Seth Woolley's Man Viewer

most(1) - most - browse or page through a text file - man 1 most

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

MOST(1)                                                                MOST(1)



NAME
       most - browse or page through a text file(1,n)

SYNOPSIS
       most [-1bCckMstvwz] [+lineno] [+c] [+d] [+s] [+/string(3,n)] [filename...]

DESCRIPTION
       most  is  a  paging program that displays, one windowful at a time(1,2,n), the
       contents of a file(1,n) on a terminal.  It pauses after each  windowful  and
       prints on the window status line the screen the file(1,n) name, current line
       number, and the percentage of the file(1,n) so far displayed.

       Unlike other paging programs, most is capable of  displaying  an  arbi-
       trary  number  of  windows as long as each window occupies at least two
       screen lines.  Each window may contain the same  file(1,n)  or  a  different
       file.   In  addition,  each  window has its own mode.  For example, one
       window may display a file(1,n) with its lines wrapped while another  may  be
       truncating  the  lines.   Windows may be `locked' together in(1,8) the sense
       that if(3,n) one of the locked windows  scrolls,  all  locked  windows  will
       scroll.   most  is  also  capable  of  ignoring lines that are indented
       beyond a user specified value.  This is useful  when  viewing  computer
       programs  to pick out gross features of the code.  See the `:o' command
       for a description of this feature.

       In addition to displaying ordinary text files, most  can  also  display
       binary  files as well as files with arbitrary ascii(1,7) characters.  When a
       file(1,n) is read(2,n,1 builtins) into a buffer, most examines the first  32  bytes  of  the
       file(1,n) to determine if(3,n) the file(1,n) is a binary file(1,n) and then switches to the
       appropriate mode.  However, this feature may be disabled  with  the  -k
       option.  See the description of the -b, -k, -v, and -t options for fur-
       ther details.

       Text files may contain combinations of underscore and backspace charac-
       ters  causing  a  printer to underline or overstrike.  When most recog-
       nizes this, it inserts the appropriate escape sequences to achieve  the
       desired  effect.   In  addition,  some files cause the printer to over-
       strike some characters by embedding carriage return characters  in(1,8)  the
       middle of a line.  When this occurs, most displays the overstruck char-
       acter with a bold attribute.  This feature facilitates the  reading  of
       UNIX  man(1,5,7) pages or a document produced by runoff.  In particular, view-
       ing this document with most should illustrate  this  behavior  provided
       that  the  underline  characters  have  not been stripped.  This may be
       turned off with the -v option.

       By default, lines with more characters than the terminal width are  not
       wrapped  but  are  instead  truncated.  When truncation occurs, this is
       indicated by a `$' in(1,8) the far right column of the terminal screen.  The
       RIGHT  and  LEFT arrow keys may be used to view lines which extend past
       the margins of the screen.  The -w option may be used to override  this
       feature.   When  a  window is wrapped, the character `\' will appear at
       the right edge of the window.

       Commands are listed below.

OPTIONS
       -1     VT100 mode.  This is  meaningful  only  on  VMS  systems.   This
              option should be used if(3,n) the terminal is strictly a VT100.  This
              implies that the terminal does not have the  ability  to  delete
              and  insert multiple lines.  VT102s and above have this ability.

       -b     Binary mode.  Use this switch(1,n) when you want to view  files  con-
              taining  8  bit characters.  most will display the file(1,n) 16 bytes
              per line in(1,8) hexidecimal notation.  A typical line looks like:

                   01000000 40001575 9C23A020 4000168D     ....@..u.#. @...

              When used with the -v option, the same line looks like:

                   ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...

       -k     `Kanji' option.  Ordinarily, most will go into  binary  mode  if(3,n)
              the  file(1,n) consists of non-ascii characters.  Sometimes this fea-
              ture is not desirable since some terminals have a special inter-
              pretation for eight bit characters.  The -k option turns off the
              automatic sensing.

       -C     Disable color support.

       -M     Disable the use of mmap.

       -s     Squeeze.  Replace multiple blank lines with a single blank line.

       -z     option turns off gunzip-on-the-fly.

       -v     Display  control  characters as in(1,8) `^A' for control A.  Normally
              most does not interpret control characters.

       -t     Display tabs as `^I'.  This option is meaningful only when  used
              with the -v option.  +lineno Start up at lineno.

       +c     Make search case sensitive.  By default, they are not.

       +d     This switch(1,n) should only be used if(3,n) you want the option to delete
              a file(1,n) while viewing it.  This makes it easier to clean unwanted
              files out of a directory.  The file(1,n) is deleted with the interac-
              tive key sequence `:D' and then confirming with `y'.

       +/string(3,n)
              Start up at the line containing the first occurrence of  string(3,n).

