Perform operation whenever dir is altered

Henry van der Beek ninhenzo64 at hotmail.com
Mon Jul 5 11:13:06 EDT 2004


Hello,

I am trying to synchronise two directories across a network. This is
no problem; I have been using rsync and it is working fine. However,
rsync is normally triggered by cron, ie. at a given time interval, and
I want it to be used whenever the contents of the directory is
altered. This is probably a case of synching just the particular file
that has been altered.

So, for every file in the directory, I want to trigger an rsync
command whenever that file is edited. This functionality needs to
cover any file type, and the directory needs to appear on both
machines as a normally mounted directory. (We are running redhat9.0 on
both machines

Does anyone know of a way of customising a directory in this way, or
does anyone have any ideas of areas where I should be looking to
achieve this kind of thing.

Thanks a lot,
Henry



More information about the Python-list mailing list