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