News for hackers. Stuff that matters.
Re:Files Are Hard by thristian on Sunday December 13, 2015 @06:19AM (#10726064)
GNU tail lets you say "--follow=descriptor" to follow the content of the file no matter how it gets renamed, or "--follow=name" to re-open the same filename when a different file gets renamed onto it.
Re:Files Are Hard by daurnimator on Sunday December 13, 2015 @07:06AM (#10726138)
That's the difference between 'tail -f' and 'tail -F' and is implemented in every tail I know of.
Re:Files Are Hard by mh- on Sunday December 13, 2015 @04:24PM (#10728012)
indeed. `tail -qF` has been muscle memory for me for as long as I can remember.

if you have long lived sessions tail'ing logs that get rotated (or truncated), forgetting -F is a good way to eventually end up confused, ctrl-c'ing, and finally cursing.