more(1) —
NAME
more − view a file one full screen at a time
SYNOPSIS
more [ −cdflsurw ] [ −n ] [ +linenumber ] [ +/pattern ]
[ name ... ]
DESCRIPTION
The more filter allows examination of continuous text one full screen at a time. It normally pauses after each full screen, printing
“--More--” at the bottom of the screen. If the user then presses the RETURN key, one more line is displayed. If the user presses the SPACEBAR, another full screen is displayed. Other possibilities are described below.
The command line options include the following:
−n An integer which is the size (in lines) of the window which more will use instead of the default.
−c More draws each page by beginning at the top of the screen and erasing each line just before it displays a new line. This avoids scrolling the screen, making it easier to read 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 More prompts with the message “Hit space to continue, Del to abort" at the end of each full screen. This is useful if more is being used as a filter in some setting, such as a class, where many users may be inexperienced.
−f This option causes more to count logical lines, 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 that would ordinarily occupy screen positions, but that 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 Does not treat CTRL-L (FORMFEED) specially. If this option is not given, more pauses after any line that contains a CTRL-L, as if the end of a full screen had been reached. Also, if a file begins with a FORMFEED, the screen is cleared before the file is printed.
−s Squeezes multiple blank lines from the output, producing only one blank line. Especially helpful when viewing nroff output, this option maximizes the useful information present on the screen.
−u Normally, more handles underlining, such as that 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.
−r Normally, more ignores control characters that it does not interpret in some way. The −r option causes these to be displayed as ^C, where “C” stands for any such control character.
−w Normally, more exits when it comes to the end of its input. With −w, however, more prompts and waits for any key to be struck before exiting.
+linenumber Starts up at linenumber.
+/pattern Starts up two lines before the line containing the regular expression pattern.
More looks in the terminfo entry for the terminal characteristics and the default window size. For example, on a terminal capable of displaying 24 lines, the default window size is 22 lines.
More looks in the environment variable, MORE, to preset any flags desired. For example, if you prefer to view files using the −c mode of operation, the shell command, “MORE=−c”, in the .profile file causes all invocations of more to use this mode.
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 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> Displays i more lines, (or another full screen if no argument is given).
CTRL-D Displays 11 more lines (a “scroll”). If i is given, then the scroll size is set to i.
d Same as CTRL-D.
iz Same as typing a space except that i, if present, becomes the new window size.
is Skips i lines and prints a full screen of lines.
if Skips i full screens and prints a full screen of lines.
q or Q Exits from more.
= Displays the current line number.
v Starts up the screen editor vi at the current line. (Note that vi may not be available with your system.)
h or ? Help command; gives a description of all the more commands.
i/expr Searches for the ith 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 full screen is displayed, starting two lines before the place where the expression was found. You can use the ERASE and KILL characters to edit the regular expression. Erasing back past the first column cancels the search command.
in Searches for the ith occurrence of the last regular expression entered.
’ (Single quotation mark) Goes 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 Invokes a shell with command. The % and ! characters in command are replaced with the current filename and the previous shell command 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 given in the command line (skips to last file if n doesn’t make sense).
i:p Skips to the ith 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 rings and nothing else happens.
:f Displays the current filename and line number.
:q or :Q Exits from more (same as q or Q).
. Repeats the previous command.
The commands take effect immediately, i.e., you do not need to press the RETURN key. Up to the time when the command character itself is given, you can press the KILL character to cancel the numerical argument being formed. In addition, you can press the ERASE character to redisplay the “--More--(xx%)” message.
The terminal is set to noecho mode by this program so that the output can be continuous. This means that what you type does not show on your terminal, except for the slash (/) and exclamation (!) commands.
If the standard output is not a teletype, more acts just like cat, except that a header is printed before each file (if there is more than one file).
A sample usage of more in previewing nroff output would be:
nroff −ms +2 doc.n | more -s
FILES
/usr/lib/terminfo/?/*terminal information database
/usr/lib/more.helphelp file
SEE ALSO
NOTES
The vi and help options may not be available.
Before displaying a file, more attempts to detect whether the file is an unprintable binary file such as a directory or an executable binary image. If more concludes that a file is unprintable, more refuses to print it. However, more cannot detect all possible kinds of unprintable files.
This utility was developed at the University of California at Berkeley and is used with permission.
ADDED VALUE
This entry, supplied by SunSoft, Inc., contains enhancements to UNIX System V.
\*U — Version 1.0