Perform operation whenever dir is altered

Discussion in 'Python' started by Henry van der Beek, Jul 5, 2004.

  1. 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
     
    Henry van der Beek, Jul 5, 2004
    #1
    1. Advertising

  2. Henry van der Beek

    John Lenton Guest

    On 5 Jul 2004 08:13:06 -0700, Henry van der Beek <> 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 () -- Random fortune:
    bash: fortune: command not found
     
    John Lenton, Jul 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Golden
    Replies:
    0
    Views:
    407
    Tim Golden
    Jul 5, 2004
  2. ssg31415926
    Replies:
    3
    Views:
    1,899
    ssg31415926
    Aug 3, 2007
  3. Rishi
    Replies:
    1
    Views:
    3,721
    Alexey Smirnov
    Nov 11, 2009
  4. jiten

    cannot perform desired operation

    jiten, Apr 16, 2010, in forum: C Programming
    Replies:
    4
    Views:
    374
    spinoza1111
    Apr 17, 2010
  5. Arturo
    Replies:
    0
    Views:
    180
    Arturo
    Feb 6, 2004
Loading...

Share This Page