r/linux • • Mar 30 '15

Stop using tail -f (mostly)

http://www.brianstorti.com/stop-using-tail/
830 Upvotes

219 comments sorted by

View all comments

28

u/twinkwithnoname Mar 30 '15

I think my project, the Logfile Navigator (http://lnav.org), is an even better alternative to less or tail. In addition to what they do, it does syntax coloring, filtering, loads compressed files, interleaves log messages from multiple files, and more. I would encourage folks to check it out.

2

u/gnualmafuerte Mar 30 '15

Your project is nice, but it's not a replacement for tail -f. Neither is less.

The problem with all of those ideas is simple: Not good for large log files. I rotate my apache logs daily, but I have a shitload of traffic. I hate seeing "calculating line numbers" on less or any similar crap. Tail is fast and lightweight, and works equally well on a 10kb file as it does on a 20Gb monstrosity.

1

u/trygveaa Mar 31 '15

Not good for large log files. I rotate my apache logs daily, but I have a shitload of traffic. I hate seeing "calculating line numbers" on less or any similar crap.

You can use -n to less to disable line numbers, and it will be as fast as tail (not saying you should use less, just that you could).