COMMAND USAGE
       The  commands  take  effect  immediately; it is not necessary to type a
       carriage return.

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

       SPACE, CTRL-D, NEXT_SCREEN
              Display another windowful, or jump i windowfuls if(3,n) i  is  speci-
              fied.

       RETURN, DOWN_ARROW, V, CTRL-N
              Display another line, or i more lines, if(3,n) specified.

       UP_ARROW, ^, CTRL-P
              Display previous line, or i previous lines, if(3,n) specified.

       T, ESCAPE<
              Move to top of buffer.

       B, ESCAPE>
              Move to bottom of buffer.

       RIGHT_ARROW, TAB, >
              Scroll window left 60i columns to view lines that are beyond the
              right margin of the window.

       LEFT_ARROW, CTRL-B, <
              Scroll window right 60i columns to view lines  that  are  beyond
              the left margin of the window.

       U, CTRL-U, DELETE, PREV_SCREEN
              Skip back i windowfuls and then print a windowful.

       R, CTRL-R
              Redraw the window.

       J, G   If  i  is not specified, then prompt for a line number then jump
              to that line otherwise just jump to line i.

       %      If i is not specified, then prompt for  a  percent  number  then
              jump  to  that percent of the file(1,n) otherwise just jump to i per-
              cent of the file.

       W, w   If the current screen width is 80, make it 132  and  vice-versa.
              For other values, this command is ignored.

       Q, CTRL-X CTRL-C, CTRL-K E
              Exit from most.  On VMS, ^Z also exits.

       h, CTRL-H, HELP, PF2
              Help.   Give  a  description of all the most commands.  The most
              environment variable MOST_HELP must be set(7,n,1 builtins) for this to be  mean-
              ingful.

       f, /, CTRL-F, FIND, GOLD PF3
              Prompt for a string(3,n) and search forward from the current line for
              ith distinct line containing the string.  CTRL-G aborts.

       ?      Prompt for a string(3,n) and search backward  for  the  ith  distinct
              line containing the string.  CTRL-G aborts.

       n      Search for the next i lines containing an occurrence of the last
              search string(3,n) in(1,8) the direction of the previous search.

       m, SELECT, CTRL-@, CTRL-K M, PERIOD
              Set a mark on the current line for later reference.

       INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD
              Set a mark on the current line  but  return  to  previous  mark.
              This  allows the user to toggle back and forth between two posi-
              tions in(1,8) the file.

       l, L   Toggle locking for this window.  The window is locked  if(3,n)  there
              is  a  `*'  at the left edge of the status line.  Windows locked
              together, scroll together.

       CTRL-X 2, CTRL-W 2, GOLD X
              Split this window in(1,8) half.

       CTRL-X o, CTRL-W o, o, GOLDUP, GOLDDOWN
              Move to other window.

       CTRL-X 0, CTRL-W 0, GOLD V
              Delete this window.

       CTRL-X 1, CTRL-W 1, GOLD O
              Delete all other windows, leaving only one window.

       E, e   Edit this file.

       $, ESC $
              This is system dependent.  On VMS, this causes most to  spawn  a
              subprocess.   When  the user exits the process, most is resumed.
              On UNIX systems, most simply suspends itself.

       :n     Skip to the next filename given in(1,8) the command  line.   Use  the
              arrow  keys to scroll forward or backward through the file(1,n) list.
              `Q' quits most and any other key selects the given file.

       :c     Toggle case sensitive search.

       :D     Delete current file.  This command is only meaningful  with  the
              +d switch.

       :o, :O Toggle various options.  With this key sequence, most displays a
              prompt asking the user to hit one of: bdtvw.  The `b', `t', `v',
              and  `w'  options  have  the  same  meaning  as the command line
              switches.  For example, the `w' option will toggle  wrapping  on
              and off for the current window.

              The  `d' option must be used with a prefix integer i.  All lines
              indented beyond i columns will not be displayed.   For  example,
              consider the fragment:

                   int main(int argc, char **argv)
                   {
                        int i;

                        for (i = 0; i < argc, i++)
                        {
                             fprintf(stdout,"%i: %s\n",i,argv[i]);
                        }
                        return 0;
                   }

              The  key  sequence  `1:od'  will  cause most to display the file(1,n)
              ignoring all lines indented beyond the first column.  So for the
              example above, most would display:

                   int main(int argc, char **argv)...
                   }

              where the `...' indicates lines follow are not displayed.

HINTS
       CTRL-G aborts the commands requiring the user to type something in(1,8) at a
       prompt.  The backquote key has a special meaning here.  It is  used  to
       quote  certain  characters.   This is useful when search for the occur-
       rence of a string(3,n) with a control character or a string(3,n) at the beginning
       of  a line.  In the latter case, to find the occurrence of `The' at the
       beginning of a line, enter `^JThe where ` quotes the CTRL-J.

