version 1.2, 1996/01/29 00:55:13 |
version 1.3, 1996/09/28 21:58:45 |
|
|
.\" Copyright (c) 1988, 1990 The Regents of the University of California. |
.\" Copyright (c) 1980 The Regents of the University of California. |
.\" Copyright (c) 1988 Mark Nudleman |
|
.\" All rights reserved. |
.\" All rights reserved. |
.\" |
.\" |
.\" Redistribution and use in source and binary forms, with or without |
.\" Redistribution and use in source and binary forms, with or without |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" SUCH DAMAGE. |
.\" SUCH DAMAGE. |
.\" |
.\" |
.\" from: @(#)more.1 5.15 (Berkeley) 7/29/91 |
.\" @(#)more.1 6.6 (Berkeley) 4/18/91 |
.\" $Id$ |
|
.\" |
.\" |
.Dd July 29, 1991 |
.TH MORE 1 "April 18, 1991" |
.Dt MORE 1 |
.UC 4 |
.Os |
.SH NAME |
.Sh NAME |
more, page \- file perusal filter for crt viewing |
.Nm more |
.SH SYNOPSIS |
.Nd file perusal filter for crt viewing |
.B more |
.Sh SYNOPSIS |
[ |
.Nm more |
.B \-cdflsu |
.Op Fl ceinus |
] |
.Op Fl t Ar tag |
[ |
.Op Fl x Ar tabs |
.B \-\fIn\fP |
.Op Fl / Ar pattern |
] |
.Op Fl # |
[ |
.Op Ar |
.B +\fIlinenumber\fP |
.Sh DESCRIPTION |
] |
.Nm More |
[ |
is a filter for paging through text one screenful at a time. It |
.B +/\fIpattern\fP |
uses |
] [ name ... ] |
.Xr termcap 3 |
.LP |
so it can run on a variety of terminals. There is even limited support |
.B page |
for hardcopy terminals. (On a hardcopy terminal, lines which should be |
.I "more options" |
printed at the top of the screen are prefixed with an up-arrow.) |
.SH DESCRIPTION |
.Ar File |
.I More |
may be a single dash (``-''), implying stdin. |
is a filter which allows examination of a continuous text |
.Sh OPTIONS |
one screenful at a time on a soft-copy terminal. |
Command line options are described below. |
It normally pauses after each screenful, printing --More-- |
Options are also taken from the environment variable |
at the bottom of the screen. |
.Ev MORE |
If the user then types a carriage return, one more line is displayed. |
(make sure to precede them with a dash (``-'')) but command |
If the user hits a space, |
line options will override them. |
another screenful is displayed. Other possibilities are enumerated later. |
.Bl -tag -width flag |
.PP |
.It Fl c |
The command line options are: |
|
.TP |
|
.I \-n |
|
An integer which is the size (in lines) of the window which |
|
.I more |
|
will use instead of the default. |
|
.TP |
|
.B \-c |
|
.I More |
|
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 |
|
.I more |
|
is writing. |
|
This option will be ignored if the terminal does not have the ability |
|
to clear to the end of a line. |
|
.TP |
|
.B \-d |
|
.I More |
|
will prompt the user with the message "Press |
|
space to continue, \'q\' to quit." at the end of each screenful, |
|
and will respond to subsequent illegal user input by |
|
printing "Press \'h\' for instructions." instead of ringing the bell. |
|
This is useful if |
|
.I more |
|
is being used as a filter in some setting, |
|
such as a class, |
|
where many users may be unsophisticated. |
|
.TP |
|
.B \-f |
|
This causes |
|
.I more |
|
to count logical, rather than screen lines. |
|
That is, long lines are not folded. |
|
This option is recommended if |
|
.I nroff |
|
output is being piped through |
|
.I ul, |
|
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 |
|
.I more |
|
may think that lines are longer than they actually are, and fold |
|
lines erroneously. |
|
.TP |
|
.B \-l |
|
Do |
|
not treat ^\&L (form feed) specially. |
|
If this option is not given, |
|
.I more |
|
will pause after any line that contains a ^\&L, as if the end of a |
|
screenful had been reached. |
|
Also, if a file begins with a form feed, the screen will be cleared |
|
before the file is printed. |
|
.TP |
|
.B \-s |
|
Squeeze multiple blank lines from the output, producing only one blank |
|
line. Especially helpful when viewing |
|
.I nroff |
|
output, this option maximizes the useful information present on the screen. |
|
.TP |
|
.B \-u |
Normally, |
Normally, |
.Nm more |
.I more |
will repaint the screen by scrolling from the bottom of the screen. |
will handle underlining such as produced by |
If the |
.I nroff |
.Fl c |
in a manner appropriate to the particular terminal: if the terminal can |
option is set, when |
perform underlining or has a stand-out mode, |
.Nm more |
.I more |
needs to change the entire display, it will paint from the top line down. |
will output appropriate escape sequences to enable underlining or stand-out |
.It Fl d |
mode for underlined information in the source file. The |
The |
.I \-u |
.Fl d |
option suppresses this processing. |
option causes the default prompt to include the basic directions |
.TP |
``[Press space to continue, 'q' to quit.]''. The |
.B +\fIlinenumber\fP |
.Fl d |
Start up at \fIlinenumber\fP. |
option also causes the message ``[Press 'h' for instructions.]'' to be |
.TP |
displayed when an invalid command is entered (normally, the bell is |
.B +/\fIpattern\fP |
rung). This option is useful in environments where users may not be |
Start up two lines before the line containing the |
experienced with pagers. |
regular expression \fIpattern\fP. |
.It Fl e |
.PP |
Normally, if displaying a single file, |
If the program is invoked as |
.Nm more |
.I page, |
exits as soon as it reaches end-of-file. The |
then the screen is cleared before each screenful is printed (but only |
.Fl e |
if a full screenful is being printed), and |
option tells more to |
.I k |
exit if it reaches end-of-file twice without an intervening operation. |
\- 1 rather |
If the file is shorter than a single screen |
than |
.Nm more |
.I k |
will exit at end-of-file regardless. |
\- 2 lines are printed in each screenful, where |
.It Fl i |
.I k |
The |
is the number of lines the terminal can display. |
.Fl i |
.PP |
option causes searches to ignore case; that is, |
.I More |
uppercase and lowercase are considered identical. |
looks in the file |
.It Fl n |
.I /etc/termcap |
The |
to determine terminal characteristics, |
.Fl n |
and to determine the default window size. |
flag suppresses line numbers. |
On a terminal capable of displaying 24 lines, |
The default (to use line numbers) may cause |
the default window size is 22 lines. |
.Nm more |
.PP |
to run more slowly in some cases, especially with a very large input file. |
.I More |
Suppressing line numbers with the |
looks in the environment variable |
.Fl n |
.I MORE |
flag will avoid this problem. |
to pre-set any flags desired. For example, if you prefer to view files using |
Using line numbers means: the line number will be displayed in the |
the |
.Cm = |
.I \-c |
command, and the |
mode of operation, the |
.Cm v |
.I csh |
command will pass the current line number to the editor. |
command |
.It Fl s |
.I "setenv MORE -c" |
The |
or the |
.Fl s |
.I sh |
option causes |
command sequence |
consecutive blank lines to be squeezed into a single blank line. |
.I "MORE='-c' ; export MORE" |
.It Fl t |
would cause all invocations of |
The |
.I more , |
.Fl t |
including invocations by programs such as |
option, followed immediately by a tag, will edit the file |
.I man |
containing that tag. For more information, see the |
and |
.Xr ctags 1 |
.I msgs , |
command. |
to use this mode. |
.It Fl u |
Normally, the user will place the command sequence which sets up the |
By default, |
.I MORE |
.Nm more |
environment variable in the |
treats backspaces and |
.I .cshrc |
.Dv CR-LF |
or |
sequences specially. Backspaces which appear |
.I .profile |
adjacent to an underscore character are displayed as underlined text. |
file. |
Backspaces which appear between two identical characters are displayed |
.PP |
as emboldened text. |
If |
.Dv CR-LF |
.I more |
sequences are compressed to a single linefeed |
is reading from a file, rather than a pipe, then a percentage is displayed |
character. The |
along with the --More-- prompt. |
.Fl u |
This gives the fraction of the file (in characters, not lines) that has been |
option causes backspaces to always be displayed as |
read so far. |
control characters, i.e. as the two character sequence ``^H'', and |
.PP |
.Dv CR-LF |
Other sequences which may be typed when |
to be left alone. |
.I more |
.It Fl x |
pauses, and their effects, are as follows (\fIi\fP is an optional integer |
The |
argument, defaulting to 1) : |
.Fl x |
.PP |
option sets tab stops every |
.IP \fIi\|\fP<space> |
.Ar N |
display |
positions. The default for |
.I i |
.Ar N |
more lines, (or another screenful if no argument is given) |
is 8. |
.PP |
.It Fl / |
.IP ^D |
The |
display 11 more lines (a ``scroll''). |
.Fl / |
If |
option specifies a string that will be searched for before |
.I i |
each file is displayed. |
is given, then the scroll size is set to \fIi\|\fP. |
.Sh COMMANDS |
.PP |
Interactive commands for |
.IP d |
.Nm more |
same as ^D (control-D) |
are based on |
.PP |
.Xr vi 1 . |
.IP \fIi\|\fPz |
Some commands may be preceeded by a decimal number, called N in the |
same as typing a space except that \fIi\|\fP, if present, becomes the new |
descriptions below. |
window size. |
In the following descriptions, ^X means control-X. |
.PP |
.Pp |
.IP \fIi\|\fPs |
.Bl -tag -width Ic |
skip \fIi\|\fP lines and print a screenful of lines |
.It Ic h |
.PP |
Help: display a summary of these commands. |
.IP \fIi\|\fPf |
If you forget all the other commands, remember this one. |
skip \fIi\fP screenfuls and print a screenful of lines |
.It Xo |
.PP |
.Ic SPACE |
.IP \fIi\|\fPb |
.No or |
skip back \fIi\fP screenfuls and print a screenful of lines |
.Ic f |
.PP |
.No or |
.IP \fIi\|\fP^B |
.Ic \&^F |
same as b |
.Xc |
.PP |
Scroll forward N lines, default one window. |
.IP "q or Q" |
If N is more than the screen size, only the final screenful is displayed. |
Exit from |
.It Ic b No or Ic \&^B |
.I more. |
Scroll backward N lines, default one window (see option -z below). |
.PP |
If N is more than the screen size, only the final screenful is displayed. |
.IP = |
.It Ic j No or Ic RETURN |
Display the current line number. |
Scroll forward N lines, default 1. |
.PP |
The entire N lines are displayed, even if N is more than the screen size. |
.IP v |
.It Ic k |
Start up the editor |
Scroll backward N lines, default 1. |
.I vi |
The entire N lines are displayed, even if N is more than the screen size. |
at the current line. |
.It Ic d No or Ic \&^D |
.PP |
Scroll forward N lines, default one half of the screen size. |
.IP h |
If N is specified, it becomes the new default for |
Help command; give a description of all the |
subsequent d and u commands. |
.I more |
.It Ic u No or Ic \&^U |
commands. |
Scroll backward N lines, default one half of the screen size. |
.PP |
If N is specified, it becomes the new default for |
.IP \fIi\|\fP/expr |
subsequent d and u commands. |
search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP |
.It Ic g |
If there are less than \fIi\fP occurrences of \fIexpr\|\fP, |
Go to line N in the file, default 1 (beginning of file). |
and the input is a file (rather than a pipe), |
.It Ic G |
then the position in the file remains unchanged. |
Go to line N in the file, default the end of the file. |
Otherwise, a screenful is displayed, starting two lines before the place |
.It Ic p No or Ic \&% |
where the expression was found. |
Go to a position N percent into the file. N should be between 0 |
The user's erase and kill characters may be used to edit the regular |
and 100. (This works if standard input is being read, but only if |
expression. |
.Nm more |
Erasing back past the first column cancels the search command. |
has already read to the end of the file. It is always fast, but |
.PP |
not always useful.) |
.IP \fIi\|\fPn |
.It Ic r No or Ic \&^L |
search for the \fIi\|\fP-th occurrence of the last regular expression entered. |
Repaint the screen. |
.PP |
.It Ic R |
.IP \' |
Repaint the screen, discarding any buffered input. |
(single quote) Go to the point from which the last search started. |
Useful if the file is changing while it is being viewed. |
If no search has been performed in the current file, this command |
.It Ic m |
goes back to the beginning of the file. |
Followed by any lowercase letter, |
.PP |
marks the current position with that letter. |
.IP !command |
.It Ic \&' |
invoke a shell with \fIcommand\|\fP. |
(Single quote.) |
The characters `%' and `!' in "command" are replaced with the |
Followed by any lowercase letter, returns to the position which |
current file name and the previous shell command respectively. |
was previously marked with that letter. |
If there is no current file name, `%' is not expanded. |
Followed by another single quote, returns to the position at |
The sequences "\\%" and "\\!" are replaced by "%" and "!" respectively. |
which the last "large" movement command was executed, or the |
.PP |
beginning of the file if no such movements have occurred. |
.IP \fIi\|\fP:n |
All marks are lost when a new file is examined. |
skip to the \fIi\|\fP-th next file given in the command line |
.It Ic \&! Ns Ar command |
(skips to last file if n doesn't make sense) |
Invoke a shell command. The characters `%', `#', and `!' |
.PP |
are replaced by the current file name, previous filename |
.IP \fIi\|\fP:p |
and previous shell command, respectively. If there is no |
skip to the \fIi\|\fP-th previous file given in the command line. |
current or previous filename, `%' and `#' are not expanded. |
If this command is given in the middle of printing out a |
`\%' `\#' and `\!' are replaced by `%', `#' and `!', |
file, then |
respectively. |
.I more |
.It Ic \&/ Ns Ar pattern |
goes back to the beginning of the file. If \fIi\fP doesn't make sense, |
Search forward in the file for the N-th line containing the pattern. |
.I more |
N defaults to 1. |
skips back to the first file. |
The pattern is a regular expression, as recognized by |
If |
.Xr ed . |
.I more |
The search starts at the second line displayed. |
is not reading from a file, the bell is rung and nothing else happens. |
.It Ic \&? Ns Ar pattern |
.PP |
Search backward in the file for the N-th line containing the pattern. |
.IP :f |
The search starts at the line immediately before the top line displayed. |
display the current file name and line number. |
.It Ic \&/\&! Ns Ar pattern |
.PP |
Like /, but the search is for the N-th line |
.IP ":q or :Q" |
which does NOT contain the pattern. |
exit from |
.It Ic \&?\&! Ns Ar pattern |
.I more |
Like ?, but the search is for the N-th line |
(same as q or Q). |
which does NOT contain the pattern. |
.PP |
.It Ic n |
.IP . |
Repeat previous search, for N-th line containing the last pattern |
(dot) repeat the previous command. |
(or |
.PP |
.Tn NOT |
The commands take effect immediately, i.e., it is not necessary to |
containing the last pattern, if the previous search |
type a carriage return. |
was /! or ?!). |
Up to the time when the command character itself is given, |
.It Ic E Ns Op Ar filename |
the user may hit the line kill character to cancel the numerical |
Examine a new file. |
argument being formed. |
If the filename is missing, the "current" file (see the N and P commands |
In addition, the user may hit the erase character to redisplay the |
below) from the list of files in the command line is re-examined. |
--More--(xx%) message. |
If the filename is a pound sign (#), the previously examined file is |
.PP |
re-examined. |
At any time when output is being sent to the terminal, the user can |
.It Ic N No or Ic \&:n |
hit the quit key (normally control\-\\). |
Examine the next file (from the list of files given in the command line). |
.I More |
If a number N is specified (not to be confused with the command N), |
will stop sending output, and will display the usual --More-- |
the N-th next file is examined. |
prompt. |
.It Ic P No or Ic \&:p |
The user may then enter one of the above commands in the normal manner. |
Examine the previous file. |
Unfortunately, some output is lost when this is done, due to the |
If a number N is specified, the N-th previous file is examined. |
fact that any characters waiting in the terminal's output queue |
.It Ic \&:t |
are flushed when the quit signal occurs. |
Go to supplied tag. |
.PP |
.It Ic v |
The terminal is set to |
Invokes an editor to edit the current file being viewed. |
.I noecho |
The editor is taken from the environment variable |
mode by this program so that the output can be continuous. |
.Ev EDITOR , |
What you type will thus not show on your terminal, except for the / and ! |
or defaults to |
commands. |
.Xr vi 1 . |
.PP |
.It Ic \&= No or Ic \&^G |
If the standard output is not a teletype, then |
These options print out the number of the file currently being displayed |
.I more |
relative to the total number of files there are to display, the current |
acts just like |
line number, the current byte number and the total bytes to display, and |
.I cat, |
what percentage of the file has been displayed. If |
except that a header is printed before each file (if there is |
.Nm more |
more than one). |
is reading from stdin, or the file is shorter than a single screen, some |
.PP |
of these items may not be available. Note, all of these items reference |
.DT |
the first byte of the last line displayed on the screen. |
A sample usage of |
.It Xo |
.I more |
.Ic q |
in previewing |
.No or |
.I nroff |
.Ic \&:q |
output would be |
.No or |
.PP |
.Ic ZZ |
nroff \-ms +2 doc.n | more -s |
.Xc |
.SH FILES |
Exits |
.DT |
.Nm more . |
/etc/termcap Terminal data base |
.El |
.br |
.Sh ENVIRONMENT |
/usr/lib/more.help Help file |
.Nm More |
.SH "SEE ALSO" |
utilizes the following environment variables, if they exist: |
csh(1), man(1), msgs(1), script(1), sh(1), environ(7) |
.Bl -tag -width Fl |
.SH BUGS |
.It Ev MORE |
Skipping backwards is too slow on large files. |
This variable may be set with favored options to |
|
.Nm more . |
|
.It Ev EDITOR |
|
Specify default editor. |
|
.It Ev SHELL |
|
Current shell in use (normally set by the shell at login time). |
|
.It Ev TERM |
|
Specifies terminal type, used by more to get the terminal |
|
characteristics necessary to manipulate the screen. |
|
.El |
|
.Sh SEE ALSO |
|
.Xr ctags 1 , |
|
.Xr vi 1 |
|
.Sh AUTHOR |
|
This software is derived from software contributed to Berkeley |
|
by Mark Nudleman. |
|
.Sh HISTORY |
|
The |
|
.Nm more |
|
command appeared in |
|
.Bx 3.0 . |
|