469,927 Members | 1,763 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Perform operation whenever dir is altered

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
Jul 18 '05 #1
1 1190
On 5 Jul 2004 08:13:06 -0700, Henry van der Beek <ni********@hotmail.com> wrote:
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.


if both ends are Linux, you could use dnotify. If both ends are some
flavour of Unix, you could use famd.

--
John Lenton (jl*****@gmail.com) -- Random fortune:
bash: fortune: command not found

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Charles Law | last post: by
2 posts views Thread by Joe Gonzalez | last post: by
8 posts views Thread by silentlights | last post: by
1 post views Thread by =?Utf-8?B?U3VzYW4=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.