Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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'm trying to follow a log file and want to extract a field from it. I've tried

tail foo.txt | cut -f 5

and this works, but if I try to follow changes via

tail -f foo.txt | cut -f 5

nothing is printed, even when there are changes to the file.

Any suggestions or comments about why this is happening?

share|improve this question
up vote 1 down vote accepted

BASH FAQ entry #9: "What is buffering? Or, why does my command line produce no output: tail -f logfile | grep 'foo bar' | awk ..."

share|improve this answer
Is there a way to force unbuffering with cut? Incidentally, I switched to using awk, and the buffering problem went away. – jonderry Apr 22 '11 at 0:34
unbuffer will force unbuffering in almost any program. – Ignacio Vazquez-Abrams Apr 22 '11 at 0:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.