2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document. The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
25 .\" This notice shall appear on any product containing this material.
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
45 .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
47 .TH MORE 1 "Nov 4, 2005"
49 more, page \- browse or page through a text file
53 \fB/usr/bin/more\fR [\fB-cdflrsuw\fR] [\fB-lines\fR] [+ \fIlinenumber\fR]
54 [+/ \fIpattern\fR] [\fIfile\fR]...
59 \fB/usr/bin/page\fR [\fB-cdflrsuw\fR] [\fB-lines\fR] [+ \fIlinenumber\fR]
60 [+/ \fIpattern\fR] [\fIfile\fR]...
65 \fB/usr/xpg4/bin/more\fR [\fB-cdeisu\fR] [\fB-n\fR \fInumber\fR] [\fB-p\fR \fIcommand\fR]
66 [\fB-t\fR \fItagstring\fR] [\fIfile\fR]...
71 \fB/usr/xpg4/bin/more\fR [\fB-cdeisu\fR] [\fB-n\fR \fInumber\fR] [+ \fIcommand\fR]
72 [\fB-t\fR \fItagstring\fR] [\fIfile\fR]...
78 The \fBmore\fR utility is a filter that displays the contents of a text file on
79 the terminal, one screenful at a time. It normally pauses after each
80 screenful. \fB/usr/bin/more\fR then prints \fB--More--\fR and
81 \fB/usr/xpg4/bin/more\fR then prints \fIfile\fR at the bottom of the screen. If
82 \fBmore\fR is reading from a file rather than a pipe, the percentage of
83 characters displayed so far is also shown.
86 The \fBmore\fR utility scrolls up to display one more line in response to a
87 \fBRETURN\fR character. \fBmore\fR displays another screenful in response to a
88 \fBSPACE\fR character. Other commands are listed below.
91 The \fBpage\fR utility clears the screen before displaying the next screenful
92 of text. \fBpage\fR only provides a one-line overlap between screens.
95 The \fBmore\fR utility sets the terminal to \fBNOECHO\fR mode, so that the
96 output can be continuous. Commands that you type do not normally show up on
97 your terminal, except for the \fB/\fR and \fB!\fR commands.
100 The \fB/usr/bin/more\fR utility exits after displaying the last specified file.
101 \fB/usr/xpg4/bin/more\fR prompts for a command at the last line of the last
105 If the standard output is not a terminal, \fBmore\fR acts just like
106 \fBcat\fR(1), except that a header is printed before each file in a series.
110 The following options are supported for both \fB/usr/bin/more\fR and
111 \fB/usr/xpg4/bin/more\fR:
118 Clears before displaying. Redraws the screen instead of scrolling for faster
119 displays. This option is ignored if the terminal does not have the ability to
120 clear to the end of a line.
129 Displays error messages rather than ringing the terminal bell if an
130 unrecognized command is used. This is helpful for inexperienced users.
139 Squeeze. Replaces multiple blank lines with a single blank line. This is
140 helpful when viewing \fBnroff\fR(1) output on the screen.
146 The following options are supported for \fB/usr/bin/more\fR only:
153 Does not fold long lines. This is useful when lines contain nonprinting
154 characters or escape sequences, such as those generated when \fBnroff\fR(1)
155 output is piped through \fBul\fR(1).
164 Does not treat \fBFORMFEED\fR characters (Control-l) as page breaks. If
165 \fB-l\fR is not used, \fBmore\fR pauses to accept commands after any line
166 containing a \fB^L\fR character (Control-l). Also, if a file begins with a
167 \fBFORMFEED\fR, the screen is cleared before the file is printed.
176 Normally, \fBmore\fR ignores control characters that it does not interpret in
177 some way. The \fB-r\fR option causes these to be displayed as \fB^\fR\fIC\fR
178 where \fIC\fR stands for any such control character.
187 Suppresses generation of underlining escape sequences. Normally, \fBmore\fR
188 handles underlining, such as that produced by \fBnroff\fR(1), in a manner
189 appropriate to the terminal. If the terminal can perform underlining or has a
190 stand-out mode, \fBmore\fR supplies appropriate escape sequences as called for
200 Normally, \fBmore\fR exits when it comes to the end of its input. With
201 \fB-w\fR, however, \fBmore\fR prompts and waits for any key to be struck before
208 \fB\fB-\fR\fIlines\fR\fR
211 Displays the indicated number of \fIlines\fR in each screenful, rather than the
212 default (the number of lines in the terminal screen less two).
218 \fB\fB+\fR\fIlinenumber\fR\fR
221 Start up at \fIlinenumber\fR.
227 \fB\fB+/\fR\fIpattern\fR\fR
230 Start up two lines above the line containing the regular expression
231 \fIpattern\fR. \fBNote:\fR Unlike editors, this construct should \fInot\fR end
232 with a `\fB/\fR.' If it does, then the trailing slash is taken as a character
233 in the search pattern.
236 .SS "/usr/xpg4/bin/more"
239 The following options are supported for \fB/usr/xpg4/bin/more\fR only:
246 Exits immediately after writing the last line of the last file in the argument
256 Performs pattern matching in searches without regard to case.
262 \fB\fB-n\fR \fInumber\fR \fR
265 Specifies the number of lines per screenful. The \fInumber\fR argument is a
266 positive decimal integer. The \fB-n\fR option overrides any values obtained
267 from the environment.
273 \fB\fB-p\fR \fIcommand\fR \fR
277 \fB\fB+\fR\fIcommand\fR \fR
280 For each file examined, initially executes the \fBmore\fR command in the
281 \fIcommand\fR argument. If the command is a positioning command, such as a line
282 number or a regular expression search, set the current position to represent
283 the final results of the command, without writing any intermediate lines of the
284 file. For example, the two commands:
288 \fBmore -p 1000j file
289 more -p 1000G file\fR
294 are equivalent and start the display with the current position at line 1000,
295 bypassing the lines that \fBj\fR would write and scroll off the screen if it
296 had been issued during the file examination. If the positioning command is
297 unsuccessful, the first line in the file will be the current position.
303 \fB\fB-t\fR \fItagstring\fR \fR
306 Writes the screenful of the file containing the tag named by the
307 \fItagstring\fR argument. See the \fBctags\fR(1) utility.
316 Treats a backspace character as a printable control character, displayed as a
317 ^H (Control-h), suppressing backspacing and the special handling that produces
318 underlined or standout-mode text on some terminal types. Also, does not ignore
319 a carriage-return character at the end of a line.
324 If both the \fB-t\fR\fI tagstring\fR and \fB-p\fR\fI command\fR (or the
325 obsolescent \fI+command\fR) options are given, the \fB-t\fR\fI tagstring\fR is
331 \fBmore\fR uses the terminal's \fBterminfo\fR(4) entry to determine its display
335 \fBmore\fR looks in the environment variable \fBMORE\fR for any preset options.
336 For instance, to page through files using the \fB-c\fR mode by default, set the
337 value of this variable to \fB-c\fR. (Normally, the command sequence to set up
338 this environment variable is placed in the \fB\&.login\fR or \fB\&.profile\fR
343 The commands take effect immediately. It is not necessary to type a carriage
344 return unless the command requires a \fIfile\fR, \fIcommand\fR,
345 \fItagstring\fR, or \fIpattern\fR. Up to the time when the command character
346 itself is given, the user may type the line kill character to cancel the
347 numerical argument being formed. In addition, the user may type the erase
348 character to redisplay the `\fB--More--(\fR\fIxx\fR%)' or \fIfile\fR message.
351 In the following commands, \fIi\fR is a numerical argument (\fB1\fR by
359 Display another screenful, or \fIi\fR more lines if \fIi\fR is specified.
368 Display another line, or \fIi\fR more lines, if specified.
378 \fB\fIi\fR\fB^B\fR\fR
381 (Control-b) Skip back \fIi\fR screenfuls and then print a screenful.
391 \fB\fIi\fR\fB^D\fR\fR
394 (Control-d) Scroll forward one half screenful or \fIi\fR more lines. If \fIi\fR
395 is specified, the count becomes the default for subsequent \fBd\fR and \fBu\fR
405 Skip \fIi\fR screens full and then print a screenful.
414 Help. Give a description of all the \fBmore\fR commands.
432 Search for the \fIi\|\fRth occurrence of the last \fIpattern\fR entered.
445 Exit from \fBmore\fR.
454 Skip \fIi\fR lines and then print a screenful.
463 Drop into the \fBvi\fR editor at the current line of the current file.
472 Same as SPACE, except that \fIi\fR, if present, becomes the new default number
473 of lines per screenful.
482 Display the current line number.
488 \fB\fIi\fR\fB/\fR\fIpattern\fR\fR
491 Search forward for the \fIi\|\fRth occurrence of the regular expression
492 \fIpattern\fR. Display the screenful starting two lines before the line that
493 contains the \fIi\|\fRth match for the regular expression \fIpattern\fR, or the
494 end of a pipe, whichever comes first. If \fBmore\fR is displaying a file and
495 there is no match, its position in the file remains unchanged. Regular
496 expressions can be edited using erase and kill characters. Erasing back past
497 the first column cancels the search command.
503 \fB\fB!\fR\fIcommand\fR\fR
506 Invoke a shell to execute \fIcommand\|\fR. The characters \fB%\fR and \fB!\fR,
507 when used within \fIcommand\fR are replaced with the current filename and the
508 previous shell command, respectively. If there is no current filename, \fB%\fR
509 is not expanded. Prepend a backslash to these characters to escape expansion.
518 Display the current filename and line number.
524 \fB\fIi\fR\fB:n\fR\fR
527 Skip to the \fIi\|\fRth next filename given in the command line, or to the last
528 filename in the list if \fIi\fR is out of range.
534 \fB\fIi\fR\fB:p\fR\fR
537 Skip to the \fIi\|\fRth previous filename given in the command line, or to the
538 first filename if \fIi\fR is out of range. If given while \fBmore\fR is
539 positioned within a file, go to the beginning of the file. If \fBmore\fR is
540 reading from a pipe, \fBmore\fR simply rings the terminal bell.
553 Exit from \fBmore\fR (same as \fBq\fR or \fBQ\fR).
559 The following commands are available only in \fB/usr/bin/more\fR:
566 Single quote. Go to the point from which the last search started. If no search
567 has been performed in the current file, go to the beginning of the file.
576 Dot. Repeat the previous command.
585 Halt a partial display of text. \fBmore\fR stops sending output, and displays
586 the usual \fB--More--\fR prompt. Some output is lost as a result.
589 .SS "/usr/xpg4/bin/more"
592 The following commands are available only in \fB/usr/xpg4/bin/more\fR:
596 \fB\fIi\fR\fB^F\fR\fR
599 (Control-f) Skip \fIi\fR screens full and print a screenful. (Same as
609 (Control-g) Display the current line number (same as \fB=\fR).
618 Go to line number \fIi\fR with the default of the first line in the file.
627 Go to line number \fIi\fR with the default of the Last line in the file.
636 Display another line, or \fIi\fR more lines, if specified. (Same as
646 Scroll backwards one or \fIi\fR lines, if specified.
652 \fB\fBm\fR\fIletter\fR \fR
655 Mark the current position with the name \fIletter\fR.
664 Reverse direction of search.
682 Refresh the screen, discarding any buffered input.
692 \fB\fIi\fR\fB^U\fR\fR
695 (Control-u) Scroll backwards one half a screen of \fIi\fR lines, if specified.
696 If \fIi\fR is specified, the count becomes the new default for subsequent
697 \fBd\fR and \fBu\fR commands.
706 Exit from \fBmore\fR (same as \fBq\fR).
712 \fB\fB:e\fR \fIfile\fR \fR
715 Examine (display) a new file. If no \fIfile\fR is specified, the current file
722 \fB\fB:t\fR \fItagstring\fR \fR
725 Go to the tag named by the \fItagstring\fR argument and scroll/rewrite the
726 screen with the tagged line in the current position. See the \fBctags\fR
733 \fB\fB\&'\fR\fIletter\fR \fR
736 Return to the position that was previously marked with the name \fIletter\fR.
745 Return to the position from which the last move of more than a screenful was
746 made. Defaults to the beginning of the file.
752 \fB\fIi\fR\fB?\fR[\fI!\fR]\fIpattern\fR\fR
755 Search backward in the file for the \fIi\fRth line containing the
756 \fIpattern\fR. The \fI!\fR specifies to search backward for the \fIi\fRth line
757 that does not contain the \fIpattern\fR.
763 \fB\fIi\fR\fB/\fR\fB!\fR\fIpattern\fR\fR
766 Search forward in the file for the \fIi\fRth line that does not contain the
773 \fB\fB!\fR[\fIcommand\fR]\fR
776 Invoke a shell or the specified command.
779 .SS "Large File Behavior"
782 See \fBlargefile\fR(5) for the description of the behavior of \fBmore\fR and
783 \fBpage\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
785 .SH ENVIRONMENT VARIABLES
788 See \fBenviron\fR(5) for descriptions of the following environment variables
789 that affect the execution of \fBmore\fR: \fBLANG\fR, \fBLC_ALL\fR,
790 \fBLC_COLLATE\fR (\fB/usr/xpg4/bin/more\fR only), \fBLC_CTYPE\fR,
791 \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and \fBTERM\fR.
792 .SS "/usr/xpg4/bin/more"
795 The following environment variables also affect the execution of
796 \fB/usr/xpg4/bin/more\fR:
803 Overrides the system selected horizontal screen size.
812 Used by the \fBv\fR command to select an editor.
821 Overrides the system selected vertical screen size. The \fB-n\fR option has
822 precedence over \fBLINES\fR in determining the number of lines in a screen.
831 A string specifying options as described in the OPTIONS section, above. As in a
832 command line, The options must be separated by blank characters and each option
833 specification must start with a \(mi. Any command line options are processed
834 after those specified in \fBMORE\fR as though the command line were: \fBmore
835 $MORE\fR \fIoptions operands\fR
841 The following exit values are returned:
848 Successful completion.
864 \fB\fB/usr/lib/more.help\fR\fR
867 help file for \fB/usr/bin/more\fR and \fB/usr/bin/page\fR only.
873 See \fBattributes\fR(5) for descriptions of the following attributes:
874 .SS "/usr/bin/more /usr/bin/page"
882 ATTRIBUTE TYPE ATTRIBUTE VALUE
887 .SS "/usr/xpg4/bin/more"
895 ATTRIBUTE TYPE ATTRIBUTE VALUE
899 Interface Stability Standard
905 \fBcat\fR(1), \fBcsh\fR(1), \fBctags\fR(1), \fBman\fR(1), \fBnroff\fR(1),
906 \fBscript\fR(1), \fBsh\fR(1), \fBul\fR(1), \fBterminfo\fR(4),
907 \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
908 .SS "/usr/bin/more /usr/bin/page"
912 .SS "/usr/xpg4/bin/more"
920 Skipping backwards is too slow on large files.
921 .SS "/usr/xpg4/bin/more"
924 This utility will not behave correctly if the terminal is not set up properly.