home | help
MORE(1) 		     General Commands Manual			 MORE(1)

NAME
     more -- file perusal filter for crt viewing

SYNOPSIS
     more [-ceinsu] [-t tag] [-x tabs] [-/ pattern] [file ...]

DESCRIPTION
     The  more	command  is  a filter for paging through text one screenful at a
     time.  It uses termcap(3) so it can run on a variety of terminals,  includ-
     ing  hardcopy  terminals.	 On  a	hardcopy terminal, lines which should be
     printed at the top of the screen are prefixed with an up-arrow.  A file may
     be specified as /dev/stdin to view stdin.

OPTIONS
     Command line options are described below.	Options are also taken from  the
     environment  variable  MORE (make sure to precede them with a dash (``-''))
     but command line options will override them.

     -c    Normally, more will repaint the screen by scrolling from  the  bottom
	   of  the  screen.   If the -c option is set, when more needs to change
	   the entire display, it will paint from the top line down.

     -e    Normally, if displaying a single file,  more  exits	as  soon  as  it
	   reaches  end-of-file.  The -e option tells more to exit if it reaches
	   end-of-file twice without an intervening operation.

     -i    The -i option causes searches to ignore case; that is, uppercase  and
	   lowercase are considered identical.

     -n    The	-n  flag suppresses line numbers.  The default (to use line num-
	   bers) may cause more to run more slowly  in	some  cases,  especially
	   with  a  very large input file.  Suppressing line numbers with the -n
	   flag will avoid this problem.  Using line  numbers  means:  the  line
	   number  will  be  displayed	in the = command, and the v command will
	   pass the current line number to the editor.

     -s    The -s option causes consecutive blank lines to be  squeezed  into  a
	   single blank line.

     -t    The -t option, followed immediately by a tag, will edit the file con-
	   taining that tag.  For more information, see ctags(1) and gtags(1).

     -u    By  default,  more  treats  backspaces and CR-LF sequences specially.
	   Backspaces which appear adjacent to an underscore character are  dis-
	   played as underlined text.  Backspaces which appear between two iden-
	   tical  characters  are displayed as emboldened text.  CR-LF sequences
	   are compressed to a single newline character.  The -u  option  causes
	   backspaces  to always be displayed as control characters, i.e. as the
	   two character sequence ``^H'', and CR-LF to be left alone.

     -x    The -x option sets tab stops every N positions.  The default for N is
	   8.

     -/    The -/ option specifies a string that will  be  searched  for  before
	   each file is displayed.

