MORE(1)

NAME
more, page - view files

SYNOPSIS
more [-cdflpsu] [-num] [+linenumber] [+/pattern] [file ...]
page [-cdflpsu] [-num] [+linenumber] [+/pattern] [file ...]

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. Other possibilities are enumerated later.

The options are as follows:

-c  more will draw each page by beginning at the top of the screen and erasing each line just before it draws on it. This avoids scrolling the screen, making it easier to read while more is writing. This option will be ignored if the terminal does not have the ability to clear to the end of a line.

-d  more will prompt the user with the message "[Press space to continue, 'q' to quit.]" at the end of each screenful, and will display "[Press 'h' for instructions.]" instead of ringing the bell when an illegal key is pressed. This is useful if more is being used as a filter in some setting, such as a class, where many users may be unsophisticated.

-f  Causes more to count logical, rather than screen lines (i.e., long lines are not folded). This option is recommended if mandoc(1) output is being piped through ul(1), since the latter may generate escape sequences. These escape sequences contain characters which would ordinarily occupy screen positions, 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 this option is not given, more will pause 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 will be cleared before the file is printed.

-p  A deprecated alias for the -c option.

-s  Squeeze multiple blank lines from the output, producing only one blank line. This maximizes the useful information present on the screen.

-u  Suppress underlining. Normally, more will handle underlining such as produced by mandoc(1) in a manner appropriate to the particular terminal: if the terminal can perform underlining or has a stand-out mode, more will output appropriate escape sequences to enable underlining or stand-out mode for underlined information in the source file.

-num
    An integer specifying the size (in lines) of the window which more will use instead of the default. On a terminal capable of displaying 24 lines, the default window size is 23 lines.

+linenumber
    Start at the specified linenumber.

+/pattern
    Start two lines before the line matching the regular expression pattern.

If the program is invoked as page, then the screen is cleared before each screenful is printed (but only if a full screenful is being printed).

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.

  Command Sequences
Command sequences (similar to vi(1)) may be typed when more pauses. In the following list, i is an optional integer argument, defaulting to 1. In the following descriptions, ^X means control-X.

i<space>
    Display i more lines, (or another screenful if no argument is given).

^D  Display 11 more lines (a “scroll”). If i is given, then the scroll size is set to i.

d   Same as ^D (control-D).

iz  Same as typing a space except that i, if present, becomes the new window size.

is  Skip i lines and print a screenful of lines.

if  Skip i screenfuls and print a screenful of lines.

ib  Skip back i screenfuls and print a screenful of lines.

i^B Same as ‘b’.

q   Exit from more.

Q   Same as ‘q’.

=   Display the current line number.

v   Start up the editor at the current line.

h   Help command; give a description of all the more commands.

i/ expr
    Search 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.

in  Search 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:n Skip to the i-th next file given in the command line (skips to last file if n doesn't make sense).

i:p Skip 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.

:f  Display the current file name and line number.

:q or :Q
    Exit from more (same as q or Q).

. (dot)
    Repeat the previous command.

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 the line kill character to cancel the numerical argument being formed. In addition, the user may hit the erase character to redisplay the --More--(xx%) message.

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(1), except that a header is printed before each file (if there is more than one).

ENVIRONMENT

EDITOR
    Editor to be used by the v command.

MORE
    A space-separated list of flags to pre-set when running more. Note that flags on the command line override those found in MORE.

SHELL
    Shell to be used when running commands. If this variable is not set, /bin/sh is used.

TERM
    The user's terminal type.

VISUAL
    Editor used in preference to that specified by EDITOR.

FILES
/usr/share/misc/termcap
    Terminal data base
/usr/bin/vi
    Default editor

EXAMPLES
A sample usage of more in previewing mandoc(1) output would be:

    mandoc doc.1 | more

SEE ALSO
cat(1), mandoc(1), sh(1), ul(1), vi(1), environ(7)

HISTORY
The more command appeared in 3.0BSD.

BUGS
Skipping backwards is too slow on large files.