less 

Send to Kindle
home » snippets » linux » less



Snippets

-N or --LINE-NUMBERS
              Causes a line number to be displayed at the beginning of each line in the display.

-R or --RAW-CONTROL-CHARS
              Like  -r,  but  only  ANSI  "color" escape sequences are output in "raw" form.  Unlike -r, the
              screen appearance is maintained correctly in most cases.  ANSI "color"  escape  sequences  are
              sequences of the form:

                   ESC [ ... m

              where  the  "..."  is  zero  or more color specification characters For the purpose of keeping
              track of screen appearance, ANSI color escape sequences are assumed to not  move  the  cursor.
              You  can make less think that characters other than "m" can end ANSI color escape sequences by
              setting the environment variable LESSANSIENDCHARS to the list of characters which  can  end  a
              color  escape  sequence.   And you can make less think that characters other than the standard
              ones may appear between the ESC and the m by setting the environment variable LESSANSIMIDCHARS
              to the list of characters which can appear.

-S or --chop-long-lines
              Causes lines longer than the screen width to be chopped rather than folded.  That is, the por-
              tion  of  a  long  line that does not fit in the screen width is not shown.  The default is to
              fold long lines; that is, display the remainder on the next line.

= or ^G or :f
       Prints some information about the file being viewed, including its name and  the  line  number
       and byte offset of the bottom line being displayed.  If possible, it also prints the length of
       the file, the number of lines in the file and the percent of the file above the last displayed
       line.

:n     Examine the next file (from the list of files given in the command line).  If a  number  N  is
              specified, the N-th next file is examined.

:p     Examine the previous file in the command line list.  If a number N is specified, the N-th pre-
       vious file is examined.

:x     Examine the first file in the command line list.  If a number N is specified, the N-th file in
       the list is examined.

:d     Remove the current file from the list of files.