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). Some
commands may be preceded by a number.
Options
-
-[z]num Set number of lines to scroll to num. Default is one screenful. A negative num sets the number to num lines less than the current number.
-
+[+]command Run command on startup. If command is 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; do not page through file.
-
-a When searching, begin after last line displayed. (Default is to search from second line displayed.)
-
-bbuffers Use buffers buffers for each file (default is 10). Buffers are 1 kilobyte in size.
-
-c Redraw screen from top, not bottom.
-
-d Suppress dumb-terminal error messages.
-
-e Automatically exit after reaching EOF twice.
-
-f Force opening of directories and devices; do not print warning when opening binaries.
-
-g Highlight only string found by past search command, not all matching strings.
-
-hnum Never scroll backward more than num lines at once.
-
-i Make searches case-insensitive, unless the search string contains uppercase letters.
-
-jnum Position target line on line num of screen. Target line can be the result of a search or a jump. Count lines beginning from 1 (top line). A negative num is counted back from bottom of screen.
-
-kfile Read file to define special key ...
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