delete files

Francis.Montagnac at Francis.Montagnac at
Sat Nov 19 07:04:25 MST 2011

On Tue, 15 Nov 2011 23:49:18 +0100 "Brian K. White" wrote:

> nj2:/opt/x # rsync -avvvn --force --delete --include=/tmp 
> --include=floof/ --exclude='*' /tmp/. co4::root/tmp/.

Detail: /tmp being the "root of the transfer", "--include=/tmp" is
wrong because it refers then to /tmp/tmp.

I thing you can do what you want by using a risk filter rule instead
of an include one.


  rsync -avvvn --force --delete \
      --filter='R /floof/***' --exclude='*' \
      /tmp/. co4::root/tmp/.

This should remove recursively co4::root/tmp/floof without browsing
integrally /tmp nor co4::root/tmp.


More information about the rsync mailing list