Skip to content

Instantly share code, notes, and snippets.

@jmillerdesign
Last active October 8, 2017 07:53
Show Gist options
  • Save jmillerdesign/e6c5af412fbe560d2611 to your computer and use it in GitHub Desktop.
Save jmillerdesign/e6c5af412fbe560d2611 to your computer and use it in GitHub Desktop.
Download a remote directory locally
# Download a remote directory locally
rsync -zatPe ssh --exclude uploads --exclude files username@example.com:/home/username/path/to/directory/ ~/local/path/to/directory/
# Copy a local directory without removing new files
rsync -zatP /path/to/old/ /path/to/new/
# Copy just one file
scp username@example.com:/home/username/path/to/file.txt ~/local/path/to/file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment