Skip to content

Instantly share code, notes, and snippets.

@carlosfaria94
Created August 29, 2019 15:51
Show Gist options
  • Save carlosfaria94/96d2e92c7760fdea638926d4e992161e to your computer and use it in GitHub Desktop.
Save carlosfaria94/96d2e92c7760fdea638926d4e992161e to your computer and use it in GitHub Desktop.
copy file or dir from local machine to server
rsync -avz -e "ssh -i /home/user/ssh/secure.pem" /path/to/folder/ centos@172.20.4.18:/path/to/directory/
copy file or dir from server to local machine
rsync -avz -e "ssh -i /home/user/ssh/secure.pem" centos@172.20.4.18:/path/to/directory/ /path/to/directory/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment