Skip to content

Instantly share code, notes, and snippets.

@JamesHopbourn
Last active December 7, 2019 02:41
Show Gist options
  • Save JamesHopbourn/a2f128537710cdafe70cd70a521b5f39 to your computer and use it in GitHub Desktop.
Save JamesHopbourn/a2f128537710cdafe70cd70a521b5f39 to your computer and use it in GitHub Desktop.
#!/bin/zsh
fswatch ~/Desktop/1 | while read file
do
rsync -trl --delete ~/Desktop/1 ~/Desktop/2
now=$(date +"%T")
echo "⚠️ $now ${file} synced"
done
#https://imqsc.xyz/2018/10/16/fswatch-and-rsync/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment