problem with --delete if I sync part of a dir

tim.conway at tim.conway at
Wed Jan 16 04:53:01 EST 2002

check this out:  "echo rsync -azv --stats -e ssh --delete i_* user at host:/dir/".
it expands to "sync -azv --stats -e ssh --delete <all existing i_* files> user at host:/dir/"  It won't mention the ones that are gone.
rsync the directory/. including i_* and excluding * (the order matters).
rsync -azv --stats -e ssh --delete ./. --include=i_* --exclude=* 
user at host:/dir/

Tim Conway
tim.conway at
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
".\n" '
"There are some who call me.... Tim?"

Palmans Pepijn <pepijn at>
Sent by: rsync-admin at
01/15/2002 02:01 AM

        To:     rsync at
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        problem with --delete if I sync part of a dir


I'm using rsync for a couple of things but I am at a point where I could 
not find a solution for my problem.

this is what I want to do:

rsync only the files i_* from a directory from machine A to machine Bi and 
delete them from machine B if they on longer exist on machine A.

so I use the command:

rsync -azv --stats -e ssh --delete i_* user at host:/dir/

When using this command the files starting with i_ will get placed on the 
remote server or even updated when I change them but if I delete a file on 
machine A it will not be deleted on machine B.
This is only a problem if I use i_* as my source.  If i sync whole 
directories (recursive or not) it's no problem at all to get files deleted 
on the other end.

Is there anything to do about this ?


Pepijn Palmans

Kangaroot Linux Solutions
Grote Steenweg 91
2600 Berchem, Antwerpen, Belgium
Email: pepijn at

More information about the rsync mailing list