tail -f

Guy Harris guy at auspex.UUCP
Fri Dec 9 04:17:49 AEST 1988


>Can someone please tell me how 'tail -f' works?.  Obviously, it does not
>do a busy loop while doing a stat on the file.  I know that it has got
>to be blocked, waiting for the length to change, but how does it get
>notified of a change?  Thanks in advance for any responses.

Oh, dear, he used the "O" word.  One should be careful using that
word....

In fact, it *does* do a busy loop while doing "read"s (not "stat"s) of
the file; it just sleeps 1 second between attempts to "read", so it
doesn't burn quite so much CPU doing it.  If there were some way for it
to block waiting for the length to change, it would; however, there
isn't any such way. 



More information about the Comp.unix.questions mailing list