Skip to content

Instantly share code, notes, and snippets.

@richardkall
Last active April 17, 2016 14:24
Show Gist options
  • Save richardkall/d85532c0f75998453284 to your computer and use it in GitHub Desktop.
Save richardkall/d85532c0f75998453284 to your computer and use it in GitHub Desktop.
Exclude files when using rsync
# Using .rsync-filter
$ rsync -avz --delete --exclude-from=".rsync-filter" -e "ssh" --rsync-path="sudo rsync" project/* [email protected]:/project
# Using pattern
$ rsync -avz --exclude=".DS_Store" -e "ssh" --rsync-path="sudo rsync" project/* [email protected]:/project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment