in reply to Log file tailing
My approach is as follows (pseudocode):
Hope this helpswhile (1) { stat the file if size of file changed since last time { open file seek to previous EOF print file contents until EOF save EOF position for next time close the file } sleep for x seconds }
--
I'm Not Just Another Perl Hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Log file tailing
by matija (Priest) on May 18, 2004 at 05:28 UTC |