Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ more(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

pg(1)

termcap(4)

terminfo(4)




more(1) more(1)
NAME more, page - show the contents of a file in display-size chunks SYNOPSIS more [-c] [-d] [-f] [-l] [-n] [-s] [-u] [+linenumber] [file]... more [-c] [-d] [-f] [-l] [-n] [-s] [-u] [+/pattern] [file]... page [-c] [-d] [-f] [-l] [-n] [-s] [-u] [+linenumber] [file]... page [-c] [-d] [-f] [-l] [-n] [-s] [-u] [+/pattern] [file]... ARGUMENTS +linenumber Causes more to start up at linenumber. +/pattern Causes more to start up two lines before the line containing the regular expression pattern, if the input is from a file. If input is from a pipe, more starts on the line where the pattern was found. -c Causes more to draw 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 flag option will be ignored if the terminal does not have the ability to clear to the end of a line. -d Causes more to prompt the user with the message Hit space to continue, Rubout to abort at the end of each screenful. -f Causes more to count logical lines, rather than screen lines; that is, long lines are not folded. This flag 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 do not print when they are sent to the terminal as part of an escape sequence. Thus more may think that lines are longer than they actually are, and, therefore, fold lines erroneously. file Specifies the file to be displayed. January 1992 1



more(1) more(1)
-l Causes more not to treat CONTROL-L (form feed) as special. If this flag option is not given, more will pause after any line that contains a CONTROL-L, as if 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 Specifies an integer which is the size (in lines) of the window which more will use instead of the default. -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 Suppresses normal processing of underlining. 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 use stand-out mode for underlined information in the source file. DESCRIPTION more is a filter which allows examination of continuous text one screenful at a time on a CRT terminal. It normally pauses after each screenful, printing --More-- at the bottom of the screen. page functions similarly, except that the screen is cleared before each screenful is displayed (but only if a full screenful is displayed), and that k-1 rather than k-2 lines are printed in each screenful, where k is the number of lines the terminal can display. If the user then presses RETURN, one more line is displayed. If the RETURN is preceded by an integer, that number becomes the new window size. If the user hits a space, another screenful is displayed. If a space is preceded by an integer, that number of lines is displayed. If the user presses d or CONTROL-D, 11 more lines (usually half a screenful) are displayed (a ``scroll''). If d or CONTROL-D is preceded by an integer, that number becomes the new scroll size. The more program 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. The more program looks in the environment variable MORE to preset any flags desired. For example, if you prefer to 2 January 1992



more(1) more(1)
view files using the -c mode of operation, the sh command sequence MORE='-c'; export MORE or the csh command setenv MORE -c would cause all invocations of more, including invocations by programs such as man and msgs, to use this mode. (Note, however, that the man command also looks at the PAGER environment variable; see man(1).) Normally, the user will place the command sequence that sets up the MORE environment variable in the shell startup file .login, .profile, or .cshrc. If more is reading from a file rather than a pipe, then a percentage is displayed along with the --More-- prompt. This gives the fraction of the file (in characters, not lines) that has been read so far. Once inside more, other sequences may be typed when more pauses. The sequences and their effects are as follows (i is an optional integer argument, defaulting to 1) : = Displays the current line number. v Starts up the editor vi at the current line (does not work if the input to the program is from a pipe). h Invokes help which provides a description of all the more commands. i:n Skips to the ith next file given in the command line. (Skips to last file if i doesn't make sense.) i:p Skips 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 doesn't make sense, more skips back to the first file. If more is not reading from a file, the bell rings and nothing more happens. :f Displays the current filename and line number. :q :Q Exits from more (same as q or Q). . Repeats the previous command. iz Same as typing a space except that i, if present, January 1992 3



more(1) more(1)
becomes the new window size. is Skips i lines and prints a screenful of lines. if Skips i screenfuls and prints a screenful of lines. in Searches for the ith occurrence of the last regular expression entered. q Q Exits from more. The interrupt character may also be used. i/expr Searches for the ith occurrence of the regular expression expr. Terminated either by pressing RETURN or the ESCAPE key. If the input is a file (rather than a pipe), and there are fewer than i occurrences of expr, then the position in the file remains unchanged and an error message is printed. If the input is a file (rather than a pipe), and there are at least i occurrences of expr, a screenful is displayed, starting two lines before the place where the expression was found. If the input is a pipe and there are fewer than i occurrences of expr, an error message is printed and more exits (because the entire input stream has been read). If the input is a pipe and there are at least i occurrences of expr, a screenful is displayed, starting on the line 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. ' 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. (Doesn't work if the input to the program is from a pipe.) !command Invokes a shell with command. Terminated either by pressing RETURN or the ESCAPE key. Up to the time 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. :!command Invokes a shell with command. (Same as !command). 4 January 1992



more(1) more(1)
CONTROL-L (^L) Redraws the screen by pressing CONTROL-L (^L). (This doesn't work if the input to the program is from a pipe.) Any time output is being sent to the terminal, the user may press the quit key (normally CONTROL-\). more will stop sending output, and will display the usual --More-- prompt. The user may then enter one of the 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 not show on the terminal, except for the / and ! commands. If the standard output is not a terminal, then more acts just like cat, except that a header is printed before each file (if there is more than one). EXAMPLES The command: nroff -ms +2 doc.n | more would show the nroff output on the terminal screen. FILES /bin/more Executable file /bin/page Executable file /etc/termcap Terminal capabilities file /usr/lib/more.help Help information file SEE ALSO cat(1), pg(1) termcap(4), terminfo(4) in A/UX Programmer's Reference January 1992 5

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