stichl.at tech at work

3Jul/130

Detect version of linux kernel file

Today I needed to detect the kernel versions of various files in our netboot environment, but there was no tool to do it and Google wasn't much help with this issue.

So here is the command I used:

grep -oae "[0-9]\+\.[0-9]\+\.[0-9]\+" ./kernelfile

Operating on more files looks like this:

grep -oae "[0-9]\+\.[0-9]\+\.[0-9]\+" ./vmlinuz-*
./vmlinuz-20100927:2.6.35
./vmlinuz-20110117:2.6.37
./vmlinuz-20110819:3.0.3
./vmlinuz-20120119:3.2.1
./vmlinuz-20120728:3.5.2
./vmlinuz-20130207:3.6.11
./vmlinuz-3.2.1:3.2.1
./vmlinuz-3.6.11:3.6.11
Filed under: Linux Leave comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.