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