home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / less373.zip / less.man < prev    next >
Text File  |  2002-01-14  |  80KB  |  2,047 lines

  1.  
  2.  
  3.  
  4. LESS(1)                                                   LESS(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        less - opposite of more
  9.  
  10. SSYYNNOOPPSSIISS
  11.        lleessss --??
  12.        lleessss ----hheellpp
  13.        lleessss --VV
  14.        lleessss ----vveerrssiioonn
  15.        lleessss [[--[[++]]aaBBccCCddeeEEffFFggGGiiIIJJmmMMnnNNqqQQrrRRssSSuuUUVVwwWWXX]]
  16.             [[--bb _s_p_a_c_e]] [[--hh _l_i_n_e_s]] [[--jj _l_i_n_e]] [[--kk _k_e_y_f_i_l_e]]
  17.             [[--{{ooOO}} _l_o_g_f_i_l_e]] [[--pp _p_a_t_t_e_r_n]] [[--PP _p_r_o_m_p_t]] [[--tt _t_a_g]]
  18.             [[--TT _t_a_g_s_f_i_l_e]] [[--xx _t_a_b,,......]] [[--yy _l_i_n_e_s]] [[--[[zz]] _l_i_n_e_s]]
  19.             [[++[[++]]_c_m_d]] [[----]] [[_f_i_l_e_n_a_m_e]]......
  20.        (See  the OPTIONS section for alternate option syntax with
  21.        long option names.)
  22.  
  23.  
  24. DDEESSCCRRIIPPTTIIOONN
  25.        _L_e_s_s is a program similar to _m_o_r_e (1),  but  which  allows
  26.        backward movement in the file as well as forward movement.
  27.        Also, _l_e_s_s does not have to read  the  entire  input  file
  28.        before  starting,  so  with large input files it starts up
  29.        faster than text editors like _v_i (1).  _L_e_s_s  uses  termcap
  30.        (or  terminfo on some systems), so it can run on a variety
  31.        of terminals.  There is even limited support for  hardcopy
  32.        terminals.  (On a hardcopy terminal, lines which should be
  33.        printed at the top of  the  screen  are  prefixed  with  a
  34.        caret.)
  35.  
  36.        Commands  are  based on both _m_o_r_e and _v_i_.  Commands may be
  37.        preceded by a decimal number, called N in the descriptions
  38.        below.  The number is used by some commands, as indicated.
  39.  
  40.  
  41. CCOOMMMMAANNDDSS
  42.        In the following descriptions, ^X  means  control-X.   ESC
  43.        stands for the ESCAPE key; for example ESC-v means the two
  44.        character sequence "ESCAPE", then "v".
  45.  
  46.        h or H Help: display a summary of these commands.  If  you
  47.               forget all the other commands, remember this one.
  48.  
  49.        SPACE or ^V or f or ^F
  50.               Scroll  forward  N  lines,  default one window (see
  51.               option -z below).  If N is  more  than  the  screen
  52.               size, only the final screenful is displayed.  Warn¡
  53.               ing: some systems use ^V as a  special  literaliza¡
  54.               tion character.
  55.  
  56.        z      Like  SPACE,  but if N is specified, it becomes the
  57.               new window size.
  58.  
  59.        ESC-SPACE
  60.               Like SPACE, but scrolls a full screenful,  even  if
  61.  
  62.  
  63.  
  64.                      Version 373: 14 Jan 2002                   1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LESS(1)                                                   LESS(1)
  71.  
  72.  
  73.               it reaches end-of-file in the process.
  74.  
  75.        RETURN or ^N or e or ^E or j or ^J
  76.               Scroll  forward  N  lines, default 1.  The entire N
  77.               lines are displayed, even if N  is  more  than  the
  78.               screen size.
  79.  
  80.        d or ^D
  81.               Scroll  forward  N  lines,  default one half of the
  82.               screen size.  If N is specified, it becomes the new
  83.               default for subsequent d and u commands.
  84.  
  85.        b or ^B or ESC-v
  86.               Scroll  backward  N  lines, default one window (see
  87.               option -z below).  If N is  more  than  the  screen
  88.               size, only the final screenful is displayed.
  89.  
  90.        w      Like  ESC-v,  but if N is specified, it becomes the
  91.               new window size.
  92.  
  93.        y or ^Y or ^P or k or ^K
  94.               Scroll backward N lines, default 1.  The  entire  N
  95.               lines  are  displayed,  even  if N is more than the
  96.               screen size.  Warning: some systems  use  ^Y  as  a
  97.               special job control character.
  98.  
  99.        u or ^U
  100.               Scroll  backward  N  lines, default one half of the
  101.               screen size.  If N is specified, it becomes the new
  102.               default for subsequent d and u commands.
  103.  
  104.        ESC-) or RIGHTARROW
  105.               Scroll  horizontally  right  N  characters, default
  106.               half the screen width (see the -#  option).   If  a
  107.               number  N  is specified, it becomes the default for
  108.               future RIGHTARROW and  LEFTARROW  commands.   While
  109.               the  text  is  scrolled,  it  acts as though the -S
  110.               option (chop lines) were in effect.
  111.  
  112.        ESC-( or LEFTARROW
  113.               Scroll horizontally left N characters, default half
  114.               the  screen width (see the -# option).  If a number
  115.               N is specified, it becomes the default  for  future
  116.               RIGHTARROW and LEFTARROW commands.
  117.  
  118.        r or ^R or ^L
  119.               Repaint the screen.
  120.  
  121.        R      Repaint  the screen, discarding any buffered input.
  122.               Useful if the file is changing while  it  is  being
  123.               viewed.
  124.  
  125.        F      Scroll  forward,  and  keep trying to read when the
  126.               end of file  is  reached.   Normally  this  command
  127.  
  128.  
  129.  
  130.                      Version 373: 14 Jan 2002                   2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LESS(1)                                                   LESS(1)
  137.  
  138.  
  139.               would  be used when already at the end of the file.
  140.               It is a way to monitor the tail of a file which  is
  141.               growing while it is being viewed.  (The behavior is
  142.               similar to the "tail -f" command.)
  143.  
  144.        g or < or ESC-<
  145.               Go to line N in the file, default 1  (beginning  of
  146.               file).   (Warning: this may be slow if N is large.)
  147.  
  148.        G or > or ESC->
  149.               Go to line N in the file, default the  end  of  the
  150.               file.  (Warning: this may be slow if N is large, or
  151.               if N is not specified and  standard  input,  rather
  152.               than a file, is being read.)
  153.  
  154.        p or % Go to a position N percent into the file.  N should
  155.               be between 0 and 100.
  156.  
  157.        {      If a left curly bracket appears  in  the  top  line
  158.               displayed  on  the screen, the { command will go to
  159.               the matching right  curly  bracket.   The  matching
  160.               right  curly  bracket  is  positioned on the bottom
  161.               line of the screen.  If there is more than one left
  162.               curly  bracket  on  the top line, a number N may be
  163.               used to specify the N-th bracket on the line.
  164.  
  165.        }      If a right curly bracket appears in the bottom line
  166.               displayed  on  the screen, the } command will go to
  167.               the matching left curly bracket.  The matching left
  168.               curly  bracket is positioned on the top line of the
  169.               screen.  If there is  more  than  one  right  curly
  170.               bracket  on the top line, a number N may be used to
  171.               specify the N-th bracket on the line.
  172.  
  173.        (      Like {, but  applies  to  parentheses  rather  than
  174.               curly brackets.
  175.  
  176.        )      Like  },  but  applies  to  parentheses rather than
  177.               curly brackets.
  178.  
  179.        [      Like {, but applies to square brackets rather  than
  180.               curly brackets.
  181.  
  182.        ]      Like  }, but applies to square brackets rather than
  183.               curly brackets.
  184.  
  185.        ESC-^F Followed by two characters, acts like {,  but  uses
  186.               the  two  characters  as  open  and close brackets,
  187.               respectively.  For example, "ESC ^F < >"  could  be
  188.               used  to go forward to the > which matches the < in
  189.               the top displayed line.
  190.  
  191.        ESC-^B Followed by two characters, acts like },  but  uses
  192.               the  two  characters  as  open  and close brackets,
  193.  
  194.  
  195.  
  196.                      Version 373: 14 Jan 2002                   3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. LESS(1)                                                   LESS(1)
  203.  
  204.  
  205.               respectively.  For example, "ESC ^B < >"  could  be
  206.               used to go backward to the < which matches the > in
  207.               the bottom displayed line.
  208.  
  209.        m      Followed by any lowercase letter, marks the current
  210.               position with that letter.
  211.  
  212.        '      (Single  quote.)  Followed by any lowercase letter,
  213.               returns to the position which was previously marked
  214.               with  that  letter.   Followed  by  another  single
  215.               quote, returns to the position at  which  the  last
  216.               "large" movement command was executed.  Followed by
  217.               a ^ or $, jumps to the beginning or end of the file
  218.               respectively.   Marks are preserved when a new file
  219.               is examined, so the ' command can be used to switch
  220.               between input files.
  221.  
  222.        ^X^X   Same as single quote.
  223.  
  224.        /pattern
  225.               Search  forward  in the file for the N-th line con¡
  226.               taining the pattern.  N defaults to 1.  The pattern
  227.               is  a regular expression, as recognized by _e_d_.  The
  228.               search starts at the second line displayed (but see
  229.               the -a and -j options, which change this).
  230.  
  231.               Certain  characters  are  special if entered at the
  232.               beginning of the pattern; they modify the  type  of
  233.               search rather than become part of the pattern:
  234.  
  235.               ^N or !
  236.                      Search for lines which do NOT match the pat¡
  237.                      tern.
  238.  
  239.               ^E or *
  240.                      Search multiple  files.   That  is,  if  the
  241.                      search  reaches  the END of the current file
  242.                      without finding a match, the search  contin¡
  243.                      ues  in  the  next  file in the command line
  244.                      list.
  245.  
  246.               ^F or @
  247.                      Begin the search at the first  line  of  the
  248.                      FIRST file in the command line list, regard¡
  249.                      less of what is currently displayed  on  the
  250.                      screen  or  the  settings  of  the  -a or -j
  251.                      options.
  252.  
  253.               ^K     Highlight any text which matches the pattern
  254.                      on the current screen, but don't move to the
  255.                      first match (KEEP current position).
  256.  
  257.               ^R     Don't interpret regular expression metachar¡
  258.                      acters;   that   is,  do  a  simple  textual
  259.  
  260.  
  261.  
  262.                      Version 373: 14 Jan 2002                   4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. LESS(1)                                                   LESS(1)
  269.  
  270.  
  271.                      comparison.
  272.  
  273.        ?pattern
  274.               Search backward in the file for the N-th line  con¡
  275.               taining the pattern.  The search starts at the line
  276.               immediately before the top line displayed.
  277.  
  278.               Certain characters are special as in the / command:
  279.  
  280.               ^N or !
  281.                      Search for lines which do NOT match the pat¡
  282.                      tern.
  283.  
  284.               ^E or *
  285.                      Search multiple  files.   That  is,  if  the
  286.                      search  reaches the beginning of the current
  287.                      file without finding  a  match,  the  search
  288.                      continues  in  the previous file in the com¡
  289.                      mand line list.
  290.  
  291.               ^F or @
  292.                      Begin the search at the  last  line  of  the
  293.                      last  file in the command line list, regard¡
  294.                      less of what is currently displayed  on  the
  295.                      screen  or  the  settings  of  the  -a or -j
  296.                      options.
  297.  
  298.               ^K     As in forward searches.
  299.  
  300.               ^R     As in forward searches.
  301.  
  302.        ESC-/pattern
  303.               Same as "/*".
  304.  
  305.        ESC-?pattern
  306.               Same as "?*".
  307.  
  308.        n      Repeat previous search, for  N-th  line  containing
  309.               the last pattern.  If the previous search was modi¡
  310.               fied by ^N, the search is made for  the  N-th  line
  311.               NOT containing the pattern.  If the previous search
  312.               was modified by ^E, the  search  continues  in  the
  313.               next  (or  previous)  file  if not satisfied in the
  314.               current file.  If the previous search was  modified
  315.               by  ^R,  the  search  is done without using regular
  316.               expressions.  There is no effect  if  the  previous
  317.               search was modified by ^F or ^K.
  318.  
  319.        N      Repeat  previous  search, but in the reverse direc¡
  320.               tion.
  321.  
  322.        ESC-n  Repeat previous search, but  crossing  file  bound¡
  323.               aries.   The  effect  is  as if the previous search
  324.               were modified by *.
  325.  
  326.  
  327.  
  328.                      Version 373: 14 Jan 2002                   5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. LESS(1)                                                   LESS(1)
  335.  
  336.  
  337.        ESC-N  Repeat previous search, but in the  reverse  direc¡
  338.               tion and crossing file boundaries.
  339.  
  340.        ESC-u  Undo search highlighting.  Turn off highlighting of
  341.               strings matching the current  search  pattern.   If
  342.               highlighting  is  already off because of a previous
  343.               ESC-u command,  turn  highlighting  back  on.   Any
  344.               search command will also turn highlighting back on.
  345.               (Highlighting can also be disabled by toggling  the
  346.               -G option; in that case search commands do not turn
  347.               highlighting back on.)
  348.  
  349.        :e [filename]
  350.               Examine a new file.  If the  filename  is  missing,
  351.               the  "current"  file  (see  the  :n and :p commands
  352.               below) from the list of files in the  command  line
  353.               is re-examined.  A percent sign (%) in the filename
  354.               is replaced by the name of  the  current  file.   A
  355.               pound  sign (#) is replaced by the name of the pre¡
  356.               viously examined file.   However,  two  consecutive
  357.               percent  signs  are  simply  replaced with a single
  358.               percent sign.  This allows you to enter a  filename
  359.               that  contains  a  percent sign in the name.  Simi¡
  360.               larly, two consecutive  pound  signs  are  replaced
  361.               with a single pound sign.  The filename is inserted
  362.               into the command line list of files so that it  can
  363.               be  seen  by subsequent :n and :p commands.  If the
  364.               filename consists of several files,  they  are  all
  365.               inserted  into  the list of files and the first one
  366.               is examined.  If the filename contains one or  more
  367.               spaces,  the  entire filename should be enclosed in
  368.               double quotes (also see the -" option).
  369.  
  370.        ^X^V or E
  371.               Same as :e.  Warning: some systems use ^V as a spe¡
  372.               cial  literalization  character.   On such systems,
  373.               you may not be able to use ^V.
  374.  
  375.        :n     Examine the next file (from the list of files given
  376.               in  the command line).  If a number N is specified,
  377.               the N-th next file is examined.
  378.  
  379.        :p     Examine the previous file in the command line list.
  380.               If  a number N is specified, the N-th previous file
  381.               is examined.
  382.  
  383.        :x     Examine the first file in the  command  line  list.
  384.               If  a  number  N is specified, the N-th file in the
  385.               list is examined.
  386.  
  387.        :d     Remove the current file from the list of files.
  388.  
  389.        t      Go to the next tag, if there  were  more  than  one
  390.               matches for the current tag.  See the -t option for
  391.  
  392.  
  393.  
  394.                      Version 373: 14 Jan 2002                   6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. LESS(1)                                                   LESS(1)
  401.  
  402.  
  403.               more details about tags.
  404.  
  405.        T      Go to the previous tag, if there were more than one
  406.               matches for the current tag.
  407.  
  408.        = or ^G or :f
  409.               Prints   some  information  about  the  file  being
  410.               viewed, including its name and the line number  and
  411.               byte offset of the bottom line being displayed.  If
  412.               possible, it also prints the length  of  the  file,
  413.               the  number of lines in the file and the percent of
  414.               the file above the last displayed line.
  415.  
  416.        -      Followed by one of the command line option  letters
  417.               (see  OPTIONS  below), this will change the setting
  418.               of that option and print a message  describing  the
  419.               new  setting.  If a ^P (CONTROL-P) is entered imme¡
  420.               diately after the dash, the setting of  the  option
  421.               is  changed  but  no  message  is  printed.  If the
  422.               option letter has a numeric value (such  as  -b  or
  423.               -h),  or  a  string value (such as -P or -t), a new
  424.               value may be entered after the option  letter.   If
  425.               no  new  value is entered, a message describing the
  426.               current setting is printed and nothing is  changed.
  427.  
  428.        --     Like  the  -  command, but takes a long option name
  429.               (see OPTIONS below) rather  than  a  single  option
  430.               letter.   You  must  press  RETURN after typing the
  431.               option name.  A ^P  immediately  after  the  second
  432.               dash  suppresses  printing  of a message describing
  433.               the new setting, as in the - command.
  434.  
  435.        -+     Followed by one of the command line option  letters
  436.               this  will  reset the option to its default setting
  437.               and print a message  describing  the  new  setting.
  438.               (The  "-+_X" command does the same thing as "-+_X" on
  439.               the command line.)  This does not work for  string-
  440.               valued options.
  441.  
  442.        --+    Like  the  -+ command, but takes a long option name
  443.               rather than a single option letter.
  444.  
  445.        -!     Followed by one of the command line option letters,
  446.               this will reset the option to the "opposite" of its
  447.               default setting and print a message describing  the
  448.               new  setting.   This  does  not work for numeric or
  449.               string-valued options.
  450.  
  451.        --!    Like the -! command, but takes a long  option  name
  452.               rather than a single option letter.
  453.  
  454.        _      (Underscore.)   Followed by one of the command line
  455.               option letters, this will print a message  describ¡
  456.               ing  the  current  setting  of  that  option.   The
  457.  
  458.  
  459.  
  460.                      Version 373: 14 Jan 2002                   7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. LESS(1)                                                   LESS(1)
  467.  
  468.  
  469.               setting of the option is not changed.
  470.  
  471.        __     (Double underscore.)  Like the _ (underscore)  com¡
  472.               mand,  but  takes  a long option name rather than a
  473.               single option letter.  You must press RETURN  after
  474.               typing the option name.
  475.  
  476.        +cmd   Causes the specified cmd to be executed each time a
  477.               new file is examined.  For example, +G causes  _l_e_s_s
  478.               to  initially display each file starting at the end
  479.               rather than the beginning.
  480.  
  481.        V      Prints the version number of _l_e_s_s being run.
  482.  
  483.        q or Q or :q or :Q or ZZ
  484.               Exits _l_e_s_s_.
  485.  
  486.        The following four commands  may  or  may  not  be  valid,
  487.        depending on your particular installation.
  488.  
  489.  
  490.        v      Invokes  an  editor  to edit the current file being
  491.               viewed.  The editor is taken from  the  environment
  492.               variable  VISUAL if defined, or EDITOR if VISUAL is
  493.               not defined, or defaults to "vi" if neither  VISUAL
  494.               nor  EDITOR is defined.  See also the discussion of
  495.               LESSEDIT under the section on PROMPTS below.
  496.  
  497.        ! shell-command
  498.               Invokes a shell to run the shell-command given.   A
  499.               percent  sign (%) in the command is replaced by the
  500.               name of the current file.   A  pound  sign  (#)  is
  501.               replaced  by  the  name  of the previously examined
  502.               file.  "!!" repeats the last  shell  command.   "!"
  503.               with  no  shell command simply invokes a shell.  On
  504.               Unix systems, the shell is taken from the  environ¡
  505.               ment  variable  SHELL, or defaults to "sh".  On MS-
  506.               DOS and OS/2 systems, the shell is the normal  com¡
  507.               mand processor.
  508.  
  509.        | <m> shell-command
  510.               <m> represents any mark letter.  Pipes a section of
  511.               the input file to the  given  shell  command.   The
  512.               section  of  the  file  to  be piped is between the
  513.               first line on the current screen and  the  position
  514.               marked  by  the  letter.  <m> may also be ^ or $ to
  515.               indicate beginning or end of file respectively.  If
  516.               <m> is . or newline, the current screen is piped.
  517.  
  518.        s filename
  519.               Save  the  input to a file.  This only works if the
  520.               input is a pipe, not an ordinary file.
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                      Version 373: 14 Jan 2002                   8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. LESS(1)                                                   LESS(1)
  533.  
  534.  
  535. OOPPTTIIOONNSS
  536.        Command line options are described  below.   Most  options
  537.        may be changed while _l_e_s_s is running, via the "-" command.
  538.  
  539.        Most options may be given in one of two  forms:  either  a
  540.        dash  followed  by a single letter, or two dashes followed
  541.        by a long option name.  A long option name may be abbrevi¡
  542.        ated  as  long  as  the  abbreviation is unambiguous.  For
  543.        example, --quit-at-eof may be abbreviated --quit, but  not
  544.        --qui,  since  both  --quit-at-eof  and --quiet begin with
  545.        --qui.  Some long option names are in uppercase,  such  as
  546.        --QUIT-AT-EOF,   as  distinct  from  --quit-at-eof.   Such
  547.        option names need only have their  first  letter  capital¡
  548.        ized;  the  remainder  of  the name may be in either case.
  549.        For example, --Quit-at-eof is equivalent to --QUIT-AT-EOF.
  550.  
  551.        Options  are  also  taken  from  the  environment variable
  552.        "LESS".  For example, to avoid typing "less -options  ..."
  553.        each time _l_e_s_s is invoked, you might tell _c_s_h_:
  554.  
  555.        setenv LESS "-options"
  556.  
  557.        or if you use _s_h_:
  558.  
  559.        LESS="-options"; export LESS
  560.  
  561.        On  MS-DOS,  you  don't  need  the  quotes, but you should
  562.        replace any percent signs in the options string by  double
  563.        percent signs.
  564.  
  565.        The  environment  variable  is  parsed  before the command
  566.        line, so command line options override the  LESS  environ¡
  567.        ment variable.  If an option appears in the LESS variable,
  568.        it can be reset to its default value on the  command  line
  569.        by beginning the command line option with "-+".
  570.  
  571.        For options like -P or -D which take a following string, a
  572.        dollar sign ($) must be used to  signal  the  end  of  the
  573.        string.  For example, to set two -D options on MS-DOS, you
  574.        must have a dollar sign between them, like this:
  575.  
  576.        LESS="-Dn9.1$-Ds4.1"
  577.  
  578.  
  579.        -? or --help
  580.               This option displays  a  summary  of  the  commands
  581.               accepted  by  _l_e_s_s  (the  same  as  the h command).
  582.               (Depending on how your shell interprets  the  ques¡
  583.               tion  mark,  it may be necessary to quote the ques¡
  584.               tion mark, thus: "-\?".)
  585.  
  586.        -a or --search-skip-screen
  587.               Causes searches to start after the last  line  dis¡
  588.               played  on  the  screen,  thus  skipping  all lines
  589.  
  590.  
  591.  
  592.                      Version 373: 14 Jan 2002                   9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. LESS(1)                                                   LESS(1)
  599.  
  600.  
  601.               displayed on  the  screen.   By  default,  searches
  602.               start  at  the  second line on the screen (or after
  603.               the last found line; see the -j option).
  604.  
  605.        -b_n or --buffers=_n
  606.               Specifies the amount of buffer space _l_e_s_s will  use
  607.               for  each file, in units of kilobytes (1024 bytes).
  608.               By default 64K of buffer space  is  used  for  each
  609.               file  (unless  the  file  is  a  pipe;  see  the -B
  610.               option).  The -b option specifies  instead  that  _n
  611.               kilobytes  of  buffer space should be used for each
  612.               file.  If _n is -1, buffer space is unlimited;  that
  613.               is, the entire file is read into memory.
  614.  
  615.        -B or --auto-buffers
  616.               By  default, when data is read from a pipe, buffers
  617.               are allocated automatically as needed.  If a  large
  618.               amount  of  data  is  read  from the pipe, this can
  619.               cause a large amount of  memory  to  be  allocated.
  620.               The -B option disables this automatic allocation of
  621.               buffers for pipes, so that only 64K (or the  amount
  622.               of  space  specified  by the -b option) is used for
  623.               the pipe.  Warning: use of -B can result  in  erro¡
  624.               neous  display, since only the most recently viewed
  625.               part of the file is kept  in  memory;  any  earlier
  626.               data is lost.
  627.  
  628.        -c or --clear-screen
  629.               Causes  full screen repaints to be painted from the
  630.               top line down.  By default,  full  screen  repaints
  631.               are  done  by  scrolling  from  the  bottom  of the
  632.               screen.
  633.  
  634.        -C or --CLEAR-SCREEN
  635.               The -C option is like -c, but the screen is cleared
  636.               before it is repainted.
  637.  
  638.        -d or --dumb
  639.               The -d option suppresses the error message normally
  640.               displayed if the terminal is dumb; that  is,  lacks
  641.               some  important  capability, such as the ability to
  642.               clear the screen or scroll backward.  The -d option
  643.               does not otherwise change the behavior of _l_e_s_s on a
  644.               dumb terminal.
  645.  
  646.        -Dxx_c_o_l_o_r or --color=xx_c_o_l_o_r
  647.               [MS-DOS only] Sets the color of the text displayed.
  648.               xx  is  a single character which selects the type of
  649.               text whose color is being set:  n=normal,  s=stand¡
  650.               out,  d=bold,  u=underlined,  k=blink.   _c_o_l_o_r is a
  651.               pair of numbers separated by a period.   The  first
  652.               number  selects the foreground color and the second
  653.               selects the background color of the text.  A single
  654.               number _N is the same as _N_._0.
  655.  
  656.  
  657.  
  658.                      Version 373: 14 Jan 2002                  10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. LESS(1)                                                   LESS(1)
  665.  
  666.  
  667.        -e or --quit-at-eof
  668.               Causes  _l_e_s_s  to automatically exit the second time
  669.               it reaches end-of-file.  By default, the  only  way
  670.               to exit _l_e_s_s is via the "q" command.
  671.  
  672.        -E or --QUIT-AT-EOF
  673.               Causes _l_e_s_s to automatically exit the first time it
  674.               reaches end-of-file.
  675.  
  676.        -f or --force
  677.               Forces non-regular files to be opened.  (A non-reg¡
  678.               ular file is a directory or a device special file.)
  679.               Also suppresses the warning message when  a  binary
  680.               file  is  opened.   By default, _l_e_s_s will refuse to
  681.               open non-regular files.
  682.  
  683.        -F or --quit-if-one-screen
  684.               Causes _l_e_s_s to automatically  exit  if  the  entire
  685.               file can be displayed on the first screen.
  686.  
  687.        -g or --hilite-search
  688.               Normally,  _l_e_s_s  will  highlight  ALL strings which
  689.               match the  last  search  command.   The  -g  option
  690.               changes this behavior to highlight only the partic¡
  691.               ular string which was found by the last search com¡
  692.               mand.   This  can cause _l_e_s_s to run somewhat faster
  693.               than the default.
  694.  
  695.        -G or --HILITE-SEARCH
  696.               The  -G  option  suppresses  all  highlighting   of
  697.               strings found by search commands.
  698.  
  699.        -h_n or ---max-back-scroll=_n
  700.               Specifies a maximum number of lines to scroll back¡
  701.               ward.  If it is necessary to scroll  backward  more
  702.               than  _n lines, the screen is repainted in a forward
  703.               direction instead.  (If the terminal does not  have
  704.               the ability to scroll backward, -h0 is implied.)
  705.  
  706.        -i or --ignore-case
  707.               Causes  searches to ignore case; that is, uppercase
  708.               and  lowercase  are  considered  identical.    This
  709.               option  is  ignored if any uppercase letters appear
  710.               in the search pattern; in other words, if a pattern
  711.               contains  uppercase  letters, then that search does
  712.               not ignore case.
  713.  
  714.        -I or --IGNORE-CASE
  715.               Like -i, but searches ignore case even if the  pat¡
  716.               tern contains uppercase letters.
  717.  
  718.        -j_n or --jump-target=_n
  719.               Specifies  a  line on the screen where the "target"
  720.               line is to be positioned.  A  target  line  is  the
  721.  
  722.  
  723.  
  724.                      Version 373: 14 Jan 2002                  11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. LESS(1)                                                   LESS(1)
  731.  
  732.  
  733.               object of a text search, tag search, jump to a line
  734.               number, jump to a file percentage,  or  jump  to  a
  735.               marked position.  The screen line is specified by a
  736.               number: the top line on the screen is 1,  the  next
  737.               is  2,  and  so  on.  The number may be negative to
  738.               specify a  line  relative  to  the  bottom  of  the
  739.               screen:  the  bottom  line on the screen is -1, the
  740.               second to the bottom is -2, and so on.  If  the  -j
  741.               option  is used, searches begin at the line immedi¡
  742.               ately after the target line.  For example, if "-j4"
  743.               is  used, the target line is the fourth line on the
  744.               screen, so searches begin at the fifth line on  the
  745.               screen.
  746.  
  747.        -J or --status-column
  748.               Displays  a  status  column at the left edge of the
  749.               screen.  The status column  shows  the  lines  that
  750.               matched  the  current search.  The status column is
  751.               also used if the -w or -W option is in effect.
  752.  
  753.        -k_f_i_l_e_n_a_m_e or --lesskey-file=_f_i_l_e_n_a_m_e
  754.               Causes _l_e_s_s to open and interpret the named file as
  755.               a  _l_e_s_s_k_e_y  (1)  file.   Multiple -k options may be
  756.               specified.  If the LESSKEY or LESSKEY_SYSTEM  envi¡
  757.               ronment  variable  is  set, or if a lesskey file is
  758.               found in a standard place (see KEY BINDINGS), it is
  759.               also used as a _l_e_s_s_k_e_y file.
  760.  
  761.        -m or --long-prompt
  762.               Causes  _l_e_s_s  to prompt verbosely (like _m_o_r_e), with
  763.               the  percent  into  the  file.   By  default,  _l_e_s_s
  764.               prompts with a colon.
  765.  
  766.        -M or --LONG-PROMPT
  767.               Causes  _l_e_s_s  to  prompt  even  more verbosely than
  768.               _m_o_r_e_.
  769.  
  770.        -n or --line-numbers
  771.               Suppresses line numbers.  The default (to use  line
  772.               numbers)  may cause _l_e_s_s to run more slowly in some
  773.               cases, especially with a  very  large  input  file.
  774.               Suppressing  line  numbers  with the -n option will
  775.               avoid this problem.  Using line numbers means:  the
  776.               line number will be displayed in the verbose prompt
  777.               and in the = command, and the v command  will  pass
  778.               the current line number to the editor (see also the
  779.               discussion of LESSEDIT in PROMPTS below).
  780.  
  781.        -N or --LINE-NUMBERS
  782.               Causes a line number to be displayed at the  begin¡
  783.               ning of each line in the display.
  784.  
  785.        -o_f_i_l_e_n_a_m_e or --log-file=_f_i_l_e_n_a_m_e
  786.               Causes  _l_e_s_s to copy its input to the named file as
  787.  
  788.  
  789.  
  790.                      Version 373: 14 Jan 2002                  12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. LESS(1)                                                   LESS(1)
  797.  
  798.  
  799.               it is being viewed.  This  applies  only  when  the
  800.               input file is a pipe, not an ordinary file.  If the
  801.               file already exists, _l_e_s_s will ask for confirmation
  802.               before overwriting it.
  803.  
  804.        -O_f_i_l_e_n_a_m_e or --LOG-FILE=_f_i_l_e_n_a_m_e
  805.               The  -O option is like -o, but it will overwrite an
  806.               existing file without asking for confirmation.
  807.  
  808.               If no log file has been specified, the  -o  and  -O
  809.               options  can  be used from within _l_e_s_s to specify a
  810.               log file.  Without a file name,  they  will  simply
  811.               report  the  name of the log file.  The "s" command
  812.               is equivalent to specifying -o from within _l_e_s_s_.
  813.  
  814.        -p_p_a_t_t_e_r_n or --pattern=_p_a_t_t_e_r_n
  815.               The -p option on the command line is equivalent  to
  816.               specifying  +/_p_a_t_t_e_r_n;  that  is,  it tells _l_e_s_s to
  817.               start at the first occurrence  of  _p_a_t_t_e_r_n  in  the
  818.               file.
  819.  
  820.        -P_p_r_o_m_p_t or --prompt=_p_r_o_m_p_t
  821.               Provides a way to tailor the three prompt styles to
  822.               your own preference.  This option would normally be
  823.               put  in  the LESS environment variable, rather than
  824.               being typed in with each  _l_e_s_s  command.   Such  an
  825.               option  must  either be the last option in the LESS
  826.               variable, or be terminated by a dollar  sign.   -Ps
  827.               followed  by  a  string changes the default (short)
  828.               prompt to that string.  -Pm changes the medium (-m)
  829.               prompt.   -PM  changes  the  long (-M) prompt.  -Ph
  830.               changes  the  prompt  for  the  help  screen.   -P=
  831.               changes  the message printed by the = command.  -Pw
  832.               changes the message printed while waiting for  data
  833.               (in  the F command).  All prompt strings consist of
  834.               a sequence of letters and special escape sequences.
  835.               See the section on PROMPTS for more details.
  836.  
  837.        -q or --quiet or --silent
  838.               Causes  moderately  "quiet" operation: the terminal
  839.               bell is not rung if an attempt is  made  to  scroll
  840.               past the end of the file or before the beginning of
  841.               the file.  If the terminal has a "visual bell",  it
  842.               is  used instead.  The bell will be rung on certain
  843.               other errors, such as typing an invalid  character.
  844.               The  default  is  to  ring the terminal bell in all
  845.               such cases.
  846.  
  847.        -Q or --QUIET or --SILENT
  848.               Causes totally "quiet" operation: the terminal bell
  849.               is never rung.
  850.  
  851.        -r or --raw-control-chars
  852.               Causes  "raw"  control  characters to be displayed.
  853.  
  854.  
  855.  
  856.                      Version 373: 14 Jan 2002                  13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. LESS(1)                                                   LESS(1)
  863.  
  864.  
  865.               The default is to display control characters  using
  866.               the caret notation; for example, a control-A (octal
  867.               001) is displayed as "^A".  Warning:  when  the  -r
  868.               option  is  used,  _l_e_s_s  cannot  keep  track of the
  869.               actual appearance of the screen (since this depends
  870.               on  how the screen responds to each type of control
  871.               character).  Thus,  various  display  problems  may
  872.               result, such as long lines being split in the wrong
  873.               place.
  874.  
  875.        -R or --RAW-CONTROL-CHARS
  876.               Like -r, but tries to  keep  track  of  the  screen
  877.               appearance  where possible.  This works only if the
  878.               input consists of normal  text  and  possibly  some
  879.               ANSI  "color" escape sequences, which are sequences
  880.               of the form:
  881.  
  882.                    ESC [ ... m
  883.  
  884.               where the "..." is zero or  more  characters  other
  885.               than  "m".   For  the  purpose  of keeping track of
  886.               screen appearance, all control characters  and  all
  887.               ANSI color escape sequences are assumed to not move
  888.               the cursor.  You can make _l_e_s_s think  that  charac¡
  889.               ters  other  than  "m"  can  end  ANSI color escape
  890.               sequences  by  setting  the  environment   variable
  891.               LESSANSIENDCHARS  to  the  list of characters which
  892.               can end a color escape sequence.
  893.  
  894.        -s or --squeeze-blank-lines
  895.               Causes consecutive blank lines to be squeezed  into
  896.               a  single  blank line.  This is useful when viewing
  897.               _n_r_o_f_f output.
  898.  
  899.        -S or --chop-long-lines
  900.               Causes lines longer than the  screen  width  to  be
  901.               chopped rather than folded.  That is, the remainder
  902.               of a long line is simply discarded.  The default is
  903.               to  fold long lines; that is, display the remainder
  904.               on the next line.
  905.  
  906.        -t_t_a_g or --tag=_t_a_g
  907.               The -t option, followed immediately by a TAG,  will
  908.               edit  the  file  containing  that tag.  For this to
  909.               work, tag information must be available; for  exam¡
  910.               ple,  there  may be a file in the current directory
  911.               called "tags", which was previously built by  _c_t_a_g_s
  912.               (1)  or  an equivalent command.  If the environment
  913.               variable LESSGLOBALTAGS is set, it is taken  to  be
  914.               the  name  of a command compatible with _g_l_o_b_a_l (1),
  915.               and that command is executed to find the tag.  (See
  916.               http://www.gnu.org/software/global/global.html).
  917.               The -t option may also  be  specified  from  within
  918.               _l_e_s_s  (using the - command) as a way of examining a
  919.  
  920.  
  921.  
  922.                      Version 373: 14 Jan 2002                  14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. LESS(1)                                                   LESS(1)
  929.  
  930.  
  931.               new file.  The command ":t" is equivalent to speci¡
  932.               fying -t from within _l_e_s_s_.
  933.  
  934.        -T_t_a_g_s_f_i_l_e or --tag-file=_t_a_g_s_f_i_l_e
  935.               Specifies a tags file to be used instead of "tags".
  936.  
  937.        -u or --underline-special
  938.               Causes  backspaces  and  carriage  returns  to   be
  939.               treated  as printable characters; that is, they are
  940.               sent to the terminal when they appear in the input.
  941.  
  942.        -U or --UNDERLINE-SPECIAL
  943.               Causes  backspaces, tabs and carriage returns to be
  944.               treated as control characters; that  is,  they  are
  945.               handled as specified by the -r option.
  946.  
  947.               By   default,  if  neither  -u  nor  -U  is  given,
  948.               backspaces which appear adjacent to  an  underscore
  949.               character  are  treated  specially:  the underlined
  950.               text is displayed  using  the  terminal's  hardware
  951.               underlining  capability.   Also,  backspaces  which
  952.               appear between two identical characters are treated
  953.               specially: the overstruck text is printed using the
  954.               terminal's  hardware  boldface  capability.   Other
  955.               backspaces  are  deleted,  along with the preceding
  956.               character.  Carriage returns  immediately  followed
  957.               by  a  newline are deleted.  other carriage returns
  958.               are handled as specified by the  -r  option.   Text
  959.               which  is  overstruck or underlined can be searched
  960.               for if neither -u nor -U is in effect.
  961.  
  962.        -V or --version
  963.               Displays the version number of _l_e_s_s_.
  964.  
  965.        -w or --hilite-unread
  966.               Temporarily highlights the first "new" line after a
  967.               forward  movement  of a full page.  The first "new"
  968.               line is the line  immediately  following  the  line
  969.               previously at the bottom of the screen.  Also high¡
  970.               lights the target line after a g or p command.  The
  971.               highlight  is  removed  at  the  next command which
  972.               causes movement.  The entire line  is  highlighted,
  973.               unless  the  -J  option is in effect, in which case
  974.               only the status column is highlighted.
  975.  
  976.        -W or --HILITE-UNREAD
  977.               Like -w, but temporarily highlights the  first  new
  978.               line after any forward movement command larger than
  979.               one line.
  980.  
  981.        -x_n,... or --tabs=_n,...
  982.               Sets tab stops.  If only one _n  is  specified,  tab
  983.               stops  are set at multiples of _n.  If multiple val¡
  984.               ues separated by commas are  specified,  tab  stops
  985.  
  986.  
  987.  
  988.                      Version 373: 14 Jan 2002                  15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. LESS(1)                                                   LESS(1)
  995.  
  996.  
  997.               are  set at those positions, and then continue with
  998.               the same spacing as the  last  two.   For  example,
  999.               _-_x_9_,_1_7  will  set  tabs at positions 9, 17, 25, 33,
  1000.               etc.  The default for _n is 8.
  1001.  
  1002.        -X or --no-init
  1003.               Disables sending  the  termcap  initialization  and
  1004.               deinitialization  strings to the terminal.  This is
  1005.               sometimes desirable if the deinitialization  string
  1006.               does   something  unnecessary,  like  clearing  the
  1007.               screen.
  1008.  
  1009.        --no-keypad
  1010.               Disables  sending  the  keypad  initialization  and
  1011.               deinitialization  strings to the terminal.  This is
  1012.               sometimes useful if the  keypad  strings  make  the
  1013.               numeric keypad behave in an undesirable manner.
  1014.  
  1015.        -y_n or --max-forw-scroll=_n
  1016.               Specifies  a maximum number of lines to scroll for¡
  1017.               ward.  If it is necessary to  scroll  forward  more
  1018.               than _n lines, the screen is repainted instead.  The
  1019.               -c or -C option may be used to repaint from the top
  1020.               of  the screen if desired.  By default, any forward
  1021.               movement causes scrolling.
  1022.  
  1023.        -[z]_n or --window=_n
  1024.               Changes the default  scrolling  window  size  to  _n
  1025.               lines.   The default is one screenful.  The z and w
  1026.               commands can also be  used  to  change  the  window
  1027.               size.   The  "z"  may  be omitted for compatibility
  1028.               with _m_o_r_e_.  If the number _n is negative,  it  indi¡
  1029.               cates  _n  lines  less than the current screen size.
  1030.               For example, if the screen is 24 lines,  _-_z_-_4  sets
  1031.               the scrolling window to 20 lines.  If the screen is
  1032.               resized to 40 lines, the scrolling window automati¡
  1033.               cally changes to 36 lines.
  1034.  
  1035.        -"_c_c or --quotes=_c_c
  1036.               Changes  the  filename quoting character.  This may
  1037.               be necessary if you are trying to name a file which
  1038.               contains  both  spaces  and quote characters.  Fol¡
  1039.               lowed by a single character, this changes the quote
  1040.               character  to that character.  Filenames containing
  1041.               a space should then be surrounded by that character
  1042.               rather  than  by  double  quotes.   Followed by two
  1043.               characters, changes the open  quote  to  the  first
  1044.               character,  and the close quote to the second char¡
  1045.               acter.  Filenames containing a space should then be
  1046.               preceded  by  the open quote character and followed
  1047.               by the close quote character.  Note that even after
  1048.               the  quote  characters  are  changed,  this  option
  1049.               remains -" (a dash followed by a double quote).
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                      Version 373: 14 Jan 2002                  16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. LESS(1)                                                   LESS(1)
  1061.  
  1062.  
  1063.        -~ or --tilde
  1064.               Normally lines after end of file are displayed as a
  1065.               single  tilde  (~).  This option causes lines after
  1066.               end of file to be displayed as blank lines.
  1067.  
  1068.        -# or --shift
  1069.               Specifies the default number of positions to scroll
  1070.               horizontally  in  the RIGHTARROW and LEFTARROW com¡
  1071.               mands.  If the number specified is  zero,  it  sets
  1072.               the  default number of positions to one half of the
  1073.               screen width.
  1074.  
  1075.        --     A command line argument of "--" marks  the  end  of
  1076.               option arguments.  Any arguments following this are
  1077.               interpreted as filenames.  This can be useful  when
  1078.               viewing a file whose name begins with a "-" or "+".
  1079.  
  1080.        +      If a command line option begins with ++, the remain¡
  1081.               der  of  that option is taken to be an initial com¡
  1082.               mand to _l_e_s_s_.  For example, +G tells _l_e_s_s to  start
  1083.               at  the  end of the file rather than the beginning,
  1084.               and +/xyz tells it to start at the first occurrence
  1085.               of "xyz" in the file.  As a special case, +<number>
  1086.               acts like +<number>g; that is, it starts  the  dis¡
  1087.               play at the specified line number (however, see the
  1088.               caveat under the "g" command above).  If the option
  1089.               starts  with  ++,  the  initial  command applies to
  1090.               every file being viewed, not just  the  first  one.
  1091.               The + command described previously may also be used
  1092.               to set (or change) an  initial  command  for  every
  1093.               file.
  1094.  
  1095.  
  1096. LLIINNEE EEDDIITTIINNGG
  1097.        When  entering  command  line  at the bottom of the screen
  1098.        (for example, a filename for the :e command, or  the  pat¡
  1099.        tern  for  a  search command), certain keys can be used to
  1100.        manipulate the command line.  Most commands have an alter¡
  1101.        nate  form in [ brackets ] which can be used if a key does
  1102.        not exist on a particular keyboard.  (The bracketed  forms
  1103.        do  not work in the MS-DOS version.)  Any of these special
  1104.        keys may be entered literally by  preceding  it  with  the
  1105.        "literal"  character, either ^V or ^A.  A backslash itself
  1106.        may also be entered literally by entering two backslashes.
  1107.  
  1108.        LEFTARROW [ ESC-h ]
  1109.               Move the cursor one space to the left.
  1110.  
  1111.        RIGHTARROW [ ESC-l ]
  1112.               Move the cursor one space to the right.
  1113.  
  1114.        ^LEFTARROW [ ESC-b or ESC-LEFTARROW ]
  1115.               (That  is,  CONTROL  and LEFTARROW simultaneously.)
  1116.               Move the cursor one word to the left.
  1117.  
  1118.  
  1119.  
  1120.                      Version 373: 14 Jan 2002                  17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. LESS(1)                                                   LESS(1)
  1127.  
  1128.  
  1129.        ^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ]
  1130.               (That is, CONTROL and  RIGHTARROW  simultaneously.)
  1131.               Move the cursor one word to the right.
  1132.  
  1133.        HOME [ ESC-0 ]
  1134.               Move the cursor to the beginning of the line.
  1135.  
  1136.        END [ ESC-$ ]
  1137.               Move the cursor to the end of the line.
  1138.  
  1139.        BACKSPACE
  1140.               Delete  the character to the left of the cursor, or
  1141.               cancel the command if the command line is empty.
  1142.  
  1143.        DELETE or [ ESC-x ]
  1144.               Delete the character under the cursor.
  1145.  
  1146.        ^BACKSPACE [ ESC-BACKSPACE ]
  1147.               (That is, CONTROL  and  BACKSPACE  simultaneously.)
  1148.               Delete the word to the left of the cursor.
  1149.  
  1150.        ^DELETE [ ESC-X or ESC-DELETE ]
  1151.               (That   is,  CONTROL  and  DELETE  simultaneously.)
  1152.               Delete the word under the cursor.
  1153.  
  1154.        UPARROW [ ESC-k ]
  1155.               Retrieve the previous command line.
  1156.  
  1157.        DOWNARROW [ ESC-j ]
  1158.               Retrieve the next command line.
  1159.  
  1160.        TAB    Complete the partial filename to the  left  of  the
  1161.               cursor.   If it matches more than one filename, the
  1162.               first match  is  entered  into  the  command  line.
  1163.               Repeated  TABs  will  cycle thru the other matching
  1164.               filenames.  If the completed filename is  a  direc¡
  1165.               tory,  a  "/" is appended to the filename.  (On MS-
  1166.               DOS systems, a "\" is appended.)   The  environment
  1167.               variable  LESSSEPARATOR  can  be  used to specify a
  1168.               different character to append to a directory  name.
  1169.  
  1170.        BACKTAB [ ESC-TAB ]
  1171.               Like, TAB, but cycles in the reverse direction thru
  1172.               the matching filenames.
  1173.  
  1174.        ^L     Complete the partial filename to the  left  of  the
  1175.               cursor.   If it matches more than one filename, all
  1176.               matches are entered into the command line (if  they
  1177.               fit).
  1178.  
  1179.        ^U (Unix and OS/2) or ESC (MS-DOS)
  1180.               Delete  the entire command line, or cancel the com¡
  1181.               mand if the command line is  empty.   If  you  have
  1182.               changed   your   line-kill  character  in  Unix  to
  1183.  
  1184.  
  1185.  
  1186.                      Version 373: 14 Jan 2002                  18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. LESS(1)                                                   LESS(1)
  1193.  
  1194.  
  1195.               something other than ^U,  that  character  is  used
  1196.               instead of ^U.
  1197.  
  1198.  
  1199. KKEEYY BBIINNDDIINNGGSS
  1200.        You may define your own _l_e_s_s commands by using the program
  1201.        _l_e_s_s_k_e_y (1) to create a lesskey file.  This file specifies
  1202.        a  set  of command keys and an action associated with each
  1203.        key.  You may also use _l_e_s_s_k_e_y to change the  line-editing
  1204.        keys (see LINE EDITING), and to set environment variables.
  1205.        If the environment variable LESSKEY is set, _l_e_s_s uses that
  1206.        as the name of the lesskey file.  Otherwise, _l_e_s_s looks in
  1207.        a standard place for the lesskey file:  On  Unix  systems,
  1208.        _l_e_s_s  looks  for  a lesskey file called "$HOME/.less".  On
  1209.        MS-DOS and Windows systems, _l_e_s_s looks for a lesskey  file
  1210.        called  "$HOME/_less",  and if it is not found there, then
  1211.        looks for a lesskey file called "_less" in  any  directory
  1212.        specified  in the PATH environment variable.  On OS/2 sys¡
  1213.        tems,   _l_e_s_s   looks   for   a   lesskey    file    called
  1214.        "$HOME/less.ini", and if it is not found, then looks for a
  1215.        lesskey file called "less.ini" in any directory  specified
  1216.        in  the  INIT  environment  variable,  and if it not found
  1217.        there, then looks for a lesskey file called "less.ini"  in
  1218.        any  directory specified in the PATH environment variable.
  1219.        See the _l_e_s_s_k_e_y manual page for more details.
  1220.  
  1221.        A system-wide lesskey file may also be set up  to  provide
  1222.        key bindings.  If a key is defined in both a local lesskey
  1223.        file and in the system-wide  file,  key  bindings  in  the
  1224.        local  file  take precedence over those in the system-wide
  1225.        file.  If the environment variable LESSKEY_SYSTEM is  set,
  1226.        _l_e_s_s  uses  that  as  the  name of the system-wide lesskey
  1227.        file.  Otherwise, _l_e_s_s looks in a standard place  for  the
  1228.        system-wide lesskey file: On Unix systems, the system-wide
  1229.        lesskey file is /usr/local/etc/sysless.  (However, if _l_e_s_s
  1230.        was   built   with  a  different  sysconf  directory  than
  1231.        /usr/local/etc, that directory is where the  sysless  file
  1232.        is found.)  On MS-DOS and Windows systems, the system-wide
  1233.        lesskey file is c:\_sysless.  On OS/2 systems, the system-
  1234.        wide lesskey file is c:\sysless.ini.
  1235.  
  1236.  
  1237. IINNPPUUTT PPRREEPPRROOCCEESSSSOORR
  1238.        You  may  define an "input preprocessor" for _l_e_s_s_.  Before
  1239.        _l_e_s_s opens a file, it first gives your input  preprocessor
  1240.        a  chance  to  modify the way the contents of the file are
  1241.        displayed.  An input preprocessor is simply an  executable
  1242.        program  (or  shell  script), which writes the contents of
  1243.        the file to a different file, called the replacement file.
  1244.        The contents of the replacement file are then displayed in
  1245.        place of the contents of the original file.   However,  it
  1246.        will appear to the user as if the original file is opened;
  1247.        that is, _l_e_s_s will display the original  filename  as  the
  1248.        name of the current file.
  1249.  
  1250.  
  1251.  
  1252.                      Version 373: 14 Jan 2002                  19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. LESS(1)                                                   LESS(1)
  1259.  
  1260.  
  1261.        An  input preprocessor receives one command line argument,
  1262.        the original filename, as entered by the user.  It  should
  1263.        create  the replacement file, and when finished, print the
  1264.        name of the replacement file to its standard  output.   If
  1265.        the input preprocessor does not output a replacement file¡
  1266.        name, _l_e_s_s uses the original file, as normal.   The  input
  1267.        preprocessor  is  not  called when viewing standard input.
  1268.        To set up an input preprocessor, set the LESSOPEN environ¡
  1269.        ment  variable  to  a  command line which will invoke your
  1270.        input preprocessor.  This command line should include  one
  1271.        occurrence  of  the string "%s", which will be replaced by
  1272.        the  filename  when  the  input  preprocessor  command  is
  1273.        invoked.
  1274.  
  1275.        When _l_e_s_s closes a file opened in such a way, it will call
  1276.        another program, called the input postprocessor, which may
  1277.        perform  any desired clean-up action (such as deleting the
  1278.        replacement  file  created  by  LESSOPEN).   This  program
  1279.        receives two command line arguments, the original filename
  1280.        as entered by the user, and the name  of  the  replacement
  1281.        file.  To set up an input postprocessor, set the LESSCLOSE
  1282.        environment variable to a command line which  will  invoke
  1283.        your  input postprocessor.  It may include two occurrences
  1284.        of the string "%s"; the first is replaced with the  origi¡
  1285.        nal  name  of the file and the second with the name of the
  1286.        replacement file, which was output by LESSOPEN.
  1287.  
  1288.        For example, on many Unix systems, these two scripts  will
  1289.        allow  you  to  keep files in compressed format, but still
  1290.        let _l_e_s_s view them directly:
  1291.  
  1292.        lessopen.sh:
  1293.             #! /bin/sh
  1294.             case "$1" in
  1295.             *.Z) uncompress -c $1  >/tmp/less.$$  2>/dev/null
  1296.                  if [ -s /tmp/less.$$ ]; then
  1297.                       echo /tmp/less.$$
  1298.                  else
  1299.                       rm -f /tmp/less.$$
  1300.                  fi
  1301.                  ;;
  1302.             esac
  1303.  
  1304.        lessclose.sh:
  1305.             #! /bin/sh
  1306.             rm $2
  1307.  
  1308.        To use these scripts, put them both where they can be exe¡
  1309.        cuted     and     set    LESSOPEN="lessopen.sh %s",    and
  1310.        LESSCLOSE="lessclose.sh %s %s".  More complex LESSOPEN and
  1311.        LESSCLOSE  scripts may be written to accept other types of
  1312.        compressed files, and so on.
  1313.  
  1314.        It is also possible to set up  an  input  preprocessor  to
  1315.  
  1316.  
  1317.  
  1318.                      Version 373: 14 Jan 2002                  20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. LESS(1)                                                   LESS(1)
  1325.  
  1326.  
  1327.        pipe  the  file data directly to _l_e_s_s_, rather than putting
  1328.        the data into a replacement file.  This avoids the need to
  1329.        decompress the entire file before starting to view it.  An
  1330.        input preprocessor that works this way is called an  input
  1331.        pipe.   An  input  pipe,  instead of writing the name of a
  1332.        replacement file on its standard output, writes the entire
  1333.        contents  of  the replacement file on its standard output.
  1334.        If the input pipe does not write  any  characters  on  its
  1335.        standard  output,  then  there  is no replacement file and
  1336.        _l_e_s_s uses the original file, as normal.  To use  an  input
  1337.        pipe, make the first character in the LESSOPEN environment
  1338.        variable a vertical bar (|) to signify that the input pre¡
  1339.        processor is an input pipe.
  1340.  
  1341.        For  example,  on many Unix systems, this script will work
  1342.        like the previous example scripts:
  1343.  
  1344.        lesspipe.sh:
  1345.             #! /bin/sh
  1346.             case "$1" in
  1347.             *.Z) uncompress -c $1  2>/dev/null
  1348.                  ;;
  1349.             esac
  1350.  
  1351.        To use this script, put it where it can  be  executed  and
  1352.        set  LESSOPEN="|lesspipe.sh  %s".   When  an input pipe is
  1353.        used, a LESSCLOSE postprocessor can be  used,  but  it  is
  1354.        usually  not  necessary since there is no replacement file
  1355.        to clean up.  In this  case,  the  replacement  file  name
  1356.        passed to the LESSCLOSE postprocessor is "-".
  1357.  
  1358.  
  1359. NNAATTIIOONNAALL CCHHAARRAACCTTEERR SSEETTSS
  1360.        There are three types of characters in the input file:
  1361.  
  1362.        normal characters
  1363.               can be displayed directly to the screen.
  1364.  
  1365.        control characters
  1366.               should  not be displayed directly, but are expected
  1367.               to  be  found  in  ordinary  text  files  (such  as
  1368.               backspace and tab).
  1369.  
  1370.        binary characters
  1371.               should  not  be  displayed  directly  and  are  not
  1372.               expected to be found in text files.
  1373.  
  1374.        A "character set" is simply a description of which charac¡
  1375.        ters  are  to  be  considered normal, control, and binary.
  1376.        The LESSCHARSET environment variable may be used to select
  1377.        a character set.  Possible values for LESSCHARSET are:
  1378.  
  1379.        ascii  BS,  TAB,  NL, CR, and formfeed are control charac¡
  1380.               ters, all chars with values between 32 and 126  are
  1381.  
  1382.  
  1383.  
  1384.                      Version 373: 14 Jan 2002                  21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. LESS(1)                                                   LESS(1)
  1391.  
  1392.  
  1393.               normal, and all others are binary.
  1394.  
  1395.        iso8859
  1396.               Selects  an  ISO  8859  character set.  This is the
  1397.               same as ASCII, except characters  between  160  and
  1398.               255 are treated as normal characters.
  1399.  
  1400.        latin1 Same as iso8859.
  1401.  
  1402.        latin9 Same as iso8859.
  1403.  
  1404.        dos    Selects a character set appropriate for MS-DOS.
  1405.  
  1406.        ebcdic Selects an EBCDIC character set.
  1407.  
  1408.        IBM-1047
  1409.               Selects an EBCDIC character set used by OS/390 Unix
  1410.               Services.  This is the EBCDIC analogue  of  latin1.
  1411.               You  get  similar  results  by setting either LESS¡
  1412.               CHARSET=IBM-1047 or LC_CTYPE=en_US in your environ¡
  1413.               ment.
  1414.  
  1415.        koi8-r Selects a Russian character set.
  1416.  
  1417.        next   Selects  a  character set appropriate for NeXT com¡
  1418.               puters.
  1419.  
  1420.        utf-8  Selects the UTF-8 encoding of the ISO 10646 charac¡
  1421.               ter set.
  1422.  
  1423.        In  special cases, it may be desired to tailor _l_e_s_s to use
  1424.        a character set other than the  ones  definable  by  LESS¡
  1425.        CHARSET.   In  this  case,  the environment variable LESS¡
  1426.        CHARDEF can be used to define a character set.  It  should
  1427.        be set to a string where each character in the string rep¡
  1428.        resents one character in the character set.  The character
  1429.        "."  is  used for a normal character, "c" for control, and
  1430.        "b" for binary.  A decimal number may be used for  repeti¡
  1431.        tion.   For  example,  "bccc4b." would mean character 0 is
  1432.        binary, 1, 2 and 3 are control, 4, 5, 6 and 7 are  binary,
  1433.        and  8 is normal.  All characters after the last are taken
  1434.        to be the same as the last, so characters  9  through  255
  1435.        would be normal.  (This is an example, and does not neces¡
  1436.        sarily represent any real character set.)
  1437.  
  1438.        This table shows the value of LESSCHARDEF which is equiva¡
  1439.        lent to each of the possible values for LESSCHARSET:
  1440.  
  1441.             ascii     8bcccbcc18b95.b
  1442.             dos       8bcccbcc12bc5b95.b.
  1443.             ebcdic    5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
  1444.                       9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
  1445.             IBM-1047  4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
  1446.                       191.b
  1447.  
  1448.  
  1449.  
  1450.                      Version 373: 14 Jan 2002                  22
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. LESS(1)                                                   LESS(1)
  1457.  
  1458.  
  1459.             iso8859   8bcccbcc18b95.33b.
  1460.             koi8-r    8bcccbcc18b95.b128.
  1461.             latin1    8bcccbcc18b95.33b.
  1462.             next      8bcccbcc18b95.bb125.bb
  1463.  
  1464.        If neither LESSCHARSET nor LESSCHARDEF  is  set,  but  the
  1465.        string  "UTF-8"  is  found  in the LC_ALL, LC_TYPE or LANG
  1466.        environment variables, then the default character  set  is
  1467.        utf-8.
  1468.  
  1469.        If  that string is not found, but your system supports the
  1470.        _s_e_t_l_o_c_a_l_e interface, _l_e_s_s will use setlocale to  determine
  1471.        the character set.  setlocale is controlled by setting the
  1472.        LANG or LC_CTYPE environment variables.
  1473.  
  1474.        Finally, if the _s_e_t_l_o_c_a_l_e interface is also not available,
  1475.        the default character set is latin1.
  1476.  
  1477.        Control  and  binary  characters are displayed in standout
  1478.        (reverse video).  Each  such  character  is  displayed  in
  1479.        caret notation if possible (e.g. ^A for control-A).  Caret
  1480.        notation is used only if inverting the 0100 bit results in
  1481.        a normal printable character.  Otherwise, the character is
  1482.        displayed as a hex number in angle brackets.  This  format
  1483.        can be changed by setting the LESSBINFMT environment vari¡
  1484.        able.  LESSBINFMT may begin with a "*" and  one  character
  1485.        to select the display attribute: "*k" is blinking, "*d" is
  1486.        bold, "*u" is underlined, "*s" is standout,  and  "*n"  is
  1487.        normal.   If  LESSBINFMT does not begin with a "*", normal
  1488.        attribute is assumed.  The remainder of  LESSBINFMT  is  a
  1489.        string  which may include one printf-style escape sequence
  1490.        (a % followed by x, X, o, d, etc.).  For example, if LESS¡
  1491.        BINFMT  is  "*u[%x]",  binary  characters are displayed in
  1492.        underlined  hexadecimal  surrounded  by   brackets.    The
  1493.        default if no LESSBINFMT is specified is "*s<%X>".
  1494.  
  1495.  
  1496. PPRROOMMPPTTSS
  1497.        The  -P  option  allows  you  to tailor the prompt to your
  1498.        preference.  The string given to the  -P  option  replaces
  1499.        the  specified  prompt  string.  Certain characters in the
  1500.        string are interpreted specially.  The prompt mechanism is
  1501.        rather  complicated  to provide flexibility, but the ordi¡
  1502.        nary user need not understand the details of  constructing
  1503.        personalized prompt strings.
  1504.  
  1505.        A  percent sign followed by a single character is expanded
  1506.        according to what the following character is:
  1507.  
  1508.        %b_X    Replaced by the byte offset into the current  input
  1509.               file.   The  b  is  followed  by a single character
  1510.               (shown as _X above) which specifies the  line  whose
  1511.               byte  offset  is to be used.  If the character is a
  1512.               "t", the byte offset of the top line in the display
  1513.  
  1514.  
  1515.  
  1516.                      Version 373: 14 Jan 2002                  23
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. LESS(1)                                                   LESS(1)
  1523.  
  1524.  
  1525.               is  used,  an  "m" means use the middle line, a "b"
  1526.               means use the bottom line, a "B" means use the line
  1527.               just after the bottom line, and a "j" means use the
  1528.               "target" line, as specified by the -j option.
  1529.  
  1530.        %B     Replaced by the size of the current input file.
  1531.  
  1532.        %c     Replaced by the column number of the text appearing
  1533.               in the first column of the screen.
  1534.  
  1535.        %d_X    Replaced  by the page number of a line in the input
  1536.               file.  The line to be used is determined by the  _X,
  1537.               as with the %b option.
  1538.  
  1539.        %D     Replaced  by the number of pages in the input file,
  1540.               or equivalently, the page number of the  last  line
  1541.               in the input file.
  1542.  
  1543.        %E     Replaced by the name of the editor (from the VISUAL
  1544.               environment variable,  or  the  EDITOR  environment
  1545.               variable  if  VISUAL is not defined).  See the dis¡
  1546.               cussion of the LESSEDIT feature below.
  1547.  
  1548.        %f     Replaced by the name of the current input file.
  1549.  
  1550.        %i     Replaced by the index of the current  file  in  the
  1551.               list of input files.
  1552.  
  1553.        %l_X    Replaced  by the line number of a line in the input
  1554.               file.  The line to be used is determined by the  _X,
  1555.               as with the %b option.
  1556.  
  1557.        %L     Replaced by the line number of the last line in the
  1558.               input file.
  1559.  
  1560.        %m     Replaced by the total number of input files.
  1561.  
  1562.        %p_X    Replaced by the  percent  into  the  current  input
  1563.               file,  based  on  byte  offsets.   The line used is
  1564.               determined by the _X as with the %b option.
  1565.  
  1566.        %P_X    Replaced by the  percent  into  the  current  input
  1567.               file,  based  on  line  numbers.   The line used is
  1568.               determined by the _X as with the %b option.
  1569.  
  1570.        %s     Same as %B.
  1571.  
  1572.        %t     Causes any trailing spaces to be removed.   Usually
  1573.               used  at the end of the string, but may appear any¡
  1574.               where.
  1575.  
  1576.        %x     Replaced by the name of the next input file in  the
  1577.               list.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.                      Version 373: 14 Jan 2002                  24
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. LESS(1)                                                   LESS(1)
  1589.  
  1590.  
  1591.        If  any  item  is  unknown  (for example, the file size if
  1592.        input is a pipe), a question mark is printed instead.
  1593.  
  1594.        The format of the prompt string can be  changed  depending
  1595.        on certain conditions.  A question mark followed by a sin¡
  1596.        gle character acts like an "IF": depending on the  follow¡
  1597.        ing character, a condition is evaluated.  If the condition
  1598.        is true, any characters following the  question  mark  and
  1599.        condition  character,  up to a period, are included in the
  1600.        prompt.  If the condition is false,  such  characters  are
  1601.        not included.  A colon appearing between the question mark
  1602.        and the period can be used to  establish  an  "ELSE":  any
  1603.        characters  between  the colon and the period are included
  1604.        in the string if and only if the IF  condition  is  false.
  1605.        Condition  characters  (which  follow a question mark) may
  1606.        be:
  1607.  
  1608.        ?a     True if any characters have been  included  in  the
  1609.               prompt so far.
  1610.  
  1611.        ?b_X    True  if  the  byte offset of the specified line is
  1612.               known.
  1613.  
  1614.        ?B     True if the size of current input file is known.
  1615.  
  1616.        ?c     True if the text is horizontally shifted (%c is not
  1617.               zero).
  1618.  
  1619.        ?d_X    True  if  the  page number of the specified line is
  1620.               known.
  1621.  
  1622.        ?e     True if at end-of-file.
  1623.  
  1624.        ?f     True if there is an input  filename  (that  is,  if
  1625.               input is not a pipe).
  1626.  
  1627.        ?l_X    True  if  the  line number of the specified line is
  1628.               known.
  1629.  
  1630.        ?L     True if the line number of the  last  line  in  the
  1631.               file is known.
  1632.  
  1633.        ?m     True if there is more than one input file.
  1634.  
  1635.        ?n     True  if  this  is  the first prompt in a new input
  1636.               file.
  1637.  
  1638.        ?p_X    True if the percent into the  current  input  file,
  1639.               based  on  byte  offsets,  of the specified line is
  1640.               known.
  1641.  
  1642.        ?P_X    True if the percent into the  current  input  file,
  1643.               based  on  line  numbers,  of the specified line is
  1644.               known.
  1645.  
  1646.  
  1647.  
  1648.                      Version 373: 14 Jan 2002                  25
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. LESS(1)                                                   LESS(1)
  1655.  
  1656.  
  1657.        ?s     Same as "?B".
  1658.  
  1659.        ?x     True if there is a next input file (that is, if the
  1660.               current input file is not the last one).
  1661.  
  1662.        Any characters other than the special ones (question mark,
  1663.        colon, period, percent, and  backslash)  become  literally
  1664.        part  of the prompt.  Any of the special characters may be
  1665.        included in the prompt literally by preceding  it  with  a
  1666.        backslash.
  1667.  
  1668.        Some examples:
  1669.  
  1670.        ?f%f:Standard input.
  1671.  
  1672.        This  prompt  prints the filename, if known; otherwise the
  1673.        string "Standard input".
  1674.  
  1675.        ?f%f .?ltLine %lt:?pt%pt\%:?btByte %bt:-...
  1676.  
  1677.        This prompt would print the filename, if known.  The file¡
  1678.        name  is  followed by the line number, if known, otherwise
  1679.        the percent if known, otherwise the byte offset if  known.
  1680.        Otherwise,  a  dash  is printed.  Notice how each question
  1681.        mark has a matching period, and how the % after the %pt is
  1682.        included literally by escaping it with a backslash.
  1683.  
  1684.        ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t
  1685.  
  1686.        This  prints the filename if this is the first prompt in a
  1687.        file, followed by the "file N of N" message  if  there  is
  1688.        more than one input file.  Then, if we are at end-of-file,
  1689.        the string "(END)" is printed followed by the name of  the
  1690.        next  file, if there is one.  Finally, any trailing spaces
  1691.        are truncated.  This is the default  prompt.   For  refer¡
  1692.        ence,  here are the defaults for the other two prompts (-m
  1693.        and -M respectively).  Each is broken into two lines  here
  1694.        for readability only.
  1695.  
  1696.        ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x.:
  1697.             ?pB%pB\%:byte %bB?s/%s...%t
  1698.  
  1699.        ?f%f .?n?m(file %i of %m) ..?ltlines %lt-%lb?L/%L. :
  1700.             byte %bB?s/%s. .?e(END) ?x- Next\: %x.:?pB%pB\%..%t
  1701.  
  1702.        And here is the default message produced by the = command:
  1703.  
  1704.        ?f%f .?m(file %i of %m) .?ltlines %lt-%lb?L/%L. .
  1705.             byte %bB?s/%s. ?e(END) :?pB%pB\%..%t
  1706.  
  1707.        The prompt expansion features are also  used  for  another
  1708.        purpose:  if  an environment variable LESSEDIT is defined,
  1709.        it is used as the command to be executed when the  v  com¡
  1710.        mand  is  invoked.  The LESSEDIT string is expanded in the
  1711.  
  1712.  
  1713.  
  1714.                      Version 373: 14 Jan 2002                  26
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. LESS(1)                                                   LESS(1)
  1721.  
  1722.  
  1723.        same way as the prompt strings.   The  default  value  for
  1724.        LESSEDIT is:
  1725.  
  1726.             %E ?lm+%lm. %f
  1727.  
  1728.        Note that this expands to the editor name, followed by a +
  1729.        and the line number, followed by the file name.   If  your
  1730.        editor  does  not  accept the "+linenumber" syntax, or has
  1731.        other differences in invocation syntax, the LESSEDIT vari¡
  1732.        able can be changed to modify this default.
  1733.  
  1734.  
  1735. SSEECCUURRIITTYY
  1736.        When the environment variable LESSSECURE is set to 1, _l_e_s_s
  1737.        runs in a "secure" mode.  This means  these  features  are
  1738.        disabled:
  1739.  
  1740.               !      the shell command
  1741.  
  1742.               |      the pipe command
  1743.  
  1744.               :e     the examine command.
  1745.  
  1746.               v      the editing command
  1747.  
  1748.               s  -o  log files
  1749.  
  1750.               -k     use of lesskey files
  1751.  
  1752.               -t     use of tags files
  1753.  
  1754.                      metacharacters in filenames, such as *
  1755.  
  1756.                      filename completion (TAB, ^L)
  1757.  
  1758.        Less  can  also  be compiled to be permanently in "secure"
  1759.        mode.
  1760.  
  1761.  
  1762. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
  1763.        Environment variables may be specified either in the  sys¡
  1764.        tem  environment  as  usual, or in a _l_e_s_s_k_e_y (1) file.  If
  1765.        environment variables are defined in more than one  place,
  1766.        variables  defined in a local lesskey file take precedence
  1767.        over variables defined in the  system  environment,  which
  1768.        take  precedence over variables defined in the system-wide
  1769.        lesskey file.
  1770.  
  1771.        COLUMNS
  1772.               Sets the number of columns on  the  screen.   Takes
  1773.               precedence  over the number of columns specified by
  1774.               the TERM variable.  (But if you  have  a  windowing
  1775.               system  which  supports TIOCGWINSZ or WIOCGETD, the
  1776.               window system's  idea  of  the  screen  size  takes
  1777.  
  1778.  
  1779.  
  1780.                      Version 373: 14 Jan 2002                  27
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. LESS(1)                                                   LESS(1)
  1787.  
  1788.  
  1789.               precedence  over  the LINES and COLUMNS environment
  1790.               variables.)
  1791.  
  1792.        EDITOR The name of the editor (used for the v command).
  1793.  
  1794.        HOME   Name of the user's home directory (used to  find  a
  1795.               lesskey file on Unix and OS/2 systems).
  1796.  
  1797.        HOMEDRIVE, HOMEPATH
  1798.               Concatenation  of  the HOMEDRIVE and HOMEPATH envi¡
  1799.               ronment variables is the name of  the  user's  home
  1800.               directory  if the HOME variable is not set (only in
  1801.               the Windows version).
  1802.  
  1803.        INIT   Name of the user's init directory (used to  find  a
  1804.               lesskey file on OS/2 systems).
  1805.  
  1806.        LANG   Language for determining the character set.
  1807.  
  1808.        LC_CTYPE
  1809.               Language for determining the character set.
  1810.  
  1811.        LESS   Options which are passed to _l_e_s_s automatically.
  1812.  
  1813.        LESSANSIENDCHARS
  1814.               Characters  which  are assumed to end an ANSI color
  1815.               escape sequence (default "m").
  1816.  
  1817.        LESSBINFMT
  1818.               Format for  displaying  non-printable,  non-control
  1819.               characters.
  1820.  
  1821.        LESSCHARDEF
  1822.               Defines a character set.
  1823.  
  1824.        LESSCHARSET
  1825.               Selects a predefined character set.
  1826.  
  1827.        LESSCLOSE
  1828.               Command  line  to invoke the (optional) input-post¡
  1829.               processor.
  1830.  
  1831.        LESSECHO
  1832.               Name of the lessecho program (default  "lessecho").
  1833.               The  lessecho program is needed to expand metachar¡
  1834.               acters, such as * and ?, in filenames on Unix  sys¡
  1835.               tems.
  1836.  
  1837.        LESSEDIT
  1838.               Editor  prototype  string (used for the v command).
  1839.               See discussion under PROMPTS.
  1840.  
  1841.        LESSGLOBALTAGS
  1842.               Name of the command used by the -t option  to  find
  1843.  
  1844.  
  1845.  
  1846.                      Version 373: 14 Jan 2002                  28
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. LESS(1)                                                   LESS(1)
  1853.  
  1854.  
  1855.               global tags.  Normally should be set to "global" if
  1856.               your system has the _g_l_o_b_a_l  (1)  command.   If  not
  1857.               set, global tags are not used.
  1858.  
  1859.        LESSKEY
  1860.               Name of the default lesskey(1) file.
  1861.  
  1862.        LESSKEY_SYSTEM
  1863.               Name of the default system-wide lesskey(1) file.
  1864.  
  1865.        LESSMETACHARS
  1866.               List  of characters which are considered "metachar¡
  1867.               acters" by the shell.
  1868.  
  1869.        LESSMETAESCAPE
  1870.               Prefix which less will add before each  metacharac¡
  1871.               ter  in  a  command  sent  to  the shell.  If LESS¡
  1872.               METAESCAPE is an empty string, commands  containing
  1873.               metacharacters will not be passed to the shell.
  1874.  
  1875.        LESSOPEN
  1876.               Command line to invoke the (optional) input-prepro¡
  1877.               cessor.
  1878.  
  1879.        LESSSECURE
  1880.               Runs less in "secure" mode.  See  discussion  under
  1881.               SECURITY.
  1882.  
  1883.        LESSSEPARATOR
  1884.               String  to be appended to a directory name in file¡
  1885.               name completion.
  1886.  
  1887.        LINES  Sets the number of  lines  on  the  screen.   Takes
  1888.               precedence  over  the  number of lines specified by
  1889.               the TERM variable.  (But if you  have  a  windowing
  1890.               system  which  supports TIOCGWINSZ or WIOCGETD, the
  1891.               window system's  idea  of  the  screen  size  takes
  1892.               precedence  over  the LINES and COLUMNS environment
  1893.               variables.)
  1894.  
  1895.        PATH   User's search path (used to find a lesskey file  on
  1896.               MS-DOS and OS/2 systems).
  1897.  
  1898.        SHELL  The shell used to execute the ! command, as well as
  1899.               to expand filenames.
  1900.  
  1901.        TERM   The type of terminal on which _l_e_s_s is being run.
  1902.  
  1903.        VISUAL The name of the editor (used for the v command).
  1904.  
  1905.  
  1906. SSEEEE AALLSSOO
  1907.        lesskey(1)
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                      Version 373: 14 Jan 2002                  29
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. LESS(1)                                                   LESS(1)
  1919.  
  1920.  
  1921. WWAARRNNIINNGGSS
  1922.        The = command and prompts (unless changed  by  -P)  report
  1923.        the line numbers of the lines at the top and bottom of the
  1924.        screen, but the byte and percent of the line after the one
  1925.        at the bottom of the screen.
  1926.  
  1927.        If  the :e command is used to name more than one file, and
  1928.        one of the named files has been viewed previously, the new
  1929.        files may be entered into the list in an unexpected order.
  1930.  
  1931.        On certain older terminals (the so-called  "magic  cookie"
  1932.        terminals),  search  highlighting  will cause an erroneous
  1933.        display.  On such terminals, search highlighting  is  dis¡
  1934.        abled by default to avoid possible problems.
  1935.  
  1936.        In  certain cases, when search highlighting is enabled and
  1937.        a search pattern begins with  a  ^,  more  text  than  the
  1938.        matching  string  may  be highlighted.  (This problem does
  1939.        not occur when less is compiled to use the  POSIX  regular
  1940.        expression package.)
  1941.  
  1942.        When  viewing  text containing ANSI color escape sequences
  1943.        using the -R option, searching will not find text contain¡
  1944.        ing  an embedded escape sequence.  Also, search highlight¡
  1945.        ing may change the color of some of the text which follows
  1946.        the highlighted text.
  1947.  
  1948.        On  some systems, _s_e_t_l_o_c_a_l_e claims that ASCII characters 0
  1949.        thru 31 are control characters rather than binary  charac¡
  1950.        ters.   This  causes  _l_e_s_s  to  treat some binary files as
  1951.        ordinary, non-binary files.  To workaround  this  problem,
  1952.        set  the  environment  variable LESSCHARSET to "ascii" (or
  1953.        whatever character set is appropriate).
  1954.  
  1955.        See http://www.greenwoodsoftware.com/less for  the  latest
  1956.        list of known bugs in this version of less.
  1957.  
  1958.  
  1959. CCOOPPYYRRIIGGHHTT
  1960.        Copyright (C) 2001  Mark Nudelman
  1961.  
  1962.        less is part of the GNU project and is free software.  You
  1963.        can redistribute it and/or modify it under  the  terms  of
  1964.        either  (1) the GNU General Public License as published by
  1965.        the Free Software Foundation; or  (2)  the  Less  License.
  1966.        See  the  file  README  in  the less distribution for more
  1967.        details  regarding  redistribution.    You   should   have
  1968.        received  a  copy  of the GNU General Public License along
  1969.        with the source for less; see the file COPYING.   If  not,
  1970.        write  to  the  Free Software Foundation, 59 Temple Place,
  1971.        Suite 330, Boston, MA  02111-1307, USA.  You  should  also
  1972.        have  received  a  copy  of the Less License; see the file
  1973.        LICENSE.
  1974.  
  1975.  
  1976.  
  1977.  
  1978.                      Version 373: 14 Jan 2002                  30
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. LESS(1)                                                   LESS(1)
  1985.  
  1986.  
  1987.        less is distributed in the hope that it  will  be  useful,
  1988.        but  WITHOUT  ANY  WARRANTY; without even the implied war¡
  1989.        ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR  PUR¡
  1990.        POSE.   See  the  GNU  General  Public  License  for  more
  1991.        details.
  1992.  
  1993.  
  1994. AAUUTTHHOORR
  1995.        Mark Nudelman <markn@greenwoodsoftware.com>
  1996.        Send bug reports or comments to the above  address  or  to
  1997.        bug-less@gnu.org.
  1998.        For   more   information,   see   the   less  homepage  at
  1999.        http://www.greenwoodsoftware.com/less.
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.                      Version 373: 14 Jan 2002                  31
  2045.  
  2046.  
  2047.