1

I have noticed that rsync have

    --exclude=PATTERN       exclude files matching PATTERN
    --exclude-from=FILE     read exclude patterns from FILE

switches, but couldn't I just exclude files from the filter file what I use anyway?

cat << EOF >> $FILTER
+ /home
- /*.iso
- /*.mp3
- /*
EOF

Doesn't seems to work.

4

"*" does not match "/" so unless you have mp3 and iso files in the root of the source then that won't have any effect. Use "**" to let the pattern also match slashes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.