BSD 3 development
[unix-history] / usr / man / man1 / more.1
CommitLineData
c1b4c7c6
ES
1.TH MORE 1 11/16/79
2.UC
3.SH NAME
4more \- file perusal filter for crt viewing
5.SH SYNOPSIS
6.B more
7[
8.B \-d
9]
10[
11.B \-\fIn\fP
12]
13[
14.B +\fIlinenumber\fP | +/\fIpattern\fP
15]
16[
17name ...
18]
19.SH DESCRIPTION
20.I More
21is a filter which allows examination of a continuous text
22one screenful at a time on a soft-copy terminal.
23It normally pauses after each screenful, printing --More--
24at the bottom of the screen.
25If the user then types a carriage return, one more line is displayed.
26If the user hits a space,
27another screenful is displayed.
28If a space is preceded by an integer, that number of lines are printed.
29If the user hits d or control-D,
3011 more lines are displayed (a `scroll').
31.I More
32looks in the file
33.I /etc/termcap
34to determine terminal characteristics,
35and to determine the default window size.
36On a terminal capable of displaying 24 lines,
37the default window size is 22 lines.
38.PP
39Other sequences which may be typed when
40.I more
41pauses, and their effects, are as follows (\fIi\fP is an optional integer
42argument, defaulting to 1) :
43.PP
44.IP \fIi\fPz
45same as typing a space except that \fIi\fP, if present, becomes the new
46window size.
47.PP
48.IP \fIi\fPs
49skip \fIi\fP lines and print a screenful of lines
50.PP
51.IP \fIi\fPf
52skip \fIi\fP screenfuls and print a screenful of lines
53.PP
54.IP \fIi\fPn
55skip to the \fIi\fP-th next file given in the command line
56(skips to last file if n doesn't make sense)
57.PP
58.IP \fIi\fPp
59skip to the \fIi\fP-th previous file given in the command line.
60If this command is given in the middle of printing out a
61file, then
62.I more
63goes back to the beginning of the file. If \fIi\fP doesn't make sense,
64.I more
65skips back to the first file.
66If
67.I more
68is not reading from a file, the bell is rung and nothing else happens.
69.PP
70.IP q or Q
71Exit from more.
72.PP
73.IP \fIi\fP/expr
74search for the \fIi\fP-th occurrence of the regular expression \fIexpr\fP.
75If there are less than \fIi\fP occurrences of \fIexpr\fP,
76and the input is a file (rather than a pipe),
77then the position in the file remains unchanged.
78Otherwise, a screenful is displayed, starting two lines before the place
79where the expression was found.
80The user's erase and kill characters may be used to edit the regular
81expression.
82Erasing back past the first column cancels the search command.
83.PP
84.IP !command
85invoke a shell with \fIcommand\fP.
86.PP
87The commands take effect immediately, i.e., it is not necessary to
88type a carriage return.
89Up to the time when the command character itself is given,
90the user may hit his or her line kill character to cancel the numerical
91argument being formed.
92.PP
93At any time when output is being sent to the terminal, the user can
94hit the quit key (normally control\-\\).
95.I More
96will stop sending output, and will display the usual --More--
97prompt.
98The user may then enter one of the above commands in the normal manner.
99Unfortunately, some output is lost when this is done, due to the
100fact that any characters waiting in the terminal's output queue
101are flushed when the quit signal occurs.
102.PP
103The terminal is set to
104.I noecho
105mode by this program so that the output can be continuous.
106What you type will thus not show on your terminal, except for the / and !
107commands.
108.PP
109If the standard output is not a teletype, then
110.I more
111acts just like
112.I cat,
113except that a header is printed before each file (if there is
114more than one).
115.PP
116The
117.B \-n
118option is an integer which is the size (in lines) of the window which
119.I more
120will use instead of the default.
121The
122.B \-d
123option causes more to prompt the user with the message "Hit
124space to continue, Rubout to abort" at the end of each screenful.
125This is useful if
126.I more
127is being used as a filter in some setting,
128such as a class,
129where many users may be unsophisticated.
130The
131.B +\fIlinenumber\fP
132option causes more to start up at \fIlinenumber\fP, while the
133.B +/\fIpattern\fP
134option causes more to start up two lines before the line containing the
135regular expression \fIpattern\fP.
136.PP
137.DT
138A sample usage of
139.I more
140in previewing
141.I nroff
142output would be
143.PP
144 nroff \-ms +2 doc.n | more
145.SH AUTHOR
146Eric Shienbrood
147.SH FILES
148.DT
149/etc/termcap Terminal data base
150.SH "SEE ALSO"
151script(1)
152.SH BUGS
153The function of
154.I more
155should be done optionally by the teletype driver in the system,
156akin to the ``more'' feature of the ITS systems at MIT.