Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alessandrobelli/484f9d737fb3de57a0018931e1d7cafa to your computer and use it in GitHub Desktop.
Save alessandrobelli/484f9d737fb3de57a0018931e1d7cafa to your computer and use it in GitHub Desktop.
Sync your data to your external hard drive
💻Windows: robocopy "SOURCEPATH" "DESTINATIONPATH" /E /MIR
💻macOs: rsync -r -v -u SOURCEPATH "DESTINATIONPATH"
With macOs add "-- delete" to remove files at the destination that are not in source.
Shebang for macOS script: #!/bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment