On Thu, 2009-10-08 at 03:17 +0400, rs...@xbit.ru wrote: > Thank you, it works. > > But if I want to delete only certain files or dirs from remote side? > > example: > > $ tree dirA/ > dirA/ > |-- dir2 > | `-- file3 > |-- file1 > `-- file2 > > $ tree dirB/ > dirB/ > |-- dir2 > | `-- file3 > |-- file1 > |-- file2 > `-- protect1 > > $ rsync -av --dry-run --delete-excluded -f ". filter" dirA/ dirB/ > building file list ... done > ./ > > sent 74 bytes received 26 bytes 200.00 bytes/sec > total size is 0 speedup is 0.00 > > $ cat filter > H * > P * > R dir2* > - dir2* > > I want to delete "dirB/dir2/" only. Not "dirB/protect1" or any other > file or dir in "dirB/". > What sort of filter I must create?
"rm -r dirB/dir2"? I don't think I understand your point here. > Where can I find example filter files for complicated cases? There are a few examples scattered throughout the man page, but I don't know of any really good tutorial. -- Matt -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html