NAME
more, page - Displays a file one screenful at a time
SYNOPSIS
more [-cdflpsuvzw] [-number] [+line_number | +g | +/pattern]
file ...
page [-cdflpsuvzw] [-number] [+line_number | +g | +/pattern]
file ...
The more command invokes a filter that allows examination of
continuous text, one screenful at a time, on a soft-copy
terminal. The page command is equivalent to more, but
erases the screen before displaying each screenful.
FLAGS
-c Starts each screenful at the top of the screen and
erases existing output on each line before displaying a
new line. This avoids scrolling the screen, making it
easier to read while more is writing. It is also faster
than scrolling on many terminals. This flag is ignored
if the terminal does not have the ability to clear to
the end of a line.
-d Prompts you to continue, quit, or obtain help after each
screenful of text.
-f Counts logical lines rather than screen lines; that is,
long lines are not folded. This flag is recommended if
nroff output is piped through ul, or if more reads any
text that contains escape sequences. Escape sequences
contain characters that would ordinarily occupy screen
positions, but which do not print when they are sent to
the terminal as part of an escape sequences. Thus more
may think that lines are longer than they actually are,
and fold lines erroneously.
-l Does not treat <Ctrl-l> specially. If this flag is not
specified, more pauses after any line that contains
<Ctrl-l>, as if at the end of a screenful. Also, if a
file begins with a <Ctrl-l>, the screen is cleared
before the file is printed.
-p Sets no scroll mode, causing more to clear the screen
before displaying each screenful. This is equivalent to
invoking the program as page.
-s Squeezes multiple empty lines from the output, producing
only one empty line. Especially helpful when viewing
nroff output, this flag maximizes the amount of useful
information present on the screen.
-u Suppresses processing of underlined text for terminal
display. Normally, more handles underlining in a manner
appropriate to the particular terminal: if the terminal
can perform underlining or has a highlight mode, more
outputs appropriate escape sequences to enable underlin-
ing or highlight mode for underlined information in the
source file.
-w Keeps the current file open, even when it is at end-of-
file. This gives you an opportunity to page or scroll
backward through the file. Normally, when more reads an
end-of-file, it goes on to display the next file speci-
fied on the command line, or exits if there is no next
file. When more is used to read from a file that is
growing, or from a pipe, the -w flag allows you to
``poll'' periodically in order to display any new text
that has been appended to the file or pipe.
-v Does not display nonprinting characters graphically.
Without this flag, all non-ASCII and control characters
(except <Tab>, <Backspace>, and <Return>) are displayed
visibly in the form ^X for <Ctrl-x>, or M-x for non-
ASCII character x.
-z Same as if the -v flag is not given, but in addition,
<Backspace> is displayed as ^H, <Return> as ^M, and
<Tab> as ^I.
+line_number
Starts up at line_number.
+g Starts up at the last screenful in the file. Instead of
exiting (or going on to the next file) after showing the
last line of the file, more displays the -More--(EOF)
prompt, as if the -w flag were in effect. This gives
you an opportunity to scroll or page backward through
the file.
+/pattern
Starts up at the line before the line containing the
regular expression pattern.
-number
Sets the number of lines in the display window to
number. The default is two lines less than the number
of lines displayed by the terminal; on a screen that
displays 24 lines, the default is 22.
DESCRIPTION
The more command normally pauses after each screenful,
printing --More-- at the bottom of the screen. You can then
enter a carriage-return to display one more line, or press
<Space> to display another screenful. Other possibilities
are described under SUBCOMMANDS.
The more command looks in the terminfo database to determine
terminal characteristics, and to determine the default win-
dow size. On a terminal capable of displaying 24 lines, the
default window size for both more and page is 23 lines.
The more command looks in the MORE environment variable to
preset any desired flags; for example, assume that you
prefer to view files using the -c and -w flags. The csh
command setenv MORE cw, or the ksh or sh command sequence
MORE='cw' ; export MORE would cause all invocations of more,
including invocations by programs such as man and mesg, to
use this mode. Normally, you place the command sequence
that sets up the MORE environment variable in the .kshrc,
.cshrc, or .profile file.
If more is reading from a file, rather than a pipe, then a
percentage is displayed along with the -More-- prompt. This
gives the fraction of the file (in characters, not lines)
that was displayed so far.
If the standard output is not a terminal, then more
processes like cat, except that a header is printed before
each file (if there is more than one file).
SUBCOMMANDS
The more command provides the following subcommands that you
can type when more pauses. These commands are designed to
be similar to the commands supported by the vi editor. (i
is an optional integer argument, defaulting to 1.) Regular
expressions (as referred to here) are described under grep.
i<Return>
ij
i<Ctrl-e>
All three forms display i more lines.
i<Space>
Displays i more lines, or another screenful if i is not
specified.
i<Ctrl-d>
Scrolls one-half screen forward (displays the next k/2
lines, where k is the number of lines displayed by the
<Space> command). If i is specified, then the scroll
size is set to i.
d Same as <Ctrl-d>.
i<Ctrl-u>
Scrolls one-half screen backward. If i is specified,
then the scroll size is set to i. Note that if your
line kill character is <Ctrl-u>, then you must use the u
command to scroll backward.
iu Same as <Ctrl-u>.
ik
i<Ctrl-y>
Both forms scroll back i lines.
iz Displays i more lines and sets the new window (screen-
ful) size to i.
ig Goes to line i and displays a screenful, making line i
the top line on the screen. If i is not specified, then
more displays the last screenful in the file. Instead
of exiting (or going on to the next file) after showing
the last line of the file, more displays the -More--
(EOF) prompt, as if the -w flag were in effect. This
gives you an opportunity to scroll or page backward
through the file.
is Skips i lines and prints a screenful.
if Skips i screenfuls and prints a screenful.
ib Skips back i screenfuls and prints a screenful.
i<Ctrl-b>
Same as b.
q, Q
Exits from more.
= Displays the current line number.
v Starts up the vi editor at the current line.
h Displays a description of all the more subcommands.
i/expression
Searches for the ith occurrence of the regular expres-
sion expression. If there are less than i occurrences
of expression, and the input is a file rather than a
pipe, then the position in the file remains unchanged.
Otherwise, a screenful is displayed, starting with the
line matching expression. You can use Erase and Kill
characters to edit the regular expression, which must be
terminated by pressing <Return> (with no trailing /
character). Erasing back past the first column cancels
the search command. If expression is null, more uses
the last regular expression entered.
i?expression
Same as /, but searches backward in the file.
in Searches for the ith occurrence of the last regular
expression entered.
iN Searches for the ith occurrence of the last regular
expression entered, but reverses the direction of that
search.
' (single quote)
Returns to the point from which the last search started.
If no search was performed in the current file, returns
to the beginning of the file.
!command or :!command
Invokes a shell with command. The % (percent sign) and
! (exclamation point) characters in command are replaced
with the current filename and the previous shell com-
mand, respectively. If there is no current filename, %
is not expanded. The sequences \% and \! are replaced
by % and !, respectively.
i:n Skips to the ith next file specified in the command
line.
i:p Skips to the ith previous file given in the command
line. If this command is given during display of a
file, more returns to the beginning of the file. If
more is not reading from a file, the bell is rung and
nothing else happens.
:f Displays the current filename and line number.
:v Displays the version number of the more command.
:q, :Q
Exits from more (same as q or Q).
. Repeats the previous command.
<Ctrl-l>
Redraws the screen.
The commands take effect immediately; it is not necessary to
type a carriage-return. Up to the time when the command
character itself is given, you can enter the line Kill char-
acter to cancel the numerical argument being formed. In
addition, you can enter the Erase character to redisplay the
-More--(xx%) message.
At any time when output is being sent to the terminal, you
can press q. The more command stops sending output, and
displays the usual -More-- prompt. You can then enter one
of the preceding commands in the normal manner. Some output
is lost when this is done, due to the fact that any charac-
ters waiting in the terminal's output queue are flushed when
the QUIT signal occurs.
The terminal is set to noecho mode by this program so that
the output can be continuous. Thus, subcommands you enter
do not show on your terminal, except for the / (slash), ?
(question mark), and ! (exclamation point) commands.
EXAMPLES
The following is a sample use of more in previewing nroff
output:
nroff -ms +2 doc.n | more -s
FILES
/usr/share/lib/terminfo/?/*
Terminal information database.
RELATED INFORMATION
Commands: cat(1), csh(1), grep(1)/egrep(1)/fgrep(1),
ksh(1), man(1), pg(1), script(1), sh(1).
Files: terminfo(4).
Acknowledgement and Disclaimer