MORE(1) — Unix Programmer’s Manual
NAME
more − file perusal filter for crt viewing
SYNOPSIS
more [ −d ] [ −n ] [ +linenumber | +/pattern ] [ name ... ]
DESCRIPTION
More is a filter which allows examination of a continuous text one screenful at a time on a soft-copy terminal. It normally pauses after each screenful, printing --More-- at the bottom of the screen. If the user then types a carriage return, one more line is displayed. If the user hits a space, another screenful is displayed. If a space is preceded by an integer, that number of lines are printed. If the user hits d or control-D, 11 more lines are displayed (a ‘scroll’). More looks in the file /etc/termcap to determine terminal characteristics, and to determine the default window size. On a terminal capable of displaying 24 lines, the default window size is 22 lines.
Other sequences which may be typed when more pauses, and their effects, are as follows (i is an optional integer argument, defaulting to 1) :
izsame as typing a space except that i, if present, becomes the new window size.
isskip i lines and print a screenful of lines
ifskip i screenfuls and print a screenful of lines
inskip to the i-th next file given in the command line (skips to last file if n doesn’t make sense)
ipskip to the i-th previous file given in the command line. If this command is given in the middle of printing out a file, then more goes back to the beginning of the file. If i doesn’t make sense, more skips back to the first file. If more is not reading from a file, the bell is rung and nothing else happens.
q
Exit from more.
i/exprsearch for the i-th occurrence of the regular expression expr. If there are less than i occurrences of expr, and the input is a file (rather than a pipe), then the position in the file remains unchanged. Otherwise, a screenful is displayed, starting two lines before the place where the expression was found. The user’s erase and kill characters may be used to edit the regular expression. Erasing back past the first column cancels the search command.
!command
invoke a shell with command.
The commands take effect immediately, i.e., it is not necessary to type a carriage return. Up to the time when the command character itself is given, the user may hit his or her line kill character to cancel the numerical argument being formed.
At any time when output is being sent to the terminal, the user can hit the quit key (normally control−\). More will stop sending output, and will display the usual --More-- prompt. The user may then enter one of the above commands in the normal manner. Unfortunately, some output is lost when this is done, due to the fact that any characters 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. What you type will thus not show on your terminal, except for the / and ! commands.
If the standard output is not a teletype, then more acts just like cat, except that a header is printed before each file (if there is more than one).
The −n option is an integer which is the size (in lines) of the window which more will use instead of the default. The −d option causes more to prompt the user with the message "Hit space to continue, Rubout to abort" at the end of each screenful. This is useful if more is being used as a filter in some setting, such as a class, where many users may be unsophisticated. The +linenumber option causes more to start up at linenumber, while the +/pattern option causes more to start up two lines before the line containing the regular expression pattern.
A sample usage of more in previewing nroff output would be
nroff −ms +2 doc.n | more
AUTHOR
Eric Shienbrood
FILES
/etc/termcapTerminal data base
SEE ALSO
BUGS
The function of more should be done optionally by the teletype driver in the system, akin to the “more” feature of the ITS systems at MIT.
3rd Berkeley Distribution — 11/16/79