Skip to content

Instantly share code, notes, and snippets.

@alexander-young
Created June 4, 2018 22:09
Show Gist options
  • Save alexander-young/f173c6178a3b26e163d1d92fe620bc47 to your computer and use it in GitHub Desktop.
Save alexander-young/f173c6178a3b26e163d1d92fe620bc47 to your computer and use it in GitHub Desktop.
Sync files to another location on file change
rsync -avz . ~/path/to/new/location/ --delete; fswatch -o . | while read f; do rsync -avz . ~/path/to/new/location/ --delete; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment