Skip to content

Instantly share code, notes, and snippets.

@bsnux
Last active December 28, 2015 10:19
Show Gist options
  • Save bsnux/7485915 to your computer and use it in GitHub Desktop.
Save bsnux/7485915 to your computer and use it in GitHub Desktop.
Syncing remote and local directories
#!/bin/bash
# Copying files from remote to local
# ----
# Syncs remote '/home/user/sync_test' with local '/tmp/sync'
# You should run this command each time you need remote directory
# gets syncronized with your local one
rsync -avzhe ssh user@yourhost:/home/user/sync_test/ /tmp/sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment