Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ more(1) — 4.2BSD 3.04v10.B

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 ] [ files ]

page options

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.  When the user then presses RETURN, one more line is displayed.  When the user presses the space bar, another screenful is displayed.  Other possibilities are enumerated below. 

OPTIONS

The command line options are as follows:

−c Each page is redrawn one line at a time, beginning at the top of the screen. Each line is erased just before a new line is drawn upon it.  This avoids scrolling the screen, making it easier to read while lines are being drawn.  This option is ignored if the terminal does not have the ability to clear to the end of a line. 

−d The user is prompted with the message "Hit space to continue, Rubout to abort" at the end of each screenful.  This is helpful if more is being used as a filter in a cl!ss or other setting where many users are inexperienced. 

−f Causes more to count logical lines, rather than screen lines.  That is, long lines are not folded.  This option is recommended if nroff output is being piped through ul, since the latter may generate escape sequences.  These escape sequences contain characters which would ordinarily occupy screen positions, but which are not printed when they are sent to the terminal as part of an escape sequence.  Thus more may treat lines as longer than they actually are, and fold lines erroneously. 

−l Treats ^L (form feed) as an ordinary character.  If this option is not given, more will pause after any line that contains  ^L, as though the end of a screenful had been reached.  Also, if a file begins with a form feed, the screen will be cleared before the file is printed. 

−n An integer which sets the window size (in lines) that more will use rather than the default. 

−s Deletes 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 that produced by nroff in a manner appropriate to the particular terminal.  Thus, 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 the indicated information in the source file.  The −u option suppresses this processing. 

+linenumber
Starts up at linenumber. 

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

If the program is invoked as page, then the screen is cleared before each screenful is printed (but only if a full screenful is being printed), and k − 1 rather than k − 2 lines are printed in each screenful, where k is the number of lines the terminal can display. 

More examines the file /etc/termcap to find 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 examines the environment variable MORE to pre-set any flags desired.  For example, if the user prefers to view files using the −c mode of operation, the csh command setenv MORE -c or the sh command sequence MORE=’-c’ can be used.  Export MORE would cause all invocations of more, including invocations by programs such as man and msgs, to use this mode.  Normally the user will place the command sequence which sets up the MORE environment variable in the .cshrc or .profile file. 

If more is reading from a file rather than a pipe, then a percentage is displayed along with the —More— prompt.  This indicates the proportion of the file (in characters, not lines) that has been read so far. 

COMMANDS

Other sequences which may be entered when more pauses are as follows.  (Note that i is an optional integer argument, defaulting to 1.) 

!command
Invokes a shell with command. The characters  %  and  !  in command are replaced by 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. 

dSame as ^D (CTRL-D). 

^DDisplays eleven more lines (a “scroll”).  If i is given, then the scroll size is set to i.

:fDisplays the current filename and line number. 

hHelp command;  gives a description of all the more commands. 

i/exprSearches for the ith occurrence of the regular expression expr. If there are fewer than i occurrences of expr, and the input is a file (rather than a pipe), then the position in the file remains unchanged. Otherwise a screenful is displayed, starting two lines before the place where the expression was found. The user’s erase and kill characters may be used to edit the regular expression. Erasing back past the first column cancels the search command.

ifSkips i screenfuls and prints a screenful of lines. 

inSearches for the ith occurrence of the last regular expression entered.

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

i:pSkips to the ith previous file given in the command line. If this command is given in the middle of printing out a file, then more goes back to the beginning of the file. If i does not make sense, then more skips back to the first file.  If more is not reading from a file, the bell rings and nothing else happens. 

isSkips i lines and prints a screenful of lines.

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

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

q
Exits from more. 

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

vStarts up the editor vi at the current line. 

=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.  Up to the time when the command character itself is given, the user may press the line kill character to cancel the numerical argument being formed.  In addition, the user may press the erase character to redisplay the —More—(xx%) message. 

Whenever output is being sent to the terminal, the user can press the quit key (normally CTRL−\).  Output will cease, and the usual —More— prompt will be displayed.  The user may then enter one of the above commands in the normal manner.  Unfortunately, some output is lost when this is done, due to the fact that any characters waiting in the terminal’s output queue are flushed when the quit signal occurs. 

The terminal is set to noecho mode by this program so that the output can be continuous.  What is typed will therefore not show on the terminal, except for the / and !  commands. 

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

EXAMPLE

A sample usage of more in previewing nroff output would be the following:

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

FILES

/etc/termcapterminal data base
/usr/lib/more.helphelp file

SEE ALSO

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

4th Berkeley Distribution  —  1 August 1985

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