- open a file:
less file.log - type capital
G: go to end of file - type small
g: go to beginning of file - type
?: enter reverse search - type
/: enter forward search - type
n: skips to next search match - type
N: skips back to last search match
e.g.
g
/
will go to beginning of file and enter a forward search
g
/error
<enter>
will go to beginning of file and find the first instance of 'error' and take you there
hit n to skip to the next search match
you can also do:
G
?error
<enter>
to go to end of file and search backwards
And if you forget a command,
hfor help