O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) and allows backward as well as forward paging. Some commands may be preceded by a number.

Options

-[z]num, --window=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.

-?, --help

Print help screen.

-a, --search-skip-screen

When searching, begin after last line currently displayed. (Default is to search from second line displayed.)

-bbuff, --buffers=buff

Specify the amount of buffer space to use for each file in 1 KB units. (Default is to use 64 KB per file.)

-B, --auto-buffers

Do not automatically allocate buffer space to hold all data read from a pipe. If -b is specified, allocate that amount of space, or default to 64 KB. If necessary, allow information from previous screens to be lost.

-c, --clear-screen

Redraw screen from top, not bottom.

-f, --force

Force opening of directories and devices; do not print warning when opening binaries.

-F, --quit-if-one-screen

Exit without displaying anything if first file can fit on a single screen.

-g, --hilite-search

Highlight only string found by past search command, not all matching strings.

-G, --HILITE-SEARCH

Never highlight matching search ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required