Skip to content

Instantly share code, notes, and snippets.

@immanuelpotter
Last active December 24, 2020 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save immanuelpotter/89028e8a6d00df4efa4312e144b59d11 to your computer and use it in GitHub Desktop.
Save immanuelpotter/89028e8a6d00df4efa4312e144b59d11 to your computer and use it in GitHub Desktop.
copy-to-icloud.sh
#!/bin/bash
usage() {
echo "$0 [SRC] [DST]"
echo "Example iCloud path: /Users/$(whoami)/Library/Mobile Documents/com~apple~CloudDocs/"
exit 99
}
[[ -z "$1" || -z "$2" ]] && usage
rsync --verbose --recursive --delete-before --whole-file --times --exclude=".DS_Store" --exclude=".Trash/" "$1" "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment