linux less command code example
Example 1: less in linux
Command Action
Down arrow, Enter, e, or j Move forward one line.
Up arrow,y or k Move backward one line.
Space bar or f Move Forward one page.
b Move Backward one page.
/pattern Search forward for matching patterns.
?pattern Search backward for matching patterns.
n Repeat previous search.
N Repeat previous search in reverse direction.
g Go to the first line in the file.
Ng Go to the N-th line in the file.
G Go to the last line in the file.
p Go to the beginning of fthe ile.
Np Go to N percent into file.
h Display help.
q Exit less
Example 2: less in linux
less [OPTIONS] filename