MORE(1) — USER COMMANDS
NAME
more, page − browse through a text file
SYNOPSIS
more [ −cdflsu ] [ −lines ] [ +linenumber ] [ +/pattern ] [ name ... ]
page [ −cdflsu ] [ −lines ] [ +linenumber ] [ +/pattern ] [ name ... ]
DESCRIPTION
More is a filter which displays the contents of a text file one screenful at a time on a video terminal. It normally pauses after each screenful, and prints ‘--More--’ at the bottom of the screen. More displays another line if you type a carriage-return; more displays another screenful if you type a space.
If you use the page command instead of the more command, the screen is cleared before each screenful is displayed (but only if a full screenful is being displayed), and k − 1 rather than k − 2 lines are displayed in each screenful, where k is the number of lines the terminal can display.
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.
More looks in the environment variable MORE to pre-set any flags desired. For example, if you prefer to view files using the −c mode of operation, the csh command "setenv MORE -c" or the sh command sequence "MORE=’-c’ ; export MORE" would cause all invocations of more , including invocations by programs such as man to use this mode. Normally, the user will place the command sequence which sets up the MORE environment variable in the .login or .profile file.
If more is reading from a file, rather than a pipe, a percentage is displayed along with the --More-- prompt. This gives the fraction of the file (in characters, not lines) that has been read so far.
Other sequences which may be typed when more pauses, and their effects, are as follows (i is an optional integer argument, defaulting to 1) :
i<space>
display i more lines, (or another screenful if no argument is given)
^Ddisplay 11 more lines (a “scroll”). If i is given, the scroll size is set to i.
dsame as ^D (control-D)
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
q or QExit from more.
=Display the current line number.
vStart up the editor vi at the current line.
hHelp command; give a description of all the more commands.
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), the position in the file remains unchanged. Otherwise, a screenful is displayed, starting two lines before the place where the expression was found, or the end of the pipe, whichever comes first. 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.
insearch for the i-th occurrence of the last regular expression entered.
’(single quote) Go to the point from which the last search started. If no search has been performed in the current file, this command goes back to the beginning of the file.
!command
invoke a shell with command. The characters ‘%’ and ‘!’ in "command" are replaced with the current file name and the previous shell command respectively. If there is no current file name, ‘%’ is not expanded. The sequences "\%" and "\!" are replaced by "%" and "!" respectively.
i:nskip to the i-th next file given in the command line (skips to last file if n doesn’t make sense)
i:pskip to the i-th previous file given in the command line. If this command is given in the middle of printing out a file, 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.
:fdisplay the current file name and line number.
:q or :Q
exit from more (same as q or Q).
.(dot) repeat the previous command.
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, the user may type the line kill character to cancel the numerical argument being formed. In addition, the user may type the erase character to redisplay the --More--(xx%) message.
At any time when output is being sent to the terminal, the user can type the quit key (normally control−\). More stops sending output, and displays 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.
More sets the terminal to noecho mode so that the output can be continuous. Thus what you type does not show on your terminal, except for the / and ! commands.
If the standard output is not a terminal, more acts just like cat, except that a header is printed before each file in a series.
OPTIONS
−lines Set the size of the window to lines lines long instead of the default.
−c Display each page by redrawing the screen instead of scrolling. This makes it easier to read text while more is writing. This option is ignored if the terminal does not have the ability to clear to the end of a line.
−d Display 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 users are unsophisticated.
−f Count logical rather than screen lines. That is, long lines are not folded. This option is recommended if nroff output is being piped through ul, since the latter may generate escape sequences. These escape sequences contain characters which would ordinarily occupy screen postions, but which do not print when they are sent to the terminal as part of an escape sequence. Thus more may think that lines are longer than they actually are, and fold lines erroneously.
−l Do not treat ^L (form feed) specially. If −l is not used, more pauses after any line that contains a ^L, as if the end of a screenful had been reached. Also, if a file begins with a form feed, the screen is cleared before the file is printed.
−s Squeeze multiple blank lines from the output, and replace them with single blank lines. Especially helpful when viewing nroff output, this option maximizes the useful information present on the screen.
−u Normally, more handles underlining such as produced by nroff in a manner appropriate to the particular terminal: if the terminal can perform underlining or has a stand-out mode, more outputs appropriate escape sequences to enable underlining or stand-out mode for underlined information in the source file. The −u option suppresses this processing.
+linenumber
Start up at linenumber.
+/pattern
Start up two lines before the line containing the regular expression pattern.
EXAMPLES
A sample usage of more in previewing nroff output would be
nroff −ms +2 doc.n | more -s
FILES
/etc/termcapTerminal data base
/usr/lib/more.helpHelp file
SEE ALSO
csh(1), man(1), script(1), sh(1), environ(5), termcap(5)
Sun Release 2.0 — Last change: 13 March 1984