man-pages/man1/linux-version.1.html
2021-03-31 01:06:50 +01:00

93 lines
2.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of LINUX-VERSION</TITLE>
</HEAD><BODY>
<H1>LINUX-VERSION</H1>
Section: User Commands (1)<BR>Updated: 30 March 2011<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
linux-version - operate on Linux kernel version strings
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<DL COMPACT>
<DT id="1">
<B>linux-version&nbsp;compare</B><I>&nbsp;VERSION1&nbsp;OP&nbsp;VERSION2</I>
<DT id="2">
<B>linux-version&nbsp;sort</B>&nbsp;[<B>--reverse</B>]
[<I>VERSION1&nbsp;VERSION2</I>&nbsp;...]
<DT id="3">
<B>linux-version&nbsp;list</B>&nbsp;[<B>--paths</B>]
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>linux-version</B> operates on Linux kernel version strings as
<DD>reported by <B>uname -r</B> 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.
<DL COMPACT>
<DT id="4"><B>compare</B><I>&nbsp;VERSION1&nbsp;OP&nbsp;VERSION2</I>
<DD>
Compare version strings, where <I>OP</I> is a binary
operator. <B>linux-version</B> returns success (zero result) if the
specified condition is satisfied, and failure (nonzero result)
otherwise. The valid operators are: <B>lt le eq ne ge gt</B>
<DT id="5"><B>sort</B> [<B>--reverse</B>] [<I>VERSION1 VERSION2</I> ...]<DD>
Sort the given version strings and print them in order from lowest to
highest. If the <B>--reverse</B> option is used, print them in order
from highest to lowest.
<DL COMPACT><DT id="6"><DD>
<P>
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:
<P>
linux-version list --paths | linux-version sort --reverse
<P>
will list the installed versions and corresponding paths in order
from highest to lowest version.
</DL>
<DT id="7"><B>list</B> [<B>--paths</B>]<DD>
List kernel versions installed in the customary location. If the
<B>--paths</B> option, show the corresponding path for each version.
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>AUTHOR</H2>
<B>linux-version</B> and this manual page were written by Ben
Hutchings as part of the Debian <B>linux-base</B> package.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
<DT id="9"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="10"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="11"><A HREF="#lbAE">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:18 GMT, March 31, 2021
</BODY>
</HTML>