home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / DESQVIEW / TECH / MYLESS.ZIP / LESS.MAN < prev    next >
Encoding:
Text File  |  1991-02-20  |  20.6 KB  |  529 lines

  1.  
  2.  
  3.  
  4.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  5.  
  6.  
  7.  
  8.  
  9.      NNNNAAAAMMMMEEEE
  10.           less - opposite of more
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           lllleeeessssssss [[[[----BBBBccccddddeeeeppppssssttttvvvvwwwwmmmmMMMMqqqqQQQQuuuuUUUU]]]] [[[[----hhhh_N]]]] [[[[----bbbb[[[[ffffpppp]]]]_N]]]] [[[[----xxxx_N]]]] [[[[----[[[[zzzz]]]]_N]]]]
  14.                [[[[----PPPP[[[[mmmmMMMM]]]]_s_t_r_i_n_g]]]] [[[[----llll_l_o_g_f_i_l_e]]]] [[[[++++_c_m_d]]]]  [[[[_f_i_l_e_n_a_m_e]]]]............
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.           _L_e_s_s is a program similar to _m_o_r_e (1), but which allows
  18.           backwards movement in the file as well as forward movement.
  19.           Also, _l_e_s_s does not have to read the entire input file
  20.           before starting, so with large input files it starts up
  21.           faster than text editors like _v_i (1).  _L_e_s_s uses termcap, so
  22.           it can run on a variety of terminals.  There is even limited
  23.           support for hardcopy terminals.  (On a hardcopy terminal,
  24.           lines which should be printed at the top of the screen are
  25.           prefixed with an up-arrow.)
  26.  
  27.           Commands are based on both _m_o_r_e and _v_i. Commands may be
  28.           preceeded by a decimal number, called N in the descriptions
  29.           below.  The number is used by some commands, as indicated.
  30.  
  31.  
  32.      CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  33.           In the following descriptions, ^X means control-X.
  34.  
  35.           h    Help: display a summary of these commands.  If you
  36.                forget all the other commands, remember this one.  If
  37.                the help file is not ./less.hlp, then you should set
  38.                the environment variable LESSHELP to the full pathname
  39.                of the actual help file.
  40.  
  41.           SPACE
  42.                Scroll forward N lines, default one window (see option
  43.                -z below).  If N is more than the screen size, only the
  44.                final screenful is displayed.
  45.  
  46.           f or ^F
  47.                Same as SPACE.
  48.  
  49.           b or ^B
  50.                Scroll backward N lines, default one window (see option
  51.                -z below).  If N is more than the screen size, only the
  52.                final screenful is displayed.
  53.  
  54.           RETURN
  55.                Scroll forward N lines, default 1.  The entire N lines
  56.                are displayed, even if N is more than the screen size.
  57.  
  58.           e or ^E
  59.                Same as RETURN.
  60.  
  61.  
  62.  
  63.      Hewlett-Packard Company       - 1 -                  Feb 20, 1991
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  71.  
  72.  
  73.  
  74.  
  75.           j or ^J
  76.                Also the same as RETURN.
  77.  
  78.           y or ^Y
  79.                Scroll backward N lines, default 1.  The entire N lines
  80.                are displayed, even if N is more than the screen size.
  81.  
  82.           k or ^K
  83.                Same as y.
  84.  
  85.           d or ^D
  86.                Scroll forward N lines, default 10.  If N is specified,
  87.                it becomes the new default for subsequent d and u
  88.                commands.
  89.  
  90.           u or ^U
  91.                Scroll backward N lines, default 10.  If N is
  92.                specified, it becomes the new default for subsequent d
  93.                and u commands.
  94.  
  95.           r or ^R or ^L
  96.                Repaint the screen.
  97.  
  98.           R    Repaint the screen, discarding any buffered input.
  99.                Useful if the file is changing while it is being
  100.                viewed.
  101.  
  102.           g    Go to line N in the file, default 1 (beginning of
  103.                file).  (Warning: this may be slow if N is large.)
  104.  
  105.           G    Go to line N in the file, default the end of the file.
  106.                (Warning: this may be slow if standard input, rather
  107.                than a file, is being read.)
  108.  
  109.           p    Go to a position N percent into the file.  N should be
  110.                between 0 and 100.  (This is possible if standard input
  111.                is being read, but only if _l_e_s_s has already read to the
  112.                end of the file.  It is always fast, but not always
  113.                useful.)
  114.  
  115.           %    Same as p.
  116.  
  117.           m    Followed by any lowercase letter, marks the current
  118.                position with that letter.
  119.  
  120.           '    (Single quote.) Followed by any lowercase letter,
  121.                returns to the position which was previously marked
  122.                with that letter.  Followed by another single quote,
  123.                returns to the postion at which the last "large"
  124.                movement command was executed.  All marks are lost when
  125.                a new file is examined.
  126.  
  127.  
  128.  
  129.      Hewlett-Packard Company       - 2 -                  Feb 20, 1991
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  137.  
  138.  
  139.  
  140.  
  141.           /pattern
  142.                Search forward in the file for the N-th line containing
  143.                the pattern.  N defaults to 1.  The pattern is a
  144.                regular expression, as recognized by _e_d. The search
  145.                starts at the second line displayed (but see the -t
  146.                option, which changes this).
  147.  
  148.           ?pattern
  149.                Search backward in the file for the N-th line
  150.                containing the pattern.  The search starts at the line
  151.                immediately before the top line displayed.
  152.  
  153.           n    Repeat previous search, for N-th line containing the
  154.                last pattern.
  155.  
  156.           E    Examine a new file.  If the filename is missing, the
  157.                "current" file (see the N and P commands below) from
  158.                the list of files in the command line is re-examined.
  159.  
  160.           N    Examine the next file (from the list of files given in
  161.                the command line).  If a number N is specified (not to
  162.                be confused with the command N), the N-th next file is
  163.                examined.
  164.  
  165.           P    Examine the previous file.  If a number N is specified,
  166.                the N-th previous file is examined.
  167.  
  168.           = or ^G
  169.                Prints some information about the file being viewed,
  170.                including its name and the byte offset of the bottom
  171.                line being displayed.  If possible, it also prints the
  172.                length of the file and the percent of the file above
  173.                the last displayed line.
  174.  
  175.           -    Followed by one of the command line option letters (see
  176.                below), this will toggle the setting of that option and
  177.                print a message describing the new setting.
  178.  
  179.           +cmd Causes the specified cmd to be executed each time a new
  180.                file is examined.  For example, +G causes _l_e_s_s to
  181.                initially display each file starting at the end rather
  182.                than the beginning.
  183.  
  184.           V    Prints the version number of _l_e_s_s being run.
  185.  
  186.           q    Exits _l_e_s_s.
  187.  
  188.           The following two commands may or may not be valid,
  189.           depending on your particular installation.
  190.  
  191.           v    Invokes an editor to edit the current file being
  192.  
  193.  
  194.  
  195.      Hewlett-Packard Company       - 3 -                  Feb 20, 1991
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  203.  
  204.  
  205.  
  206.  
  207.                viewed.  The editor is taken from the environment
  208.                variable _E_D_I_T_O_R or defaults to _v_i
  209.  
  210.           ! shell-command
  211.                Invokes a shell to run the shell-command given.
  212.  
  213.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  214.           Command line options are described below.  Most options may
  215.           be changed while _l_e_s_s is running, via the "-" command.
  216.  
  217.           Options are also taken from the environment variable "LESS".
  218.           For example, if you like _m_o_r_e -style prompting, to avoid
  219.           typing "less -m ..." each time _l_e_s_s is invoked, you might
  220.           tell _c_s_h:
  221.  
  222.           setenv LESS m
  223.  
  224.           or if you use _s_h:
  225.  
  226.           LESS=m; export LESS
  227.  
  228.           The environment variable is parsed before the command line,
  229.           so command line options override the LESS environment
  230.           variable.  A dollar sign ($) may be used to signal the end
  231.           of an option string.  This is important only for options
  232.           like -P which take a following string.
  233.  
  234.           -s   The -s option causes consecutive blank lines to be
  235.                squeezed into a single blank line.  This is useful when
  236.                viewing _n_r_o_f_f output.
  237.  
  238.           -t   Normally, forward searches start just after the top
  239.                displayed line (that is, at the second displayed line).
  240.                Thus forward searches include the currently displayed
  241.                screen.  The -t option causes forward searches to start
  242.                just after the bottom line displayed, thus skipping the
  243.                currently displayed screen.
  244.  
  245.           -m   Normally, _l_e_s_s prompts with a colon.  The -m option
  246.                causes _l_e_s_s to prompt verbosely (like _m_o_r_e), with the
  247.                percent into the file.
  248.  
  249.           -M   The -M option causes _l_e_s_s to prompt even more verbosely
  250.                than _m_o_r_e.
  251.  
  252.           -P   The -P option provides a way to tailor the three prompt
  253.                styles to your own preference.  You would normally put
  254.                this option in your LESS environment variable, rather
  255.                than type it in with each _l_e_s_s command.  Such an option
  256.                must either be the last option in the LESS variable, or
  257.                be terminated by a dollar sign.  -P followed by a
  258.  
  259.  
  260.  
  261.      Hewlett-Packard Company       - 4 -                  Feb 20, 1991
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  269.  
  270.  
  271.  
  272.  
  273.                string changes the default (short) prompt to that
  274.                string.  -Pm changes the medium (-m) prompt to the
  275.                string, and -PM changes the long (-M) prompt.  The
  276.                string consists of a sequence of letters which are
  277.                replaced with certain predefined strings, as follows:
  278.                     F    file name
  279.                     f    file name, only once
  280.                     O    file n of n
  281.                     o    file n of n, only once
  282.                     b    byte offset
  283.                     p    percent into file
  284.                     P    percent if known, else byte offset
  285.                Angle brackets, < and >, may be used to surround a
  286.                literal string to be included in the prompt.  The
  287.                defaults are "fo" for the short prompt, "foP" for the
  288.                medium prompt, and "Fobp" for the long prompt.
  289.                Example: Setting your LESS variable to "PmFOP$PMFObp"
  290.                would change the medium and long prompts to always
  291.                include the file name and "file n of n" message.
  292.                Another example: Setting your LESS variable to
  293.                "mPm<--Less-->FoPe" would change the medium prompt to
  294.                the string "--Less--" followed by the file name and
  295.                percent into the file.  It also selects the medium
  296.                prompt as the default prompt (because of the first
  297.                "m").
  298.  
  299.           -q   Normally, if an attempt is made to scroll past the end
  300.                of the file or before the beginning of the file, the
  301.                terminal bell is rung to indicate this fact.  The -q
  302.                option tells _l_e_s_s not to ring the bell at such times.
  303.                If the terminal has a "visual bell", it is used
  304.                instead.
  305.  
  306.           -Q   Even if -q is given, _l_e_s_s will ring the bell on certain
  307.                other errors, such as typing an invalid character.  The
  308.                -Q option tells _l_e_s_s to be quiet all the time; that is,
  309.                never ring the terminal bell.  If the terminal has a
  310.                "visual bell", it is used instead.
  311.  
  312.           -e   Normally the only way to exit _l_e_s_s is via the "q"
  313.                command.  The -e option tells _l_e_s_s to automatically
  314.                exit the second time it reaches end-of-file.
  315.  
  316.           -u   If the -u option is given, backspaces are treated as
  317.                printable characters; that is, they are sent to the
  318.                terminal when they appear in the input.
  319.  
  320.           -U   If the -U option is given, backspaces are printed as
  321.                the two character sequence "^H".
  322.  
  323.                If neither -u nor -U is given, backspaces which appear
  324.  
  325.  
  326.  
  327.      Hewlett-Packard Company       - 5 -                  Feb 20, 1991
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  335.  
  336.  
  337.  
  338.  
  339.                adjacent to an underscore character are treated
  340.                specially: the underlined text is displayed using the
  341.                terminal's hardware underlining capability.  Also,
  342.                backspaces which appear between two identical
  343.                characters are treated specially: the overstruck text
  344.                is printed using the terminal's hardware boldface
  345.                capability.  Other backspaces are deleted, along with
  346.                the preceeding character.
  347.  
  348.           -B   Normally, this (specially modified) version of _l_e_s_s
  349.                ignores backspace sequences during string searches.
  350.                That is, all occurrences of a character followed by a
  351.                backspace are stripped out from the text to prevent
  352.                redundant sequences from interfering with text
  353.                searches.  This behaviour is different from "standard"
  354.                _l_e_s_s, and allows one to search for keywords in _m_a_n
  355.                pages or other _n_r_o_f_f output.  The -B option is used to
  356.                disable this feature, for "compatibility" with standard
  357.                _l_e_s_s.
  358.  
  359.           -v   When invoking _v_i using the "v" command, it is sometimes
  360.                convenient to have _v_i start up at the same part of the
  361.                file that was being viewed with _l_e_s_s immediately
  362.                beforehand.  This option enables this feature, by
  363.                causing a '+n' sequence to be inserted between _E_D_I_T_O_R
  364.                and the file name, where 'n' is the current line in the
  365.                file (at top of screen in _l_e_s_s ).
  366.  
  367.           -w   Normally, _l_e_s_s uses a tilde character to represent
  368.                lines past the end of the file.  The -w option causes
  369.                blank lines to be used instead.
  370.  
  371.           -d   Normally, _l_e_s_s will complain if the terminal is dumb;
  372.                that is, lacks some important capability, such as the
  373.                ability to clear the screen or scroll backwards.  The
  374.                -d option suppresses this complaint (but does not
  375.                otherwise change the behavior of the program on a dumb
  376.                terminal).
  377.  
  378.           -p   Normally, _l_e_s_s will repaint the screen by scrolling
  379.                from the bottom of the screen.  If the -p option is
  380.                set, when _l_e_s_s needs to change the entire display, it
  381.                will clear the screen and paint from the top line down.
  382.  
  383.           -h   Normally, _l_e_s_s will scroll backwards when backwards
  384.                movement is necessary.  The -h option specifies a
  385.                maximum number of lines to scroll backwards.  If it is
  386.                necessary to move backwards more than this many lines,
  387.                the screen is repainted in a forward direction.  (If
  388.                the terminal does not have the ability to scroll
  389.                backwards, -h0 is implied.)
  390.  
  391.  
  392.  
  393.      Hewlett-Packard Company       - 6 -                  Feb 20, 1991
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  401.  
  402.  
  403.  
  404.  
  405.           -[z] When given a backwards or forwards window command, _l_e_s_s
  406.                will by default scroll backwards or forwards one
  407.                screenful of lines.  The -z_n option changes the default
  408.                scrolling window size to _n lines.  If _n is greater than
  409.                the screen size, the scrolling window size will be set
  410.                to one screenful.  Note that the "z" is optional for
  411.                compatibility with _m_o_r_e.
  412.  
  413.           -x   The -x_n option sets tab stops every _n positions.  The
  414.                default for _n is 8.
  415.  
  416.           -l   The -l option, followed immediately by a filename, will
  417.                cause _l_e_s_s to copy its input to the named file as it is
  418.                being viewed.  This applies only when the input file is
  419.                a pipe, not an ordinary file.
  420.  
  421.           -b   The -b_n option tells _l_e_s_s to use a non-standard buffer
  422.                size.  There are two standard (default) buffer sizes,
  423.                one is used when a file is being read and the other
  424.                when a pipe (standard input) is being read.  The
  425.                current defaults are 5 buffers for files and 12 for
  426.                pipes.  (Buffers are 1024 bytes.) The number _n
  427.                specifies a different number of buffers to use.  The -b
  428.                may be followed by "f", in which case only the file
  429.                default is changed, or by "p" in which case only the
  430.                pipe default is changed.  Otherwise, both are changed.
  431.  
  432.           -c   Normally, when data is read by _l_e_s_s, it is scanned to
  433.                ensure that bit 7 (the high order bit) is turned off in
  434.                each byte read, and to ensure that there are no null
  435.                (zero) bytes in the data (null bytes are turned into
  436.                "@" characters).  If the data is known to be "clean",
  437.                the -c option will tell _l_e_s_s to skip this checking,
  438.                causing an imperceptible speed improvement.  (However,
  439.                if the data is not "clean", unpredicatable results may
  440.                occur.)
  441.  
  442.           +    If a command line option begins with ++++, the remainder
  443.                of that option is taken to be an initial command to
  444.                _l_e_s_s. For example, +G tells _l_e_s_s to start at the end of
  445.                the file rather than the beginning, and +/xyz tells it
  446.                to start at the first occurence of "xyz" in the file.
  447.                As a special case, +<number> acts like +<number>g; that
  448.                is, it starts the display at the specified line number
  449.                (however, see the caveat under the "g" command above).
  450.                If the option starts with ++++++++, the initial command
  451.                applies to every file being viewed, not just the first
  452.                one.  The + command described previously may also be
  453.                used to set (or change) an initial command for every
  454.                file.
  455.  
  456.  
  457.  
  458.  
  459.      Hewlett-Packard Company       - 7 -                  Feb 20, 1991
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      LLLLEEEESSSSSSSS((((llll))))                                                   LLLLEEEESSSSSSSS((((llll))))
  467.  
  468.  
  469.  
  470.  
  471.      BBBBUUUUGGGGSSSS
  472.           When used on standard input (rather than a file), you can
  473.           move backwards only a finite amount, corresponding to that
  474.           portion of the file which is still buffered.  The -b option
  475.           may be used to expand the buffer space.
  476.  
  477.           The environment variable _L_E_S_S_H_E_L_P must be defined to supply
  478.           the full path for the help file (less.hlp) in order for the
  479.           help function to work.
  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.      Hewlett-Packard Company       - 8 -                  Feb 20, 1991
  526.  
  527.  
  528.  
  529.