Skip to content

Instantly share code, notes, and snippets.

@ZekunZh
Created November 23, 2018 16:19
Show Gist options
  • Save ZekunZh/474d43caaeab8e80706e253235b809ed to your computer and use it in GitHub Desktop.
Save ZekunZh/474d43caaeab8e80706e253235b809ed to your computer and use it in GitHub Desktop.
Copy all contents in one folder except one file/sub-folder

rsync -av --progress source_folder/* dest_folder/ --exclude folder_to_exclude/ -n

Use -n for dry run to see what will be copied, then remove -n to do real copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment