NOTES
more 1 "28 Mar 1995"
more, page - browse or page through a text file
/usr/bin/more
[
-cdflrsuw
] [
-lines
] [
+linenumber
]
[
+/pattern
]
[
filename ... ]
/usr/bin/page
[
-cdflrsuw
] [
-lines
] [
+linenumber
]
[
+/pattern
]
[
filename ... ]
/usr/xpg4/bin/more
[
-cdeisu
] [
-nnumber
] [
-pcommand
]
[
-ttagstring
] [
filename ... ]
/usr/xpg4/bin/more
[
-cdeisu
] [
-nnumber
] [
+command
]
[
-ttagstring
] [
filename ... ]
SUNWcsu
SUNWxcu4
\f3more\f1
is a filter that displays the contents of a text file on the terminal,
one screenful at a time. It normally pauses after each screenful.
/usr/bin/more
then prints
--More--
and
/usr/xpg4/bin/more
then prints
filename
at the bottom of the screen. If
\f3more\f1
is reading from a file rather than a pipe, the percentage of
characters displayed so far is also shown.
\f3more\f1
scrolls up to display one more line in response to a
character; it displays another screenful in response to a
character. Other commands are listed below.
\f3page
clears the screen before displaying the next screenful of text;
it only provides a one-line overlap between screens.
\f3more\f1
sets the terminal to
mode, so that the output can be continuous. Commands that you type
do not normally show up on your terminal, except for the \f3/\f1
and \f3!\f1 commands.
/usr/bin/more
exits after displaying the last specified file.
/usr/xpg4/bin/more
prompts for a command at the last line of the last specified file.
If the standard output is not a terminal,
\f3more\f1
acts just like
cat(1),
except that a header is printed before each file in a series.
The following options are available in both versions of
more:
-
-c
-
Clear before displaying. Redraws 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.
-
-s
-
Squeeze. Replace multiple blank lines with a single
blank line. This is helpful when viewing
nroff(1)
output on the screen.
The following options are available only in
/usr/bin/more:
-
-f
-
Do not fold long lines. This is useful when lines contain
nonprinting characters or escape sequences, such as those generated
when
nroff(1)
output is piped through
ul(1).
-
-l
-
Do not treat
characters (CTRL-L) as page breaks. If
-l
is not used,
more
pauses to accept commands after any line containing a
^L\f1
character (CTRL-L). Also, if a file begins with a
the screen is cleared before the file is printed.
-
-r
-
Normally,
more
ignores control characters that it does not interpret in some way.
The
-r
option causes these to be displayed as
\f3^\f2C\f1
where
C
stands for any such control character.
-
-u
-
Suppress generation of underlining escape sequences.
Normally, \f3more\f1
handles underlining, such as that produced by
nroff(1),
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.
-
-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.
-
\f3-\f2lines\f1
-
Display the indicated number of
lines
in each screenful, rather than the default (the number of lines
in the terminal screen less two).
-
\f3+\f2linenumber\f1
-
Start up at
linenumber.
-
\f3+/\f2pattern\f1
-
Start up two lines above the line containing the
regular expression \f2pattern\f1.
Note: Unlike
editors, this construct should
not
end with a
\f1`\f3/\f1.'
If it does, then the trailing slash is taken as a character in the
search pattern.
The following options are available only in
/usr/xpg4/bin/more:
-
-e
-
Exit immediately after writing the last line of the last file
in the argument list.
-
-i
-
Perform pattern matching in searches without regard to case.
-
-n number
-
Specify the number of lines per screenful.
The
number
argument is a positive decimal integer.
The
-n
option overrides any values obtained from the environment.
-
-p command
-
For each file examined, initially execute the
more
command in the
command
argument. If the command is a positioning command, such as a line
number or a regular expression search, set the current position
to represent the final results of the command, without writing any
intermediate lines of the file. For example, the two commands:
more -p 1000j file
more -p 1000G file
are equivalent and start the display with the current position at
line 1000, bypassing the lines that
j
would write and scroll off the screen if it had been issued during
the file examination. If the positioning command is unsuccessful,
the first line in the file will be the current position.
-
-t tagstring
-
Write the screenful of the file containing the tag named by the
tagstring
argument. See the
ctags(1)
utility.
-
-u
-
Treat a backspace character as a printable control character,
displayed as a ^H (CTRL-H), suppressing backspacing and the
special handling that produces underlined or standout-mode text on
some terminal types. Also, do not ignore a carriage-return character
at the end of a line.
If both the
-t tagstring
and
-p command
(or the obsolescent
+command)
options are given, the
-t tagstring
is processed first.
more
uses the terminal's
terminfo(4)
entry to determine its display characteristics.
more
looks in the environment variable
for any preset options. For instance, to page through files using
the
\f3-c\f1
mode by default, set the value of this variable to
\f3-c\f1.
(Normally, the command sequence to set up this
environment variable is placed in the
\f3.login\f1
or
\f3.profile\f1
file).
The commands take effect immediately. It is not necessary to
type a carriage return unless the command requires a
filename,
command,
tagstring,
or
pattern.
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 addition, the user may type the erase character to redisplay the
\f1`\f3--More--(\f2xx%)\f1'
or
filename
message.
In the following commands,
i
is a numerical argument
\f1(\f31\f1
by default).
-
iSPACE
-
Display another screenful, or
i
more lines if
i
is specified.
-
iRETURN
-
Display another line, or
i
more lines, if specified.
-
\f2i\f3b\f1
-
-
\f2i\f3^B\f1
-
(CTRL-B)
Skip back
i
screenfuls and then print a screenful.
-
\f2i\f3d\f1
-
-
\f2i\f3^D\f1
-
(CTRL-D)
Scroll forward one half screenful or \f2i\f1 more lines. If
i
is specified, the count becomes the default for subsequent \f3d\f1 and
\f3u\f1 commands.
-
\f2i\f3f\f1
-
Skip
i
screens full and then print a screenful.
-
\f3h\f1
-
Help. Give a description of all the
\f3more\f1
commands.
-
^L
-
(CTRL-L) Refresh.
-
\f2i\f3n\f1
-
Search for the
ith
occurrence of the last
pattern
entered.
-
q
-
-
Q
-
Exit from \f3more\f1.
-
\f2i\f3s\f1
-
Skip
i
lines and then print a screenful.
-
\f3v\f1
-
Drop into the
vi
editor at the current line of the current file.
-
\f2i\f3z\f1
-
Same as
except that
i,
if present, becomes the new default number
of lines per screenful.
-
=
-
Display the current line number.
-
\f2i\f3/\f2pattern\f1
-
Search forward for the
ith
occurrence of the regular expression
pattern.
Display the screenful starting two lines before the line that
contains the
ith
match for the regular expression
pattern,
or the end of a pipe, whichever comes first. If
\f3more\f1
is displaying a file and there is no 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.
-
\f3!\f2command\f1
-
Invoke a shell to execute
command.
The characters
\f3%\f1
and
\f3!\f1,
when used within
command
are replaced with the current filename
and the previous shell command,
respectively.
If there is no current filename,
\f3%\f1
is not expanded. Prepend a backslash to these characters to
escape expansion.
-
\f3:f\f1
-
Display the current filename and line number.
-
\f2i\f3:n\f1
-
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.
-
\f2i\f3:p\f1
-
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
\f3more\f1
is positioned within a file, go to the
beginning of the file.
If
\f3more\f1
is reading from a pipe,
\f3more\f1
simply rings the terminal bell.
-
\f3:q\f1
-
-
\f3:Q\f1
-
Exit from \f3more\f1 (same as \f3q\f1 or \f3Q\f1).
The following commands are available only in
/usr/bin/more:
-
\f3\'\f1
-
Single quote. Go to the point from which the last search started.
If no search has been performed in the current file,
go to the beginning of the file.
-
\f3.\f1
-
Dot. Repeat the previous command.
-
\f3^\f1
-
Halt a partial display of text.
more
stops sending output, and displays the usual \f3--More--\f1
prompt. Some output is lost as a result.
The following commands are available only in
/usr/xpg4/bin/more:
-
\f2i\f3^F\f1
-
(CTRL-F) Skip \f2i\f1 screens full and print a screenful. (Same
as \f2i\f3f\f1.)
-
\f3^G\f1
-
(CTRL-G) Display the current line number (same as \f3=\f1).
-
\f2i\f3g\f1
-
Go to line number \f2i\f1 with the default of the first line in the
file.
-
\f2i\f3G\f1
-
Go to line number \f2i\f1 with the default of the Last line in the
file.
-
\f2i\f3j\f1
-
Display another line, or \f2i\f1 more lines, if specified. (Same as
\f2i\f1RETURN.)
-
\f2i\f3k\f1
-
Scroll backwards one or \f2i\f1 lines, if specified.
-
mletter
-
Mark the current position with the name
letter.
-
N
-
Reverse direction of search.
-
r
-
Refresh the screen.
-
R
-
Refresh the screen, discarding any buffered input.
-
\f2i\f3u\f1
-
-
\f2i\f3^U\f1
-
(CTRL-U) Scroll backwards one half a screen of \f2i\f1 lines, if
specified. If \f2i\f1 is specified, the count becomes the new default
for subsequent \f3d\f1 and \f3u\f1 commands.
-
ZZ
-
Exit from
more
(same as
q).
-
:e filename
-
Examine (display) a new file. If no
filename
is specified, the current file is redisplayed.
-
:t tagstring
-
Go to the tag named by the
tagstring
argument and scroll/rewrite the screen with the tagged line in the
current position. See the
ctags
utility.
-
'letter
-
Return to the position that was previously marked with the name
letter.
-
''
-
Return to the position from which the last move of more than a screenful
was made. Defaults to the beginning of the file.
-
\f2i\f3?\f1[\f2!\f1]\f2pattern\f1
-
Search backward in the file for the
ith
line containing the
pattern.
The
!
specifies to search backward for the
ith
line that does not contain the
pattern.
-
\f2i\f3/\f3!\f2pattern\f1
-
Search forward in the file for the
ith
line that does not contain the pattern.
-
\f3!\f1[\f2command\f1]
-
Invoke a shell or the specified command.
See
environ(5)
for descriptions of the following environment variables that affect the
execution of
more:
LC_COLLATE\f1,
LC_CTYPE\f1,
LC_MESSAGES\f1,
NLSPATH\f1,
and
TERM\f1.
The following environment variables also affect the execution of
/usr/xpg4/bin/more:
-
COLUMNS\f1
-
Override the system selected horizontal screen size.
-
EDITOR\f1
-
Used by the
v
command to select an editor.
-
LINES\f1
-
Override the system selected vertical screen size. The
-n
option has precedence over
in determining the number of lines in a screen.
-
MORE\f1
-
A string specifying options as described in the
OPTIONS
section, above. As in a command line, The options must be separated by
blank characters and each option specification must start with a -.
Any command line options are processed after those specified in
as though the command line were:
\f3more $MORE \f2options operands\f1
-
\f3/usr/lib/more.help\f1
-
help file for
/usr/bin/more
and
/usr/bin/page
only.
cat(1),
csh(1),
ctags(1),
man(1),
nroff(1),
script(1),
sh(1),
ul(1),
environ(4),
terminfo(4),
environ(5)
Skipping backwards is too slow on large files.
Will not behave correctly if the terminal is not set up
correctly.