in reply to How to detect if file is in use?
A lot depends on what is producing the log file. Is using file test operators or stat() a possibility? If the last modification date on a log file is over a threshold value, can you assume the process has stopped writing to it?
A trick I used to use with Oracle log files was to rename the file while it was still open. You could then work on it.
Good luck!
Kathy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to detect if file is in use?
by blazar (Canon) on Mar 17, 2005 at 15:51 UTC | |
by gellyfish (Monsignor) on Mar 17, 2005 at 15:57 UTC |