Raise an error if file exists on destination

Rémi Delmas remi.delmas at gmail.com
Thu Dec 15 02:12:27 MST 2011


I am trying to use rsync to copy files from several origins to a single
destination. I would like to detect when a file gets overwritten because it
is present with the same relative path/name in several origins:



Destination after copy:
foo/bar.txt -> is that from Origin1 or origin2?

I know I can use the `--ignore-existing` option to make sure only the first
version is kept, or I could remove this option to keep the last one. But I
would like to be notified when this happens, either with a warning or an

Is that possible with rsync?

Thanks a lot and best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20111215/d465119f/attachment.html>

More information about the rsync mailing list