Home Explore Blog CI



man-pages

8th chunk of `less.man`
57d0055e86ff14df79382ba076f70bc78b504623b67bbcea0000000100000fba
 -D options on MS‐DOS like this:

       LESS="Dn9.1$Ds4.1"

       If the --use‐backslash option appears earlier in the options, then a dollar sign or backslash may be included literally in an option string by preceding it with a backslash.  If the --use‐backslash option  is  not  in
       effect, then backslashes are not treated specially, and there is no way to include a dollar sign in the option string.

       -? or --help
              This  option  displays  a  summary of the commands accepted by less (the same as the h command).  (Depending on how your shell interprets the question mark, it may be necessary to quote the question mark, thus:
              "-\?".)

       -a or --search‐skip‐screen
              By default, forward searches start at the top of the displayed screen and backwards searches start at the bottom of the displayed screen (except for repeated searches invoked by the n or N commands, which start
              after or before the "target" line respectively; see the -j option for more about the target line).  The -a option causes forward searches to instead start at the bottom of the screen and  backward  searches  to
              start at the top of the screen, thus skipping all lines displayed on the screen.

       -A or --SEARCH‐SKIP‐SCREEN
              Causes  all  forward  searches (not just non‐repeated searches) to start just after the target line, and all backward searches to start just before the target line.  Thus, forward searches will skip part of the
              displayed screen (from the first line up to and including the target line).  Similarly backwards searches will skip the displayed screen from the last line up to and including the target line.  This was the de‐
              fault behavior in less versions prior to 441.

       -bn or --buffers=n
              Specifies the amount of buffer space less will use for each file, in units of kilobytes (1024 bytes).  By default 64 KB of buffer space is used for each file (unless the file is a pipe; see the -B option).  The
              -b option specifies instead that n kilobytes of buffer space should be used for each file.  If n is -1, buffer space is unlimited; that is, the entire file can be read into memory.

       -B or --auto‐buffers
              By default, when data is read from a pipe, buffers are allocated automatically as needed.  If a large amount of data is read from the pipe, this can cause a large amount of memory to be allocated.  The  -B  op‐
              tion  disables  this  automatic allocation of buffers for pipes, so that only 64 KB (or the amount of space specified by the -b option) is used for the pipe.  Warning: use of -B can result in erroneous display,
              since only the most recently viewed part of the piped data is kept in memory; any earlier data is lost.

       -c or --clear‐screen
              Causes full screen repaints to be painted from the top line down.  By default, full screen repaints are done by scrolling from the bottom of the screen.

       -C or --CLEAR‐SCREEN
              Same as -c, for compatibility with older versions of less.

       -d or --dumb
              The -d option suppresses the error message normally displayed if the terminal is dumb; that is, lacks some important capability, such as the ability to clear the screen or scroll backward.  The -d  option  does
              not otherwise change the behavior of less on a dumb terminal.

       -Dxcolor or --color=xcolor
              Changes the color of different parts of the displayed text.  x is a single character which selects the type of text whose color is being set:

              B      Binary characters.

              C      Control characters.

              E      Errors and informational messages.

              M      Mark letters in the status column.

              N      Line numbers enabled via the -N option.

              P      Prompts.

              R      The rscroll character.

    

Title: Less Command Options: Search, Buffers, Screen Clearing, Dumb Terminals, and Color Customization
Summary
This section describes various command-line options for the `less` command. It covers options related to search behavior (-a, -A), buffer management (-b, -B), screen clearing (-c, -C), handling dumb terminals (-d), and customizing text colors (-D). Each option is explained with its purpose and usage, including how they affect the behavior of `less` when viewing files or piped data.