COMMANDS
     Interactive  commands  for  more  are based on vi(1).  Some commands may be
     preceded by a decimal number, called N in the descriptions below.	 In  the
     following descriptions, ^X means control-X.

     h		 Help:	display  a summary of these commands.  If you forget all
		 the other commands, remember this one.

     SPACE or f or ^F
		 Scroll forward N lines, default one window.  If N is more  than
		 the screen size, only the final screenful is displayed.

     b or ^B	 Scroll  backward N lines, default one window (see option -z be-
		 low).	If N is more  than  the  screen  size,	only  the  final
		 screenful is displayed.

     j or RETURN or DOWN-ARROW
		 Scroll forward N lines, default 1.  The entire N lines are dis-
		 played, even if N is more than the screen size.

     k or UP-ARROW
		 Scroll  backward  N  lines,  default 1.  The entire N lines are
		 displayed, even if N is more than the screen size.

     LEFT-ARROW  Scroll leftwards N columns, default 1, or turn on line-wrapping
		 if the screen is cannot be scrolled leftwards.

     RIGHT-ARROW
		 Turn off line-wrapping or scroll rightwards N columns,  default
		 1, if line wrapping is already off.

     TAB	 Turn  off line-wrapping or scroll rightwards N * 8 columns, de-
		 fault 8, if line-wrapping is already off.

     HOME	 Toggle horizontal scrolling and associated line-wrapping on and
		 off.

     d or ^D	 Scroll forward N lines, default one half of  the  screen  size.
		 If  N is specified, it becomes the new default for subsequent d
		 and u commands.  The entire N lines are displayed, even if N is
		 more than the screen size.

     u or ^U	 Scroll backward N lines, default one half of the  screen  size.
		 If  N is specified, it becomes the new default for subsequent d
		 and u commands.  The entire N lines are displayed, even if N is
		 more than the screen size.

     g		 Go to line N in the file, default 1 (beginning of file).

     G		 Go to line N in the file, default the end of the file.

     p or %	 Go to a position N percent into the file.  N should be  between
		 0 and 100.  This does work if standard input is being read, but
		 only  if  more  has already read to the end of the file.  It is
		 always fast, but not always useful.

     r or ^L	 Repaint the screen.

     R		 Repaint the screen, discarding any buffered input.   Useful  if
		 the file is changing while it is being viewed.

     m		 Followed  by  any  lowercase letter, marks the current position
		 with that letter.

     '		 (single quote) Followed by any lowercase letter, returns to the
		 position which was previously marked with  that  letter.   Fol-
		 lowed by another single quote, returns to the position at which
		 the  last  "large" movement command was executed, or the begin-
		 ning of the file if no such movements have occurred.

     /pattern	 Search forward in the file for the  N-th  line  containing  the
		 pattern.   N  defaults  to 1.	The pattern is a IEEE Std 1003.2
		 ("POSIX.2") "extended format" regular expression, as  described
		 in  re_format(7).   The  search  starts at the second line dis-
		 played.

     ?pattern	 Search backward in the file for the N-th  line  containing  the
		 pattern.   The search starts at the line immediately before the
		 top line displayed.

     /!pattern	 Like /, but the search is for the N-th line which does NOT con-
		 tain the pattern.

     ?!pattern	 Like ?, but the search is for the N-th line which does NOT con-
		 tain the pattern.

     n and N	 Repeat previous search, in same or opposite  direction  respec-
		 tively,  for N-th line containing the last pattern (or NOT con-
		 taining the last pattern, if the previous search was /! or ?!).

     E[filename]
		 Examine a new file.  If the filename is  missing,  the  current
		 file (see the N and P commands below) from the list of files in
		 the  command  line  is re-examined.  If the filename is a pound
		 sign (#), the previously examined file is re-examined.

     :n 	 Examine the next file (from the list of files given in the com-
		 mand line).  If a number N is specified  (not	to  be	confused
		 with the command N), the N-th next file is examined.

     :p 	 Examine  the previous file.  If a number N is specified, the N-
		 th previous file is examined.

     :t 	 Go to supplied tag.

     t		 Go forward in tag queue [gtags only].

     T		 Go backward in tag queue [gtags only].

     v		 Invokes an editor to edit the current file being  viewed.   The
		 editor  is  taken  from the environment variable EDITOR, or de-
		 faults to vi(1).

     = or ^G	 These options print out the number of the file currently  being
		 displayed  relative  to  the total number of files there are to
		 display, the current line number, the current byte  number  and
		 the total bytes to display, and what percentage of the file has
		 been  displayed.  If more is reading from stdin, or the file is
		 shorter than a single screen, some of these items  may  not  be
		 available.   Note,  all of these items reference the first byte
		 of the last line displayed on the screen.

     q or :q or ZZ
		 Exits more.

ENVIRONMENT
     The following environment variables are used, if they exist:

     MORE	 Specifies default option flags to more.  Options must	be  pre-
		 ceeded by a "-" as if they were specified on the command line.

     EDITOR	 Specifies default editor.

     SHELL	 Specifies  current  shell  in use.  This is normally set by the
		 shell at login time.

     TERM	 Specifies terminal type.  This is used by more to get the  ter-
		 minal characteristics necessary to manipulate the screen.

SEE ALSO
     ctags(1), global(1), gtags(1), vi(1)

BUGS
     Reading files with long lines is slow.

     CRLF-terminated  80  character  lines  are proceeded by an extraneous blank
     line.

     Immediate transitions from bold text to underlined text cause the underlin-
     ing to be not existing.

     Sometimes searches match lines  that  do  not  contain  the  pattern  being
     searched for.

AUTHORS
     This  software  is  derived  from	software contributed to Berkeley by Mark
     Nudleman.

HISTORY
     The more command appeared in 3.0BSD.

FreeBSD ports 15.quarterly	 April 18, 1994 			 MORE(1)

home | help