Hacker News new | ask | show | jobs
by pandada8 3923 days ago
What's difference between this one and rsync?
5 comments

Javascript!

And fewer features.

(but a cool little project none the less!)

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.
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
rsync is not written in a hipster language.
This is 130 lines of code, including whitespace.
Plus node, and npm. That's an extra 59 packages from Apt. before you install this tool.
So we will roll glibc and everything else into the counts too?

My point was it isn't "hipster" to use something that is fast and efficient.

Writing yet another file sync solution using nodejs of all things is definitely hipster.

Glibc is used by multiple packages. I simply identified the number of dependencies to install this tool when nodejs/npm are not installed.

https://github.com/mattijs/node-rsync

You can use rsync if you like too

this works on windows
rsync can be run in cygwin.
Quoting beagle3

> this one is continuous and rsync is one-shot.