f SPACE ^V ^F forward a window (see -z ).
If n is more than the screen size, only the final screenful is displayed.
| z forward with n is specified, it becomes the new window size.
| ␛-SPACE forward screen
| RETURN ^N e ^E j ^J
next line
d ^D down half screen .
With n scroll down n lines, and n becomes the default for d and u .
| F Scroll forward, and continue displaying as lines are added to the file by another process,
(similar to tail -f file .)
| b ^B ␛-v back a window
| w Like ␛-v, but if n is specified, it becomes the new window size.
| y ^Y ^P k ^K
Scroll back n lines, default 1. The entire N lines are displayed, even if N is more than the screen size.
Warning: some systems use ^Y as a special job control character.
| u ^U up half a screen.
With n ,n becomes the new default for d and u .
| ␛-) RIGHTARROW
right half a screen (see the -# option).
With n , n becomes the default for RIGHTARROW and LEFTARROW .
While the text is scrolled, it acts as though the -S option (chop lines) were in effect.
| ␛-( LEFTARROW
Scroll horizontally left n characters, default half the screen width (see the -# option). If a number N is
specified, it becomes the default for future RIGHTARROW and LEFTARROW commands.
| r ^R ^L
Repaint the screen.
| R Repaint the screen, discarding any buffered input. Useful if the file is changing while it is being viewed.
| g < ␛-<
Go to line n in the file, default 1 (beginning of file). (Warning: this may be slow if N is large.)
| G > ␛->
Go to line n in the file, default the end of the file. (Warning: this may be slow if N is large, if N is not
specified and standard input, rather than a file, is being read.)
| p % Go to a position n percent into the file. N should be between 0 and 100, and may contain a decimal point.
| P Go to the line containing byte offset n in the file.
| { If a left curly bracket appears in the top line displayed on the screen, the { command will go to the matching
right curly bracket. The matching right curly bracket is positioned on the bottom line of the screen. If there
is more than one left curly bracket on the top line, a number n may be used to specify the N-th bracket on the
line.
| } If a right curly bracket appears in the bottom line displayed on the screen, the } command will go to the matching left curly bracket. The matching left curly bracket is positioned on the top line of the screen. If there
is more than one right curly bracket on the top line, a number n may be used to specify the N-th bracket on the
line.
| ( Like {, but applies to parentheses rather than curly brackets.
| ) Like }, but applies to parentheses rather than curly brackets.
| [ Like {, but applies to square brackets rather than curly brackets.
| ] Like }, but applies to square brackets rather than curly brackets.
| ␛-^Fxy acts like {, but uses the two characters as open and close brackets, respectively.
For example, "␛ ^F < > could be used to go forward to the > which matches the < in the top displayed line.
| ␛-^B xylike }, but uses the two characters as open and close brackets, respectively.
For example, ␛ ^B < > could be used to go backward to the < which matches the > in the bottom displayed
line.
| mp marks the current position with that letter.
| 'p
apostrphe
^X^Xp returns to the position which was previously marked .
Followed by another apostrphe, returns to the position at which the last "large" movement command
was executed.
Followed by a ^ jumps to the beginning ; $ end of the file .
Marks are preserved when a new file is examined, so the ' command can be used to switch between input files.
| /pattern
Search forward in the file for the N-th line containing the pattern. n defaults to 1. The pattern is a regular
expression, as recognized by the regular expression library supplied by your system. The search starts at the
second line displayed (but see the -a and -j options, which change this).
Certain characters are special if entered at the beginning of the pattern; they modify the type of search rather
than become part of the pattern:
| ^N ! Search for lines which do NOT match the pattern.
| ^E *
Search multiple files. That is, if the search reaches the END of the current file without finding a
match, the search continues in the next file in the command line list.
| ^F @ Begin the search at the first line of the FIRST file in the command line list, regardless of what is currently displayed on the screen the settings of the -a -j options.
| ^K Highlight any text which matches the pattern on the current screen, but don't move to the first match
(KEEP current position).
| ^R Don't interpret regular expression metacharacters; that is, do a simple textual comparison.
| ?pattern
Search backward in the file for the N-th line containing the pattern. The search starts at the line immediately
before the top line displayed.
Certain characters are special as in the / command:
^N ! Search for lines which do NOT match the pattern.
^E * Search multiple files. That is, if the search reaches the beginning of the current file without finding
a match, the search continues in the previous file in the command line list.
^F @ the search at the last line of the last file in the command line list, regardless of what is currently displayed on the screen the settings of the -a -j options.
^K As in forward searches.
^R As in forward searches.
| | | | | |
| ␛-/pattern Same as /*.
␛-?pattern Same as ?*
n Repeat search, for N-th line containing the last pattern. If the previous search was modified by ^N,
the search is made for the N-th line NOT containing the pattern. If the previous search was modified by ^E, the
search continues in the next (or previous) file if not satisfied in the current file. If the previous search
was modified by ^R, the search is done without using regular expressions. There is no effect if the previous
search was modified by ^F ^K.
| N Repeat previous search, but in the reverse direction.
| ␛-n Repeat previous search, but crossing file boundaries. The effect is as if the previous search were modified by
*.
| ␛-N Repeat previous search, but in the reverse direction and crossing file boundaries.
| ␛-u Undo search highlighting. Turn off highlighting of strings matching the current search pattern. If highlighting is already off because of a previous ␛-u command, turn highlighting back on. Any search command will also
turn highlighting back on. (Highlighting can also be disabled by toggling the -G option; in that case search
commands do not turn highlighting back on.)
| :e [filename]
Examine a new file. If the filename is missing, the "current" file (see the :n and :p commands below) from the
list of files in the command line is re-examined. A percent sign (%) in the filename is replaced by the name of
the current file. A pound sign (#) is replaced by the name of the previously examined file. However, two consecutive percent signs are simply replaced with a single percent sign. This allows you to enter a filename that
contains a percent sign in the name. Similarly, two consecutive pound signs are replaced with a single pound
sign. The filename is inserted into the command line list of files so that it can be seen by subsequent :n and
:p commands. If the filename consists of several files, they are all inserted into the list of files and the
first one is examined. If the filename contains one more spaces, the entire filename should be enclosed in
double quotes (also see the -" option).
| ^X^V E
Same as :e. Warning: some systems use ^V as a special literalization character. On such systems, you may not
be able to use ^V.
| :n Examine the next file (from the list of files given in the command line). If a number n is specified, the N-th
next file is examined.
| :p Examine the previous file in the command line list. If a number n is specified, the N-th previous file is examined.
| :x Examine the first file in the command line list. If a number n is specified, the N-th file in the list is examined.
| :d Remove the current file from the list of files.
| t Go to the next tag, if there were more than one matches for the current tag. See the -t option for more details about tags.
| T Go to the previous tag, if there were more than one matches for the current tag.
| = ^G :f
Display filename, line number and byte offset of the last line displayed,
the length of the file, the number of lines in the
file and the percent of the file above the last displayed line.
For example: less.1.html lines 1-35/1060 byte 1587/65878 2% (press RETURN)
| -C Followed by one of the command line option letters (see OPTIONS below), this will change the setting of that
option and print a message describing the new setting. If a ^P (CONTROL-P) is entered immediately after the
dash, the setting of the option is changed but no message is printed. If the option letter has a numeric value
(such as -b -h), a string value (such as -P -t), a new value may be entered after the option letter.
If no new value is entered, a message describing the current setting is printed and nothing is changed.
| -- Like the - command, but takes a long option name (see OPTIONS below) rather than a single option letter. You
must press RETURN after typing the option name. A ^P immediately after the second dash suppresses printing of a
message describing the new setting, as in the - command.
| -+ Followed by one of the command line option letters this will reset the option to its default setting and print a
message describing the new setting. (The "-+X" command does the same thing as "-+X" on the command line.) This
does not work for string-valued options.
| --+ Like the -+ command, but takes a long option name rather than a single option letter.
| -! Followed by one of the command line option letters, this will reset the option to the "opposite" of its default
setting and print a message describing the new setting. This does not work for numeric string-valued
options.
| --! Like the -! command, but takes a long option name rather than a single option letter.
| _ (Underscore.) Followed by one of the command line option letters, this will print a message describing the current setting of that option. The setting of the option is not changed.
| __ (Double underscore.) Like the _ (underscore) command, but takes a long option name rather than a single option
letter. You must press RETURN after typing the option name.
| +cmd Causes the specified cmd to be executed each time a new file is examined. For example, +G causes less to initially display each file starting at the end rather than the beginning.
| V Prints the version number of less being run.
| q Q :q :Q ZZ
Exits less.
| The following commands may be valid, depending on your particular installation.
| v Invokes an editor to edit the current file being viewed. The editor is taken from the environment variable
VISUAL if defined, EDITOR if VISUAL is not defined, defaults to "vi" if neither VISUAL nor EDITOR is
defined. See also the discussion of LESSEDIT under the section on PROMPTS below.
| ! shell-command
Invokes a shell to run the shell-command given. A percent sign (%) in the command is replaced by the name of
the current file. A pound sign (#) is replaced by the name of the previously examined file. "!!" repeats the
last shell command. "!" with no shell command simply invokes a shell. On Unix systems, the shell is taken from
the environment variable SHELL, defaults to "sh". On MS-DOS and OS/2 systems, the shell is the normal command processor.
| | µ shell-command
µ represents any mark letter.
Pipes a section of the input to shell command , from the first line on the current screen and the position marked by the letter.
µ may be ^ or $ to indicate beginning or end of input.
If µ is . or  the current screen is piped.
| s filename Save the input to a file, only if the input is a pipe, not an ordinary file.
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |