rsync server and --delete option

Wayne Davison wayned at samba.org
Fri Jul 4 03:11:33 EST 2003


On Thu, Jul 03, 2003 at 03:23:08PM +0100, Xavier wrote:
> rsync -nPru --delete /temp/* serverA::wwwroot/temp/
> 
> the delete option is not working

That's because you used a wildcard.  The --delete option only affects
directories, and you send a list of files.  The above is equivalent to
the following because the shell expands the wildcard:

rsync -nPru --delete /temp/foo /temp/bar /temp/baz serverA::wwwroot/temp/

So, certainly no files in wwwroot/temp are going to be deleted.  Use
this instead:

rsync -nPru --delete /temp/ serverA::wwwroot/temp/

..wayne..



More information about the rsync mailing list