Hacker News new | ask | show | jobs
by metatation 5040 days ago
I prefer tailing logs with less (rather than tail) so that the file is searchable (using '/ searchterm'). Then if you start following the file (using 'F'), your search term will be highlighted in the followed file.
3 comments

+1. You can even

    alias ltail="less -Ri +F"
so you don't have to remember to hit 'F'.

(I generally add -Ri: -R to pass through unprintable characters to avoid borking coloured output; -i so searches are case-insensitive.)

This. I've been evangelising using less over tail for a couple of years now. Search (& corresponding highlighting as new lines appear) and the ability to pause/resume is awesome.
Thank you for making me aware of this! This is very handy and indeed more comfortable than pure tail.