Thursday, August 30, 2012

Linux command 'Less' short list of commands

Linux command 'Less' short commands:
source, source2.

h - show help

f - scroll page forward
b - scroll page backward
g or "<" - go to begin of the file
G or ">" - go to end of the file

/PATERN - search
n - search for next appearance
N - search for previous appearance


tail mode:

Press Shift-F. This will take you to the end of the file, and continuously display new contents. In other words, it behaves just like tail -f.
To start less in the tail mode, execute:
$ less +F /var/log/messages
To scroll backwards, you must first exit the follow mode by pressing Control-c.

reload latest lines from file, one time 'tail mode':
Shift+G - got to the end of file
Shift + ">" - load till the end of file, press few times if you expect changes to file.

No comments:

Post a Comment