Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Perform operation whenever dir is altered

Reply
Thread Tools

Perform operation whenever dir is altered

 
 
Henry van der Beek
Guest
Posts: n/a
 
      07-05-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
 
Reply With Quote
 
 
 
 
John Lenton
Guest
Posts: n/a
 
      07-05-2004
On 5 Jul 2004 08:13:06 -0700, Henry van der Beek <(E-Mail Removed)> 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 ((E-Mail Removed)) -- Random fortune:
bash: fortune: command not found

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot perform desired operation jiten C Programming 4 04-17-2010 08:30 AM
The Application attempted to perform an operation not allowed Rishi ASP .Net 1 11-11-2009 09:35 AM
Unable to open the Web...You are not authorized to perform the current operation ssg31415926 ASP .Net 3 08-03-2007 02:10 PM
Cannot perform post data operation in winhttp nirav vasa Wireless Networking 0 04-26-2007 01:29 PM
RE: Perform operation whenever dir is altered Tim Golden Python 0 07-05-2004 03:46 PM



Advertisments