trigger command on successful upload?

Eberhard Moenkeberg emoenke at
Tue Jun 15 14:12:50 GMT 2004


On Tue, 15 Jun 2004 PEnright at wrote:

> I think this would be a useful feature. I can think of how I could use a
> feature like that. If you are successful let me know.

rsync has wonderful precise return codes. "man rsync" will tell.
You can already do somehing like this:

  rsync ${OPTS} ${SRC} ${DST} >>${PROT} 2>&1
  if test "${RC}" = "0" -o "${RC}" = "23"; then
    echo "normal termination."
  elif test "${RC}" = "10"; then
    echo "no connection."
  elif test "${RC}" = "24"; then
    echo "OK, but some file(s) vanished."

and distinguish many more cases.

Cheers -e
Eberhard Moenkeberg (emoenke at, em at

More information about the rsync mailing list