Skip to content

Instantly share code, notes, and snippets.

@sokil
Last active June 2, 2020 11:33
Show Gist options
  • Save sokil/f85a2f5f493f24fe11d7 to your computer and use it in GitHub Desktop.
Save sokil/f85a2f5f493f24fe11d7 to your computer and use it in GitHub Desktop.
Sync remote files to local
#!/bin/sh
while true; do
read -p "Do you want to sync? (y/n): " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
rsync \
-v \
-a \
--delete \
--exclude=nbproject \
server:/dir \
/local/dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment