User Commands                                             more(1)


NAME

     more, page - browse or page through a text file


SYNOPSIS

     /usr/bin/more [-cdflrsuw] [-lines] [+ linenumber]
          [+/ pattern] [file]...

     /usr/bin/page [-cdflrsuw] [-lines] [+ linenumber]
          [+/ pattern] [file]...

     /usr/xpg4/bin/more [-cdeisu] [-n number] [-p command]
          [-t tagstring] [file]...

     /usr/xpg4/bin/more [-cdeisu] [-n number] [+ command]
          [-t tagstring] [file]...


DESCRIPTION

     The more utility is a filter that displays the contents of a
     text file on the terminal, one screenful at a time.  It nor-
     mally  pauses  after  each  screenful.   /usr/bin/more  then
     prints  --More--  and /usr/xpg4/bin/more then prints file at
     the bottom of the screen.  If more is reading  from  a  file
     rather  than  a pipe, the percentage of characters displayed
     so far is also shown.

     The more utility scrolls up to  display  one  more  line  in
     response  to  a  RETURN  character.   more  displays another
     screenful in response to a SPACE character.  Other  commands
     are listed below.

     The page utility clears the  screen  before  displaying  the
     next screenful of text.  page only provides a one-line over-
     lap between screens.

     The more utility sets the terminal to NOECHO mode,  so  that
     the  output can be continuous. Commands that you type do not
     normally show up on your terminal, except for the  /  and  !
     commands.

     The /usr/bin/more utility exits after  displaying  the  last
     specified file.  /usr/xpg4/bin/more prompts for a command at
     the last line of the last specified file.

SunOS 5.11           Last change: 4 Nov 2005                    1


User Commands                                             more(1)

     If the standard output is not a  terminal,  more  acts  just
     like  cat(1),  except  that  a header is printed before each
     file in a series.


OPTIONS

     The following options are supported for  both  /usr/bin/more
     and /usr/xpg4/bin/more:

     -c     Clears before displaying. Redraws the screen  instead
            of  scrolling  for  faster  displays.  This option is
            ignored if the terminal does not have the ability  to
            clear to the end of a line.

     -d     Displays error messages rather than ringing the  ter-
            minal  bell  if an unrecognized command is used. This
            is helpful for inexperienced users.

     -s     Squeeze.  Replaces multiple blank lines with a single
            blank  line.  This  is  helpful when viewing nroff(1)
            output on the screen.

  /usr/bin/more
     The following options are supported for /usr/bin/more only:

     -f             Does not fold long lines. This is useful when
                    lines   contain   nonprinting  characters  or
                    escape sequences,  such  as  those  generated
                    when nroff(1) output is piped through ul(1).

     -l             Does not treat FORMFEED characters  (Control-
                    l)  as  page  breaks. If -l is not used, more
                    pauses to accept commands after any line con-
                    taining  a ^L character (Control-l). Also, if
                    a file begins with a FORMFEED, the screen  is
                    cleared before the file is printed.

     -r             Normally,  more  ignores  control  characters
                    that  it  does not interpret in some way. The
                    -r option causes these to be displayed as  ^C
                    where  C  stands for any such control charac-
                    ter.

     -u             Suppresses generation of  underlining  escape
                    sequences.  Normally,  more handles underlin-
                    ing, such as that produced by nroff(1), in  a
                    manner  appropriate  to  the terminal. If the

SunOS 5.11           Last change: 4 Nov 2005                    2


User Commands                                             more(1)

                    terminal can perform  underlining  or  has  a
                    stand-out  mode,  more  supplies  appropriate
                    escape sequences as called for  in  the  text
                    file.

     -w             Normally, more exits when it comes to the end
                    of  its input. With -w, however, more prompts
                    and waits for any key  to  be  struck  before
                    exiting.

     -lines         Displays the indicated  number  of  lines  in
                    each  screenful, rather than the default (the
                    number of lines in the terminal  screen  less
                    two).

     +linenumber    Start up at linenumber.

     +/pattern      Start up two lines above the line  containing
                    the regular expression pattern.  Note: Unlike
                    editors, this construct should not end with a
                    `/.'   If it does, then the trailing slash is
                    taken as a character in the search pattern.

  /usr/xpg4/bin/more
     The following options are supported  for  /usr/xpg4/bin/more
     only:

     -e               Exits immediately after  writing  the  last
                      line of the last file in the argument list.

     -i               Performs  pattern  matching   in   searches
                      without regard to case.

     -n number        Specifies the number of lines  per  screen-
                      ful.  The  number  argument  is  a positive
                      decimal integer. The  -n  option  overrides
                      any values obtained from the environment.

     -p command       For each file examined, initially  executes
     +command         the  more  command in the command argument.
                      If the command is  a  positioning  command,
                      such  as a line number or a regular expres-
                      sion search, set the  current  position  to
                      represent the final results of the command,

SunOS 5.11           Last change: 4 Nov 2005                    3


User Commands                                             more(1)

                      without writing any intermediate  lines  of
                      the file. For example, the two commands:

                        more -p 1000j file
                        more -p 1000G file

                      are equivalent and start the  display  with
                      the  current position at line 1000, bypass-
                      ing the lines that j would write and scroll
                      off the screen if it had been issued during
                      the file examination.  If  the  positioning
                      command  is unsuccessful, the first line in
                      the file will be the current position.

     -t tagstring     Writes the screenful of the file containing
                      the  tag  named  by the tagstring argument.
                      See the ctags(1) utility.

     -u               Treats a backspace character as a printable
                      control   character,   displayed  as  a  ^H
                      (Control-h),  suppressing  backspacing  and
                      the  special  handling that produces under-
                      lined or standout-mode text on some  termi-
                      nal   types.    Also,  does  not  ignore  a
                      carriage-return character at the end  of  a
                      line.

     If both the -t tagstring and -p command (or the  obsolescent
     +command)  options  are given, the -t tagstring is processed
     first.


USAGE

  Environment
     more uses the terminal's terminfo(4) entry to determine  its
     display characteristics.

     more looks in the environment variable MORE for  any  preset
     options.  For  instance,  to page through files using the -c
     mode by default, set the  value  of  this  variable  to  -c.
     (Normally,  the  command sequence to set up this environment
     variable is placed in the .login or .profile file).

  Commands
     The commands take effect immediately. It is not necessary to
     type  a  carriage return unless the command requires a file,
     command, tagstring, or pattern.  Up to  the  time  when  the

SunOS 5.11           Last change: 4 Nov 2005                    4


User Commands                                             more(1)

     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%)' or file message.

     In the following commands, i is a numerical argument  (1  by
     default).

     iSPACE       Display another screenful, or i more lines if i
                  is specified.

     iRETURN      Display another  line,  or  i  more  lines,  if
                  specified.

     ib           (Control-b) Skip back  i  screenfuls  and  then
     i^B          print a screenful.

     id           (Control-d) Scroll forward one  half  screenful
     i^D          or  i  more lines. If i is specified, the count
                  becomes the default for subsequent d and u com-
                  mands.

     if           Skip i screens full and then print a screenful.

     h            Help. Give a description of all the  more  com-
                  mands.

     ^L           (Control-l) Refresh.

     in           Search for the ith occurrence of the last  pat-
                  tern entered.

     q            Exit from more.
     Q

     is           Skip i lines and then print a screenful.

     v            Drop into the vi editor at the current line  of
                  the current file.

SunOS 5.11           Last change: 4 Nov 2005                    5


User Commands                                             more(1)

     iz           Same as  SPACE,  except  that  i,  if  present,
                  becomes  the  new  default  number of lines per
                  screenful.

     =            Display the current line number.

     i/pattern    Search forward for the ith  occurrence  of  the
                  regular   expression   pattern.    Display  the
                  screenful starting two lines  before  the  line
                  that  contains  the  ith  match for the regular
                  expression pattern,  or  the  end  of  a  pipe,
                  whichever  comes first. If more is displaying a
                  file and there is no match, its position in the
                  file remains unchanged. Regular expressions can
                  be edited  using  erase  and  kill  characters.
                  Erasing  back past the first column cancels the
                  search command.

     !command     Invoke a shell to execute command. The  charac-
                  ters  %  and  !,  when  used within command are
                  replaced with the current filename and the pre-
                  vious  shell command, respectively. If there is
                  no current filename, % is not expanded. Prepend
                  a  backslash  to  these  characters  to  escape
                  expansion.

     :f           Display the current filename and line number.

     i:n          Skip to the ith next filename given in the com-
                  mand  line, or to the last filename in the list
                  if i is out of range.

     i:p          Skip to the ith previous filename given in  the
                  command  line, or to the first filename if i is
                  out of range. If given while more is positioned
                  within a file, go to the beginning of the file.
                  If more is reading from  a  pipe,  more  simply
                  rings the terminal bell.

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

  /usr/bin/more
     The following commands are available only in /usr/bin/more:

SunOS 5.11           Last change: 4 Nov 2005                    6


User Commands                                             more(1)

     '        Single quote. Go to the point from which  the  last
              search  started. If no search has been performed in
              the current file, go to the beginning of the file.

     .        Dot. Repeat the previous command.

     ^\       Halt a partial display of text.  more stops sending
              output,  and  displays  the  usual --More-- prompt.
              Some output is lost as a result.

  /usr/xpg4/bin/more
     The   following   commands    are    available    only    in
     /usr/xpg4/bin/more:

     i^F              (Control-f) Skip i screens full and print a
                      screenful. (Same as if.)

     ^G               (Control-g) Display the current line number
                      (same as =).

     ig               Go to line number i with the default of the
                      first line in the file.

     iG               Go to line number i with the default of the
                      Last line in the file.

     ij               Display another line, or i more  lines,  if
                      specified. (Same as iRETURN.)

     ik               Scroll backwards one or i lines, if  speci-
                      fied.

     mletter          Mark the current  position  with  the  name
                      letter.

     N                Reverse direction of search.

     r                Refresh the screen.

SunOS 5.11           Last change: 4 Nov 2005                    7


User Commands                                             more(1)

     R                Refresh the screen, discarding any buffered
                      input.

     iu               (Control-u) Scroll  backwards  one  half  a
     i^U              screen  of  i  lines, if specified. If i is
                      specified,  the  count  becomes   the   new
                      default for subsequent d and u commands.

     ZZ               Exit from more (same as q).

     :e file          Examine (display) a new file. If no file is
                      specified, the current file is redisplayed.

     :t tagstring     Go to the tag named by the tagstring  argu-
                      ment and scroll/rewrite the screen with the
                      tagged line in the  current  position.  See
                      the ctags utility.

     'letter          Return to the position that was  previously
                      marked with the name letter.

     ''               Return to the position from which the  last
                      move  of  more  than  a screenful was made.
                      Defaults to the beginning of the file.

     i?[!]pattern     Search backward in the  file  for  the  ith
                      line  containing the pattern.  The ! speci-
                      fies to search backward for  the  ith  line
                      that does not contain the pattern.

     i/!pattern       Search forward in the file for the ith line
                      that does not contain the pattern.

     ![command]       Invoke a shell or the specified command.

  Large File Behavior
     See largefile(5) for the description of the behavior of more
     and  page when encountering files greater than or equal to 2
     Gbyte ( 2^31 bytes).


ENVIRONMENT VARIABLES


SunOS 5.11           Last change: 4 Nov 2005                    8


User Commands                                             more(1)

     See environ(5) for descriptions of the following environment
     variables  that affect the execution of more:  LANG, LC_ALL,
     LC_COLLATE (/usr/xpg4/bin/more only), LC_CTYPE, LC_MESSAGES,
     NLSPATH, and TERM.

  /usr/xpg4/bin/more
     The following environment variables also affect  the  execu-
     tion of /usr/xpg4/bin/more:

     COLUMNS     Overrides the system selected horizontal  screen
                 size.

     EDITOR      Used by the v command to select an editor.

     LINES       Overrides the system  selected  vertical  screen
                 size. The -n option has precedence over LINES in
                 determining the number of lines in a screen.

     MORE        A string specifying options as described in  the
                 OPTIONS  section,  above.  As in a command line,
                 The options must be separated by  blank  charac-
                 ters  and  each  option specification must start
                 with a -. Any command line options are processed
                 after those specified in MORE as though the com-
                 mand line were:  more $MORE options operands


EXIT STATUS

     The following exit values are returned:

     0      Successful completion.

     >0     An error occurred.


FILES

     /usr/lib/more.help    help  file   for   /usr/bin/more   and
                           /usr/bin/page only.


ATTRIBUTES

     See attributes(5) for descriptions of the  following  attri-
     butes:

  /usr/bin/more /usr/bin/page

SunOS 5.11           Last change: 4 Nov 2005                    9


User Commands                                             more(1)

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWcsu                     |
    |_____________________________|_____________________________|
    | CSI                         | Not enabled                 |
    |_____________________________|_____________________________|

  /usr/xpg4/bin/more
     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWxcu4                    |
    |_____________________________|_____________________________|
    | CSI                         | Enabled                     |
    |_____________________________|_____________________________|
    | Interface Stability         | Standard                    |
    |_____________________________|_____________________________|


SEE ALSO

     cat(1),  csh(1),  ctags(1),  man(1),  nroff(1),   script(1),
     sh(1), ul(1), terminfo(4), attributes(5), environ(5), large-
     file(5), standards(5)

  /usr/bin/more /usr/bin/page
     regcomp(3C)

  /usr/xpg4/bin/more
     regex(5)


NOTES

  /usr/bin/more
     Skipping backwards is too slow on large files.

  /usr/xpg4/bin/more
     This utility will not behave correctly if  the  terminal  is
     not set up properly.

SunOS 5.11           Last change: 4 Nov 2005                   10


Man(1) output converted with man2html


FhG Schily's Home VED powered