Home Explore Blog CI



man-pages

15th chunk of `less.man`
12cd344d9a3ca252cd01f301be23a7db5a6bbd4f9682f8c70000000100000fb8
             Like -w, but temporarily highlights the first new line after any forward movement command larger than one line.

       -xn,... or --tabs=n,...
              Sets tab stops.  If only one n is specified, tab stops are set at multiples of n.  If multiple values separated by commas are specified, tab stops are set at those positions, and then  continue  with  the  same
              spacing as the last two.  For example, -x9,17 will set tabs at positions 9, 17, 25, 33, etc.  The default for n is 8.

       -X or --no‐init
              Disables sending the termcap initialization and deinitialization strings to the terminal.  This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.

       -yn or --max‐forw‐scroll=n
              Specifies  a  maximum number of lines to scroll forward.  If it is necessary to scroll forward more than n lines, the screen is repainted instead.  The -c or -C option may be used to repaint from the top of the
              screen if desired.  By default, any forward movement causes scrolling.

       -zn or --window=n or -n
              Changes the default scrolling window size to n lines.  The default is one screenful.  The z and w commands can also be used to change the window size.  The "z" may be omitted for compatibility  with  some  ver‐
              sions  of  more.   If the number n is negative, it indicates n lines less than the current screen size.  For example, if the screen is 24 lines, -z-4 sets the scrolling window to 20 lines.  If the screen is re‐
              sized to 40 lines, the scrolling window automatically changes to 36 lines.

       -"cc or --quotes=cc
              Changes the filename quoting character.  This may be necessary if you are trying to name a file which contains both spaces and quote characters.  Followed by a single character, this changes the quote character
              to that character.  Filenames containing a space should then be surrounded by that character rather than by double quotes.  Followed by two characters, changes the open quote to the  first  character,  and  the
              close  quote  to the second character.  Filenames containing a space should then be preceded by the open quote character and followed by the close quote character.  Note that even after the quote characters are
              changed, this option remains -" (a dash followed by a double quote).

       -~ or --tilde
              Normally lines after end of file are displayed as a single tilde (~).  This option causes lines after end of file to be displayed as blank lines.

       -# or --shift
              Specifies the default number of positions to scroll horizontally in the RIGHTARROW and LEFTARROW commands.  If the number specified is zero, it sets the default number of positions to one  half  of  the  screen
              width.   Alternately,  the number may be specified as a fraction of the width of the screen, starting 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

Title: Less Command Options: Highlighting, Tabs, Scrolling, Quoting, and File Handling
Summary
This section covers `less` options for advanced features. It includes highlighting after larger movements (-W), setting custom tab stops (-x), disabling terminal initialization (-X), controlling forward scrolling (-y), adjusting the scrolling window size (-z), customizing filename quoting characters (-"), displaying blank lines after the end of a file (-~), setting horizontal scrolling positions (-#), and options related to determining file size (--file-size) and following renamed files (--follow-name).