Ubuntu – Paginate with tail -f command

command linetail

I am trying to tail file with pagination:

tail -f foo.txt | more

This works fine until file gets, lets say, 200 lines injected, when this happens nature of tail command is to go to end of file, at that point I lose track of trailing the log.

Is there a way to avoid this?

Best Answer

My solution is this:

less some-file.log

Then, in less I hit Shift+F. This causes less to update with the file. To scroll back, just hit Ctrl+C.