I'm using tail -f
to print the content of a continuously changing file. When the file is truncated it shows up like this:
blah (old)..
blah more (old)..
tail: file.out: file truncated
blah..
blah more..
This can get messy when I change the file too often so that it becomes hard to see where the file begins/ends. Is there a way to somehow clear
the screen when the file is truncated so that it would show up like this?
tail: file.out: file truncated
blah..
blah more..