Re: A File has Changed or the Source of Tail
Re: A File has Changed or the Source of Tail
- Subject: Re: A File has Changed or the Source of Tail
- From: Sherm Pendley <email@hidden>
- Date: Thu, 3 Oct 2002 22:00:40 -0400
On Thursday, October 3, 2002, at 07:28 AM, Gerriet M. Denkmann wrote:
Well, tail -f does it, so there really must be a way to do it. Maybe
some kind soul can send me the source of tail?
I think that what tail -f does, is periodically stat() the file,
comparing its size each time with the size returned the previous time.
If the file has grown, it prints the last (newsize - oldsize) bytes of
the file to stdout.
sherm--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.