in reply to Re: Reading only new lines from a file
in thread Reading only new lines from a file

That's a mildly annoying possibility (just by virtue of opening the possibility that an attempt to detect rotation could be foiled by, say, a slashdotting following a slow day), although I do see the advantage in doing it that way. Thanks for bringing it up.
  • Comment on Re^2: Reading only new lines from a file

Replies are listed 'Best First'.
Re^3: Reading only new lines from a file
by bruceb3 (Pilgrim) on Sep 01, 2007 at 01:47 UTC
    To detect a log file rotation you could keep track of the inode number of logfile.2 but it would be necessary to examine the inode number more frequently that the log rotation software runs.