watching directories recursively

From: Digna González <>
Date: Thu, 25 Sep 2008 20:16:47 +0200


    I am working in a proyect in which I need to watch directories
recursively. As I know that isn't still supported, I tried to do a little
hack (but it doesn't work):

*I have added to my incron table a line that runs the script
everytime a directory is created inside the directory I want to monitor:

/dir_to_watch IN_CREATE
/dir_to_watch IN_ONLYDIR IN_CREATE $@/$#

That script,, is intended to add to my incron table the lines to
start watching that new subdirectory:

echo $1 IN_CREATE>>/var/spool/incron/root
echo $1 'IN_ONLYDIR IN_CREATE $@/$#'>>/var/spool/incron/root

The problem is it doesn't write anything to my incron table. If I try to
write it to another file, it does work, but not with the "root" file. Maybe
because it is in use?

Is there any way I could make this work?


Received on Thu Sep 25 2008 - 20:17:32 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST