more(C) 19 June 1992 more(C) Name more - view a file one screen full at a time Syntax more [ -cdflrsuvw ] [ -n ] [ +linenumber ] [ +/pattern ] [ name ... ] Description This filter allows examination of continuous text one screen full at a time. It normally pauses after each full screen, displaying: --More-- at the bottom of the screen. If the user then presses carriage return, one more line is displayed. If the user presses the Space bar, another full screen is displayed. Other possibilities are described below. The command line options are: -n An integer which is the size (in lines) of the window which more will use instead of the default. -c more draws each page by beginning at the top of the screen and eras- ing 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 with the message ``Hit space to continue, Rubout to abort" at the end of each full screen. This is useful if more is being used as a filter in some setting, such as a class, where many users may be inexperienced. -f This option causes more to count logical, 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 gen- erate escape sequences. These escape sequences contain characters that would ordinarily occupy screen positions, but 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 fold lines erroneously. -l Does not treat <Ctrl>l (form feed) specially. If this option is not given, more pauses after any line that contains a <Ctrl>l, as if the end of a full screen has been reached. Also, if a file begins with a form feed, the screen is cleared before the file is printed. -r Causes carriage returns to be printed as ``^M''. -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 handles underlining, such as that 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. -v Normally, more ignores control characters that it does not interpret in some way. The -v option causes these to be displayed as ^C where C is the corresponding printable ASCII character. Non-printing non-ASCII characters (with the high bit set) are displayed in the format M-C, where C is the corresponding character without the high bit set. If output is not going to a terminal, more does not inter- pret control characters. -w Normally, more exits when it comes to the end of its input. With -w more prompts and waits for any key to be struck before exiting. +linenumber Starts up at linenumber. +/pattern Starts up two lines before the line containing the regular expres- sion pattern. more looks in /usr/lib/terminfo/* to determine terminal characteristics, and to determine the default window size. On a terminal capable of dis- playing 24 lines, the default window size is 22 lines. more looks in the environment variable MORE to preset any flags desired. For example, if you prefer to view files using the -c mode of operation, the shell command ``MORE=-c'' in the .profile file causes all invocations of more to use this mode. If more is reading from a file, rather than a pipe, a percentage is dis- played with the ``--More--'' prompt. This gives the fraction of the file (in characters, not lines) that has been read so far. Other sequences which may be entered when more pauses, and their effects, are as follows (i is an optional integer argument, defaulting to 1 where not specified otherwise): i<Space> Displays i more lines, (or another full screen if no argument is given). <Ctrl>d Displays 11 more lines (a ``scroll''). If i is given, then the scroll size is set to i. d Same as <Ctrl>d. iz Same as entering a space except that i, if present, becomes the new window size. is Skips i lines and displays a full screen of lines. if Skips i full screens and displays a full screen of lines. b Skips back and displays the previous screen of lines. <Ctrl>b Same as b. q or Q Exits from more. = Displays the current line number. v Starts up the screen editor vi at the current line. h or ? Help command; gives a description of all the more commands. iexpr/ Searches for the ith 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, a full screen is dis- played, starting two lines before the place where the expres- sion 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. in Searches for the ith occurrence of the last regular expres- sion entered. ' (Single quotation mark) 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. !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. 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, 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 else hap- pens. :f Displays the current filename and line number. :q or :Q Exits from more (same as q or Q). . Repeats the previous command. The commands take effect immediately. It is not necessary to enter a car- riage return. Up to the time when the command character itself is given, the user may enter the line kill character to cancel the numerical argu- ment being formed. In addition, the user may enter the erase character to redisplay the ``--More-- (xx%)'' message. The terminal is set to noecho mode by this program so that the output can be continuous. What you enter will not show on your terminal, except for the slash (/) and exclamation (!) characters. If the standard output is not a teletype, more acts just like cat, except that a header is printed before each file (if there is more than one). Files /usr/lib/terminfo/* Terminal database /usr/lib/more.help Help file See also cat(C), csh(C), environ(M), sh(C) Credit This utility was developed at the University of California at Berkeley and is used with permission. Notes The vi and help options may not be available. Before displaying a file, more attempts to detect whether it is a non- printable binary file such as a directory or executable binary image. However, more cannot detect all possible kinds of non-printable files.