On Tue 26 Jul 2005, jdd sur free wrote:>
> testing rsync, I use the following line:
>
> rsync --rsync-path=/usr/bin/rsync -e ssh --delete -valptz
> --safe-links * jdd@mecum:~/temp/test
>
> between a mandrake 10.1 and a suse 9.0
Why use "*" and not "." ?
> a create a dummy file in start dir, run rsync, file is
> transfered.
> I delete the file in start dir, run rsync, the file is _not_
> delete on the other side.
The --delete option only deletes stuff that doesn't exist in directories
being transferred; the manpage says:
This tells rsync to delete extraneous files from the receiving side
(ones that aren't on the sending side), but only for the directories
that are being syn- chronized. You must have asked rsync to send
the whole directory (e.g. "dir" or "dir/") without
using a
wildcard for the directory's contents (e.g. "dir/*") since
the
wildcard is expanded by the shell and rsync thus gets a request to
transfer individual files, not the files' parent directory.
That says it all!
Paul Slootman