Question about deleting a file from the server via Rsync

Matt McCutchen hashproduct+rsync at
Tue Nov 28 04:38:44 GMT 2006

On 11/27/06, Ben Anderson <ben at> wrote:
>  I'm using cwrsync (with rsync 2.6.9) via ssh

Careful: when we say "rsync via ssh", we usually mean that the client
rsync invokes a second instance of rsync on the server as the ssh
remote command.  Your setup counts as talking directly to an rsync
daemon; rsync doesn't care that the connection goes through ssh port

>  I'm trying to delete C:\ba\myFile.ico from the server by using
> --delete-excluded and
> --exclude="/cygdrive/C/ba/myFile.ico".
>  Command to run: "c:\cwRsync\bin\rsync.exe"  -vvv -R -r --delete-excluded
> --exclude="/cygdrive/C/ba/myFile.ico"
> /cygdrive/C/ba/myFile.ico
> rsync://myUser@localhost:9119/modName/BensComputer/

The trouble is that the receiving rsync only deletes files from a
directory if the entire directory is part of the transfer.  So you
should specify /cygdrive/C/ba , not /cygdrive/C/ba/myFile.ico , as the

Keep in mind that you must continue to specify the --exclude rule on
future runs if you don't want rsync to copy myFile.ico to the server


More information about the rsync mailing list