Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ more(1) — GDT-UNX 6.8_er0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

man(1)

msgs(1)

script(1)

sh(1)

environ(5)

MORE(1)  —  UNIX Programmer’s Manual

NAME

more, page − file perusal filter for crt viewing

SYNOPSIS

more [ −cdflsu ] [ −n ] [ +linenumber ] [ +/pattern ] [ name ...  ]

page more options

DESCRIPTION

More is a filter which allows examination of a continuous text, one screenful at a time, on a soft-copy terminal.  More normally pauses after each screenful, printing --More-- at the bottom of the screen.  If the user then types a carriage return, one more line is displayed.  If the user hits a space, another screenful is displayed.  Other possibilites are presented later in this manual. 

The command line options are as follows:

−n An integer which is the size (in lines) of the window which more uses instead of the default. 

−c More draws each page by beginning at the top of the screen and erasing each line just before it draws on it.  This avoids scrolling the screen, making it easier to read while more is writing.  This option is ignored if the terminal does not have the ability to clear to the end of a line. 

−d More prompts the user with the message "Hit space to continue, Rubout to abort" at the end of each screenful.  This prompting is useful if more is used as a filter in a setting such as a class, where many users may be unsophisticated. 

−f Causes more to count logical, rather than screen lines; Specifically, long lines are not folded.  This option is recommended if nroff output is being piped through ul, as the latter may generate escape sequences.  These escape sequences contain characters which would ordinarily occupy screen positions, but which do not print when sent to the terminal as part of an escape sequence.  As a result, more may assume that lines exceed their actual length and fold lines erroneously. 

−l Do not treat ^L (form feed) specially.  If this option is not given, more pauses after any line that contains a ^L, as if the end of a screenful had been reached.  Also, if a file begins with a form feed, the screen is cleared before the file is printed. 

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

−u Normally, more handles 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 outputs appropriate escape sequences to enable underlining or stand-out mode for underlined information in the source file.  The −u option suppresses this processing. 

+linenumber
Start up at linenumber. 

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

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

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

More searches in the environment variable MORE to pre-set any desired flags.  For example, if you prefer to examine files using the −c mode of operation, the csh command setenv MORE -c or the sh command sequence MORE=’-c’ ; export MORE causes all invocations of more (including invocations by programs such as man and msgs) to use this mode.  Normally, the user places 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, a percentage is displayed along with the --More-- prompt.  This percentage gives the fraction of the file (in characters, not lines) read up to this point. 

Other sequences (which may be typed when more pauses), and their effects are as follows (i is an optional integer argument, defaulting to 1) :

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

^DDisplay 11 more lines (a “scroll”).  If i is given, the scroll size is set to i.

dIdentical to ^D (control-D)

izIdentical to typing a space, except that i, if present, becomes the new window size.

isSkip i lines and print a screenful of lines

ifSkip i screenfuls and print a screenful of lines

q or QExit from more. 

=Display the current line number. 

vStart up the editor vi at the current line. 

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

i/exprSearch 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), 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.

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

’(single quote) Go to the point where the last search started.  If no search has been performed in the current file, this command returns to the beginning of the file. 

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

i:nSkip to the i-th next file given in the command line (skips to last file if n is not logical)

i:pSkip to the i-th previous file given in the command line. If this command is given in the middle of printing out a file, more returns to the beginning of the file. If i is not logical, more skips back to the first file.  If more is not reading from a file, the bell is rung and no further action occurs. 

:fDisplay the current file name and line number. 

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

.(dot) repeat the previous command. 

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

At any point when output is being sent to the terminal, the user can hit the quit key (normally control−\).  More stops sending output, and displays the usual --More-- prompt.  The user may then enter one of the above commands, as standard.  Unfortunately, some output is lost when this command is entered, as 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 the output can be continuous; therefore, what you type will not appear on your terminal, except for the / and !  commands. 

If the standard output is not a teletype, more functions similarly to cat, except a header is printed before each file (if there is more than one). 

A sample usage of more in previewing nroff output is as follows:

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

AUTHOR

Eric Shienbrood, minor revisions by John Foderaro and Geoffrey Peck

FILES

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

SEE ALSO

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

4th Berkeley Distribution  —  %W%%Q%%Y%

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