Skip to content

Instantly share code, notes, and snippets.

@daveaspinall
Last active February 8, 2016 09:00
Show Gist options
  • Save daveaspinall/8c4378842bd65b3b71b4 to your computer and use it in GitHub Desktop.
Save daveaspinall/8c4378842bd65b3b71b4 to your computer and use it in GitHub Desktop.
Useful terminal commands

Useful Terminal Commands

rsync

Sync files between two places (e.g. local and staging)

# single excluded file
rsync -avzh user@server:/var/www/site/dir/ ~/Sites/site/dir/ --exclude 'file.txt'

# multiple excluded files
rsync -avzh user@server:/var/www/site/dir/ ~/Sites/site/dir/ --exclude={file1.txt,file2.txt}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment