Home Explore Blog CI



man-pages

6th chunk of `less.man`
23e7a9277ddbf9c4a9601f27ceb10fec053db9844db30a1a0000000100000fb7
 for the current tag.

       = 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.

       -      Followed by one of the command line option letters (see OPTIONS below), this will change the setting of that option and print a message describing the new setting.  If a ^P (CONTROL‐P)  is  entered  immediately
              after the dash, the setting of the option is changed but no message is printed.  If the option letter has a numeric value (such as -b or -h), or a string value (such as -P or -t), a new value may be entered af‐
              ter the option letter.  If no new value is entered, a message describing the current setting is printed and nothing is changed.

       --     Like  the  -  command,  but takes a long option name (see OPTIONS below) rather than a single option letter.  You must press ENTER or RETURN after typing the option name.  A ^P immediately after the second dash
              suppresses printing of a message describing the new setting, as in the - command.

       -+     Followed by one of the command line option letters this will reset the option to its default setting and print a message describing the new setting.  (The "-+X" command does the same thing as "-+X" on the  com‐
              mand line.)  This does not work for string‐valued options.

       --+    Like the -+ command, but takes a long option name rather than a single option letter.

       -!     Followed by one of the command line option letters, this will reset the option to the "opposite" of its default setting and print a message describing the new setting.  This does not work for numeric or string‐
              valued options.

       --!    Like the -! command, but takes a long option name rather than a single option letter.

       _      (Underscore.)  Followed by one of the command line option letters, this will print a message describing the current setting of that option.  The setting of the option is not changed.

       __     (Double underscore.)  Like the _ (underscore) command, but takes a long option name rather than a single option letter.  You must press ENTER or RETURN after typing the option name.

       +cmd   Causes the specified cmd to be executed each time a new file is examined.  For example, +G causes less to initially display each file starting at the end rather than the beginning.

       V      Prints the version number of less being run.

       q or Q or :q or :Q or ZZ
              Exits less.

       The following four commands may or may not be valid, depending on your particular installation.

       v      Invokes  an editor to edit the current file being viewed.  The editor is taken from the environment variable VISUAL if defined, or EDITOR if VISUAL is not defined, or defaults to "vi" if neither VISUAL nor EDI‐
              TOR is defined.  See also the discussion of LESSEDIT under the section on PROMPTS below.

       ! shell‐command
              Invokes a shell to run the shell‐command given.  A percent sign (%) in the command is replaced by the name of the current file.  A pound sign (#) is replaced by the name of the previously examined  file.   "!!"
              repeats the last shell command.  "!" with no shell command simply invokes a shell.  On Unix systems, the shell is taken from the environment variable SHELL, or defaults to "sh".  On MS‐DOS and OS/2 systems, the
              shell is the normal command processor.

       | <m> shell‐command
              <m>  represents any mark letter.  Pipes a section of the input file to the given shell command.  The section of the file to be piped is between the position marked by the letter and the current screen.  The en‐
              tire current screen is included,

Title: Less Command Manual: Option Modification, Version Info, and Shell Interaction
Summary
This section of the `less` command manual explains how to modify options (short and long names), reset options to default or opposite settings, display option settings, execute commands upon examining a new file, print the version number, and exit `less`. It also covers invoking an editor to edit the current file and running shell commands, including piping sections of the input file to a shell command.