Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

csh(1)

man(1)

script(1)

sh(1)

environ(4)

environ(5)

more(1)

NAME

more, page − browse or page through a text file

SYNOPSIS

more [ −cdflrsuw ] [ −lines ] [ +linenumber ] [ +/pattern ] [ filename ... ]

page [ −cdflrsuw ] [ −lines ] [ +linenumber ] [ +/pattern ] [ filename ... ]

AVAILABILITY

SUNWcsu

DESCRIPTION

more is a filter that displays the contents of a text file on the terminal, one screenful at a time.  It normally pauses after each screenful, and prints --More-- at the bottom of the screen.  more provides a two-line overlap between screens for continuity.  If more is reading from a file rather than a pipe, the percentage of characters displayed so far is also shown. 

more scrolls up to display one more line in response to a RETURN character; it displays another screenful in response to a SPACE character.  Other commands are listed below. 

page clears the screen before displaying the next screenful of text; it only provides a one-line overlap between screens. 

more sets the terminal to noecho mode, so that the output can be continuous.  Commands that you type do not normally show up on your terminal, except for the / and ! commands. 

If the standard output is not a terminal, more acts just like cat(1), except that a header is printed before each file in a series. 

OPTIONS

The following options are available with more:

−c Clear before displaying.  Redrawing the screen instead of scrolling for faster displays.  This option is ignored if the terminal does not have the ability to clear to the end of a line. 

−d Display error messages rather than ringing the terminal bell if an unrecognized command is used.  This is helpful for inexperienced users. 

−f Do not fold long lines.  This is useful when lines contain nonprinting characters or escape sequences, such as those generated when nroff(1) output is piped through ul(1). 

−l Do not treat FORMFEED characters (CTRL-L) as “page breaks.” If −l is not used, more pauses to accept commands after any line containing a ^L character (CTRL-L).  Also, if a file begins with a FORMFEED, the screen is cleared before the file is printed. 

−r Normally, more ignores control characters that it does not interpret in some way.  The −r option causes these to be displayed as ^C where C stands for any such control character. 

−s Squeeze.  Replace multiple blank lines with a single blank line.  This is helpful when viewing nroff(1) output, on the screen. 

−u Suppress generation of underlining escape sequences.  Normally, more handles underlining, such as that produced by nroff(1), in a manner appropriate to the terminal.  If the terminal can perform underlining or has a stand-out mode, more supplies appropriate escape sequences as called for in the text file. 

−w Normally, more exits when it comes to the end of its input.  With −w, however, more prompts and waits for any key to be struck before exiting. 

−lines Display the indicated number of lines in each screenful, rather than the default (the number of lines in the terminal screen less two). 

+linenumber
Start up at linenumber.

+/pattern
Start up two lines above the line containing the regular expression pattern.  Note:  Unlike editors, this construct should not end with a ‘/’.  If it does, then the trailing slash is taken as a character in the search pattern. 

USAGE

Environment

more uses the terminal’s /usr/share/lib/terminfo entry to determine its display characteristics, and looks in the environment variable MORE for any preset options.  For instance, to page through files using the −c mode by default, set the value of this variable to −c.  (Normally, the command sequence to set up this environment variable is placed in the .login or .profile file). 

Commands

The commands take effect immediately;  it is not necessary to type a carriage return.  Up to the time when the command character itself is given, the user may type the line kill character to cancel the numerical argument being formed.  In addition, the user may type the erase character to redisplay the ‘--More--(xx%)’ message. 

In the following commands, i is a numerical argument (1 by default). 

iSPACE Display another screenful, or i more lines if i is specified. 

iRETURN Display another line, or i more lines, if specified. 

i^D (CTRL−D) Display (scroll down) 11 more lines.  If i is given, the scroll size is set to i.

id Same as ^D. 

iz Same as SPACE, except that i, if present, becomes the new default number of lines per screenful.

is Skip i lines and then print a screenful. 

if Skip i screenfuls and then print a screenful. 

i^B (CTRL-B) Skip back i screenfuls and then print a screenful. 

b Same as ^B (CTRL-B). 

q

Q Exit from more. 

= Display the current line number. 

v Drop into the editor indicated by the EDITOR environment variable, at the current line of the current file.  The default editor is ed(1). 

h Help.  Give a description of all the more commands. 

i/pattern Search forward for the ith occurrence of the regular expression pattern. Display the screenful starting two lines before the line that contains the ith match for the regular expression pattern, or the end of a pipe, whichever comes first.  If more is displaying a file and there is no such match, its position in the file remains unchanged.  Regular expressions can be edited using erase and kill characters.  Erasing back past the first column cancels the search command. 

in Search for the ith occurrence of the last pattern entered. 

´ Single quote.  Go to the point from which the last search started.  If no search has been performed in the current file, go to the beginning of the file. 

!command Invoke a shell to execute command. The characters % and !, when used within command are replaced with the current filename and the previous shell command, respectively.  If there is no current filename, % is not expanded. Prepend a backslash to these characters to escape expansion. 

i:n Skip to the ith next filename given in the command line, or to the last filename in the list if i is out of range. 

i:p Skip to the ith previous filename given in the command line, or to the first filename if i is out of range.  If given while more is positioned within a file, go to the beginning of the file.  If more is reading from a pipe, more simply rings the terminal bell. 

:f Display the current filename and line number. 

:q

:Q Exit from more (same as q or Q). 

. Dot.  Repeat the previous command. 

^\ Halt a partial display of text.  more stops sending output, and displays the usual --More-- prompt.  Unfortunately, some output is lost as a result. 

ENVIRONMENT

If any of the LC_∗ variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of more for each corresponding locale category is determined by the value of the LANG environment variable.  If LC_ALL is set, its contents are used to override both the LANG and the other LC_∗ variables.  If none of the above variables is set in the environment, the "C"  (U.S. style) locale determines how more behaves. 

LC_CTYPE
Determines how more handles characters. When LC_CTYPE is set to a valid value, more can display and handle text and filenames containing valid characters for that locale.  more can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide.  more can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid. 

LC_MESSAGES
Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses.  In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).

FILES

/usr/lib/more.help help file

/usr/share/lib/terminfo/∗
terminal data base

SEE ALSO

cat(1), csh(1), man(1), script(1), sh(1), environ(4), environ(5)

NOTES

Skipping backwards is too slow on large files. 

SunOS 5.4  —  Last change: 17 Mar 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026