1more(1) User Commands more(1)
2
3
4
6 more, page - browse or page through a text file
7
9 /usr/bin/more [-cdflrsuw] [-lines] [+ linenumber]
10 [+/ pattern] [file]...
11
12
13 /usr/bin/page [-cdflrsuw] [-lines] [+ linenumber]
14 [+/ pattern] [file]...
15
16
17 /usr/xpg4/bin/more [-cdeisu] [-n number] [-p command]
18 [-t tagstring] [file]...
19
20
21 /usr/xpg4/bin/more [-cdeisu] [-n number] [+ command]
22 [-t tagstring] [file]...
23
24
26 The more utility is a filter that displays the contents of a text file
27 on the terminal, one screenful at a time. It normally pauses after
28 each screenful. /usr/bin/more then prints --More-- and
29 /usr/xpg4/bin/more then prints file at the bottom of the screen. If
30 more is reading from a file rather than a pipe, the percentage of char‐
31 acters displayed so far is also shown.
32
33
34 The more utility scrolls up to display one more line in response to a
35 RETURN character. more displays another screenful in response to a
36 SPACE character. Other commands are listed below.
37
38
39 The page utility clears the screen before displaying the next screenful
40 of text. page only provides a one-line overlap between screens.
41
42
43 The more utility sets the terminal to NOECHO mode, so that the output
44 can be continuous. Commands that you type do not normally show up on
45 your terminal, except for the / and ! commands.
46
47
48 The /usr/bin/more utility exits after displaying the last specified
49 file. /usr/xpg4/bin/more prompts for a command at the last line of the
50 last specified file.
51
52
53 If the standard output is not a terminal, more acts just like cat(1),
54 except that a header is printed before each file in a series.
55
57 The following options are supported for both /usr/bin/more and
58 /usr/xpg4/bin/more:
59
60 -c Clears before displaying. Redraws the screen instead of
61 scrolling for faster displays. This option is ignored if the
62 terminal does not have the ability to clear to the end of a
63 line.
64
65
66 -d Displays error messages rather than ringing the terminal bell if
67 an unrecognized command is used. This is helpful for inexperi‐
68 enced users.
69
70
71 -s Squeeze. Replaces multiple blank lines with a single blank
72 line. This is helpful when viewing nroff(1) output on the
73 screen.
74
75
76 /usr/bin/more
77 The following options are supported for /usr/bin/more only:
78
79 -f Does not fold long lines. This is useful when lines con‐
80 tain nonprinting characters or escape sequences, such as
81 those generated when nroff(1) output is piped through
82 ul(1).
83
84
85 -l Does not treat FORMFEED characters (Control-l) as page
86 breaks. If -l is not used, more pauses to accept com‐
87 mands after any line containing a ^L character (Control-
88 l). Also, if a file begins with a FORMFEED, the screen
89 is cleared before the file is printed.
90
91
92 -r Normally, more ignores control characters that it does
93 not interpret in some way. The -r option causes these to
94 be displayed as ^C where C stands for any such control
95 character.
96
97
98 -u Suppresses generation of underlining escape sequences.
99 Normally, more handles underlining, such as that pro‐
100 duced by nroff(1), in a manner appropriate to the termi‐
101 nal. If the terminal can perform underlining or has a
102 stand-out mode, more supplies appropriate escape
103 sequences as called for in the text file.
104
105
106 -w Normally, more exits when it comes to the end of its
107 input. With -w, however, more prompts and waits for any
108 key to be struck before exiting.
109
110
111 -lines Displays the indicated number of lines in each screen‐
112 ful, rather than the default (the number of lines in the
113 terminal screen less two).
114
115
116 +linenumber Start up at linenumber.
117
118
119 +/pattern Start up two lines above the line containing the regular
120 expression pattern. Note: Unlike editors, this construct
121 should not end with a `/.' If it does, then the trailing
122 slash is taken as a character in the search pattern.
123
124
125 /usr/xpg4/bin/more
126 The following options are supported for /usr/xpg4/bin/more only:
127
128 -e Exits immediately after writing the last line of the
129 last file in the argument list.
130
131
132 -i Performs pattern matching in searches without regard
133 to case.
134
135
136 -n number Specifies the number of lines per screenful. The num‐
137 ber argument is a positive decimal integer. The -n
138 option overrides any values obtained from the environ‐
139 ment.
140
141
142 -p command For each file examined, initially executes the more
143 +command command in the command argument. If the command is a
144 positioning command, such as a line number or a regu‐
145 lar expression search, set the current position to
146 represent the final results of the command, without
147 writing any intermediate lines of the file. For exam‐
148 ple, the two commands:
149
150 more -p 1000j file
151 more -p 1000G file
152
153
154 are equivalent and start the display with the current
155 position at line 1000, bypassing the lines that j
156 would write and scroll off the screen if it had been
157 issued during the file examination. If the positioning
158 command is unsuccessful, the first line in the file
159 will be the current position.
160
161
162 -t tagstring Writes the screenful of the file containing the tag
163 named by the tagstring argument. See the ctags(1)
164 utility.
165
166
167 -u Treats a backspace character as a printable control
168 character, displayed as a ^H (Control-h), suppressing
169 backspacing and the special handling that produces
170 underlined or standout-mode text on some terminal
171 types. Also, does not ignore a carriage-return char‐
172 acter at the end of a line.
173
174
175
176 If both the -t tagstring and -p command (or the obsolescent +command)
177 options are given, the -t tagstring is processed first.
178
180 Environment
181 more uses the terminal's terminfo(4) entry to determine its display
182 characteristics.
183
184
185 more looks in the environment variable MORE for any preset options. For
186 instance, to page through files using the -c mode by default, set the
187 value of this variable to -c. (Normally, the command sequence to set up
188 this environment variable is placed in the .login or .profile file).
189
190 Commands
191 The commands take effect immediately. It is not necessary to type a
192 carriage return unless the command requires a file, command, tagstring,
193 or pattern. Up to the time when the command character itself is given,
194 the user may type the line kill character to cancel the numerical argu‐
195 ment being formed. In addition, the user may type the erase character
196 to redisplay the `--More--(xx%)' or file message.
197
198
199 In the following commands, i is a numerical argument (1 by default).
200
201 iSPACE Display another screenful, or i more lines if i is speci‐
202 fied.
203
204
205 iRETURN Display another line, or i more lines, if specified.
206
207
208 ib (Control-b) Skip back i screenfuls and then print a
209 i^B screenful.
210
211
212 id (Control-d) Scroll forward one half screenful or i more
213 i^D lines. If i is specified, the count becomes the default
214 for subsequent d and u commands.
215
216
217 if Skip i screens full and then print a screenful.
218
219
220 h Help. Give a description of all the more commands.
221
222
223 ^L (Control-l) Refresh.
224
225
226 in Search for the ith occurrence of the last pattern entered.
227
228
229 q Exit from more.
230 Q
231
232 is Skip i lines and then print a screenful.
233
234
235 v Drop into the vi editor at the current line of the current
236 file.
237
238
239 iz Same as SPACE, except that i, if present, becomes the new
240 default number of lines per screenful.
241
242
243 = Display the current line number.
244
245
246 i/pattern Search forward for the ith occurrence of the regular
247 expression pattern. Display the screenful starting two
248 lines before the line that contains the ith match for the
249 regular expression pattern, or the end of a pipe, which‐
250 ever comes first. If more is displaying a file and there
251 is no match, its position in the file remains unchanged.
252 Regular expressions can be edited using erase and kill
253 characters. Erasing back past the first column cancels the
254 search command.
255
256
257 !command Invoke a shell to execute command. The characters % and !,
258 when used within command are replaced with the current
259 filename and the previous shell command, respectively. If
260 there is no current filename, % is not expanded. Prepend a
261 backslash to these characters to escape expansion.
262
263
264 :f Display the current filename and line number.
265
266
267 i:n Skip to the ith next filename given in the command line,
268 or to the last filename in the list if i is out of range.
269
270
271 i:p Skip to the ith previous filename given in the command
272 line, or to the first filename if i is out of range. If
273 given while more is positioned within a file, go to the
274 beginning of the file. If more is reading from a pipe,
275 more simply rings the terminal bell.
276
277
278 :q Exit from more (same as q or Q).
279 :Q
280
281 /usr/bin/more
282 The following commands are available only in /usr/bin/more:
283
284 ' Single quote. Go to the point from which the last search
285 started. If no search has been performed in the current file,
286 go to the beginning of the file.
287
288
289 . Dot. Repeat the previous command.
290
291
292 ^\ Halt a partial display of text. more stops sending output, and
293 displays the usual --More-- prompt. Some output is lost as a
294 result.
295
296
297 /usr/xpg4/bin/more
298 The following commands are available only in /usr/xpg4/bin/more:
299
300 i^F (Control-f) Skip i screens full and print a screenful.
301 (Same as if.)
302
303
304 ^G (Control-g) Display the current line number (same as
305 =).
306
307
308 ig Go to line number i with the default of the first line
309 in the file.
310
311
312 iG Go to line number i with the default of the Last line
313 in the file.
314
315
316 ij Display another line, or i more lines, if specified.
317 (Same as iRETURN.)
318
319
320 ik Scroll backwards one or i lines, if specified.
321
322
323 mletter Mark the current position with the name letter.
324
325
326 N Reverse direction of search.
327
328
329 r Refresh the screen.
330
331
332 R Refresh the screen, discarding any buffered input.
333
334
335 iu (Control-u) Scroll backwards one half a screen of i
336 i^U lines, if specified. If i is specified, the count
337 becomes the new default for subsequent d and u com‐
338 mands.
339
340
341 ZZ Exit from more (same as q).
342
343
344 :e file Examine (display) a new file. If no file is specified,
345 the current file is redisplayed.
346
347
348 :t tagstring Go to the tag named by the tagstring argument and
349 scroll/rewrite the screen with the tagged line in the
350 current position. See the ctags utility.
351
352
353 'letter Return to the position that was previously marked with
354 the name letter.
355
356
357 '' Return to the position from which the last move of
358 more than a screenful was made. Defaults to the begin‐
359 ning of the file.
360
361
362 i?[!]pattern Search backward in the file for the ith line contain‐
363 ing the pattern. The ! specifies to search backward
364 for the ith line that does not contain the pattern.
365
366
367 i/!pattern Search forward in the file for the ith line that does
368 not contain the pattern.
369
370
371 ![command] Invoke a shell or the specified command.
372
373
374 Large File Behavior
375 See largefile(5) for the description of the behavior of more and page
376 when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
377
379 See environ(5) for descriptions of the following environment variables
380 that affect the execution of more: LANG, LC_ALL, LC_COLLATE
381 (/usr/xpg4/bin/more only), LC_CTYPE, LC_MESSAGES, NLSPATH, and TERM.
382
383 /usr/xpg4/bin/more
384 The following environment variables also affect the execution of
385 /usr/xpg4/bin/more:
386
387 COLUMNS Overrides the system selected horizontal screen size.
388
389
390 EDITOR Used by the v command to select an editor.
391
392
393 LINES Overrides the system selected vertical screen size. The -n
394 option has precedence over LINES in determining the number
395 of lines in a screen.
396
397
398 MORE A string specifying options as described in the OPTIONS
399 section, above. As in a command line, The options must be
400 separated by blank characters and each option specification
401 must start with a −. Any command line options are processed
402 after those specified in MORE as though the command line
403 were: more $MORE options operands
404
405
407 The following exit values are returned:
408
409 0 Successful completion.
410
411
412 >0 An error occurred.
413
414
416 /usr/lib/more.help help file for /usr/bin/more and /usr/bin/page
417 only.
418
419
421 See attributes(5) for descriptions of the following attributes:
422
423 /usr/bin/more /usr/bin/page
424 ┌─────────────────────────────┬─────────────────────────────┐
425 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
426 ├─────────────────────────────┼─────────────────────────────┤
427 │Availability │SUNWcsu │
428 ├─────────────────────────────┼─────────────────────────────┤
429 │CSI │Not enabled │
430 └─────────────────────────────┴─────────────────────────────┘
431
432 /usr/xpg4/bin/more
433 ┌─────────────────────────────┬─────────────────────────────┐
434 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
435 ├─────────────────────────────┼─────────────────────────────┤
436 │Availability │SUNWxcu4 │
437 ├─────────────────────────────┼─────────────────────────────┤
438 │CSI │Enabled │
439 ├─────────────────────────────┼─────────────────────────────┤
440 │Interface Stability │Standard │
441 └─────────────────────────────┴─────────────────────────────┘
442
444 cat(1), csh(1), ctags(1), man(1), nroff(1), script(1), sh(1), ul(1),
445 terminfo(4), attributes(5), environ(5), largefile(5), standards(5)
446
447 /usr/bin/more /usr/bin/page
448 regcomp(3C)
449
450 /usr/xpg4/bin/more
451 regex(5)
452
454 /usr/bin/more
455 Skipping backwards is too slow on large files.
456
457 /usr/xpg4/bin/more
458 This utility will not behave correctly if the terminal is not set up
459 properly.
460
461
462
463SunOS 5.11 4 Nov 2005 more(1)