To copy files of a certain type while maintaining directory structure: find $src -type f -name \*.py References https://stackoverflow.com/a/5927592