ENVIRONMENT
       most uses the following environment variables:

       MOST_SWITCHES
              This variable sets commonly used switches.   For  example,  some
              people  prefer  to  use  most  with the -s option so that excess
              blank lines are not displayed.  On VMS  this  is  normally  done
              done in(1,8) the login.com through the line:

                   $ define MOST_SWITCHES "-s"

       MOST_EDITOR, SLANG_EDITOR
              Either of these environment variables specify an editor for most
              to invoke to edit a file. The value can contain %s and  %d  for-
              matting  descriptors  that represent the file(1,n) name and line num-
              ber, respectively.  For example, if(3,n) JED is your editor, then set(7,n,1 builtins)
              MOST_EDITOR to 'jed %s -g %d'.

       MOST_HELP
              This variable may be used to specify an alternate help file.

       MOST_INITFILE
              Set  this  variable  to  specify the initialization file(1,n) to load(7,n)
              during startup.  The default action is to load(7,n) the  system  con-
              figuration  file(1,n)  and  then a personal configuration file(1,n) called
              .mostrc on Unix, and most.rc on other systems.

CONFIGURATION FILE SYNTAX
       When most starts up, it tries to read(2,n,1 builtins) a system  confiuration  file(1,n)  and
       then a personal configuration file.  These files may be used to specify
       keybindings and colors.

       To bind(2,n,1 builtins) a key to a particular function use the syntax:

       setkey function-name key-sequence

       The setkey command requires two arguments.  The function-name  argument
       specifies the function that is to be executed as a response to the keys
       specified by the key-sequence argument are pressed.  For example,

             setkey   "up"     "^P"

       indicates that when Ctrl-P is pressed then the function  up  is  to  be
       executed.

       Sometimes,  it  is  necessary  to  first  unbind  a key-sequence before
       rebinding it in(1,8) order via the unsetkey function:

              unsetkey "^F"

       Colors may be defined through the use of the color keyword in(1,8)  the  the
       configuration file(1,n) using the syntax:

       color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR

       Here, OBJECT-NAME can be any one of the following items:

           status           -- the status line
           underline        -- underlined text
           overstrike       -- overstriked text
           normal           -- anything else

       See the sample configuration files for more information.

BUGS
       Almost all of the known bugs or limitations of most are due to a desire
       to read(2,n,1 builtins) and interpret control characters in(1,8) files.   One  problem  con-
       cerns the use of backspace characters to underscore or overstrike other
       characters.  most makes an attempt to use terminal escape sequences  to
       simulate this behavior.  One side effect is the one does not always get
       what one expects when scrolling right and left through a file.  When in(1,8)
       doubt, use the -v and -b options of most.


AUTHOR
       John E. Davis
       davis@space.mit.edu

ACKNOWLEDGEMENTS
       I would like to thank the users(1,5) of most for valuable comments and crit-
       icisms.  I would especially like to thank those  individuals  who  have
       contributed code to most.

       Mats  Akerberg,  Henk  D. Davids, Rex O. Livingston, and Mark Pizzolato
       contributed to the early VMS versions of  most.   In  particular,  Mark
       worked on it to get it ready for DECUS.

       Foteos  Macrides <MACRIDES@SCI.WFEB.EDU> adapted most for use in(1,8) cswing
       and gopher.  A few features of the present version(1,3,5) of most was inspired
       from his work.

       I  am  grateful  to Robert Mills <robert@jna.com.au> for re-writing the
       search routines to use regular expressions.

       Sven Oliver Moll <smol0075@rz.uni-hildesheim.de> came up with the  idea
       of automatic detection of zipped files.

       I would also like to thank Shinichi Hama for his valuable criticisms of
       most.

       Thanks to David W. Sanderson (dws@cs.wisc.edu) for adapting  the  docu-
       mentation to nroff man(1,5,7) page source format.




                                   May 1999                            MOST(1)

References for this manual (incoming links)