Re: File size events.
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
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 -- To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html