more(1)								      more(1)



NAME

  more, page - Displays a file one screenful at a time

SYNOPSIS

  Current Syntax


  more [-cdefhipsuvz] [ -n number ] [+line_number | [-t tagstring] +/pattern]
  [file ...]

  page [-cdefhipsuvz] [ -n number ] [+line_number | +/pattern] [-t tagstring]
  [file ...]

  Obsolescent Syntax


  more [-cdefhipsuvz] [-number ] [+G] [+line_number | +/pattern] [-t tag-
  string] [file ...]

  page [-cdefhipsuvz] [-number ] [+G] [+line_number | +/pattern] [-t tag-
  string] [file ...]


  The more command invokes a filter that allows examination of continuous
  text, one screenful at a time, on a soft-copy terminal.  The page command
  is equivalent to more, but erases the screen before displaying each screen-
  ful.

FLAGS

  -c  Starts each screenful at the top of the screen and erases existing out-
      put on each line before displaying a new line.  This avoids scrolling
      the screen, making it easier to read while more is writing.  It is also
      faster than scrolling on many terminals.	This flag is ignored if the
      terminal does not have the ability to clear to the end of a line.	 This
      option does not work with -h.

  -d  Prompts you to continue, quit, or obtain help after each screenful of
      text.

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

  -f  Counts logical lines rather than screen lines; that is, long lines are
      not folded.  This flag is recommended if nroff output is piped through
      ul, or if more reads any text that contains escape sequences.  Escape
      sequences contain characters that would ordinarily occupy screen posi-
      tions, but which do not print when they are sent to the terminal as
      part of an escape sequences.  Thus more may think that lines are longer
      than they actually are, and fold lines erroneously.

  -h  Help mode.

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

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

  -p  For each file examined, initially execute the more command in the com-
      mand argument.  If the command is a positioning command, such as a line
      number or a regular expression search, set the current position to
      represent the final results of the command, without writing any inter-
      mediate lines of the file.  For example, the two commands:
	   more -p 1000j file

	   more -p 1000G file
      would be equivalent and start the display with the current position at
      line 1000, bypassing the lines that j would write and scroll off the
      screen if it had been issued during the file examination.	 If the posi-
      tioning command is unsuccessful, the first line in the file will be the
      current position.

  -s  Squeezes multiple empty lines from the output, producing only one empty
      line.  Especially helpful when viewing nroff output, this flag maxim-
      izes the amount of useful information present on the screen.

  -u  Suppresses processing of underlined text for terminal display.  Nor-
      mally, more handles underlining in a manner appropriate to the particu-
      lar terminal: if the terminal can perform underlining or has a
      highlight mode, more outputs appropriate escape sequences to enable
      underlining or highlight mode for underlined information in the source
      file.

  -t tagstring
      Write the screenful of the file containing the tag named by the tag-
      string argument.	See the ctags utility.

  -v  Does not display nonprinting characters graphically.  Without this
      flag, all non-ASCII and control characters (except , ,
      and ) are displayed visibly in the form ^X for , or M-x
      for non-ASCII character x.

  -z  Same as if the -v flag is not given, but in addition,  is
      displayed as ^H,  as ^M, and  as ^I.

  +line_number
      Starts up at line_number.

  +G  Starts up at the last screenful in the file.  This gives you an oppor-
      tunity to scroll or page backward through the file.

  +/pattern
      Starts up at the line containing the regular expression pattern.

  -number
      Sets the number of lines in the display window to number.	 The default
      is two lines less than the number of lines displayed by the terminal;
      on a screen that displays 24 lines, the default is 22.

DESCRIPTION

  The more utility reads files and either writes them to the terminal on a
  page-by-page basis or filters them to standard output.  If standard output
  is not a terminal device, all input files are copied to standard output in
  their entirety, without modification.	 If standard output is a terminal
  device, the files will be written a number of lines (one screenful) at a
  time under the control of user commands.

  The number of lines available per screen is determined by the -n option, if
  present or by examining values in the environment (see ENVIRONMENT VARI-
  ABLES).  If neither method yields a number, an unspecified number of lines
  will be used.	 The actual number of lines written will be one less than
  this number, as the last line of the screen will be used to write a user
  prompt and user input.  If the number of lines available per screen is less
  than four, the results are undefined.

  If the terminal type can be determined, the more command looks in the ter-
  minfo database 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.

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

EXAMPLES

  The following is a sample use of more in previewing nroff output:

       nroff -ms doc.n | more -s -f



Subcommands

  The more command provides the following subcommands that you can type when
  more pauses.	These commands are designed to be similar to the commands
  supported by the vi editor.  (i is an optional integer argument, defaulting
  to 1.)  Regular expressions (as referred to here) are described under grep.

  i

  ij

  i
	 All three forms display i more lines.

  i
	 Displays i more lines, or another screenful if i is not specified.

  i
	 Scrolls one-half screen forward (displays the next k/2 lines, where
	 k is the number of lines displayed by the  command).  If i is
	 specified, then the scroll size is set to i.

  d	 Same as .

  i
	 Scrolls one-half screen backward.  If i is specified, then the
	 scroll size is set to i.  Note that if your line kill character is
	 , then you must use the u command to scroll backward.

  iu	 Same as .

  ik

  i
	 Both forms scroll back i lines.

  iz	 Displays i more lines.	 i.

  ig	 Goes to line i and displays a screenful, making line i the top line
	 on the screen.	 If i is not specified, then more displays the first
	 screenful in the file.

  is	 Skips i  screenfuls and prints a screenful.

  if	 Skips i lines and prints a screenful.

  ib	 Skips back i screenfuls and prints a screenful.

  i
	 Same as b.

  q, Q	 Exits from more.

  =	 Displays the current line number.

  v	 Starts up the vi editor at the current line.

  h	 Displays a description of all the more subcommands.

  i/expression
	 Searches for the ith occurrence of the regular expression expres-
	 sion.	If there are less than i occurrences of expression, and the
	 input is a file rather than a pipe, then the position in the file
	 remains unchanged.  Otherwise, a screenful is displayed, starting
	 with the line matching expression.  You can use Erase and Kill char-
	 acters to edit the regular expression, which must be terminated by
	 pressing  (with no trailing / character).  Erasing back past
	 the first column cancels the search command.  If expression is null,
	 more uses the last regular expression entered.

  i?expression
	 Same as /, but searches backward in the file.

  in	 Searches for the ith occurrence of the last regular expression
	 entered.

  iN	 Searches for the ith occurrence of the last regular expression
	 entered, but reverses the direction of that search.

  ' (single quote)
	 Returns to the point from which the last search started.  If no
	 search was performed in the current file, returns to the beginning
	 of the file.

  !command
	 Invokes a shell with command.	The % (percent sign) and ! (exclama-
	 tion point) characters 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 specified in the command line.

  i:p	 Skips to the ith previous file given in the command line.  If this
	 command is given during display of a file, more returns to the
	 beginning of the file.	 If more is not reading from a file, the bell
	 is rung and nothing else happens.

  :f	 Displays the current filename and line number.

  :q, :Q Exits from more (same as q or Q).

  .	 Repeats the previous command.

  
	 Redraws the screen.

  h	 Displays help information.

  The commands take effect immediately; it is not necessary to type a
  carriage-return.  Up to the time when the command character itself is
  given, you can enter the line Kill character to cancel the numerical argu-
  ment being formed.  In addition, you can enter the Erase character to
  redisplay the prompt.

  At any time when output is being sent to the terminal, you can press q.
  The more command stops sending output, and displays the usual prompt.	 You
  can then enter one of the preceding commands in the normal manner.  Some
  output is lost when this is done, due to the fact that any characters wait-
  ing 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.  Thus, subcommands you enter do not show on your terminal,
  except for the / (slash), ? (question mark), and ! (exclamation point) com-
  mands.

Environment Variables

  Normally, you place the command sequence that sets up the environment vari-
  ables in the .cshrc, .login, .kshrc, or .profile files.  Setting them in
  .login or .profile will prevent possibly unnecessary re-evaluation of the
  variable assignments.	 Since it is unlikely that you will ever want to
  remotely execute more (for example, rsh  more), it is not as impor-
  tant to place them in the .cshrc, or .kshrc files.

  LINES

  The LINES variable overrides the system-selected vertical screen size, used
  as the number of lines in a screenful.  The -n option takes precedence over
  the LINES variable for determining the number of lines in a screenful.

  MORE

  The more command looks in the MORE environment variable to preset any
  desired flags; for example, assume that you prefer to view files using the
  -c and -e flags.  The csh command setenv MORE -c -e, or the ksh or sh com-
  mand sequence MORE='-c -e' ; export MORE would cause all invocations of
  more, including invocations by programs such as man and mesg, to use this
  mode.

  The MORE variable no longer supports options without hyphens.	 It only sup-
  ports white space separated hyphenated variables. Any command-line options
  are processed after those in the MORE variable, as if the command line
  were:

       more $MORE options operands

  TERM

  The TERM variable determines the name of the terminal type.

FILES

  /usr/share/lib/terminfo/?/*
		Terminal information database.




RELATED INFORMATION

  Commands: cat(1), csh(1), grep(1)/egrep(1)/fgrep(1), ksh(1), man(1),
  nroff(1), pg(1), script(1), sh(1)


  Files: terminfo(4).