Rsync – exclude specific file extension

To exclude a specific file extension (say .class) we can use –exclude “*.class” (or –exclude=”*.class”). Note that it can be repeated multiple time.

$ rsync --exclude "*.class" --exclude "*.jar" -a src_dir machine1.com:dest_dir/
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments