BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / page.0
MORE(1) UNIX Programmer's Manual MORE(1)
N\bNA\bAM\bME\bE
more, page - file perusal filter for crt viewing
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
m\bmo\bor\bre\be [ -\b-c\bcd\bdf\bfl\bls\bsu\bu ] [ -\b-_\bn ] [ +\b+_\bl_\bi_\bn_\be_\bn_\bu_\bm_\bb_\be_\br ] [ +\b+/\b/_\bp_\ba_\bt_\bt_\be_\br_\bn ] [ name
... ]
p\bpa\bag\bge\be _\bm_\bo_\br_\be _\bo_\bp_\bt_\bi_\bo_\bn_\bs
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bM_\bo_\br_\be 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 command line options are:
-_\bn An integer which is the size (in lines) of the window
which _\bm_\bo_\br_\be will use instead of the default.
-\b-c\bc _\bM_\bo_\br_\be 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 _\bm_\bo_\br_\be is writing. This option will be
ignored if the terminal does not have the ability to
clear to the end of a line.
-\b-d\bd _\bM_\bo_\br_\be will prompt the user with the message "Press space
to continue, 'q' to quit." at the end of each screen-
ful, and will respond to subsequent illegal user input
by printing "Press 'h' for instructions." instead of
ringing the bell. This is useful if _\bm_\bo_\br_\be is being used
as a filter in some setting, such as a class, where
many users may be unsophisticated.
-\b-f\bf This causes _\bm_\bo_\br_\be to count logical, rather than screen
lines. That is, long lines are not folded. This
option is recommended if _\bn_\br_\bo_\bf_\bf output is being piped
through _\bu_\bl, 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 _\bm_\bo_\br_\be may think
that lines are longer than they actually are, and fold
lines erroneously.
-\b-l\bl Do not treat ^L (form feed) specially. If this option
is not given, _\bm_\bo_\br_\be will pause after any line that con-
tains a ^L, as if the end of a screenful had been
Printed 7/9/88 June 5, 1986 1
MORE(1) UNIX Programmer's Manual MORE(1)
reached. Also, if a file begins with a form feed, the
screen will be cleared before the file is printed.
-\b-s\bs Squeeze multiple blank lines from the output, producing
only one blank line. Especially helpful when viewing
_\bn_\br_\bo_\bf_\bf output, this option maximizes the useful informa-
tion present on the screen.
-\b-u\bu Normally, _\bm_\bo_\br_\be will handle underlining such as produced
by _\bn_\br_\bo_\bf_\bf in a manner appropriate to the particular ter-
minal: if the terminal can perform underlining or has
a stand-out mode, _\bm_\bo_\br_\be will output appropriate escape
sequences to enable underlining or stand-out mode for
underlined information in the source file. The -_\bu
option suppresses this processing.
+\b+_\bl_\bi_\bn_\be_\bn_\bu_\bm_\bb_\be_\br
Start up at _\bl_\bi_\bn_\be_\bn_\bu_\bm_\bb_\be_\br.
+\b+/\b/_\bp_\ba_\bt_\bt_\be_\br_\bn
Start up two lines before the line containing the regu-
lar expression _\bp_\ba_\bt_\bt_\be_\br_\bn.
If the program is invoked as _\bp_\ba_\bg_\be, then the screen is
cleared before each screenful is printed (but only if a full
screenful is being printed), and _\bk - 1 rather than _\bk - 2
lines are printed in each screenful, where _\bk is the number
of lines the terminal can display.
_\bM_\bo_\br_\be looks in the file /_\be_\bt_\bc/_\bt_\be_\br_\bm_\bc_\ba_\bp to determine terminal
characteristics, and to determine the default window size.
On a terminal capable of displaying 24 lines, the default
window size is 22 lines.
_\bM_\bo_\br_\be looks in the environment variable _\bM_\bO_\bR_\bE to pre-set any
flags desired. For example, if you prefer to view files
using the -_\bc mode of operation, the _\bc_\bs_\bh command _\bs_\be_\bt_\be_\bn_\bv _\bM_\bO_\bR_\bE
-_\bc or the _\bs_\bh command sequence _\bM_\bO_\bR_\bE='-_\bc' ; _\be_\bx_\bp_\bo_\br_\bt _\bM_\bO_\bR_\bE would
cause all invocations of _\bm_\bo_\br_\be , including invocations by
programs such as _\bm_\ba_\bn and _\bm_\bs_\bg_\bs , to use this mode. Normally,
the user will place the command sequence which sets up the
_\bM_\bO_\bR_\bE environment variable in the ._\bc_\bs_\bh_\br_\bc or ._\bp_\br_\bo_\bf_\bi_\bl_\be file.
If _\bm_\bo_\br_\be 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.
Other sequences which may be typed when _\bm_\bo_\br_\be pauses, and
their effects, are as follows (_\bi is an optional integer
argument, defaulting to 1) :
Printed 7/9/88 June 5, 1986 2
MORE(1) UNIX Programmer's Manual MORE(1)
_\bi<space>
display _\bi more lines, (or another screenful if no argu-
ment is given)
^D display 11 more lines (a ``scroll''). If _\bi is given,
then the scroll size is set to _\bi.
d same as ^D (control-D)
_\biz same as typing a space except that _\bi, if present,
becomes the new window size.
_\bis skip _\bi lines and print a screenful of lines
_\bif skip _\bi screenfuls and print a screenful of lines
_\bib skip back _\bi screenfuls and print a screenful of lines
_\bi^B same as b
q or Q
Exit from _\bm_\bo_\br_\be.
= Display the current line number.
v Start up the editor _\bv_\bi at the current line.
h Help command; give a description of all the _\bm_\bo_\br_\be com-
mands.
_\bi/expr
search for the _\bi-th occurrence of the regular expres-
sion _\be_\bx_\bp_\br. If there are less than _\bi occurrences of
_\be_\bx_\bp_\br, and the input is a file (rather than a pipe),
then the position in the file remains unchanged. Oth-
erwise, 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.
_\bin search for the _\bi-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 _\bc_\bo_\bm_\bm_\ba_\bn_\bd. The characters `%' and `!'
in "command" are replaced with the current file name
Printed 7/9/88 June 5, 1986 3
MORE(1) UNIX Programmer's Manual MORE(1)
and the previous shell command respectively. If there
is no current file name, `%' is not expanded. The
sequences "\%" and "\!" are replaced by "%" and "!"
respectively.
_\bi:n skip to the _\bi-th next file given in the command line
(skips to last file if n doesn't make sense)
_\bi:p skip to the _\bi-th previous file given in the command
line. If this command is given in the middle of print-
ing out a file, then _\bm_\bo_\br_\be goes back to the beginning of
the file. If _\bi doesn't make sense, _\bm_\bo_\br_\be skips back to
the first file. If _\bm_\bo_\br_\be 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 _\bm_\bo_\br_\be (same as q or Q).
. (dot) repeat the previous command.
The commands take effect immediately, i.e., it is not neces-
sary 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-\). _\bM_\bo_\br_\be 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 wait-
ing in the terminal's output queue are flushed when the quit
signal occurs.
The terminal is set to _\bn_\bo_\be_\bc_\bh_\bo 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 _\bm_\bo_\br_\be acts
just like _\bc_\ba_\bt, except that a header is printed before each
file (if there is more than one).
A sample usage of _\bm_\bo_\br_\be in previewing _\bn_\br_\bo_\bf_\bf output would be
nroff -ms +2 doc.n | more -s
F\bFI\bIL\bLE\bES\bS
/etc/termcap Terminal data base
Printed 7/9/88 June 5, 1986 4
MORE(1) UNIX Programmer's Manual MORE(1)
/usr/lib/more.help Help file
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
csh(1), man(1), msgs(1), script(1), sh(1), environ(7)
B\bBU\bUG\bGS\bS
Skipping backwards is too slow on large files.
Printed 7/9/88 June 5, 1986 5