1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
.TH LINUX-VERSION 1 "30 March 2011"
.SH NAME
linux\-version \- operate on Linux kernel version strings
.SH SYNOPSIS
.HP
.BI linux\-version\ compare \ KERNEL\-VER\-1\ OP\ KERNEL\-VER\-2
.HP
.BR linux\-version\ sort \ [ \-\-reverse ]
.RI [ KERNEL\-VER\-1\ KERNEL\-VER\-2 \ ...]
.HP
.BR linux\-version\ list \ [ \-\-paths ]
.SH DESCRIPTION
\fBlinux\-version\fR operates on Linux kernel version strings as
reported by \fBuname \-r\fR and used in file and directory names.
These version strings do not follow the same rules as Debian package
version strings and should not be compared as such or as arbitrary
strings.
.TP
.BI compare \ KERNEL\-VER\-1\ OP\ KERNEL\-VER\-2
Compare version strings, where \fIOP\fP is a binary
operator. \fBlinux\-version\fP returns success (zero result) if the
specified condition is satisfied, and failure (nonzero result)
otherwise. The valid operators are: \fBlt le eq ne ge gt\fP
.TP
\fBsort\fR [\fB\-\-reverse\fR] [\fIKERNEL\-VER\-1 KERNEL\-VER\-2\fR ...]
Sort the given version strings and print them in order from lowest to
highest. If the \fB\-\-reverse\fR option is used, print them in order
from highest to lowest.
.RS
.PP
If no version strings are given as arguments, the version strings will
instead be read from standard input, one per line. They may be
suffixed by arbitrary text after a space, which will be included in
the output. This means that, for example:
.PP
.EX
linux\-version list \-\-paths | linux\-version sort \-\-reverse
.EE
.PP
will list the installed versions and corresponding paths in order
from highest to lowest version.
.RE
.TP
\fBlist\fR [\fB\-\-paths\fR]
List kernel versions installed in the customary location. If the
\fB\-\-paths\fR option, show the corresponding path for each version.
.SH AUTHOR
\fBlinux\-version\fR and this manual page were written by Ben
Hutchings as part of the Debian \fBlinux\-base\fR package.
|