Skip to content

Instantly share code, notes, and snippets.

@dcai
Last active November 6, 2017 10:17
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 dcai/1a20da159df0534e8b9471735de26d0c to your computer and use it in GitHub Desktop.
Save dcai/1a20da159df0534e8b9471735de26d0c to your computer and use it in GitHub Desktop.
rsync cheatsheet
SRC=/path/to/source
DEST=/path/to/dest
# Copy
rsync -aP --stats --human-readable "${SRC}" "${DEST}"
# Move
rsync -aP --stats --human-readable --remove-source-files "${SRC}" "${DEST}"
# Sync
rsync -aP --stats --human-readable --delete "${SRC}" "${DEST}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment