Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ page(1) — Duplix 5.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

man(1)

msgs(1)

script(1)

sh(1)

environ(7)

MORE(1)  —  Unix Programmer’s Manual

NAME

more, page − file perusal filter for crt viewing

SYNOPSIS

more [ options ] [ filename ...  ]

page [ options ] [ filename ...  ]

DESCRIPTION

more is a filter which allows examination of a continuous text one screenful at a time on a soft-copy terminal.  It normally pauses after each screenful, printing --More-- at the bottom of the screen.  If you then type a carriage return, more scrolls the screen and displays the next line of text.  If you press the space bar, more displays the next screenful of text.  Other possibilities are enumerated later. 

Page is identical to more except that it clears the screen before printing each screenful of text (when it prepares to print a full screenful of text).  Also, it prints k − 1 rather than k − 2 lines in each screenful, where k is the number of lines the terminal can display. 

more looks in the file /etc/termcap to determine terminal characteristics, and to determine the default window size.  On a terminal capable of displaying 24 lines, the default window size is 22 lines. 

more looks in the environment variable MORE to pre-set any flags desired.  For example, if you prefer to view files using the −c mode of operation, the csh command setenv MORE -c or the sh command sequence MORE=’-c’ ; export MORE would cause all invocations of more, including invocations by programs such as man and msgs , to use this mode.  Normally, you would place the command sequence that sets up the MORE environment variable in the .cshrc or .profile file. 

When more is reading from a file, rather than a pipe, it diplays a percentage along with the --More-- prompt.  The percentage tells what fraction of the file (in characters, not lines) that more has read so far. 

If the standard output is not a teletype, then more acts just like cat, except that a header is printed before each file (if there is more than one). 

A sample usage of more in previewing nroff output would be

nroff −ms +2 doc.n | more -s

COMMANDS

Other sequences you can type when more pauses, and their effects, are described below.  (i is an optional integer argument, defaulting to 1.) 

i<space>
Displays i more lines, (or another screenful if no argument is given)

i/exprSearches for the i-th occurrence of the regular expression expr. If there are less than i occurrences of expr, and the input is a file (rather than a pipe), then the position in the file remains unchanged. Otherwise, more displays a screenful of text, starting two lines before the place where the expression was found.  The user can use the erase and kill characters to edit the regular expression.  Erasing back past the first column cancels the search command. 

ibSkips back i screenfuls and prints a screenful of lines. 

i^BPerforms the same function as b. 

ifSkips i screenfuls and prints a screenful of lines. 

inSearches for the i-th occurrence of the last regular expression entered.

isSkips i lines and prints a screenful of lines.

izPerforms the same function as typing a space except that i, if present, becomes the new window size.

i:nSkips to the i-th next file given in the command line (skips to last file if n doesn’t make sense).

i:pSkips to the i-th previous file given in the command line. If you invoke this command in the middle of printing a file, more goes back to the beginning of the file. If i doesn’t make sense, more skips back to the first file.  If more is not reading from a file, the command rings the bell and does nothing else. 

^DDisplays 11 more lines (a “scroll”).  If you specify i, more sets the scroll size to i.

dPerforms the same function as ^D (control-D). 

hPrints a description of all the more commands.  This is the help command. 

q or QExits from more. 

vStarts up the editor vi at the current line. 

:fDisplays the current filename and line number. 

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

!command
Invokes a shell with command. The characters ‘%’ and ‘!’ in "command" are replaced with the current filename and the previous shell command respectively. If there is no current filename, ‘%’ is not expanded. The sequences "\%" and "\!" are replaced by "%" and "!" respectively.

=Displays the current line number. 

´(single quote) Goes to the point from which the last search started.  If no search has been performed in the current file, this command goes back to the beginning of the file. 

.(dot) Repeats the previous command. 

The commands take effect immediately—it is not necessary to type a carriage return.  Until you type the command character itself, you can type the line kill character to cancel the numerical argument being formed.  In addition, you can type the erase character to redisplay the --More--(xx%) message. 

At any time when more is sending output to the terminal, you can press the quit key (normally control−\).  more will stop sending output, and will display the usual --More-- prompt.  You may then enter one of the above commands in the normal manner.  Unfortunately, some output is lost when this is done, because more flushes any characters waiting in the terminal’s output queue when it receives the quit signal. 

more sets the terminal to noecho mode to allow continuous output.  What you type will not show on your terminal, except for the / and !  commands. 

OPTIONS

−c Draws each page by beginning at the top of the screen and erasing each line just before writing on it.  This avoids scrolling the screen and makes it easier to read while more is writing.  more will ignore this option if the terminal does not have the ability to clear to the end of a line. 

−d Prompts you with the message "Press space to continue, ´q´ to quit." at the end of each screenful, and responds to subsequent illegal user input by printing "Press ´h´ for instructions." instead of ringing the bell.  This option is useful if you are using more as a filter in some setting, such as a classroom, where many users may be unsophisticated. 

−f Causes more to count logical, rather than screen lines.  That is, -f causes more not to fold long lines.  This option is recommended if you are piping nroff output through ul, since ul may generate escape sequences.  These escape sequences contain characters which would ordinarily occupy screen positions, but which do not print when more sends them to the screen as part of an escape sequence.  Reading these characters, more might overestimate the length of these lines and fold them erroneously. 

−l Does not treat ^L (form feed) specially.  If you do not specify this option, more will pause after any line that contains a ^L, as though it has reached the bottom of the screen.  Also, if a file begins with a form feed, more will clear the screen before printing the file. 

−s Squeezes multiple blank lines from the output, producing only one blank line.  Especially helpful when viewing nroff output, this option maximizes the useful information present on the screen. 

−u Normally, more will handle underlining such as produced by nroff in a manner appropriate to the particular terminal:  if the terminal can perform underlining or has a stand-out mode, more will output appropriate escape sequences to enable underlining or stand-out mode for underlined information in the source file.  The −u option suppresses this processing. 

−n Sets the size (in lines) of the window more will use instead of the default. 

+linenumber
Starts up at linenumber. 

+/pattern
Starts up two lines before the line containing the regular expression pattern. 

FILES

/etc/termcapTerminal data base
/usr/lib/more.helpHelp file

SEE ALSO

csh(1), man(1), msgs(1), script(1), sh(1), environ(7)

BUGS

Skipping backwards is too slow on large files. 

4th Berkeley Distribution  —  July 14, 1988

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