trailing a growing file
Wed Dec 31 02:58:07 CET 2003
On Tue, Dec 30, 2003 at 06:47:18PM +0100, Raphael Bellec wrote:
> I would like to read logs file as soon as data is written to them. I
> actually have found 2 ways for this purpose:
> - With Io module, pooling (each time I get an eof, I wait a small
> time then try again).
> - With ports, spawning "tail -f -n 1 /path/to/file", which is the
> method I currently use.
Just a note to help in the comparison of these two options: (GNU) tail
(basically) works by checking every second (or whatever
--sleep-interval is set to) if the file's size has changed.
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the erlang-questions