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

6

u/tsdgeos Mar 30 '15

Or you can use a terminal emulator application that supports searching and infinite scrollback (konsole does, no idea if others do)

1

u/DavidA2001 Mar 30 '15

Or use screen or tmux from whatever console you want, but you still can't search or view further back into the file then 10 lines before when you invoked tail. You have to C, and open the file in less to see the file from the beginning. That said I still use tail -f mostly and kill it and open less if I need more context.

If I'm running something in a verbose or debug mode specifically to trouble shoot something, I go to less immediately for all of its features.

4

u/port53 Mar 30 '15

but you still can't search or view further back into the file then 10 lines before when you invoked tail.

tail -n+0 -f <file> solves that.