Display files on a page-by-page basis (POSIX)


more [-ceisu] [-n number] [-p pattern] 
     [-/ pattern] [-t tag] [-x tabstop] [file...]

Runs on:



-/ pattern
Same as -p pattern.
For each full screen of text that's displayed, clear the screen from the first line and display the next full screen of text.
Stop after displaying the last line in the file. If the next command that displays text causes more to reach end-of-file again, more exits. If the file is shorter than a single screen, more exits at end-of-file regardless.
Ignore case during searches. Uppercase and lowercase letters are considered identical.
-n number
Specify the number of lines that constitute a full screen of text. The number argument is a positive decimal integer. The -n option overrides any values obtained from the environment.
-p pattern
Search for a line that matches pattern. The current position is set to the first matched line. If no match is found, the first line in the file is the current position.
Replace consecutive empty lines with a single empty line.
-t tag
Display the file containing the tag named by the tag argument. Note that for this to work, the file tags must reside in the current directory.
Always display backspaces as control characters (e.g. as the two-character sequence ^H) and leave carriage-return/linefeed (\r\n) sequences alone.

By default, more makes special use of backspaces and carriage-return/linefeed (\r\n) sequences. If a backspace appears next to an underscore character, the character is displayed as underlined text, provided the terminal type supports underlined text. If a backspace appears between two identical characters, the first character is displayed as bold text, provided the terminal type supports bold text display.

-x tabstop
Set tabs at the positions specified by tabstop. The default is four spaces, unless the POSIX_STRICT environment variable is defined, in which case it's eight spaces.
A pathname of an input file. If no file operands are specified, more uses the standard input. If a file operand is the dash character (-), the standard input is read at that point of the sequence.


The more utility lets you view text files one screenfull at a time. The utility determines the number of lines that make a full screen by looking in the terminal database. However, you can use the LINES environment variable to override the value found in the database, and the -n option to override the LINES variable.

If the standard output isn't a terminal device, the number of lines that make up a full screen of text is considered to be infinite. In a pipeline, all input files are copied to the standard output in their entirety. On terminals, more displays text one screen at a time.

The more command can be very useful when another utility prints more information to the standard output than can be displayed on a single screen. By piping the output to more, you can scroll through the displayed output at leisure. For example:

ls | more

pipes the output from the ls command to more, allowing you to scroll through the output.

Note: The more command is a link to less, which behaves according to the command name it was invoked as.

Environment variables:

The editor to use.
A decimal integer value to be used as the number of lines in a screenfull.
A string containing options described in the Options section of this utility, preceded by hyphens and separated by blank characters as on the command line. Command-line options override those specified in the MORE variable. The MORE variable takes precedence over the TERM and LINES variables.
The name of the terminal type.
Interpret options according to POSIX specifications.

Exit status:

Successful completion.
An error occurred.

Contributing author:

Mark Nudelman

See also:

cat, clear, ctags, head, less, tail