Protect File: how to monitor directory effectively?
Hi all,
I have difficulty in Real-time File Protection under Linux. I consult some documents aout "FAM" and "inotify", which are used for Watching File Changing.But they can only get File Changing Event in a directory, can not get it in the subdirectory--I mean I have to monitor each subdirectory myself, and stop monitoring them if they have been deleted. Um,I save all directories in a "tree" Data Structure, e.g. if a dirctory P that has subdirectories C1,C2 has been deleted, I stop monitoring P, C1 and C2, then if they three have been restored successfully, I start monitoring them again.It does work if file changing is not frequent. The problem is that it's not stable if files change frequently, I don't know how to solve it, but I think it may be related to stopping and starting monitoring directories continually. Will you please make a suggestion for me? |
um, I'm puzzled..
|
All times are GMT -5. The time now is 05:06 AM. |