tech at work


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-*
Filed under: Linux Leave comment
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.