--exclude and --delete

Wayne Davison
Wed, 25 Feb 2004 07:31:05 -0000

On Wed, Feb 25, 2004 at 02:32:47PM +1100, andrew wrote:
> rsync -av --exclude "/user/profile/" --delete /home/user
user@receiver:/home
>
> This works as I expect, sender:/home/user/profile/ is not copied, except
> that receiver:/home/user/profile/ is deleted.

I can't duplicate this.  If I make /home/user/profile on the receiver a
file (instead of a directory) it will vanish (because the trailing slash
on the exclude tells rsync only to exclude a directory by that name),
but if it's a directory, it remains unaffected.

..wayne..