Recursive rsync with only specific file types

I had never worked out how to use rsync to create intermediate directories when syncing over certain filetypes (in my case nuke’s .nk files). So the other day I googled around and found exactly what i was looking for.

A great way to sync directories and certain filetypes recursively:
example

rsync -pavr –progress –include “+ */” -include=”*.nk” -exclude=”- *” /my/source/directory /my/destination/

And all the thanks needs to go to Mike:
http://mike-is-a-geek.blogspot.com/2011/04/recursive-rsync-only-specific-file.html

2 thoughts on “Recursive rsync with only specific file types”

  1. Wow, slinging those command lines like a real cowboy! You may want to change those n-dashes in the command line to minus (-) sings for others to copy/paste.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.