Perform operation whenever dir is altered
jlenton at gmail.com
Mon Jul 5 20:26:41 CEST 2004
On 5 Jul 2004 08:13:06 -0700, Henry van der Beek <ninhenzo64 at hotmail.com> wrote:
> 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.
if both ends are Linux, you could use dnotify. If both ends are some
flavour of Unix, you could use famd.
John Lenton (jlenton at gmail.com) -- Random fortune:
bash: fortune: command not found
More information about the Python-list