Re: File size events.

Holger Kiehl <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
On Mon, 13 Sep 2010, ratheesh k wrote:

> I have an application which keep on writing to one file /tmp/rat.txt.
> I would like to handle an event when the file size exceed 20kb . How
> to get this event ? Is there an event chain , i could register with ?
> is there any other easy mechanism ?
>
See inotify. This will not tell the size, just the event when someone
writes to the file. The size you can then get with stat() or fstat().

Holger
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.