TOOL » LINUX » PACKAGE

Less

Usage

shell
less OPTIONS FILE
OptionDescription
-SChop long lines
-XDo not clean the screen
-FQuit if one screen
-RShow colors
-NShow line numbers
-nSupress line numbers
+Automatically run commands

It is also possible to toggle any option by typing - and its character. For example, to show line numbers: -N.

Commands

CommandDescription
gGo to first line.
GGo to last line.
FFollow mode, ctrl+C to cancel.
s FILENAMESave the input to a file.
| <m><m> represents any mark letter (^ $ .). Pipes a section of the input file to the given shell command.
:nExamine the next file in the command line list.
:pExamine the previous file in the command line list.