less [-[+]aBcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~]
[-b space] [-h lines] [-j line] [-k keyfile]
[-{oO} logfile]
[-p pattern] [-P prompt] [-t tag]
[-T tagsfile] [-x tab,...]
[-y lines] [-[z] lines]
[-# shift] [+[+]cmd] [--] [filename]…
Commands may be preceded by a decimal number, N
.
In the following descriptions, ^X means control-X. ␛ stands for the ␛APE key; for example ␛-v means the two character sequence "␛APE", then "v".
|
If the environment variable LESS_IS_MORE is set to 1,
if the program is invoked via a file link named "more", less
behaves (mostly) in conformance with the POSIX "more" command specification. In this mode, less behaves differently in
these ways:
The -e option works differently. If the -e option is not set, less behaves as if the -E option were set. If the -e
option is set, less behaves as if the -e and -F options were set.
The -m option works differently. If the -m option is not set, the medium prompt is used, and it is prefixed with the
string "--More--". If the -m option is set, the short prompt is used.
The -n option acts like the -z option. The normal behavior of the -n option is unavailable in this mode.
The parameter to the -p option is taken to be a less command rather than a search pattern.
The LESS environment variable is ignored, and the MORE environment variable is used in its place.
ENVIRONMENT VARIABLES
Environment variables may be specified either in the system environment as usual,
in a lesskey (1) file. If environment variables are defined in more than one place, variables defined in a local lesskey file take precedence over
variables defined in the system environment, which take precedence over variables defined in the system-wide lesskey
file.
COLUMNS
Sets the number of columns on the screen. Takes precedence over the number of columns specified by the TERM
variable. (But if you have a windowing system which supports TIOCGWINSZ
WIOCGETD, the window system's idea
of the screen size takes precedence over the LINES and COLUMNS environment variables.)
EDITOR The name of the editor (used for the v command).
HOME Name of the user's home directory (used to find a lesskey file on Unix and OS/2 systems).
HOMEDRIVE, HOMEPATH
Concatenation of the HOMEDRIVE and HOMEPATH environment variables is the name of the user's home directory if
the HOME variable is not set (only in the Windows version).
INIT Name of the user's init directory (used to find a lesskey file on OS/2 systems).
LANG Language for determining the character set.
LC_CTYPE
Language for determining the character set.
LESS Options which are passed to less automatically.
LESSANSIENDCHARS
Characters which may end an ANSI color escape sequence (default "m").
LESSANSIMIDCHARS
Characters which may appear between the ␛ character and the end character in an ANSI color escape sequence
(default "0123456789;[?!"'#%()*+ ".
LESSBINFMT
Format for displaying non-printable, non-control characters.
LESSCHARDEF
Defines a character set.
LESSCHARSET
Selects a predefined character set.
LESSCLOSE
Command line to invoke the (optional) input-postprocessor.
LESSECHO
Name of the lessecho program (default "lessecho"). The lessecho program is needed to expand metacharacters,
such as * and ?, in filenames on Unix systems.
LESSEDIT
Editor prototype string (used for the v command). See discussion under PROMPTS.
LESSGLOBALTAGS
Name of the command used by the -t option to find global tags. Normally should be set to "global" if your system has the global (1) command. If not set, global tags are not used.
LESSHISTFILE
Name of the history file used to remember search commands and shell commands between invocations of less. If
set to "-"
"/dev/null", a history file is not used. The default is "$HOME/.lesshst" on Unix systems,
"$HOME/_lesshst" on DOS and Windows systems,
"$HOME/lesshst.ini"
"$INIT/lesshst.ini" on OS/2 systems.
LESSHISTSIZE
The maximum number of commands to save in the history file. The default is 100.
LESSKEY
Name of the default lesskey(1) file.
LESSKEY_SYSTEM
Name of the default system-wide lesskey(1) file.
LESSMETACHARS
List of characters which are considered "metacharacters" by the shell.
LESSMETAESCAPE
Prefix which less will add before each metacharacter in a command sent to the shell. If LESSMETA␛APE is an
empty string, commands containing metacharacters will not be passed to the shell.
LESSOPEN
Command line to invoke the (optional) input-preprocessor.
LESSSECURE
Runs less in "secure" mode. See discussion under SECURITY.
LESSSEPARATOR
String to be appended to a directory name in filename completion.
LESSUTFBINFMT
Format for displaying non-printable Unicode code points.
LESS_IS_MORE
Emulate the more (1) command.
LINES Sets the number of lines on the screen. Takes precedence over the number of lines specified by the TERM variable. (But if you have a windowing system which supports TIOCGWINSZ
WIOCGETD, the window system's idea of
the screen size takes precedence over the LINES and COLUMNS environment variables.)
PATH User's search path (used to find a lesskey file on MS-DOS and OS/2 systems).
SHELL The shell used to execute the ! command, as well as to expand filenames.
TERM The type of terminal on which less is being run.
VISUAL The name of the editor (used for the v command).
SEE ALSO
lesskey(1)
COPYRIGHT
Copyright (C) 1984-2007 Mark Nudelman
less is part of the GNU project and is free software. You can redistribute it and/or modify it under the terms of
either (1) the GNU General Public License as published by the Free Software Foundation;
(2) the Less License. See
the file README in the less distribution for more details regarding redistribution. You should have received a copy of
the GNU General Public License along with the source for less; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. You should also have received a copy of the
Less License; see the file LICENSE.
less is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
AUTHOR
Mark Nudelman