2 S
\bSU
\bUM
\bMM
\bMA
\bAR
\bRY
\bY O
\bOF
\bF L
\bLE
\bES
\bSS
\bS C
\bCO
\bOM
\bMM
\bMA
\bAN
\bND
\bDS
\bS
4 Commands marked with * may be preceded by a number, _
\bN.
5 Notes in parentheses indicate the behavior if _
\bN is given.
9 ---------------------------------------------------------------------------
11 M
\bMO
\bOV
\bVI
\bIN
\bNG
\bG
13 e ^E j ^N CR * Forward one line (or _
\bN lines).
14 y ^Y k ^K ^P * Backward one line (or _
\bN lines).
15 f ^F ^V SPACE * Forward one window (or _
\bN lines).
16 b ^B ESC-v * Backward one window (or _
\bN lines).
17 z * Forward one window (and set window to _
\bN).
18 w * Backward one window (and set window to _
\bN).
19 ESC-SPACE * Forward one window, but don't stop at end-of-file.
20 d ^D * Forward one half-window (and set half-window to _
\bN).
21 u ^U * Backward one half-window (and set half-window to _
\bN).
22 ESC-) RightArrow * Left one half screen width (or _
\bN positions).
23 ESC-( LeftArrow * Right one half screen width (or _
\bN positions).
24 F Forward forever; like "tail -f".
25 r ^R ^L Repaint screen.
26 R Repaint screen, discarding buffered input.
27 ---------------------------------------------------
28 Default "window" is the screen height.
29 Default "half-window" is half of the screen height.
30 ---------------------------------------------------------------------------
32 S
\bSE
\bEA
\bAR
\bRC
\bCH
\bHI
\bIN
\bNG
\bG
34 /_
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn * Search forward for (_
\bN-th) matching line.
35 ?_
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn * Search backward for (_
\bN-th) matching line.
36 n * Repeat previous search (for _
\bN-th occurrence).
37 N * Repeat previous search in reverse direction.
38 ESC-n * Repeat previous search, spanning files.
39 ESC-N * Repeat previous search, reverse dir. & spanning files.
40 ESC-u Undo (toggle) search highlighting.
41 &_
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn * Display only matching lines
42 ---------------------------------------------------
43 Search patterns may be modified by one or more of:
44 ^N or ! Search for NON-matching lines.
45 ^E or * Search multiple files (pass thru END OF FILE).
46 ^F or @ Start search at FIRST file (for /) or last file (for ?).
47 ^K Highlight matches, but don't move (KEEP position).
48 ^R Don't use REGULAR EXPRESSIONS.
49 ---------------------------------------------------------------------------
51 J
\bJU
\bUM
\bMP
\bPI
\bIN
\bNG
\bG
53 g < ESC-< * Go to first line in file (or line _
\bN).
54 G > ESC-> * Go to last line in file (or line _
\bN).
55 p % * Go to beginning of file (or _
\bN percent into file).
56 t * Go to the (_
\bN-th) next tag.
57 T * Go to the (_
\bN-th) previous tag.
58 { ( [ * Find close bracket } ) ].
59 } ) ] * Find open bracket { ( [.
60 ESC-^F _
\b<_
\bc_
\b1_
\b> _
\b<_
\bc_
\b2_
\b> * Find close bracket _
\b<_
\bc_
\b2_
\b>.
61 ESC-^B _
\b<_
\bc_
\b1_
\b> _
\b<_
\bc_
\b2_
\b> * Find open bracket _
\b<_
\bc_
\b1_
\b>
62 ---------------------------------------------------
63 Each "find close bracket" command goes forward to the close bracket
64 matching the (_
\bN-th) open bracket in the top line.
65 Each "find open bracket" command goes backward to the open bracket
66 matching the (_
\bN-th) close bracket in the bottom line.
68 m_
\b<_
\bl_
\be_
\bt_
\bt_
\be_
\br_
\b> Mark the current position with <letter>.
69 '_
\b<_
\bl_
\be_
\bt_
\bt_
\be_
\br_
\b> Go to a previously marked position.
70 '' Go to the previous position.
72 ---------------------------------------------------
73 A mark is any upper-case or lower-case letter.
74 Certain marks are predefined:
75 ^ means beginning of the file
76 $ means end of the file
77 ---------------------------------------------------------------------------
79 C
\bCH
\bHA
\bAN
\bNG
\bGI
\bIN
\bNG
\bG F
\bFI
\bIL
\bLE
\bES
\bS
81 :e [_
\bf_
\bi_
\bl_
\be] Examine a new file.
83 :n * Examine the (_
\bN-th) next file from the command line.
84 :p * Examine the (_
\bN-th) previous file from the command line.
85 :x * Examine the first (or _
\bN-th) file from the command line.
86 :d Delete the current file from the command line list.
87 = ^G :f Print current file name.
88 ---------------------------------------------------------------------------
90 M
\bMI
\bIS
\bSC
\bCE
\bEL
\bLL
\bLA
\bAN
\bNE
\bEO
\bOU
\bUS
\bS C
\bCO
\bOM
\bMM
\bMA
\bAN
\bND
\bDS
\bS
92 -_
\b<_
\bf_
\bl_
\ba_
\bg_
\b> Toggle a command line option [see OPTIONS below].
93 --_
\b<_
\bn_
\ba_
\bm_
\be_
\b> Toggle a command line option, by name.
94 __
\b<_
\bf_
\bl_
\ba_
\bg_
\b> Display the setting of a command line option.
95 ___
\b<_
\bn_
\ba_
\bm_
\be_
\b> Display the setting of an option, by name.
96 +_
\bc_
\bm_
\bd Execute the less cmd each time a new file is examined.
98 !_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd Execute the shell command with $SHELL.
99 |X
\bX_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd Pipe file between current pos & mark X
\bX to shell command.
100 v Edit the current file with $VISUAL or $EDITOR.
101 V Print version number of "less".
102 ---------------------------------------------------------------------------
104 O
\bOP
\bPT
\bTI
\bIO
\bON
\bNS
\bS
106 Most options may be changed either on the command line,
107 or from within less by using the - or -- command.
108 Options may be given in one of two forms: either a single
109 character preceded by a -, or a name preceeded by --.
112 Display help (from command line).
113 -a ........ --search-skip-screen
114 Forward search skips current screen.
115 -A ........ --SEARCH-SKIP-SCREEN
116 Forward search always skips target line.
117 -b [_
\bN] .... --buffers=[_
\bN]
119 -B ........ --auto-buffers
120 Don't automatically allocate buffers for pipes.
121 -c ........ --clear-screen
122 Repaint by clearing rather than scrolling.
125 -D [_
\bx_
\bn_
\b._
\bn] . --color=_
\bx_
\bn_
\b._
\bn
126 Set screen colors. (MS-DOS only)
127 -e -E .... --quit-at-eof --QUIT-AT-EOF
130 Force open non-regular files.
131 -F ........ --quit-if-one-screen
132 Quit if entire file fits on first screen.
133 -g ........ --hilite-search
134 Highlight only last match for searches.
135 -G ........ --HILITE-SEARCH
136 Don't highlight any matches for searches.
137 -h [_
\bN] .... --max-back-scroll=[_
\bN]
138 Backward scroll limit.
139 -i ........ --ignore-case
140 Ignore case in searches that do not contain uppercase.
141 -I ........ --IGNORE-CASE
142 Ignore case in all searches.
143 -j [_
\bN] .... --jump-target=[_
\bN]
144 Screen position of target lines.
145 -J ........ --status-column
146 Display a status column at left edge of screen.
147 -k [_
\bf_
\bi_
\bl_
\be] . --lesskey-file=[_
\bf_
\bi_
\bl_
\be]
150 Exit less in response to ctrl-C.
151 -L ........ --no-lessopen
152 Ignore the LESSOPEN environment variable.
153 -m -M .... --long-prompt --LONG-PROMPT
155 -n -N .... --line-numbers --LINE-NUMBERS
156 Don't use line numbers.
157 -o [_
\bf_
\bi_
\bl_
\be] . --log-file=[_
\bf_
\bi_
\bl_
\be]
158 Copy to log file (standard input only).
159 -O [_
\bf_
\bi_
\bl_
\be] . --LOG-FILE=[_
\bf_
\bi_
\bl_
\be]
160 Copy to log file (unconditionally overwrite).
161 -p [_
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn] --pattern=[_
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn]
162 Start at pattern (from command line).
163 -P [_
\bp_
\br_
\bo_
\bm_
\bp_
\bt] --prompt=[_
\bp_
\br_
\bo_
\bm_
\bp_
\bt]
165 -q -Q .... --quiet --QUIET --silent --SILENT
166 Quiet the terminal bell.
167 -r -R .... --raw-control-chars --RAW-CONTROL-CHARS
168 Output "raw" control characters.
169 -s ........ --squeeze-blank-lines
170 Squeeze multiple blank lines.
171 -S ........ --chop-long-lines
173 -t [_
\bt_
\ba_
\bg] .. --tag=[_
\bt_
\ba_
\bg]
175 -T [_
\bt_
\ba_
\bg_
\bs_
\bf_
\bi_
\bl_
\be] --tag-file=[_
\bt_
\ba_
\bg_
\bs_
\bf_
\bi_
\bl_
\be]
176 Use an alternate tags file.
177 -u -U .... --underline-special --UNDERLINE-SPECIAL
178 Change handling of backspaces.
179 -V ........ --version
180 Display the version number of "less".
181 -w ........ --hilite-unread
182 Highlight first new line after forward-screen.
183 -W ........ --HILITE-UNREAD
184 Highlight first new line after any forward movement.
185 -x [_
\bN[,...]] --tabs=[_
\bN[,...]]
187 -X ........ --no-init
188 Don't use termcap init/deinit strings.
190 Don't use termcap keypad init/deinit strings.
191 -y [_
\bN] .... --max-forw-scroll=[_
\bN]
192 Forward scroll limit.
193 -z [_
\bN] .... --window=[_
\bN]
195 -" [_
\bc[_
\bc]] . --quotes=[_
\bc[_
\bc]]
196 Set shell quote characters.
198 Don't display tildes after end of file.
199 -# [_
\bN] .... --shift=[_
\bN]
200 Horizontal scroll amount (0 = one half screen width)
202 Don't send keypad init/deinit sequence.
203 ........ --follow-name
204 The F command changes files if the input file is renamed.
207 ---------------------------------------------------------------------------
209 L
\bLI
\bIN
\bNE
\bE E
\bED
\bDI
\bIT
\bTI
\bIN
\bNG
\bG
211 These keys can be used to edit text being entered
212 on the "command line" at the bottom of the screen.
214 RightArrow ESC-l Move cursor right one character.
215 LeftArrow ESC-h Move cursor left one character.
216 CNTL-RightArrow ESC-RightArrow ESC-w Move cursor right one word.
217 CNTL-LeftArrow ESC-LeftArrow ESC-b Move cursor left one word.
218 HOME ESC-0 Move cursor to start of line.
219 END ESC-$ Move cursor to end of line.
220 BACKSPACE Delete char to left of cursor.
221 DELETE ESC-x Delete char under cursor.
222 CNTL-BACKSPACE ESC-BACKSPACE Delete word to left of cursor.
223 CNTL-DELETE ESC-DELETE ESC-X Delete word under cursor.
224 CNTL-U ESC (MS-DOS only) Delete entire line.
225 UpArrow ESC-k Retrieve previous command line.
226 DownArrow ESC-j Retrieve next command line.
227 TAB Complete filename & cycle.
228 SHIFT-TAB ESC-TAB Complete filename & reverse cycle.
229 CNTL-L Complete filename, list all.