Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pg(1)

cat(1)

sh(1)

csh(1)

ul(1)

profile(4)

environ(5)

term(5)



more(1)                        DG/UX R4.11MU05                       more(1)


NAME
       more, page - display file one screenful at a time

SYNOPSIS
       more [ -cdflpsu ] [ -n ] [ +linenumber ] [ +/pattern ] [ name ... ]

       page [ more options ]

DESCRIPTION
       More is a filter that allows you to examine a long text one CRT-
       screenful at a time.  It 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 types a
       space, another screenful is displayed.  Other possibilities are
       listed below in the Commands section.

   Options
       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 will 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 option will be ignored if the terminal does not
              have the ability to clear to the end of a line.

       -d     More will prompt the user with the message "Press space to
              continue, 'q' to quit." at the end of each screenful, and will
              respond to subsequent illegal user input by printing "Press
              'h' for instructions." instead of ringing the bell.  This is
              useful if more is being used as a filter in some setting, such
              as a class, where many users may be unsophisticated.

       -f     This causes more to count logical lines, rather than screen
              lines.  That is, long lines are not folded.  This option is
              recommended for viewing ul(1) output, since it may contain
              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 fold lines erroneously.  This
              option is also recommended when piping man output through
              more; otherwise, more may become confused by nonprinting video
              attribute characters typically displayed to a terminal screen.

       -l     Do not treat ^L (form feed) specially.  If this option is not
              given, more will pause 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 will be cleared before the
              file is printed.

       -p     Clear the screen before each screenful is printed (but only if
              a full screenful is being printed), and print k - 1 rather
              than k - 2 lines in each screenful, where k is the number of
              lines the terminal can display.

       -s     Squeeze multiple blank lines from the output, producing only
              one blank line.  Especially helpful when viewing formatted
              text, this option maximizes the useful information present on
              the screen.

       -u     Normally, more will handle underlining 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.

       +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, then it behaves the same as more
       with the -p option.

       More accesses the terminfo(4) database to determine terminal
       characteristics such as the screen size, and to determine the default
       window and scroll sizes.  On a terminal with no fixed number of rows,
       such as a hardcopy printer, the screen size defaults to 24 lines.
       The default window size is normally two less than the screen size.
       However, if the -p option is specified or the program is invoked as
       page, the window size defaults to one less than the length of the
       screen.  The scroll size defaults to half the window size.

       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 csh command setenv MORE -c or the sh command
       sequence MORE='-c' ; export MORE would cause all invocations of more
       to use this mode.  Normally, the user will place the command sequence
       which sets up the MORE environment variable in the .login or .profile
       file (see profile(4)).

       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.

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


       ispace Display i more lines, or another screenful if no argument is
              given.


       id     Display i more lines (a ``scroll'').  If i is given, then the
              scroll size is set to i.  Otherwise, the default is to scroll
              11 lines.


       i^D (control-D)
              Same as d.


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


       is     Skip i lines and print a screenful of lines.


       if     Skip i screenfuls and print a screenful of lines.


       ib     Skip back i screenfuls and print a screenful of lines.  This
              command works only when the input is a file, not a pipe.


       i^B (control-B)
              Same as b.


       q or Q Exit from more.


       =      Display the current line number.


       v      Start up the editor vi(1) at the current line.  This command
              works only when the input is a file, not a pipe.


       h      Help command; give a description of all the more commands.


       i/expr Search for the i-th occurrence of the regular expression expr.
              If the search is successful a screenful is displayed, starting
              two lines before the place where the expression was found.
              Otherwise, if the input is a file, the position in the file
              remains unchanged; if the input is a pipe, more terminates.
              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     Search for the i-th occurrence of the last regular expression
              entered.


       ' (single quote)
              Go 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.  This command works
              only when the input is a file, not a pipe.


       !command
              Invoke a shell and execute 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:n    Skip to the i-th next file given in the command line.  If i
              doesn't make sense, skip to the last file.


       i:p    Skip 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 counts the current file when doing the skipping.  If i
              doesn't make sense, more skips back to the first file.  If
              more is not reading from a file, the terminal bell is rung and
              nothing else happens.


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

       At any time when output is being sent to the terminal, the user can
       type the quit character (normally control-\) to interrupt the
       display.  more will stop sending output, and will display the usual
       --More-- prompt.  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 you type will thus not show on your
       terminal, except for the / and !  commands.

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



EXAMPLES
       $ more textfile

       Display the contents of the file "textfile" using the more processor.
       This allows for display of the file "textfile" on a screen by screen
       basis.

       $ man more | more -f

       Prints the manual page for the more command and pipes the output to
       the more processor.  This allows for display of the more
       documentation on a screen by screen basis.  The -f option ensures
       that more will display the output of the man(1) command correctly,
       since man generates escape sequences.

       $ ls -l | more

       Display all information about the files in the current working
       directory and pipes the output to the more processor.  This allows
       for display of the directory listing on a screen by screen basis.

FILES
       /usr/lib/terminfo/?/*  Terminal data base
       /usr/lib/more.help     Help file

SEE ALSO
       pg(1), cat(1), sh(1), csh(1), ul(1).
       profile(4), environ(5), term(5).

BUGS
       Skipping backwards is too slow on large files.


Licensed material--property of copyright holder(s)

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