Last active
June 2, 2020 11:33
-
-
Save sokil/f85a2f5f493f24fe11d7 to your computer and use it in GitHub Desktop.
Sync remote files to local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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