Skip to content

Instantly share code, notes, and snippets.

@rlan
Last active January 24, 2019 06:28
Show Gist options
  • Select an option

  • Save rlan/3bda8eb6d11ca23828dc188b10941357 to your computer and use it in GitHub Desktop.

Select an option

Save rlan/3bda8eb6d11ca23828dc188b10941357 to your computer and use it in GitHub Desktop.
rsync ssh example
#!/bin/sh -x
# rsync ssh example
# $1 - source folder
# $2 - machine name
# $3 - target folder
if [ $# -eq 0 ]; then
echo "No arguments supplied"
else
rsync -avzhe ssh $1 $2:$3
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment