[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

tailing rotating log files



Hi, I generallly keep some of my log files open ni a terminal via tail -f.
For example:
tail -f /var/log/messages

However, tail does not "move" to the new "messages" (or whatever) log file
when they are rotated by savelog.  So for example, I will still see the last
lines from the old messages file and I will have to terminate tail and run
it again to force it to move to the new messages file.

If the file is moved and a new one put in its place, I'd like to start
reading the new file.  I don't see any way to do this with tail (I checked
in the man/info pages).  Is there a program which will do this?

Actually come to think of it!  Maybe I could just use:
watch tail -n 20 /var/log/messages

:)  Just thought of it.  That should work I think, but I'm still curious as
to how else one might do it.

TIA.



Reply to: