You may know
tail -f, but here is a tool specifically designed to navigate
through log files:
Viewing a changing log file
tail -f logfile will wait for output of a log file, and your favorite editor
may warn you about a file change.
lnav logfile will handle log file change.
Most Linux distribution use
to handle log files rotation. The goal is to rotate logs when they are too big,
or too old. The shortcoming is that it creates multiples log files, in various
formats, with funny names.
lnav -r /var/log/syslog will open
/var/log/syslog, and all rotated files!
Multiple log files
lnav will display multiple log files in the same view (log entries sorted by time).
lnav -r /var/log/syslog /var/log/auth.log
A complete list of hotkeys is available here, but here are some I use everyday:
|Home or g||Top of the view|
|End or G||Bottom of the view|
|PgDn or space||Down a page|
|PgUp or b||Up a page|
|/||Search for lines matching a regular expression|