Skip to content

Instantly share code, notes, and snippets.

@wckd
Forked from tureki/fswatch.sh
Created April 16, 2014 11:14
Show Gist options
  • Save wckd/10854819 to your computer and use it in GitHub Desktop.
Save wckd/10854819 to your computer and use it in GitHub Desktop.
#!/bin/bash
#install fswatch
brew install fswatch
#fswatch to keep a directory in sync with other directory
fswatch /Users/tureki/Desktop/files/ /Users/tureki/sh/rsync.sh
#!/bin/bash
#rsync file to samba volumes
rsync -rlHpogDtS --delete /Users/tureki/Desktop/files/ /Volumes/tureki/files/
#rsync file to remote server
rsync -rlHpogDtS -e ssh --delete /Users/tureki/Desktop/files/ HOSTNAME:~/files/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment