The more(1) utility is a filter for paging through text,
one screenful at a time. It uses termcap(1) so it can run on
a variety of terminals. There is even limited support for hardcopy
terminals. (On a hardcopy terminal, lines that should be printed at
the top of the screen are prefixed with an up-arrow.) If
file is a single hyphen (-), more(1) reads
standard input (though it will not take input from a terminal).
Command-line options are described in the following list.
Options are also taken from the environment variable MORE,
but command-line options will override options taken from
MORE. Be sure to precede options with a dash (-) in
the MORE variable.
-c
Normally, more(1) will repaint the screen by scrolling
from the bottom of the screen. If the -c option is set, when
more(1) needs to change the entire display, it will paint
from the top line down.
-e
When standard output is a terminal, more(1) normally
prompts the user, indicating end-of-file, when it reaches the end
of the last argument, and waits. When -e is specified,
more(1) exits as soon as it writes the last line of the last
file.
-i
The -i option causes searches to ignore case; that is,
uppercase and lowercase are considered identical.
-nnumber
Display number lines per screenful. This overrides any
value taken from the environment.
-pcommand
For each file, execute the more(1) command given
as command when first displaying the file.
-Pstr
Set the paging prompt to str followed by the position in
the file expressed as a percentage.
-s
The -s option causes consecutive blank lines to be
squeezed into a single blank line.
-t
The -t option, followed immediately by a tag, will edit
the file containing that tag. For more information, see the
ctags(1) command.
-u
By default, more(1) treats backspaces and CR-LF
sequences specially. Backspaces that appear adjacent to an
underscore character are displayed as underlined text. Backspaces
that appear between two identical characters are displayed as bold
text. CR-LF sequences are compressed to a single line-feed
character. The -u option causes backspaces to always be
displayed as control characters; that is, as the two-character
sequence "^H", and CR-LF to be left alone.
-xN
The -x option sets tab stops every N positions.
The default for N is eight.
-/pattern
The -/ option specifies a string that will be searched
for before each file is displayed.
Interactive commands for more(1) are based on
vi(1). Some commands can be preceded by a decimal number,
called N in the descriptions below. In the following
descriptions, ^X means CTRL+X.
h
Help: display a summary of these commands. This can be a very
useful command.
<SPACE>, f, or ^F
Scroll forward N lines, default is one window. If
N is more than the screen size, only the final screenful is
displayed.
b or ^B
Scroll backward N lines, default is one window (see
option -z below). If N is more than the screen size,
only the final screenful is displayed.
j or <RETURN>
Scroll forward N lines, default is 1. The entire
N lines are displayed, even if N is more than the
screen size.
k
Scroll backward N lines, default is 1. The entire
N lines are displayed, even if N is more than the
screen size.
d or ^D
Scroll forward N lines, default is one half of the
screen size. If N is specified, it becomes the new default
for subsequent d and u commands.
u or ^U
Scroll backward N lines, default is one half of the
screen size. If N is specified, it becomes the new default
for subsequent d and u commands.
g
Go to line N in the file, default is 1 (beginning of
file).
G
Go to line N in the file, default is the end of the
file.
p or %
Go to a position N percent into the file. The percent
N should be between 0 and 100. (This works if standard input
is being read, but only if more(1) has already read to the
end of the file. It is always fast, but not always useful.)
r or ^L
Repaint the screen.
R
Repaint the screen, discarding any buffered input. Useful if
the file is changing while it is being viewed.
mc
Followed by any lowercase letter, c, marks the current
position with that letter.
'c
(Single quote.) Followed by any lowercase letter, returns to
the position that was previously marked with that letter. Followed
by another single quote, returns to the position at which the last
"large" movement command was executed, or the beginning of the file
if no such movements have occurred. All marks are lost when a new
file is examined.
/pattern
Search forward in the file for the instance of the line,
specified by N, containing the pattern. N defaults to
1. The pattern is a regular expression, as recognized by
ed(1). The search starts at the second line displayed.
?pattern
Search backward in the file for the instance of the line,
specified by N, containing the pattern. The search starts at
the line immediately before the top line displayed.
/!pattern
Like /, but the search is for the instance of the line,
indicated by N, that does not contain the
pattern.
?!pattern
Like ?, but the search is for the instance of the line,
specified by N, that does not contain the
pattern.
n
Repeat previous search, for the instance of the line, indicated
by N, containing the last pattern (or not containing
the last pattern, if the previous search was /! or
?!).
E[filename]
Examine a new file. If the file name is missing, the "current"
file (see the N and P commands below), from the list
of files in the command line, is re-examined. If the file name is a
pound sign (#), the previously examined file is
re-examined.
N or :n
Examine the next file (from the list of files given in the
command line). If a number N is specified (not to be
confused with the command N), the next instance of the file,
specified by N, is examined.
P or :p
Examine the previous file. If a number N is specified,
the previous instance of the file, specified by N, is
examined.
:ttag
Go to supplied tag.
v
Invokes an editor to edit the current file being viewed. The
editor is taken from the environment variable EDITOR, or
defaults to vi(1).
= or ^G
These options print out the number of the file currently being
displayed relative to: the total number of files there are to
display, the current line number, the current byte number and the
total bytes to display, and what percentage of the file has been
displayed. If more(1) is reading from stdin, or the file is
shorter than a single screen, some of these items might not be
available. Note that all of these items reference the first byte of
the last line displayed on the screen.