1 2 SUMMARY OF COMMANDS 3 4 Commands marked with * may be preceded by a number, _N. 5 Notes in parentheses indicate the behavior if _N is given. 6 7 h H Display this help. 8 q :q :Q ZZ Exit. 9 10 e ^E j ^N CR * Forward one line (or _N lines). 11 y ^Y k ^K ^P * Backward one line (or _N lines). 12 f ^F ^V SPACE * Forward one window (or _N lines). 13 b ^B ESC-v * Backward one window (or _N lines). 14 z * Forward one window (and set window to _N). 15 w * Backward one window (and set window to _N). 16 d ^D * Forward one half-window (and set half-window to _N). 17 u ^U * Backward one half-window (and set half-window to _N). 18 F Forward forever; like "tail -f". 19 r ^R ^L Repaint screen. 20 R Repaint screen, discarding buffered input. 21 --------------------------------------------------- 22 Default "window" is the screen height. 23 Default "half-window" is half of the screen height. 24 --------------------------------------------------- 25 /_p_a_t_t_e_r_n * Search forward for (_N-th) matching line. 26 ?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line. 27 n * Repeat previous search (for _N-th occurrence). 28 N * Repeat previous search in reverse direction. 29 ESC-n * Repeat previous search, spanning files. 30 ESC-N * Repeat previous search, reverse dir. & spanning files. 31 ESC-u Undo (toggle) search highlighting. 32 --------------------------------------------------- 33 Search patterns may be modified by one or more of: 34 ! search for NON-matching lines. 35 * search multiple files. 36 @ start search at first file (for /) or last file (for ?). 37 --------------------------------------------------- 38 g < ESC-< * Go to first line in file (or line _N). 39 G > ESC-> * Go to last line in file (or line _N). 40 p % * Go to beginning of file (or _N percent into file). 41 { * Go to the } matching the (_N-th) { in the top line. 42 } * Go to the { matching the (_N-th) } in the bottom line. 43 ( * Go to the ) matching the (_N-th) ( in the top line. 44 ) * Go to the ( matching the (_N-th) ) in the bottom line. 45 [ * Go to the ] matching the (_N-th) [ in the top line. 46 ] * Go to the [ matching the (_N-th) ] in the bottom line. 47 ESC-^F _<_c_1_> _<_c_2_> * Go to the _c_1 matching the (_N-th) _c_2 in the top line 48 ESC-^B _<_c_1_> _<_c_2_> * Go to the _c_2 matching the (_N-th) _c_1 in the bottom line. 49 m_<_l_e_t_t_e_r_> Mark the current position with <letter>. 50 '_<_l_e_t_t_e_r_> Go to a previously marked position. 51 '' Go to the previous position. 52 ^X^X Same as '. 53 54 :e [_f_i_l_e] Examine a new file. 55 ^X^V Same as :e. 56 :n * Examine the (_N-th) next file from the command line. 57 :p * Examine the (_N-th) previous file from the command line. 58 :x * Examine the first (or _N-th) file from the command line. 59 = ^G :f Print current file name. 60 V Print version number of "less". 61 62 -_<_f_l_a_g_> Toggle a command line flag [see FLAGS below]. 63 __<_f_l_a_g_> Display the setting of a command line flag. 64 +_c_m_d Execute the less cmd each time a new file is examined. 65 66 !_c_o_m_m_a_n_d Passes the command to $SHELL to be executed. 67 |XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command. 68 v Edit the current file with $VISUAL or $EDITOR. 69 --------------------------------------------------- 70 FLAGS 71 72 Most flags may be changed either on the command line, 73 or from within less by using the - command. 74 75 -? Display help (from command line). 76 -a Forward search skips current screen. 77 -b [_N] Number of buffers. 78 -B Don't automatically allocate buffers for pipes. 79 -c -C Repaint by scrolling/clearing. 80 -d Dumb terminal. 81 -e -E Quit at end of file. 82 -f Force open non-regular files. 83 -g Don't highlight matches for previous search pattern. 84 -G Highlight ALL matches for previous search pattern. 85 -h [_N] Backward scroll limit. 86 -i Ignore case in searches. 87 -I Ignore case in searches and in search patterns. 88 -j [_N] Screen position of target lines. 89 -k [_f_i_l_e] Use a lesskey file. 90 -m -M Set prompt style. 91 -n -N Use line numbers. 92 -o [_f_i_l_e] Log file. 93 -O [_f_i_l_e] Log file (unconditionally overwrite). 94 -p [_p_a_t_t_e_r_n] Start at pattern (from command line). 95 -P [_p_r_o_m_p_t] Define new prompt. 96 -q -Q Quiet the terminal bell. 97 -r Output "raw" control characters. 98 -s Squeeze multiple blank lines. 99 -S Chop long lines. 100 -t [_t_a_g] Find a tag. 101 -T [_t_a_g_s_f_i_l_e] Use an alternate tags file. 102 -u -U Change handling of backspaces. 103 -V Display the version number of "less". 104 -w Display ~ for lines after end-of-file. 105 -x [_N] Set tab stops. 106 -X Don't use termcap init/deinit strings. 107 -y [_N] Forward scroll limit. 108 -z [_N] Set size of window. 109 110