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