Name
less
Synopsis
less [options] [filename]
less is a program for paging through files or
other output. It was written in reaction to the perceived
primitiveness of more (hence its name). A number
may precede some commands.
Options
-
-[z]num Set number of lines to scroll to
num. Default is one screenful. A negativenumsets the number tonumlines less than the current number.-
+[+]command Run
commandon startup. Ifcommandis a number, jump to that line. The option++applies this command to each file in the command-line list.-
-? Print help screen. Ignore all other options; don’t page through file.
-
-a,--skip-search-screen When searching, begin after last line displayed. (Default is to search from second line displayed.)
-
-b,--buffers=n Use
nbuffers for each file (default is 10). Buffers are 1 KB in size.-
-B,--auto-buffers Don’t automatically allocate buffers for data read from a pipe. If
-bspecifies a number of buffers, allocate that many. If necessary, allow information from previous screens to be lost.-
-c,--clear-screen Redraw screen from top, instead of scrolling from the bottom.
-
-C,--CLEAR-SCREEN Same as
-c, but clear the screen before redrawing.-
-d,--dumb Suppress dumb-terminal error messages.
-
-e,--quit-at-eof Automatically exit after reaching EOF twice.
-
-E,--QUIT-AT-EOF Automatically exit after reaching EOF once.
-
-f,--force Force opening of directories and devices; don’t print warning when opening binaries.
-
-F,--quit-if-one-screen Automatically exit if the file fits ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access