Команда less
10.1.2.1 Команда less
Чтобы просмотреть файл с помощью less
команды, передайте имя файла в качестве аргумента:
sysadmin@localhost:~/Documents$ less words
Первая группа команд движения, на которой следует сосредоточиться, — это те, которые используются чаще всего. Чтобы сделать это еще более удобным, клавиши, идентичные по more
и, less
приведены ниже, чтобы продемонстрировать, как перемещаться more
и less
в то же время:
SUMMARY OF LESS COMMANDS
Commands marked with * may be preceded by a number, N.
Notes in parentheses indicate the behavior if N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
h H Display this help.
q :q Q :Q ZZ Exit.
------------------------------------------------------------------------
MOVING
e ^E j ^N CR * Forward one line (or N lines).
y ^Y k ^K ^P * Backward one line (or N lines).
f ^F ^V SPACE * Forward one window (or N lines).
b ^B ESC-v * Backward one window (or N lines).
z * Forward one window (and set window to N).
w * Backward one window (and set window to N).
ESC-SPACE * Forward one window, but don't stop at end-of-file.
d ^D * Forward one half-window (and set half-window to N).
u ^U * Backward one half-window (and set half-window to N).
ESC-) RightArrow * Left one half screen width (or N positions).
ESC-( LeftArrow * Right one half screen width (or N positions).
HELP -- Press RETURN for more, or q when done
The first group of movement commands to focus on are the ones that are most commonly used. To make it even more convenient, the keys that are identical in more
and less
are summarized below in order to demonstrate how to move in more
and less
at the same time:
Spacebar
Окно вперед
B
Окно назад
Enter
Линия вперед
Q
Выход
H
Помощь
При использовании less
в качестве пейджера самый простой способ прокрутить страницу вперед — нажать клавишу пробела .
Last updated