Directory watching

Mario Vukelic mario.vukelic at dantian.org
Tue Oct 16 16:37:42 UTC 2007


On Tue, 2007-10-16 at 09:40 -0400, Bart Silverstrim wrote:
> Is there a simple script or method under ubuntu to check every, say, 
> five minutes a particular directory and copy the contents to a second 
> directory and at the same time compare and notify me if the original 
> directory has the contents change?

As others noted, rdiff-backup and cron will likely help you. 

For the record though, inotify is a kernel feature to do exactly what
you described: it gives user processes a way to be notified whenever
files changes. Here is a blog posting about how to implement such a user
process in python:
http://thinkhole.org/wp/2006/02/23/watch-directory-changes-with-python/





More information about the ubuntu-users mailing list