Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Use less instead of more. – choroba Nov 2 '12 at 13:29
Decided to double down? – Snesticle Nov 2 '12 at 13:35
@Snesticle Yes I'm desperate, is it against the rules? – Dolphin Nov 2 '12 at 13:40
Are you reading from a pipe? If so your option "-f" gets ignored. – Snesticle Nov 2 '12 at 13:56
@Dolphin – Snesticle Nov 2 '12 at 14:36
up vote 4 down vote accepted

Use less with +F instead of tail/more:

less +F foo.txt

When you want to take a look around, hit Ctrl-c. To restart following (tailing), hit F.

share|improve this answer
Not exactly what I had in mind but works nicely. Thank you +1 from me and if nothing closer to target accept from me. – Dolphin Nov 2 '12 at 14:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .