Skip to content

rsync

see also my mess over at ssh, scp, rsync

only include specific file (pattern)

I only want to sync files which match a specific name and exclude everything else.

  • Important: the include/exclude lists are case sensitive.

In this case, I want to sync all files with foo and bar in the name, so it'd match the files foobar and Superduper.jpg

rsync -avP --include={*foo*,*Super*} --include='*/' --exclude='*' rsync://example.com/files/ ~/Downloads