.TH more "" "" Command
.PC "Display text one page at a time"
\fBmore [ \-cdflsu ] [ \-\fIwindow_size\fB ] [ +\fIline_number\fB ] [ +/\fIpattern\fB ] [ \fIfile ...\fB ] [ \- ]\fR
.PP
.HS
.SH Options:
.IC \fB\-\fR
Read/display stdin
.IC \fB\-c\fR
Paint screen from top down
.IC \fB\-d\fR
Prompt user to quit after each screenful of text
.IC \fB\-f\fR
Count lines from file rather than screen-display lines
.IC \fB\-l\fR
Do not treat \fB<ctrl-L>\fR as special
.IC \fB\-s\fR
Squeeze consecutive blank lines into one
.IC \fB\-u\fR
Display backspaces as control characters
.IC \fB\+line_number\fR
.br
Begin display at \fIline_number\fR
.IC \fB\+/pattern\fR
Begin display at first line to contain \fIpattern\fR
.HE
.B more
is a filter for paging through text one screenful at a time.
.I file
is a text file; the operator
.B \-
tells
.B more
to read and display the standard input.
.SH "Command-line Options"
.B more
reads options from the command line and from
the environmental variable
.BR MORE .
In case of a conflict, the options given on the command line take precedence.
Every cluster of options must be preceded with a hyphen `\-',
even if passed via the environmental variable
.BR MORE .
.PP
.B more
recognizes the following options:
.RS
.IP \fB-c\fR 0.3i
Paint the screen from the top line down.
.B more
normally repaints the screen by scrolling from the bottom of the screen.
.IP \fB-d\fR
Prompt the user at the end of each screen with the message:
.ID
	[Press space to continue, 'q' to quit.]
.IE
The default is to not issue a prompt.
.IP \fB\-f\fR
Count actual lines from the input file rather than screen lines.
This option is useful when the input contains escape sequences that
.B more
does not recognize.
.IP \fB\-l\fR
Do not treat the formfeed character \fB<ctrl-L>\fP as special.
By default,
.B more
pauses at each formfeed character, as if a full screen had been displayed.
.IP \fB\-s\fR
Squeeze consecutive blank lines into one blank line.
This is useful for looking at \fBnroff\fR output, such as manual pages.
.IP \fB\-u\fR
Display backspaces as control characters
and leave the carriage return-linefeed (CR\-LF) pair alone.
By default,
.B more
displays backspaces that appear
adjacent to an underscore character as underlined text;
backspaces that appear between two identical characters
as emboldened text;
and compresses CR\-LF sequences.
.IP "\fB+/\fIpattern\fR"
.br
Search for
.I pattern
before displaying a file.
.I pattern
is a regular expression, as recognized by commands
.B ed
or
.BR egrep .
.I pattern
should be escaped to avoid being processed by the shell.
.IP \fB\-\fIwindow_size\fR
.br
Set the size of the window that
.B more
displays to
.IR window_size ,
which
is a decimal integer less than or equal to the number of lines on your
terminal.
The default window size is read from the
.B termcap
description for your terminal.
.IP "\fB+\fIline_number\fR"
.br
Make
.I line_number
the beginning line to display in 
.IR file .
.I line_number
is a decimal integer less than the number of lines in
.IR file .
.RE
.SH Commands
The following describes
.BR more 's
interactive commands.
These commands are based on those for the \*(UN editor
.BR vi .
Some commands may optionally be preceded by a decimal number.
If you enter an invalid command,
.B more
will beep at you.
.RS
.IP \fBh\fR 0.3i
.sp -0.6
.IP \fB?\fR
Help:
display a summary of these commands.
.IP "\fI[N]\fB<space>\fR"
.br
Display the next \fIN\fP lines of text (default, one screenful).
.IP "\fI[N]\fBz\fR"
.br
If
.I N
is not specified, display the next screenful.
Otherwise, display
.I N
lines and set the default scrolling size to
.I N
for all subsequent
.B <space>
and
.B z
commands.
.IP "\fI[N]\fB<ctrl-F>"
.sp -0.6
.IP "\fI[N]\fBf\fR"
.br
Scroll forward
.I N
screenfuls (default, one screenful).
If
.I N
is more than the screen size, only the final screenful is displayed.
.IP "\fI[N]\fB<ctrl-B>\fR"
.sp -0.6
.IP "\fI[N]\fBb\fR"
.br
Scroll backward
.I N
screenfuls (default, one screenful).
If
.I N
is more than the screen size, only the final screenful is displayed.
.IP "\fI[N]\fBs\fR"
.br
Skip forward
.I N
lines (default, one line) and display one screenful.
.IP "\fI[N]\fB<return>\fR"
.sp -0.6
.IP "\fI[N]\fB<enter>\fR"
.br
Scroll forward
.I N
lines (default, one).
Display all
.I N
lines, even if
.I N
is more than the screen size.
.IP "\fI[N]\fB<ctrl-D>\fR"
.sp -0.6
.IP "\fI[N]\fBd\fR"
.br
Scroll forward
.I N
lines (default, one half of the screen size).
If
.I N
is specified, it becomes the new default for subsequent
.B d
and
.B <ctrl-D>
commands.
.IP "\fB<ctrl-L>\fR"
.br
Redraw the screen.
.IP "\fB\'\fR"
(Apostrophe) Return to the position in the current file where the previous
search command started, or to the
beginning of the file if no search commands have occurred.
This information is lost when a new file is examined.
.IP "\fI[N]\fB/\fIpattern\fR"
.br
Search forward for the
.IR N -th
line that contains
.I pattern
(default, one).
.I pattern
is a regular expression, as recognized by
.B ed
or
.BR egrep .
The search starts at the second line displayed.
.IP \fBn\fR
Repeat previous search.
.IP "\fB:f\fR"
Display the name of the current file with the current line number.
.IP "\fI[N]\fB:n\fR"
.br
Examine the
.IR N -th
file after the current file, as given in the command line
(default, the next file).
.IP "\fI[N]\fB:p\fR"
.br
Examine the
.IR N -th
file previous to the current file, as given in the command line
(default, the previous file).
.IP "\fB!\fI command\fR"
.sp -0.6
.IP "\fB:!\fI command\fR"
.br
Pass
.I command
to the shell specified by environment variable
.B SHELL
for execution.
The default shell is
.BR /bin/sh .
.IP \fBv\fR
Invoke an editor to edit the current file.
The editor is set by the environment variables
.B VISUAL
and
.BR EDITOR ,
in that order.
If these variables are not set, use
.BR vi .
.IP "\fB=\fR"
Display the current line number.
.IP "\fBq\fR"
.sp -0.6
.IP "\fB:q\fR"
.sp -0.6
.IP "\fBQ\fR"
.sp -0.6
.IP "\fB:Q\fR"
Quit.
.SH Environment
.B more
uses the following environment variables:
.RS
.IP \fBEDITOR\fR 0.8i
Specify default editor.
.IP \fBMORE\fR
Set default options for
.B more .
.IP \fBSHELL\fR
Specify the shell being used (normally set at login time).
.IP \fBTERM\fR
Specify the type of terminal you are using.
.B more
uses this variable to read from
.B /etc/termcap
the terminal characteristics needed to manipulate the screen.
.IP \fBVISUAL\fR
Specify default visual editor.
.RE
.SH "See Also"
.Xr "commands," commands
.Xr "egrep," egrep
.Xr "scat," scat
.Xr "vi," vi
.Xr "zmore" zmore
.SH Author
This software is derived from software contributed to Berkeley
by Mark Nudleman.
.B more
is copyright \(co 1988,1990
by The Regents of the University of California.
.II "Nudleman, Mark"
Copyright \(co 1988 by Mark Nudleman.
All rights reserved.
