home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Utilities / most / most.doc < prev    next >
Text File  |  1999-05-17  |  19KB  |  529 lines

  1.  
  2.  
  3.  
  4. MOST(1)                                                   MOST(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        most - browse or page through a text file
  9.  
  10. SSYYNNOOPPSSIISS
  11.        mmoosstt  [--bbssttvvwwzz]  [++_l_i_n_e_n_o]  [++cc]  [++dd]  [++//_s_t_r_i_n_g]  [_f_i_l_e_-
  12.        _n_a_m_e...]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.        _m_o_s_t is a paging program that displays, one windowful at a
  16.        time,  the  contents  of  a file on a terminal.  It pauses
  17.        after each windowful and prints on the window status  line
  18.        the  screen  the  file  name, current line number, and the
  19.        percentage of the file so far displayed.
  20.  
  21.        Unlike other paging programs, _m_o_s_t is capable of  display-
  22.        ing  an arbitrary number of windows as long as each window
  23.        occupies at least two screen lines.  Each window may  con-
  24.        tain the same file or a different file.  In addition, each
  25.        window has its own mode.  For example, one window may dis-
  26.        play  a  file  with its lines wrapped while another may be
  27.        truncating the lines.  Windows may be `locked' together in
  28.        the  sense  that if one of the locked windows scrolls, all
  29.        locked windows will  scroll.   _m_o_s_t  is  also  capable  of
  30.        ignoring  lines  that are indented beyond a user specified
  31.        value.  This is useful when viewing computer  programs  to
  32.        pick out gross features of the code.  See the `::oo' command
  33.        for a description of this feature.
  34.  
  35.        In addition to displaying ordinary text  files,  _m_o_s_t  can
  36.        also  display binary files as well as files with arbitrary
  37.        ascii characters.  When a file is read into a buffer, _m_o_s_t
  38.        examines  the  first  32 bytes of the file to determine if
  39.        the file is a binary file and then switches to the  appro-
  40.        priate  mode.   However, this feature may be disabled with
  41.        the --kk option.  See the description of the --bb, --kk, --vv, and
  42.        --tt options for further details.
  43.  
  44.        Text  files  may  contain  combinations  of underscore and
  45.        backspace characters causing a  printer  to  underline  or
  46.        overstrike.   When  _m_o_s_t  recognizes  this, it inserts the
  47.        appropriate  escape  sequences  to  achieve  the   desired
  48.        effect.   In  addition,  some  files  cause the printer to
  49.        overstrike some characters by  embedding  carriage  return
  50.        characters  in  the  middle  of a line.  When this occurs,
  51.        _m_o_s_t  displays  the  overstruck  character  with  a   bold
  52.        attribute.   This  feature facilitates the reading of UNIX
  53.        man pages or a document produced by _r_u_n_o_f_f.   In  particu-
  54.        lar,  viewing  this  document  with _m_o_s_t should illustrate
  55.        this behavior provided that the underline characters  have
  56.        not  been  stripped.   This  may be turned off with the --vv
  57.        option.
  58.  
  59.        By default, lines with more characters than  the  terminal
  60.        width  are  not  wrapped  but are instead truncated.  When
  61.  
  62.  
  63.  
  64.                              May 1999                           1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MOST(1)                                                   MOST(1)
  71.  
  72.  
  73.        truncation occurs, this is indicated by a `$' in  the  far
  74.        right  column  of the terminal screen.  The RIGHT and LEFT
  75.        arrow keys may be used to view lines which extend past the
  76.        margins of the screen.  The --ww option may be used to over-
  77.        ride this feature.  When a window is wrapped, the  charac-
  78.        ter `\' will appear at the right edge of the window.
  79.  
  80.        Commands are listed below.
  81.  
  82. OOPPTTIIOONNSS
  83.        --11     VT100  mode.   This  is meaningful only on VMS sys-
  84.               tems.  This option should be used if  the  terminal
  85.               is  strictly a VT100.  This implies that the termi-
  86.               nal does not have the ability to delete and  insert
  87.               multiple  lines.   VT102s and above have this abil-
  88.               ity.
  89.  
  90.        --bb     Binary mode.  Use this switch when you want to view
  91.               files  containing 8 bit characters.  _m_o_s_t will dis-
  92.               play the file 16  bytes  per  line  in  hexidecimal
  93.               notation.  A typical line looks like:
  94.  
  95.                    01000000 40001575 9C23A020 4000168D     ....@..u.#. @...
  96.  
  97.               When  used  with the --vv option, the same line looks
  98.               like:
  99.  
  100.                    ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...
  101.  
  102.        --kk     `Kanji' option.   Ordinarily,  _m_o_s_t  will  go  into
  103.               binary mode if the file consists of non-ascii char-
  104.               acters.  Sometimes this feature  is  not  desirable
  105.               since  some terminals have a special interpretation
  106.               for eight bit characters.  The --kk option turns  off
  107.               the automatic sensing.
  108.  
  109.        --ss     Squeeze.   Replace multiple blank lines with a sin-
  110.               gle blank line.
  111.  
  112.        --zz     option turns off gunzip-on-the-fly.
  113.  
  114.        --vv     Display control characters as in `^A'  for  control
  115.               A.   Normally _m_o_s_t does not interpret control char-
  116.               acters.
  117.  
  118.        --tt     Display tabs as `^I'.  This  option  is  meaningful
  119.               only  when  used with the --vv option.  ++_l_i_n_e_n_o Start
  120.               up at _l_i_n_e_n_o.
  121.  
  122.        ++cc     Make search case sensitive.  By default,  they  are
  123.               not.
  124.  
  125.        ++dd     This  switch  should  only  be used if you want the
  126.               option to delete a file  while  viewing  it.   This
  127.  
  128.  
  129.  
  130.                              May 1999                           2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MOST(1)                                                   MOST(1)
  137.  
  138.  
  139.               makes  it  easier  to clean unwanted files out of a
  140.               directory.  The file is deleted with  the  interac-
  141.               tive  key  sequence  `::DD'  and then confirming with
  142.               `yy'.
  143.  
  144.        ++//_s_t_r_i_n_g
  145.               Start up at the line containing  the  first  occur-
  146.               rence of _s_t_r_i_n_g.
  147.  
  148. CCOOMMMMAANNDD UUSSAAGGEE
  149.        The  commands take effect immediately; it is not necessary
  150.        to type a carriage return.
  151.  
  152.        In the following commands, _i is a numerical argument (1 by
  153.        default).
  154.  
  155.        SSPPAACCEE, CCTTRRLL--DD, NNEEXXTT__SSCCRREEEENN
  156.               Display  another windowful, or jump _i windowfuls if
  157.               _i is specified.
  158.  
  159.        RREETTUURRNN, DDOOWWNN__AARRRROOWW, VV, CCTTRRLL--NN
  160.               Display another line, or _i more  lines,  if  speci-
  161.               fied.
  162.  
  163.        UUPP__AARRRROOWW, ^^, CCTTRRLL--PP
  164.               Display  previous  line,  or  _i  previous lines, if
  165.               specified.
  166.  
  167.        TT, EESSCCAAPPEE<
  168.               Move to top of buffer.
  169.  
  170.        BB, EESSCCAAPPEE>
  171.               Move to bottom of buffer.
  172.  
  173.        RRIIGGHHTT__AARRRROOWW, TTAABB, >>
  174.               Scroll window left 60_i columns to view  lines  that
  175.               are beyond the right margin of the window.
  176.  
  177.        LLEEFFTT__AARRRROOWW, CCTTRRLL--BB, <<
  178.               Scroll  window right 60_i columns to view lines that
  179.               are beyond the left margin of the window.
  180.  
  181.        UU, CCTTRRLL--UU, DDEELLEETTEE, PPRREEVV__SSCCRREEEENN
  182.               Skip back _i windowfuls and then print a  windowful.
  183.  
  184.        RR, CCTTRRLL--RR
  185.               Redraw the window.
  186.  
  187.        JJ, GG   If  _i is not specified, then prompt for a line num-
  188.               ber then jump to that line otherwise just  jump  to
  189.               line _i.
  190.  
  191.        %%      If  _i  is  not specified, then prompt for a percent
  192.               number then  jump  to  that  percent  of  the  file
  193.  
  194.  
  195.  
  196.                              May 1999                           3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MOST(1)                                                   MOST(1)
  203.  
  204.  
  205.               otherwise just jump to _i percent of the file.
  206.  
  207.        WW, ww   If  the current screen width is 80, make it 132 and
  208.               vice-versa.  For  other  values,  this  command  is
  209.               ignored.
  210.  
  211.        QQ, CCTTRRLL--XX CCTTRRLL--CC, CCTTRRLL--KK EE
  212.               Exit from _m_o_s_t.  On VMS, ^Z also exits.
  213.  
  214.        hh, CCTTRRLL--HH, HHEELLPP, PPFF22
  215.               Help.  Give a description of all the _m_o_s_t commands.
  216.               The _m_o_s_t environment variable MMOOSSTT__HHEELLPP must be set
  217.               for this to be meaningful.
  218.  
  219.        ff, //, CCTTRRLL--FF, FFIINNDD, GGOOLLDD PPFF33
  220.               Prompt  for  a  string  and search forward from the
  221.               current line for _ith distinct line  containing  the
  222.               string.  CCTTRRLL--GG aborts.
  223.  
  224.        ??      Prompt for a string and search backward for the _ith
  225.               distinct  line  containing  the   string.    CCTTRRLL--GG
  226.               aborts.
  227.  
  228.        nn      Search  for  the  next _i lines containing an occur-
  229.               rence of the last search string in the direction of
  230.               the previous search.
  231.  
  232.        mm, SSEELLEECCTT, CCTTRRLL--@@, CCTTRRLL--KK MM, PPEERRIIOODD
  233.               Set a mark on the current line for later reference.
  234.  
  235.        IINNSSEERRTT__HHEERREE,, CCTTRRLL--XX CCTTRRLL--XX,, CCOOMMMMAA,, CCTTRRLL--KK RREETTUURRNN,, GGOOLLDD
  236.               PPEERRIIOODD
  237.               Set a mark on the current line but return to previ-
  238.               ous mark.  This allows the user to toggle back  and
  239.               forth between two positions in the file.
  240.  
  241.        ll, LL   Toggle  locking  for  this  window.   The window is
  242.               locked if there is a `*' at the left  edge  of  the
  243.               status   line.   Windows  locked  together,  scroll
  244.               together.
  245.  
  246.        CCTTRRLL--XX 22, CCTTRRLL--WW 22, GGOOLLDD XX
  247.               Split this window in half.
  248.  
  249.        CCTTRRLL--XX oo, CCTTRRLL--WW oo, oo, GGOOLLDDUP,, GOLDDDOOWWNN
  250.               Move to other window.
  251.  
  252.        CCTTRRLL--XX 00, CCTTRRLL--WW 00, GGOOLLDD VV
  253.               Delete this window.
  254.  
  255.        CCTTRRLL--XX 11, CCTTRRLL--WW 11, GGOOLLDD OO
  256.               Delete all other windows, leaving only one  window.
  257.  
  258.        EE, ee   Edit this file.
  259.  
  260.  
  261.  
  262.                              May 1999                           4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. MOST(1)                                                   MOST(1)
  269.  
  270.  
  271.        $$, EESSCC $$
  272.               This is system dependent.  On VMS, this causes _m_o_s_t
  273.               to spawn a subprocess.  When  the  user  exits  the
  274.               process,  _m_o_s_t  is  resumed.  On UNIX systems, _m_o_s_t
  275.               simply suspends itself.
  276.  
  277.        ::nn     Skip to the next  filename  given  in  the  command
  278.               line.   Use  the  arrow  keys  to scroll forward or
  279.               backward through the file list.  `QQ' quits _m_o_s_t and
  280.               any other key selects the given file.
  281.  
  282.        ::cc     Toggle case sensitive search.
  283.  
  284.        ::DD     Delete current file.  This command is only meaning-
  285.               ful with the ++dd switch.
  286.  
  287.        ::oo, ::OO Toggle various options.  With  this  key  sequence,
  288.               _m_o_s_t  displays  a prompt asking the user to hit one
  289.               of: bbddttvvww.  The `bb', `tt', `vv', and `ww' options have
  290.               the same meaning as the command line switches.  For
  291.               example, the `ww' option will toggle wrapping on and
  292.               off for the current window.
  293.  
  294.               The  `dd'  option must be used with a prefix integer
  295.               _i.  All lines indented beyond _i columns will not be
  296.               displayed.  For example, consider the fragment:
  297.  
  298.                    int main(int argc, char **argv)
  299.                    {
  300.                         int i;
  301.  
  302.                         for (i = 0; i < argc, i++)
  303.                         {
  304.                              fprintf(stdout,"%i: %s\n",i,argv[i]);
  305.                         }
  306.                         return 0;
  307.                    }
  308.  
  309.               The  key sequence `11::oodd' will cause _m_o_s_t to display
  310.               the file ignoring all  lines  indented  beyond  the
  311.               first column.  So for the example above, _m_o_s_t would
  312.               display:
  313.  
  314.                    int main(int argc, char **argv)...
  315.                    }
  316.  
  317.               where the `...' indicates lines follow are not dis-
  318.               played.
  319.  
  320. HHIINNTTSS
  321.        CCTTRRLL--GG  aborts  the  commands  requiring  the user to type
  322.        something in at a prompt.  The backquote key has a special
  323.        meaning  here.   It  is  used to quote certain characters.
  324.        This is useful when search for the occurrence of a  string
  325.  
  326.  
  327.  
  328.                              May 1999                           5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. MOST(1)                                                   MOST(1)
  335.  
  336.  
  337.        with a control character or a string at the beginning of a
  338.        line.  In the latter case, to find the occurrence of `The'
  339.        at  the  beginning  of a line, enter ``^^JJTThhee where `` quotes
  340.        the CCTTRRLL--JJ.
  341.  
  342. EENNVVIIRROONNMMEENNTT
  343.        _m_o_s_t uses the following environment variables:
  344.  
  345.        MMOOSSTT__SSWWIITTCCHHEESS
  346.               This variable sets  commonly  used  switches.   For
  347.               example, some people prefer to use _m_o_s_t with the --ss
  348.               option so that excess  blank  lines  are  not  dis-
  349.               played.   On  VMS this is normally done done in the
  350.               login.com through the line:
  351.  
  352.                    $ define MOST_SWITCHES "-s"
  353.  
  354.        MMOOSSTT__EEDDIITTOORR, SSLLAANNGG__EEDDIITTOORR
  355.               Either of these environment  variables  specify  an
  356.               editor for _m_o_s_t to invoke to edit a file. The value
  357.               can contain %s and %d formatting  descriptors  that
  358.               represent  the  file  name and line number, respec-
  359.               tively.  For example, if JED is your  editor,  then
  360.               set MMOOSSTT__EEDDIITTOORR to 'jed %s -g %d'.
  361.  
  362.        MMOOSSTT__HHEELLPP
  363.               This  variable  may be used to specify an alternate
  364.               help file.
  365.  
  366.        MMOOSSTT__IINNIITTFFIILLEE
  367.               Set this variable  to  specify  the  initialization
  368.               file to load during startup.  The default action is
  369.               to load the system configuration file  and  then  a
  370.               personal configuration file called _._m_o_s_t_r_c on Unix,
  371.               and _m_o_s_t_._r_c on other systems.
  372.  
  373. CCOONNFFIIGGUURRAATTIIOONN FFIILLEE SSYYNNTTAAXX
  374.        When most starts up, it tries to read a  system  confiura-
  375.        tion  file  and then a personal configuration file.  These
  376.        files may be used to specify keybindings and colors.
  377.  
  378.        To bind a key to a particular function use the syntax:
  379.  
  380.        sseettkkeeyy ffuunnccttiioonn--nnaammee kkeeyy--sseeqquueennccee
  381.  
  382.        The _s_e_t_k_e_y command requires two arguments.  The  _f_u_n_c_t_i_o_n_-
  383.        _n_a_m_e  argument  specifies  the function that is to be exe-
  384.        cuted as a response to the  keys  specified  by  the  _k_e_y_-
  385.        _s_e_q_u_e_n_c_e argument are pressed.  For example,
  386.  
  387.              setkey   "up"     "^P"
  388.  
  389.        indicates that when _C_t_r_l_-_P is pressed then the function _u_p
  390.        is to be executed.
  391.  
  392.  
  393.  
  394.                              May 1999                           6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. MOST(1)                                                   MOST(1)
  401.  
  402.  
  403.        Sometimes, it is necessary to first unbind a  key-sequence
  404.        before rebinding it in order via the _u_n_s_e_t_k_e_y function:
  405.  
  406.               unsetkey "^F"
  407.  
  408.        Colors may be defined through the use of the _c_o_l_o_r keyword
  409.        in the the configuration file using the syntax:
  410.  
  411.        ccoolloorr OOBBJJEECCTT--NNAAMMEE FFOORREEGGRROOUUNNDD--CCOOLLOORR BBAACCKKGGRROOUUNNDD--CCOOLLOORR
  412.  
  413.        Here, OBJECT-NAME can be any one of the following items:
  414.  
  415.            status           -- the status line
  416.            underline        -- underlined text
  417.            overstrike       -- overstriked text
  418.            normal           -- anything else
  419.  
  420.        See the sample configuration files for more information.
  421.  
  422. BBUUGGSS
  423.        Almost all of the known bugs or limitations  of  _m_o_s_t  are
  424.        due  to  a desire to read and interpret control characters
  425.        in files.  One problem concerns the use of backspace char-
  426.        acters to underscore or overstrike other characters.  _m_o_s_t
  427.        makes an attempt to use terminal escape sequences to simu-
  428.        late  this  behavior.  One side effect is the one does not
  429.        always get what one expects when scrolling right and  left
  430.        through  a file.  When in doubt, use the --vv and --bb options
  431.        of _m_o_s_t.
  432.  
  433.  
  434. AAUUTTHHOORR
  435.        John E. Davis
  436.        davis@space.mit.edu
  437.  
  438. AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS
  439.        I would like to thank the users of _m_o_s_t for valuable  com-
  440.        ments  and  criticisms.   I would especially like to thank
  441.        those individuals who have contributed code to _m_o_s_t_.
  442.  
  443.        Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark
  444.        Pizzolato  contributed  to the early VMS versions of _m_o_s_t_.
  445.        In particular, Mark worked on  it  to  get  it  ready  for
  446.        DECUS.
  447.  
  448.        Foteos  Macrides  <MACRIDES@SCI.WFEB.EDU> adapted _m_o_s_t for
  449.        use in _c_s_w_i_n_g and _g_o_p_h_e_r_.  A few features of  the  present
  450.        version of _m_o_s_t was inspired from his work.
  451.  
  452.        I  am grateful to Robert Mills <robert@jna.com.au> for re-
  453.        writing the search routines to use regular expressions.
  454.  
  455.        Sven Oliver Moll <smol0075@rz.uni-hildesheim.de>  came  up
  456.        with the idea of automatic detection of zipped files.
  457.  
  458.  
  459.  
  460.                              May 1999                           7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. MOST(1)                                                   MOST(1)
  467.  
  468.  
  469.        I  would also like to thank Shinichi Hama for his valuable
  470.        criticisms of _m_o_s_t_.
  471.  
  472.        Thanks to David W. Sanderson (dws@cs.wisc.edu) for  adapt-
  473.        ing the documentation to nroff man page source format.
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                              May 1999                           8
  527.  
  528.  
  529.