Home Explore Blog CI



man-pages

16th chunk of `less.man`
f46f490d455108f4d527c897a3608dcd10ea34a5bd4d9f840000000100000fd0
 with a decimal point: .5 is half of the screen width, .3 is three tenths of the screen width, and so on.  If
              the number is specified as a fraction, the actual number of scroll positions is recalculated if the terminal window is resized, so that the actual scroll remains at the specified fraction of the screen width.

       --file‐size
              If --file‐size is specified, less will determine the size of the file immediately after opening the file.  Normally this is not done, because it can be slow if the input file is large.

       --follow‐name
              Normally, if the input file is renamed while an F command is executing, less will continue to display the contents of the original file despite its name change.  If --follow‐name is specified, during an F  com‐
              mand less will periodically attempt to reopen the file by name.  If the reopen succeeds and the file is a different file from the original (which means that a new file has been created with the same name as the
              original (now renamed) file), less will display the contents of that new file.

       --incsearch
              Subsequent search commands will be "incremental"; that is, less will advance to the next line containing the search pattern as each character of the pattern is typed in.

       --line‐num‐width
              Sets the minimum width of the line number field when the -N option is in effect.  The default is 7 characters.

       --mouse
              Enables  mouse  input: scrolling the mouse wheel down moves forward in the file, scrolling the mouse wheel up moves backwards in the file, and clicking the mouse sets the "#" mark to the line where the mouse is
              clicked.  The number of lines to scroll when the wheel is moved can be set by the --wheel‐lines option.  Mouse input works only on terminals which support X11 mouse reporting, and  on  the  Windows  version  of
              less.

       --MOUSE
              Like --mouse, except the direction scrolled on mouse wheel movement is reversed.

       --no‐keypad
              Disables sending the keypad initialization and deinitialization strings to the terminal.  This is sometimes useful if the keypad strings make the numeric keypad behave in an undesirable manner.

       --no‐histdups
              This option changes the behavior so that if a search string or file name is typed in, and the same string is already in the history list, the existing copy is removed from the history list before the new one is
              added.  Thus, a given string will appear only once in the history list.  Normally, a string may appear multiple times.

       --rscroll
              This  option  changes  the  character used to mark truncated lines.  It may begin with a two‐character attribute indicator like LESSBINFMT does.  If there is no attribute indicator, standout is used.  If set to
              "-", truncated lines are not marked.

       --save‐marks
              Save marks in the history file, so marks are retained across different invocations of less.

       --status‐col‐width
              Sets the width of the status column when the -J option is in effect.  The default is 2 characters.

       --use‐backslash
              This option changes the interpretations of options which follow this one.  After the --use‐backslash option, any backslash in an option string is removed and the following character is  taken  literally.   This
              allows a dollar sign to be included in option strings.

       --use‐color
              Enables the colored text in various places.  The ‐D option can be used to change the colors.  Colored text works only if the terminal supports ANSI color escape sequences (as defined in ECMA‐48 SGR; see
              https://www.ecma‐international.org/publications‐and‐standards/standards/ecma‐48).

       --wheel‐lines=n
              Set the number of lines to scroll when the mouse wheel is scrolled and the

Title: Less Command Options: Advanced Features (Continued)
Summary
This section details further `less` options including setting horizontal scroll increments, determining file size, following renamed files, incremental search (--incsearch), adjusting line number width (--line-num-width), enabling mouse input (--mouse, --MOUSE), disabling keypad initialization (--no-keypad), preventing duplicate history entries (--no-histdups), customizing truncated line markers (--rscroll), saving marks (--save-marks), setting status column width (--status-col-width), using backslashes in options (--use-backslash), enabling colored text (--use-color), and setting the number of lines to scroll with the mouse wheel (--wheel-lines).