Hacker News new | ask | show | jobs
by LukeShu 3924 days ago
It looks to me that this keeps running "in the background" and watches for changes; syncing things as they happen. Rsync can't do that.
2 comments

rsync can however take a file list, and inotifywait can produce a file list with the help of awk or sed. Which means you can achieve continuous synchronisation with ~5 lines of shell script. A bit more care if you want to sync two ways.

I've found that my file syncing needs tends to be so varied that most of the dedicated tools I've looked at have almost always been just wrong enough not to be worth it compared to just composing something with rsync and inotifywait.

Of course your mileage will vary.

True but you could spawn rsync with a different tool that uses inotify, for example: http://git.quitesimple.org/adhocify/tree/README