start a batch after rsync

Jan-Benedict Glaw jbglaw at
Fri Jan 9 10:59:36 GMT 2004

On Fri, 2004-01-09 11:38:20 +0100, Andreas Moroder <amoroder at>
wrote in message <btm0g5$l61$1 at>:
> I would like to replicate one file from one machine to a second one with 
>  rsync. After the file is copied ( rsync in read mode ), if the file 
> has changed i must start a small batch, if it has not change I must do 
> nothing.

Ask for very verbose output. Then, you'll either get the filename, or
you'll get "filename is uptodate". So, if you can't find " is uptodate"
in rsync's output, start your script:

$ rsync --many-options-here 2>&1 | grep ' is uptodate$' > /dev/null 2>&1 || ./

Of yourse, fi

   Jan-Benedict Glaw       jbglaw at    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the rsync mailing list