But then you've transformed the problem into something completely different, but not necessarily more easily solved. The new question becomes how long must you wait to ENSURE that log file is not being appended to? One second may not be long enough, nor 10, 100, 1000 etc.
-Scott | [reply] |
Ignoring for a moment that some logfiles can remain open for several days without seeing a new entry -- what's the point in making a copy? Just do -s $file or (stat($file))[7] at t0 and t1..tn and save some disk space.
It won't tell you if the file is open, but it will tell you if it's changing while you're looking at it. | [reply] [d/l] [select] |