Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not rsync I'm concerned about. It is fswatch and adding/deleting multiple files (possibly from multiple devices) and having them automatically synced.


More than 2 end points would be a bridge too far for this simple script.

With regards to fswatch, from what I gather, it blocks a iotcl call on all the files in your watched folder. This script fires rsync (always from the local end to prevent confusion) as soon as a change is detected on either end, starting with the end where the change has been detected. Pretty simple. I guess if you change files and delete files at the same time on both ends, some deleted files might get recreated. At this point this is the worse I can see, but I could be very wrong... :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: