1.TH LESS 1 "Version 371: 26 Dec 2001" |
2.SH NAME 3less \- opposite of more 4.SH SYNOPSIS 5.B "less -?" 6.br 7.B "less --help" 8.br 9.B "less -V" 10.br 11.B "less --version" 12.br |
13.B "less [-[+]aBcCdeEfFgGiIJmMnNqQrRsSuUVwWX]" |
14.br 15.B " [-b \fIbufs\fP] [-h \fIlines\fP] [-j \fIline\fP] [-k \fIkeyfile\fP]" 16.br 17.B " [-{oO} \fIlogfile\fP] [-p \fIpattern\fP] [-P \fIprompt\fP] [-t \fItag\fP]" 18.br |
19.B " [-T \fItagsfile\fP] [-x \fItab\fP,...] [-y \fIlines\fP] [-[z] \fIlines\fP]" |
20.br 21.B " [+[+]\fIcmd\fP] [--] [\fIfilename\fP]..." 22.br 23(See the OPTIONS section for alternate option syntax with long option names.) 24 25.SH DESCRIPTION 26.I Less 27is a program similar to --- 55 unchanged lines hidden (view full) --- 83Warning: some systems use ^Y as a special job control character. 84.IP "u or ^U" 85Scroll backward N lines, default one half of the screen size. 86If N is specified, it becomes the new default for 87subsequent d and u commands. 88.IP "ESC-) or RIGHTARROW" 89Scroll horizontally right N characters, default half the screen width 90(see the -# option). |
91If a number N is specified, it becomes the default for future RIGHTARROW 92and LEFTARROW commands. |
93While the text is scrolled, it acts as though the -S option 94(chop lines) were in effect. |
95.IP "ESC-( or LEFTARROW" 96Scroll horizontally left N characters, default half the screen width 97(see the -# option). |
98If a number N is specified, it becomes the default for future RIGHTARROW 99and LEFTARROW commands. |
100.IP "r or ^R or ^L" 101Repaint the screen. 102.IP R 103Repaint the screen, discarding any buffered input. 104Useful if the file is changing while it is being viewed. 105.IP "F" 106Scroll forward, and keep trying to read when the 107end of file is reached. --- 175 unchanged lines hidden (view full) --- 283.IP ":p" 284Examine the previous file in the command line list. 285If a number N is specified, the N-th previous file is examined. 286.IP ":x" 287Examine the first file in the command line list. 288If a number N is specified, the N-th file in the list is examined. 289.IP ":d" 290Remove the current file from the list of files. |
291.IP "t" 292Go to the next tag, if there were more than one matches for the current tag. 293See the \-t option for more details about tags. 294.IP "T" 295Go to the previous tag, if there were more than one matches for the current tag. |
296.IP "= or ^G or :f" 297Prints some information about the file being viewed, 298including its name 299and the line number and byte offset of the bottom line being displayed. 300If possible, it also prints the length of the file, 301the number of lines in the file 302and the percent of the file above the last displayed line. 303.IP \- --- 251 unchanged lines hidden (view full) --- 555to the bottom is -2, and so on. 556If the -j option is used, searches begin at the line immediately 557after the target line. 558For example, if "-j4" is used, the target line is the 559fourth line on the screen, so searches begin at the fifth line 560on the screen. 561.IP "-J or --status-column" 562Displays a status column at the left edge of the screen. |
563The status column shows the lines that matched the current search. 564The status column is also used if the -w or -W option is in effect. |
565.IP "-k\fIfilename\fP or --lesskey-file=\fIfilename\fP" 566Causes 567.I less 568to open and interpret the named file as a 569.I lesskey 570(1) file. 571Multiple -k options may be specified. 572If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or --- 63 unchanged lines hidden (view full) --- 636Such an option must either be the last option in the LESS variable, 637or be terminated by a dollar sign. 638-Ps followed by a string changes the default (short) prompt 639to that string. 640-Pm changes the medium (-m) prompt. 641-PM changes the long (-M) prompt. 642-Ph changes the prompt for the help screen. 643-P= changes the message printed by the = command. |
644-Pw changes the message printed while waiting for data (in the F command). |
645All prompt strings consist of a sequence of 646letters and special escape sequences. 647See the section on PROMPTS for more details. 648.IP "-q or --quiet or --silent" 649Causes moderately "quiet" operation: 650the terminal bell is not rung 651if an attempt is made to scroll past the end of the file 652or before the beginning of the file. --- 40 unchanged lines hidden (view full) --- 693Causes lines longer than the screen width to be 694chopped rather than folded. 695That is, the remainder of a long line is simply discarded. 696The default is to fold long lines; that is, display the remainder 697on the next line. 698.IP "-t\fItag\fP or --tag=\fItag\fP" 699The -t option, followed immediately by a TAG, 700will edit the file containing that tag. |
701For this to work, tag information must be available; 702for example, there may be a file in the current directory called "tags", 703which was previously built by |
704.I ctags |
705(1) or an equivalent command. 706If the environment variable LESSGLOBALTAGS is set, it is taken to be 707the name of a command compatible with 708.I global 709(1), and that command is executed to find the tag. 710(See http://www.gnu.org/software/global/global.html). 711The -t option may also be specified from within |
712.I less 713(using the \- command) as a way of examining a new file. 714The command ":t" is equivalent to specifying -t from within 715.I less. 716.IP "-T\fItagsfile\fP or --tag-file=\fItagsfile\fP" 717Specifies a tags file to be used instead of "tags". 718.IP "-u or --underline-special" 719Causes backspaces and carriage returns to be treated as printable characters; --- 27 unchanged lines hidden (view full) --- 747at the bottom of the screen. 748Also highlights the target line after a g or p command. 749The highlight is removed at the next command which causes movement. 750The entire line is highlighted, unless the -J option is in effect, 751in which case only the status column is highlighted. 752.IP "-W or --HILITE-UNREAD" 753Like -w, but temporarily highlights the first new line after any 754forward movement command larger than one line. |
755.IP "-x\fIn\fP,... or --tabs=\fIn\fP,..." 756Sets tab stops. 757If only one \fIn\fP is specified, tab stops are set at multiples of \fIn\fP. 758If multiple values separated by commas are specified, tab stops 759are set at those positions, and then continue with the same spacing as the 760last two. 761For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc. |
762The default for \fIn\fP is 8. 763.IP "-X or --no-init" 764Disables sending the termcap initialization and deinitialization strings 765to the terminal. 766This is sometimes desirable if the deinitialization string does 767something unnecessary, like clearing the screen. |
768.IP "--no-keypad" 769Disables sending the keypad initialization and deinitialization strings 770to the terminal. 771This is sometimes useful if the keypad strings make the numeric 772keypad behave in an undesirable manner. |
773.IP "-y\fIn\fP or --max-forw-scroll=\fIn\fP" 774Specifies a maximum number of lines to scroll forward. 775If it is necessary to scroll forward more than \fIn\fP lines, 776the screen is repainted instead. 777The -c or -C option may be used to repaint from the top of 778the screen if desired. 779By default, any forward movement causes scrolling. 780.IP "-[z]\fIn\fP or --window=\fIn\fP" --- 102 unchanged lines hidden (view full) --- 883The environment variable LESSSEPARATOR can be used to specify a 884different character to append to a directory name. 885.IP "BACKTAB [ ESC-TAB ]" 886Like, TAB, but cycles in the reverse direction thru the matching filenames. 887.IP "^L" 888Complete the partial filename to the left of the cursor. 889If it matches more than one filename, all matches are entered into 890the command line (if they fit). |
891.IP "^U (Unix and OS/2) or ESC (MS-DOS)" |
892Delete the entire command line, 893or cancel the command if the command line is empty. 894If you have changed your line-kill character in Unix to something 895other than ^U, that character is used instead of ^U. 896 897.SH "KEY BINDINGS" 898You may define your own 899.I less --- 37 unchanged lines hidden (view full) --- 937system-wide file, key bindings in the local file take precedence over 938those in the system-wide file. 939If the environment variable LESSKEY_SYSTEM is set, 940.I less 941uses that as the name of the system-wide lesskey file. 942Otherwise, 943.I less 944looks in a standard place for the system-wide lesskey file: |
945On Unix systems, the system-wide lesskey file is /usr/local/etc/sysless. |
946(However, if 947.I less |
948was built with a different sysconf directory than /usr/local/etc, 949that directory is where the sysless file is found.) |
950On MS-DOS and Windows systems, the system-wide lesskey file is c:\\_sysless. 951On OS/2 systems, the system-wide lesskey file is c:\\sysless.ini. 952 953.SH "INPUT PREPROCESSOR" 954You may define an "input preprocessor" for 955.I less. 956Before 957.I less --- 139 unchanged lines hidden (view full) --- 1097all chars with values between 32 and 126 are normal, 1098and all others are binary. 1099.IP iso8859 1100Selects an ISO 8859 character set. 1101This is the same as ASCII, except characters between 160 and 255 are 1102treated as normal characters. 1103.IP latin1 1104Same as iso8859. |
1105.IP latin9 1106Same as iso8859. |
1107.IP dos 1108Selects a character set appropriate for MS-DOS. 1109.IP ebcdic 1110Selects an EBCDIC character set. |
1111.IP IBM-1047 1112Selects an EBCDIC character set used by OS/390 Unix Services. 1113This is the EBCDIC analogue of latin1. You get similar results 1114by setting either LESSCHARSET=IBM-1047 or LC_CTYPE=en_US 1115in your environment. |
1116.IP koi8-r 1117Selects a Russian character set. 1118.IP next 1119Selects a character set appropriate for NeXT computers. 1120.IP utf-8 1121Selects the UTF-8 encoding of the ISO 10646 character set. 1122.PP |
1123In special cases, it may be desired to tailor 1124.I less 1125to use a character set other than the ones definable by LESSCHARSET. 1126In this case, the environment variable LESSCHARDEF can be used 1127to define a character set. 1128It should be set to a string where each character in the string represents 1129one character in the character set. 1130The character "." is used for a normal character, "c" for control, --- 12 unchanged lines hidden (view full) --- 1143 ascii\ 8bcccbcc18b95.b 1144.br 1145 dos\ \ \ 8bcccbcc12bc5b95.b. 1146.br 1147 ebcdic 5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b 1148.br 1149 \ \ \ \ \ \ 9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b. 1150.br |
1151 IBM-1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc 1152 \ \ \ \ \ \ 191.b 1153.br |
1154 iso8859 8bcccbcc18b95.33b. 1155.br 1156 koi8-r 8bcccbcc18b95.b128. 1157.br 1158 latin1 8bcccbcc18b95.33b. 1159.br 1160 next\ \ 8bcccbcc18b95.bb125.bb 1161.PP |
1162If neither LESSCHARSET nor LESSCHARDEF is set, 1163but the string "UTF-8" is found in the LC_ALL, LC_TYPE or LANG 1164environment variables, then the default character set is utf-8. 1165.PP 1166If that string is not found, but your system supports the |
1167.I setlocale 1168interface, 1169.I less 1170will use setlocale to determine the character set. |
1171setlocale is controlled by setting the LANG or LC_CTYPE environment 1172variables. |
1173.PP |
1174Finally, if the 1175.I setlocale 1176interface is also not available, the default character set is latin1. 1177.PP |
1178Control and binary characters are displayed in standout (reverse video). 1179Each such character is displayed in caret notation if possible 1180(e.g. ^A for control-A). Caret notation is used only if 1181inverting the 0100 bit results in a normal printable character. 1182Otherwise, the character is displayed as a hex number in angle brackets. 1183This format can be changed by 1184setting the LESSBINFMT environment variable. 1185LESSBINFMT may begin with a "*" and one character to select --- 226 unchanged lines hidden (view full) --- 1412Sets the number of columns on the screen. 1413Takes precedence over the number of columns specified by the TERM variable. 1414(But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD, 1415the window system's idea of the screen size takes precedence over the 1416LINES and COLUMNS environment variables.) 1417.IP EDITOR 1418The name of the editor (used for the v command). 1419.IP HOME |
1420Name of the user's home directory 1421(used to find a lesskey file on Unix and OS/2 systems). |
1422.IP "HOMEDRIVE, HOMEPATH" 1423Concatenation of the HOMEDRIVE and HOMEPATH environment variables is 1424the name of the user's home directory if the HOME variable is not set 1425(only in the Windows version). 1426.IP INIT 1427Name of the user's init directory (used to find a lesskey file on OS/2 systems). 1428.IP LANG 1429Language for determining the character set. --- 16 unchanged lines hidden (view full) --- 1446Command line to invoke the (optional) input-postprocessor. 1447.IP LESSECHO 1448Name of the lessecho program (default "lessecho"). 1449The lessecho program is needed to expand metacharacters, such as * and ?, 1450in filenames on Unix systems. 1451.IP LESSEDIT 1452Editor prototype string (used for the v command). 1453See discussion under PROMPTS. |
1454.IP LESSGLOBALTAGS 1455Name of the command used by the -t option to find global tags. 1456Normally should be set to "global" if your system has the 1457.I global 1458(1) command. If not set, global tags are not used. |
1459.IP LESSKEY 1460Name of the default lesskey(1) file. 1461.IP LESSKEY_SYSTEM 1462Name of the default system-wide lesskey(1) file. 1463.IP LESSMETACHARS 1464List of characters which are considered "metacharacters" by the shell. 1465.IP LESSMETAESCAPE 1466Prefix which less will add before each metacharacter in a --- 43 unchanged lines hidden (view full) --- 1510to avoid possible problems. 1511.PP 1512In certain cases, when search highlighting is enabled and 1513a search pattern begins with a ^, 1514more text than the matching string may be highlighted. 1515(This problem does not occur when less is compiled to use the POSIX 1516regular expression package.) 1517.PP |
1518When viewing text containing ANSI color escape sequences using the -R option, 1519searching will not find text containing an embedded escape sequence. 1520Also, search highlighting may change the color of some of the text 1521which follows the highlighted text. 1522.PP |
1523On some systems, 1524.I setlocale 1525claims that ASCII characters 0 thru 31 are control characters 1526rather than binary characters. 1527This causes 1528.I less 1529to treat some binary files as ordinary, non-binary files. 1530To workaround this problem, set the environment variable 1531LESSCHARSET to "ascii" (or whatever character set is appropriate). 1532.PP |
1533See http://www.greenwoodsoftware.com/less for the latest list of known bugs in this |
1534version of less. 1535 1536.SH COPYRIGHT |
1537Copyright (C) 2001 Mark Nudelman |
1538.PP 1539less is part of the GNU project and is free software. 1540You can redistribute it and/or modify it 1541under the terms of either 1542(1) the GNU General Public License as published by 1543the Free Software Foundation; or (2) the Less License. 1544See the file README in the less distribution for more details 1545regarding redistribution. --- 6 unchanged lines hidden (view full) --- 1552.PP 1553less is distributed in the hope that it will be useful, but 1554WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1555or FITNESS FOR A PARTICULAR PURPOSE. 1556See the GNU General Public License for more details. 1557 1558.SH AUTHOR 1559.PP |
1560Mark Nudelman <markn@greenwoodsoftware.com> |
1561.br 1562Send bug reports or comments to the above address or to bug-less@gnu.org. |
1563.br 1564For more information, see the less homepage at http://www.greenwoodsoftware.com/less. |