fix 2 field timezones from date (from mcvax!jim)
[unix-history] / usr / src / old / more / more.1
CommitLineData
18f64a54
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
d90c1482 5.\" @(#)more.1 6.1 (Berkeley) %G%
18f64a54 6.\"
d90c1482 7.TH MORE 1 ""
18f64a54
KM
8.UC 4
9.SH NAME
10more, page \- file perusal filter for crt viewing
11.SH SYNOPSIS
12.B more
13[
14.B \-cdflsu
15]
16[
17.B \-\fIn\fP
18]
19[
20.B +\fIlinenumber\fP
21]
22[
23.B +/\fIpattern\fP
24] [ name ... ]
25.LP
26.B page
27.I "more options"
28.SH DESCRIPTION
29.I More
30is a filter which allows examination of a continuous text
31one screenful at a time on a soft-copy terminal.
32It normally pauses after each screenful, printing --More--
33at the bottom of the screen.
34If the user then types a carriage return, one more line is displayed.
35If the user hits a space,
6e4b70e7 36another screenful is displayed. Other possibilities are enumerated later.
18f64a54
KM
37.PP
38The command line options are:
39.TP
40.I \-n
41An integer which is the size (in lines) of the window which
42.I more
43will use instead of the default.
44.TP
45.B \-c
46.I More
47will draw each page by beginning at the top of the screen and erasing
48each line just before it draws on it.
49This avoids scrolling the screen, making it easier to read while
50.I more
51is writing.
52This option will be ignored if the terminal does not have the ability
53to clear to the end of a line.
54.TP
55.B \-d
56.I More
d90c1482
KM
57will prompt the user with the message "Press
58space to continue, \'q\' to quit." at the end of each screenful,
59and will respond to subsequent illegal user input by
60printing "Press \'h\' for instructions." instead of ringing the bell.
18f64a54
KM
61This is useful if
62.I more
63is being used as a filter in some setting,
64such as a class,
65where many users may be unsophisticated.
66.TP
67.B \-f
68This causes
69.I more
70to count logical, rather than screen lines.
71That is, long lines are not folded.
72This option is recommended if
73.I nroff
74output is being piped through
75.I ul,
76since the latter may generate escape sequences.
77These escape sequences contain characters which would ordinarily occupy
6e4b70e7 78screen positions, but which do not print when they are sent to the
18f64a54
KM
79terminal as part of an escape sequence.
80Thus
81.I more
82may think that lines are longer than they actually are, and fold
83lines erroneously.
84.TP
85.B \-l
86Do
87not treat ^L (form feed) specially.
88If this option is not given,
89.I more
90will pause after any line that contains a ^L, as if the end of a
91screenful had been reached.
92Also, if a file begins with a form feed, the screen will be cleared
93before the file is printed.
94.TP
95.B \-s
96Squeeze multiple blank lines from the output, producing only one blank
97line. Especially helpful when viewing
98.I nroff
99output, this option maximizes the useful information present on the screen.
100.TP
101.B \-u
102Normally,
103.I more
104will handle underlining such as produced by
105.I nroff
106in a manner appropriate to the particular terminal: if the terminal can
107perform underlining or has a stand-out mode,
108.I more
109will output appropriate escape sequences to enable underlining or stand-out
110mode for underlined information in the source file. The
111.I \-u
112option suppresses this processing.
113.TP
114.B +\fIlinenumber\fP
115Start up at \fIlinenumber\fP.
116.TP
117.B +/\fIpattern\fP
118Start up two lines before the line containing the
119regular expression \fIpattern\fP.
120.PP
121If the program is invoked as
122.I page,
123then the screen is cleared before each screenful is printed (but only
124if a full screenful is being printed), and
125.I k
126\- 1 rather
127than
128.I k
129\- 2 lines are printed in each screenful, where
130.I k
131is the number of lines the terminal can display.
132.PP
133.I More
134looks in the file
135.I /etc/termcap
136to determine terminal characteristics,
137and to determine the default window size.
138On a terminal capable of displaying 24 lines,
139the default window size is 22 lines.
140.PP
141.I More
142looks in the environment variable
143.I MORE
144to pre-set any flags desired. For example, if you prefer to view files using
145the
146.I \-c
147mode of operation, the
148.I csh
149command
150.I "setenv MORE -c"
151or the
152.I sh
153command sequence
154.I "MORE='-c' ; export MORE"
155would cause all invocations of
156.I more ,
157including invocations by programs such as
158.I man
159and
160.I msgs ,
161to use this mode.
162Normally, the user will place the command sequence which sets up the
163.I MORE
164environment variable in the
165.I .cshrc
166or
167.I .profile
168file.
169.PP
170If
171.I more
172is reading from a file, rather than a pipe, then a percentage is displayed
173along with the --More-- prompt.
174This gives the fraction of the file (in characters, not lines) that has been
175read so far.
176.PP
177Other sequences which may be typed when
178.I more
179pauses, and their effects, are as follows (\fIi\fP is an optional integer
180argument, defaulting to 1) :
181.PP
182.IP \fIi\|\fP<space>
183display
184.I i
185more lines, (or another screenful if no argument is given)
186.PP
187.IP ^D
188display 11 more lines (a ``scroll'').
189If
190.I i
191is given, then the scroll size is set to \fIi\|\fP.
192.PP
193.IP d
194same as ^D (control-D)
195.PP
196.IP \fIi\|\fPz
197same as typing a space except that \fIi\|\fP, if present, becomes the new
198window size.
199.PP
200.IP \fIi\|\fPs
201skip \fIi\|\fP lines and print a screenful of lines
202.PP
203.IP \fIi\|\fPf
204skip \fIi\fP screenfuls and print a screenful of lines
205.PP
206.IP "q or Q"
207Exit from
208.I more.
209.PP
210.IP =
211Display the current line number.
212.PP
213.IP v
214Start up the editor
215.I vi
216at the current line.
217.PP
218.IP h
219Help command; give a description of all the
220.I more
221commands.
222.PP
223.IP \fIi\|\fP/expr
224search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
225If there are less than \fIi\fP occurrences of \fIexpr\|\fP,
226and the input is a file (rather than a pipe),
227then the position in the file remains unchanged.
228Otherwise, a screenful is displayed, starting two lines before the place
229where the expression was found.
230The user's erase and kill characters may be used to edit the regular
231expression.
232Erasing back past the first column cancels the search command.
233.PP
234.IP \fIi\|\fPn
235search for the \fIi\|\fP-th occurrence of the last regular expression entered.
236.PP
d90c1482 237.IP \'
18f64a54
KM
238(single quote) Go to the point from which the last search started.
239If no search has been performed in the current file, this command
240goes back to the beginning of the file.
241.PP
242.IP !command
243invoke a shell with \fIcommand\|\fP.
244The characters `%' and `!' in "command" are replaced with the
245current file name and the previous shell command respectively.
246If there is no current file name, `%' is not expanded.
247The sequences "\\%" and "\\!" are replaced by "%" and "!" respectively.
248.PP
249.IP \fIi\|\fP:n
250skip to the \fIi\|\fP-th next file given in the command line
251(skips to last file if n doesn't make sense)
252.PP
253.IP \fIi\|\fP:p
254skip to the \fIi\|\fP-th previous file given in the command line.
255If this command is given in the middle of printing out a
256file, then
257.I more
258goes back to the beginning of the file. If \fIi\fP doesn't make sense,
259.I more
260skips back to the first file.
261If
262.I more
263is not reading from a file, the bell is rung and nothing else happens.
264.PP
265.IP :f
266display the current file name and line number.
267.PP
268.IP ":q or :Q"
269exit from
270.I more
271(same as q or Q).
272.PP
273.IP .
274(dot) repeat the previous command.
275.PP
276The commands take effect immediately, i.e., it is not necessary to
277type a carriage return.
278Up to the time when the command character itself is given,
279the user may hit the line kill character to cancel the numerical
280argument being formed.
281In addition, the user may hit the erase character to redisplay the
282--More--(xx%) message.
283.PP
284At any time when output is being sent to the terminal, the user can
285hit the quit key (normally control\-\\).
286.I More
287will stop sending output, and will display the usual --More--
288prompt.
289The user may then enter one of the above commands in the normal manner.
290Unfortunately, some output is lost when this is done, due to the
291fact that any characters waiting in the terminal's output queue
292are flushed when the quit signal occurs.
293.PP
294The terminal is set to
295.I noecho
296mode by this program so that the output can be continuous.
297What you type will thus not show on your terminal, except for the / and !
298commands.
299.PP
300If the standard output is not a teletype, then
301.I more
302acts just like
303.I cat,
304except that a header is printed before each file (if there is
305more than one).
306.PP
307.DT
308A sample usage of
309.I more
310in previewing
311.I nroff
312output would be
313.PP
314 nroff \-ms +2 doc.n | more -s
315.SH AUTHOR
316Eric Shienbrood, minor revisions by John Foderaro and Geoffrey Peck
317.SH FILES
318.DT
319/etc/termcap Terminal data base
320.br
321/usr/lib/more.help Help file
322.SH "SEE ALSO"
6e4b70e7 323csh(1), man(1), msgs(1), script(1), sh(1), environ(7)