2 .\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\" This notice shall appear on any product containing this material.
7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 .TH MORE 1 "Nov 4, 2005"
12 more, page \- browse or page through a text file
16 \fB/usr/bin/more\fR [\fB-cdflrsuw\fR] [\fB-lines\fR] [+ \fIlinenumber\fR]
17 [+/ \fIpattern\fR] [\fIfile\fR]...
22 \fB/usr/bin/page\fR [\fB-cdflrsuw\fR] [\fB-lines\fR] [+ \fIlinenumber\fR]
23 [+/ \fIpattern\fR] [\fIfile\fR]...
28 \fB/usr/xpg4/bin/more\fR [\fB-cdeisu\fR] [\fB-n\fR \fInumber\fR] [\fB-p\fR \fIcommand\fR]
29 [\fB-t\fR \fItagstring\fR] [\fIfile\fR]...
34 \fB/usr/xpg4/bin/more\fR [\fB-cdeisu\fR] [\fB-n\fR \fInumber\fR] [+ \fIcommand\fR]
35 [\fB-t\fR \fItagstring\fR] [\fIfile\fR]...
41 The \fBmore\fR utility is a filter that displays the contents of a text file on
42 the terminal, one screenful at a time. It normally pauses after each
43 screenful. \fB/usr/bin/more\fR then prints \fB--More--\fR and
44 \fB/usr/xpg4/bin/more\fR then prints \fIfile\fR at the bottom of the screen. If
45 \fBmore\fR is reading from a file rather than a pipe, the percentage of
46 characters displayed so far is also shown.
49 The \fBmore\fR utility scrolls up to display one more line in response to a
50 \fBRETURN\fR character. \fBmore\fR displays another screenful in response to a
51 \fBSPACE\fR character. Other commands are listed below.
54 The \fBpage\fR utility clears the screen before displaying the next screenful
55 of text. \fBpage\fR only provides a one-line overlap between screens.
58 The \fBmore\fR utility sets the terminal to \fBNOECHO\fR mode, so that the
59 output can be continuous. Commands that you type do not normally show up on
60 your terminal, except for the \fB/\fR and \fB!\fR commands.
63 The \fB/usr/bin/more\fR utility exits after displaying the last specified file.
64 \fB/usr/xpg4/bin/more\fR prompts for a command at the last line of the last
68 If the standard output is not a terminal, \fBmore\fR acts just like
69 \fBcat\fR(1), except that a header is printed before each file in a series.
73 The following options are supported for both \fB/usr/bin/more\fR and
74 \fB/usr/xpg4/bin/more\fR:
81 Clears before displaying. Redraws the screen instead of scrolling for faster
82 displays. This option is ignored if the terminal does not have the ability to
83 clear to the end of a line.
92 Displays error messages rather than ringing the terminal bell if an
93 unrecognized command is used. This is helpful for inexperienced users.
102 Squeeze. Replaces multiple blank lines with a single blank line. This is
103 helpful when viewing \fBnroff\fR(1) output on the screen.
109 The following options are supported for \fB/usr/bin/more\fR only:
116 Does not fold long lines. This is useful when lines contain nonprinting
117 characters or escape sequences, such as those generated when \fBnroff\fR(1)
118 output is piped through \fBul\fR(1).
127 Does not treat \fBFORMFEED\fR characters (Control-l) as page breaks. If
128 \fB-l\fR is not used, \fBmore\fR pauses to accept commands after any line
129 containing a \fB^L\fR character (Control-l). Also, if a file begins with a
130 \fBFORMFEED\fR, the screen is cleared before the file is printed.
139 Normally, \fBmore\fR ignores control characters that it does not interpret in
140 some way. The \fB-r\fR option causes these to be displayed as \fB^\fR\fIC\fR
141 where \fIC\fR stands for any such control character.
150 Suppresses generation of underlining escape sequences. Normally, \fBmore\fR
151 handles underlining, such as that produced by \fBnroff\fR(1), in a manner
152 appropriate to the terminal. If the terminal can perform underlining or has a
153 stand-out mode, \fBmore\fR supplies appropriate escape sequences as called for
163 Normally, \fBmore\fR exits when it comes to the end of its input. With
164 \fB-w\fR, however, \fBmore\fR prompts and waits for any key to be struck before
171 \fB\fB-\fR\fIlines\fR\fR
174 Displays the indicated number of \fIlines\fR in each screenful, rather than the
175 default (the number of lines in the terminal screen less two).
181 \fB\fB+\fR\fIlinenumber\fR\fR
184 Start up at \fIlinenumber\fR.
190 \fB\fB+/\fR\fIpattern\fR\fR
193 Start up two lines above the line containing the regular expression
194 \fIpattern\fR. \fBNote:\fR Unlike editors, this construct should \fInot\fR end
195 with a `\fB/\fR.' If it does, then the trailing slash is taken as a character
196 in the search pattern.
199 .SS "/usr/xpg4/bin/more"
202 The following options are supported for \fB/usr/xpg4/bin/more\fR only:
209 Exits immediately after writing the last line of the last file in the argument
219 Performs pattern matching in searches without regard to case.
225 \fB\fB-n\fR \fInumber\fR \fR
228 Specifies the number of lines per screenful. The \fInumber\fR argument is a
229 positive decimal integer. The \fB-n\fR option overrides any values obtained
230 from the environment.
236 \fB\fB-p\fR \fIcommand\fR \fR
240 \fB\fB+\fR\fIcommand\fR \fR
243 For each file examined, initially executes the \fBmore\fR command in the
244 \fIcommand\fR argument. If the command is a positioning command, such as a line
245 number or a regular expression search, set the current position to represent
246 the final results of the command, without writing any intermediate lines of the
247 file. For example, the two commands:
251 \fBmore -p 1000j file
252 more -p 1000G file\fR
257 are equivalent and start the display with the current position at line 1000,
258 bypassing the lines that \fBj\fR would write and scroll off the screen if it
259 had been issued during the file examination. If the positioning command is
260 unsuccessful, the first line in the file will be the current position.
266 \fB\fB-t\fR \fItagstring\fR \fR
269 Writes the screenful of the file containing the tag named by the
270 \fItagstring\fR argument. See the \fBctags\fR(1) utility.
279 Treats a backspace character as a printable control character, displayed as a
280 ^H (Control-h), suppressing backspacing and the special handling that produces
281 underlined or standout-mode text on some terminal types. Also, does not ignore
282 a carriage-return character at the end of a line.
287 If both the \fB-t\fR\fI tagstring\fR and \fB-p\fR\fI command\fR (or the
288 obsolescent \fI+command\fR) options are given, the \fB-t\fR\fI tagstring\fR is
294 \fBmore\fR uses the terminal's \fBterminfo\fR(4) entry to determine its display
298 \fBmore\fR looks in the environment variable \fBMORE\fR for any preset options.
299 For instance, to page through files using the \fB-c\fR mode by default, set the
300 value of this variable to \fB-c\fR. (Normally, the command sequence to set up
301 this environment variable is placed in the \fB\&.login\fR or \fB\&.profile\fR
306 The commands take effect immediately. It is not necessary to type a carriage
307 return unless the command requires a \fIfile\fR, \fIcommand\fR,
308 \fItagstring\fR, or \fIpattern\fR. Up to the time when the command character
309 itself is given, the user may type the line kill character to cancel the
310 numerical argument being formed. In addition, the user may type the erase
311 character to redisplay the `\fB--More--(\fR\fIxx\fR%)' or \fIfile\fR message.
314 In the following commands, \fIi\fR is a numerical argument (\fB1\fR by
322 Display another screenful, or \fIi\fR more lines if \fIi\fR is specified.
331 Display another line, or \fIi\fR more lines, if specified.
341 \fB\fIi\fR\fB^B\fR\fR
344 (Control-b) Skip back \fIi\fR screenfuls and then print a screenful.
354 \fB\fIi\fR\fB^D\fR\fR
357 (Control-d) Scroll forward one half screenful or \fIi\fR more lines. If \fIi\fR
358 is specified, the count becomes the default for subsequent \fBd\fR and \fBu\fR
368 Skip \fIi\fR screens full and then print a screenful.
377 Help. Give a description of all the \fBmore\fR commands.
395 Search for the \fIi\|\fRth occurrence of the last \fIpattern\fR entered.
408 Exit from \fBmore\fR.
417 Skip \fIi\fR lines and then print a screenful.
426 Drop into the \fBvi\fR editor at the current line of the current file.
435 Same as SPACE, except that \fIi\fR, if present, becomes the new default number
436 of lines per screenful.
445 Display the current line number.
451 \fB\fIi\fR\fB/\fR\fIpattern\fR\fR
454 Search forward for the \fIi\|\fRth occurrence of the regular expression
455 \fIpattern\fR. Display the screenful starting two lines before the line that
456 contains the \fIi\|\fRth match for the regular expression \fIpattern\fR, or the
457 end of a pipe, whichever comes first. If \fBmore\fR is displaying a file and
458 there is no match, its position in the file remains unchanged. Regular
459 expressions can be edited using erase and kill characters. Erasing back past
460 the first column cancels the search command.
466 \fB\fB!\fR\fIcommand\fR\fR
469 Invoke a shell to execute \fIcommand\|\fR. The characters \fB%\fR and \fB!\fR,
470 when used within \fIcommand\fR are replaced with the current filename and the
471 previous shell command, respectively. If there is no current filename, \fB%\fR
472 is not expanded. Prepend a backslash to these characters to escape expansion.
481 Display the current filename and line number.
487 \fB\fIi\fR\fB:n\fR\fR
490 Skip to the \fIi\|\fRth next filename given in the command line, or to the last
491 filename in the list if \fIi\fR is out of range.
497 \fB\fIi\fR\fB:p\fR\fR
500 Skip to the \fIi\|\fRth previous filename given in the command line, or to the
501 first filename if \fIi\fR is out of range. If given while \fBmore\fR is
502 positioned within a file, go to the beginning of the file. If \fBmore\fR is
503 reading from a pipe, \fBmore\fR simply rings the terminal bell.
516 Exit from \fBmore\fR (same as \fBq\fR or \fBQ\fR).
522 The following commands are available only in \fB/usr/bin/more\fR:
529 Single quote. Go to the point from which the last search started. If no search
530 has been performed in the current file, go to the beginning of the file.
539 Dot. Repeat the previous command.
548 Halt a partial display of text. \fBmore\fR stops sending output, and displays
549 the usual \fB--More--\fR prompt. Some output is lost as a result.
552 .SS "/usr/xpg4/bin/more"
555 The following commands are available only in \fB/usr/xpg4/bin/more\fR:
559 \fB\fIi\fR\fB^F\fR\fR
562 (Control-f) Skip \fIi\fR screens full and print a screenful. (Same as
572 (Control-g) Display the current line number (same as \fB=\fR).
581 Go to line number \fIi\fR with the default of the first line in the file.
590 Go to line number \fIi\fR with the default of the Last line in the file.
599 Display another line, or \fIi\fR more lines, if specified. (Same as
609 Scroll backwards one or \fIi\fR lines, if specified.
615 \fB\fBm\fR\fIletter\fR \fR
618 Mark the current position with the name \fIletter\fR.
627 Reverse direction of search.
645 Refresh the screen, discarding any buffered input.
655 \fB\fIi\fR\fB^U\fR\fR
658 (Control-u) Scroll backwards one half a screen of \fIi\fR lines, if specified.
659 If \fIi\fR is specified, the count becomes the new default for subsequent
660 \fBd\fR and \fBu\fR commands.
669 Exit from \fBmore\fR (same as \fBq\fR).
675 \fB\fB:e\fR \fIfile\fR \fR
678 Examine (display) a new file. If no \fIfile\fR is specified, the current file
685 \fB\fB:t\fR \fItagstring\fR \fR
688 Go to the tag named by the \fItagstring\fR argument and scroll/rewrite the
689 screen with the tagged line in the current position. See the \fBctags\fR
696 \fB\fB\&'\fR\fIletter\fR \fR
699 Return to the position that was previously marked with the name \fIletter\fR.
708 Return to the position from which the last move of more than a screenful was
709 made. Defaults to the beginning of the file.
715 \fB\fIi\fR\fB?\fR[\fI!\fR]\fIpattern\fR\fR
718 Search backward in the file for the \fIi\fRth line containing the
719 \fIpattern\fR. The \fI!\fR specifies to search backward for the \fIi\fRth line
720 that does not contain the \fIpattern\fR.
726 \fB\fIi\fR\fB/\fR\fB!\fR\fIpattern\fR\fR
729 Search forward in the file for the \fIi\fRth line that does not contain the
736 \fB\fB!\fR[\fIcommand\fR]\fR
739 Invoke a shell or the specified command.
742 .SS "Large File Behavior"
745 See \fBlargefile\fR(5) for the description of the behavior of \fBmore\fR and
746 \fBpage\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
748 .SH ENVIRONMENT VARIABLES
751 See \fBenviron\fR(5) for descriptions of the following environment variables
752 that affect the execution of \fBmore\fR: \fBLANG\fR, \fBLC_ALL\fR,
753 \fBLC_COLLATE\fR (\fB/usr/xpg4/bin/more\fR only), \fBLC_CTYPE\fR,
754 \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and \fBTERM\fR.
755 .SS "/usr/xpg4/bin/more"
758 The following environment variables also affect the execution of
759 \fB/usr/xpg4/bin/more\fR:
766 Overrides the system selected horizontal screen size.
775 Used by the \fBv\fR command to select an editor.
784 Overrides the system selected vertical screen size. The \fB-n\fR option has
785 precedence over \fBLINES\fR in determining the number of lines in a screen.
794 A string specifying options as described in the OPTIONS section, above. As in a
795 command line, The options must be separated by blank characters and each option
796 specification must start with a \(mi. Any command line options are processed
797 after those specified in \fBMORE\fR as though the command line were: \fBmore
798 $MORE\fR \fIoptions operands\fR
804 The following exit values are returned:
811 Successful completion.
827 \fB\fB/usr/lib/more.help\fR\fR
830 help file for \fB/usr/bin/more\fR and \fB/usr/bin/page\fR only.
836 See \fBattributes\fR(5) for descriptions of the following attributes:
837 .SS "/usr/bin/more /usr/bin/page"
845 ATTRIBUTE TYPE ATTRIBUTE VALUE
850 .SS "/usr/xpg4/bin/more"
858 ATTRIBUTE TYPE ATTRIBUTE VALUE
862 Interface Stability Standard
868 \fBcat\fR(1), \fBcsh\fR(1), \fBctags\fR(1), \fBman\fR(1), \fBnroff\fR(1),
869 \fBscript\fR(1), \fBsh\fR(1), \fBul\fR(1), \fBterminfo\fR(4),
870 \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
871 .SS "/usr/bin/more /usr/bin/page"
875 .SS "/usr/xpg4/bin/more"
883 Skipping backwards is too slow on large files.
884 .SS "/usr/xpg4/bin/more"
887 This utility will not behave correctly if the terminal is not set up properly.