less +F for viewing logs
Content of 1-pager:
When you are monitoring a single file, consider using less +F over tail -f. At first they do the same thing, but less +F allows you to switch from watch mode into a navigation mode with ctrl-c (and
back to watching with F).
In navigation mode you can use the usual less commands, such as:
- Search “foo” with /foo
- Jump to the next occurence with n or the previous with N
- Go up with j or down with k
- Create marks with m
If you use rotating logs, check out the –follow-name option.
When you are monitoring multiple files, you’ll probably prefer tail -f because it will show you changes in all monitored files whereas less +F will only show you the first file (unless you use ctrl-c, :n, F to switch between buffers).
Also stick with tail -f if you want to insert empty lines as a visual separation.