I know that tail -f /var/log/messages will be keep updating on screen as the contents of file gets updated. But when I tried the same thing with a debug file system's file it is not working , any idea?

I tried ftrace and tried this: tail -f trace it is not working ?

Note, I can see the contents actually getting by using watch -n1 cat trace.

  • 1
    The thing is, tail -f only works with files which are appended to. Maybe your debug file is not appended but overwritten with every run? – Sami Laine Dec 30 '13 at 12:23

tail -f works on the file descriptor, not on the file name. If the file is being overwritten, or deleted and re-created, tail -f won't be able to track that.

In gnu tail there's the option --follow=name or -F which will track the file name rather than the inode/file descriptor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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