more(1)


more, page -- browse or page through a text file

Synopsis

more [-Ncdeisuvz] [-n number] [-p command] [-t tag] [-x tabs] [-W [tite|notite] [file . . . ]

more [-Ncdeisuvz] [-n number] [+command] [-t tag] [-x tabs] [-W [tite|notite] [file . . . ]

page [-Ncdeisuvz] [-n number] [-p command] [-t tag] [-x tabs] [-W [tite|notite] [file . . . ]

Description

The more command reads files and either writes them to the terminal on a page-by-page basis or filters them to standard output.

The more command normally pauses after each screenful. If more is reading from a file rather than a pipe, the percentage of characters displayed so far is also shown.

more scrolls up to display one more line in response to a <Return> character; it displays another screenful in response to a <Space> character. Other commands are listed below.

page clears the screen before displaying the next screenful of text; it only provides a one-line overlap between screens.

more sets the terminal to noecho mode, so that the output can be continuous. Commands that you type do not normally show up on your terminal, except for the / and ! commands.

If the standard output is not a terminal, more acts just like cat(1).

Command Options

The following options are available with more:

-N
Do not show line numbers.

-c
Clear before displaying. Redrawing the screen instead of scrolling for faster displays. This option is ignored if the terminal does not have the ability to clear to the end of a line.

-d
Display error messages rather than ringing the terminal bell if an unrecognized command is used. This is helpful for inexperienced users.

-e
Exit immediately after writing the last line of the last file in the standard input.

-i
Perform pattern matching in searches without regard to case.

-n number
Specify number of lines in terminal window.

-p command
For each file in the standard input, execute the indicated more command upon opening the file. If the command is a positioning command, the command is evaluated and the current position displayed reflects the results of the command. If command fails, the current position is set to the first line in the file.

+command
Same as the -p command option.

-s
Squeeze. Replace multiple blank lines with a single blank line. This is helpful when viewing nroff(1bsd) output, on the screen.

-t tag
Write the screenful of the file containing the tag named by the tag argument. See ctags(1).

-u
Suppress generation of underlining escape sequences. Normally, more handles underlining, such as that produced by nroff(1bsd), in a manner appropriate to the terminal. If the terminal can perform underlining or has a stand-out mode, more supplies appropriate escape sequences as called for in the text file.

-v
Do not show control characters as ^char.

-W [tite|notite]
Use/do not use cursor addressing.

-x n
Set tab to be tabs characters.

-z
Show all tabs, backspaces, and control characters.

file
File(s) whose contents are to be displayed.

Environment variables

The following environment variables affect the execution of more:

COLUMNS
Specifies the screen size used by more for cursor positioning commands and scrolling.

EDITOR
Specifies the path name of the editor used by the v command.

LANG
Provide a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined.

LC_ALL
If set to a non-empty string value, override the values of all the other internationalization variables.

LC_COLLATE
Determine the locale for the behavior of range expressions and equivalence classes.

LC_CTYPE
Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- versus multi-byte characters in arguments) and the behavior of character classes.

LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

LINES
Specifies the vertical screen size used by more for cursor positioning commands and scrolling, in number of lines per screenful,

MORE
Specifies options to more; any options specified in this environment variable get executed as if the command line were:

more $MORE other_options file

That is, they get executed before any other options explicitly specified on the command line. Options specified in the MORE variable must be preceded by hyphens and with blank spaces preceding option-arguments where necessary, just as you would on the command line. Options specified in the MORE variable take precedence over the contents of the TERM and LINES environment variables.


TERM
Specifies the name of the terminal type; more uses the terminal's terminfo(4) entry to determine its display characteristics.

Commands

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 the following commands, i is an optional numerical argument (1 by default).


i<Space>
Display another screenful, or i more lines if i is specified.

i<Return>
Display another line, or i more lines, if specified.

ij
Display another line, or i more lines, if specified.

i<Ctrl>D
Display (scroll down) half a screenful. If i is given, the scroll size is set to i.

id
Same as <Ctrl>D.

iz
Same as <Space>, except that i, if present, becomes the new default number of lines per screenful.

is
Skip i lines and then print a screenful.

i<Ctrl>U
Skip back i lines and then print a screenful, with a default of half the screen size.

iu
Same as <Ctrl>U.

if
Skip i lines and then print a screenful. The default is one screen.

i<Ctrl>F
Same as if.

ik
Scroll backward i lines. The default is one line.

i<Ctrl>B
Skip back i lines and then print a screenful. The default is one screen.

ib
Same as <Ctrl>B.

ig
Go to the ith line in the file, with a default of 1 (the beginning of the file).

iG
Go to the ith line in the file, with a default of the last line in the file. If no count is specified, the screen is cleared and the last screenful of the file is displayed with the last line of the file at the bottom of the screen.

r or <Ctrl>L
Refresh the screen.

R
Refresh the screen, discarding any buffered input. If the current file is non-seekable, this is equivalent to the r command.

m[a-z)
Mark the current position with the supplied letter. Marks are usually lost when you switch to a new file.

'[a-z)
Return to the mark associated with the supplied letter, previously used with the m command, and make that line the current position.

''
Return to the line associated with the last movement command which changed the current cursor position by more than a screenful. If no such movements have been made, return to the first line of the file.

= or <Ctrl>G
Display the current line number, and filename.

v
Drop into the editor indicated by the EDITOR environment variable, at the current line of the current file. The default editor is ed(1).

h
Help. Give a description of all the more commands.

i/pattern
Search forward for the ith occurrence of the regular expression pattern. Display the screenful starting at the line that contains the ith match for the regular expression pattern, or the end of a pipe, whichever comes first. If more is displaying a file and there is no such match, its position in the file remains unchanged. Regular expressions can be edited using erase and kill characters. Erasing back past the first column cancels the search command.

i/[!]pattern
Search forward; same as last command described above, except that the exclamation character (!) indicates that the ith line that does not contain the given pattern becomes the current cursor position.

i?[!]pattern
Search backward; same as the last command described above.

in
Repeat the previous search for the ith occurrence of the last pattern entered.

iN
Search in the opposite direction of the previously performed search for the ith occurrence of the last pattern entered.

!command
Invoke a shell to execute command. The characters ``%'' and ``!'', when used within command are replaced with the current filename and the previous shell command, respectively. If there is no current filename, ``%'' is not expanded. Prepend a backslash to these characters to escape expansion.

i:a
Display the list of files.

i:n
Skip to the ith next filename given in the command line, or to the last filename in the list if i is out of range.

i:p
Skip to the ith previous filename given in the command line, or to the first filename if i is out of range. If given while more is positioned within a file, go to the beginning of the file. If more is reading from a pipe, more simply rings the terminal bell.

i:pi%
Position at i percent into the file.

:f
Display the current filename and line number.

:t tag
Go to the supplied tag and scroll or rewrite the current screen with that line as the current position. See ctags(1).

E[file]
Examine a new file.

Q, q, :q, :Q or ZZ
Exit from more.

Files


/usr/share/lib/terminfo/?/*
terminal data base

/usr/lib/more.help
help file

References

cat(1), ctags(1), pg(1), script(1), term(4), terminfo(4), environ(5)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004