Problem with file exclusion pattern

H agents at
Tue May 3 14:35:29 UTC 2022

On May 3, 2022 2:16:58 AM EDT, Wayne Davison <wayne at> wrote:
>On Sat, Apr 30, 2022 at 3:33 PM H wrote:
>> rsync -vHrltDium -c --chmod=Du+rwx,go-rwx,Fu+rw,go-rw --no-perms
>> --include='*' --include='*/' --exclude='*.~lock*' --exclude='*' -e
>"ssh -y
>> -p 22" ~/test/ someone at
>See the latest manpage's filter-rules section
><> an easy way
>debug where filtering is going wrong. Doing that would show you that
>everything in your transfer is being matched by the first include
>you used.  This is because (as the 2nd paragraph in the filter section
>explains) the first matching pattern is acted upon. A good general rule
>thumb is to move more specific rules prior to more general rules. 
>in your command above, you only need the one lock-excluding option
>the default is to include anything that doesn't match any of your
>and not any of the other include/exclude options.

Thank you, I will look at the reference. However, would I not still need --include='*/'  since I want it to recourse into all subdirectories?

More information about the rsync mailing list