COLUMNS
Sets the number of columns on the screen. Takes precedence over the number of columns specified by the TERM variable, but may be overridden by window systems which support TIOCGWINSZ.
View files
more [-ceisu]
[-n
number]
[-p
command]
[-t
tag]
[file ...]
The more pager displays text one screenful at a time. After showing each screenful, it prompts the user for a command. Most commands scroll the text or move to a different place in the file, while some switch to another file. If no file is specified, or if file is a single dash (‘-’), the standard input is used.
When showing the last line of a file, more displays a prompt indicating end of file and the name of the next file to examine, if any. It then waits for input from the user. Scrolling forward switches to the next file, or exits if there is none.
The options are as follows:
-c
When changing the display, paint from the top line down. The default is to scroll from the bottom of the screen.
-e
Exit immediately after showing the last line of the last file, without prompting the user for a command first.
-i
Ignore case. Upper case and lower case are considered identical.
-n number
Page number of lines per screenful. By default, more uses the terminal window size.
-p command
Execute the specified more commands when a file is first examined (or re-examined, such as with the :e or :p commands). Multiple commands have to be concatenated into one single argument. Search patterns may contain blank characters and can be terminated by newline characters embedded in the command argument. Any other blank and newline characters contained in the argument are interpreted as SPACE and RETURN commands, respectively.
-s
Squeeze consecutive blank lines into a single blank line.
-t tag
Examine the file containing tag. For more information, see ctags(1).
-u
Display backspaces as control characters (‘^H’) and leave CR-LF sequences alone. By default, more treats backspaces and CR-LF sequences specially: backspaces which appear adjacent to an underscore character are displayed as underlined text; backspaces which appear between two identical characters are displayed as emboldened text; and CR-LF sequences are compressed to a single linefeed character.
Interactive commands for more are based on vi(1). Some commands may be preceded by a decimal number, called N in the descriptions below. In the following descriptions, ^X means control-X.
hHelp: display a summary of these commands.
f | ^FScroll forward N lines, default one window. If N is more than the screen size, only the final screenful is displayed.
b | ^BScroll backward N lines, default one window (see the -n option). If N is more than the screen size, only the final screenful is displayed.
j | RETURNScroll forward N lines, default 1. The entire N lines are displayed, even if N is more than the screen size.
kScroll backward N lines, default 1. The entire N lines are displayed, even if N is more than the screen size.
d | ^DScroll forward N lines, default one half of the screen size. If N is specified, it becomes the new default for subsequent d and u commands.
u | ^UScroll backward N lines, default one half of the screen size. If N is specified, it becomes the new default for subsequent d and u commands.
gGo to line N in the file, default 1 (beginning of file).
Go to line N in the file, default the end of the file.
r | ^LRepaint the screen.
Repaint the screen, discarding any buffered input. Useful if the file is changing while it is being viewed.
mFollowed by any lowercase letter, marks the current position with that letter.
(Single quote.) Followed by any lowercase letter, returns to the position which was previously marked with that letter. Followed by another single quote, returns to the position at which the last "large" movement command was executed, or the beginning of the file if no such movements have occurred. All marks are lost when a new file is examined.
/patternSearch forward in the file for the N-th line containing the pattern. N defaults to 1. The pattern is a basic regular expression (BRE). See re_format(7) for more information on regular expressions. The search starts at the second line displayed.
Search backward in the file for the N-th line containing the pattern. The search starts at the line immediately before the top line displayed.
/!patternLike /, but the search is for the N-th line which does NOT contain the pattern.
Like ?, but the search is for the N-th line which does NOT contain the pattern.
nRepeat previous search, for N-th line containing the last pattern (or NOT containing the last pattern, if the previous search was /! or ?!).
Repeat previous search in the opposite direction, for N-th line containing the last pattern (or NOT containing the last pattern, if the previous search was /! or ?!).
:e [filename]Examine a new file. If the filename is missing, the "current" file (see the :n and :p commands below) from the list of files in the command line is re-examined. If the filename is a pound sign (#), the previously examined file is re-examined.
:nExamine the next file (from the list of files given in the command line). If a number N is specified (not to be confused with the command N), the N-th next file is examined.
:pExamine the previous file. If a number N is specified, the N-th previous file is examined.
:tGo to supplied tag.
vInvokes an editor to edit the current file being viewed. The editor is taken from the environment variable EDITOR, or defaults to vi(1).
These options print out the number of the file currently being displayed relative to the total number of files there are to display, the current line number, the current byte number and the total bytes to display, and what percentage of the file has been displayed. If more is reading from the standard input, or the file is shorter than a single screen, some of these items may not be available. Note, all of these items reference the first byte of the last line displayed on the screen.
q | :q | ZZExits more.
COLUMNS
Sets the number of columns on the screen. Takes precedence over the number of columns specified by the TERM variable, but may be overridden by window systems which support TIOCGWINSZ.
EDITOR
Specifies the default editor. If not set, vi(1) is used.
LINES
Sets the number of lines on the screen. Takes precedence over the number of lines specified by the TERM variable, but may be overridden by window systems which support TIOCGWINSZ.
MORE
Default command line options to use with more. The options should be space-separated and must be prefixed with a dash (‘-’).
TERM
Specifies the terminal type. Used by more to get the terminal characteristics necessary to manipulate the screen.
The more utility exits 0 on success, and >0 if an error occurs.
Examine the ends of all files in the current directory, showing line and byte counts for each:
$ more -p G= *
Examine several manual pages, starting from the options description in the DESCRIPTION section:
$ more -p '/DESCRIPTION > /options > ' *.1
58 releases since OpenBSD 2.1; the text changed 18 times.
-e since OpenBSD 3.4;
-i since OpenBSD 3.4;
-p since OpenBSD 5.6;
-t since OpenBSD 5.6.
-! until OpenBSD 5.5;
-# until OpenBSD 5.5;
-+ until OpenBSD 5.5;
-- until OpenBSD 5.5;
--CLEAR-SCREEN until OpenBSD 5.5;
--HILITE-SEARCH until OpenBSD 5.5;
--HILITE-UNREAD until OpenBSD 5.5;
--IGNORE-CASE until OpenBSD 5.5;
--LINE-NUMBERS until OpenBSD 5.5;
--LONG-PROMPT until OpenBSD 5.5;
--QUIET until OpenBSD 5.5;
--QUIT-AT-EOF until OpenBSD 5.5;
--RAW-CONTROL-CHARS until OpenBSD 5.5;
--SEARCH-SKIP-SCREEN until OpenBSD 5.5;
--SILENT until OpenBSD 5.5;
--UNDERLINE-SPECIAL until OpenBSD 5.5;
--auto-buffers until OpenBSD 5.5;
--chop-long-lines until OpenBSD 5.5;
--clear-screen until OpenBSD 5.5;
--follow-name until OpenBSD 5.5;
--force until OpenBSD 5.5;
--help until OpenBSD 5.5;
--hilite-search until OpenBSD 5.5;
--hilite-unread until OpenBSD 5.5;
--ignore-case until OpenBSD 5.5;
--line-numbers until OpenBSD 5.5;
--long-prompt until OpenBSD 5.5;
--no-init until OpenBSD 5.5;
--no-keypad until OpenBSD 5.5;
--no-lessopen until OpenBSD 5.5;
--quiet until OpenBSD 5.5;
--quit-at-eof until OpenBSD 5.5;
--quit-if-one-screen until OpenBSD 5.5;
--quit-on-intr until OpenBSD 5.5;
--raw-control-chars until OpenBSD 5.5;
--search-skip-screen until OpenBSD 5.5;
--shift until OpenBSD 5.5;
--silent until OpenBSD 5.5;
--squeeze-blank-lines until OpenBSD 5.5;
--status-column until OpenBSD 5.5;
--tilde until OpenBSD 5.5;
--underline-special until OpenBSD 5.5;
--version until OpenBSD 5.5;
-? until OpenBSD 5.5;
-A until OpenBSD 5.5;
-B until OpenBSD 5.5;
-C until OpenBSD 5.5;
-E until OpenBSD 5.5;
-F until OpenBSD 5.5;
-G until OpenBSD 5.5;
-I until OpenBSD 5.5;
-J until OpenBSD 5.5;
-K until OpenBSD 5.5;
-L until OpenBSD 5.5;
-M until OpenBSD 5.5;
-N until OpenBSD 5.5;
-Q until OpenBSD 5.5;
-R until OpenBSD 5.5;
-S until OpenBSD 5.5;
-U until OpenBSD 5.5;
-V until OpenBSD 5.5;
-W until OpenBSD 5.5;
-X until OpenBSD 5.5;
-a until OpenBSD 5.5;
-d until OpenBSD 3.0;
-f until OpenBSD 5.5;
-g until OpenBSD 5.5;
-l until OpenBSD 3.0;
-m until OpenBSD 5.5;
-q until OpenBSD 5.5;
-r until OpenBSD 5.5;
-w until OpenBSD 5.5;
-~ until OpenBSD 5.5.