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

Show parent comments

19

u/qwertyboy Mar 30 '15

But it will still not let you scroll above the original tail.

0

u/socium Mar 30 '15

Depends. I fired up Lubuntu 14.04 recently and with the default terminal provided there I remember doing so without a hassle.

7

u/DavidA2001 Mar 30 '15

You can't scroll back in the log file more then the 10? Lines of context tail gives you. You can of course scroll back in your tmux history to see previous commands but you can't look further back in the log file then 10 lines before the moment you invoked tail.

1

u/renrutal Mar 31 '15
tail -Fn1000 server1.out -Fn500 server2.log

When you need only the last 1000 or 500 lines of two different files.

1

u/DavidA2001 Mar 31 '15

Tail wins if you want to open 2 files. The way less handles multiple files is sequential: you can't see them both at the same time.

I just don't think you can usually predict when you'll need more context. And when you find you need more context in this one particular file, you should probably switch to less.