Wednesday, May 28, 2008

Synchronize two directories (local or remote)

Found a neat utility called Unison which does two way synchronization between two directories (as opposed to rsync which AFAIK is only one way).  It seems much easier to use than rsync, as well.  You simply use a command like so 'unison /path/to/dir1 /path/to/dir2'.  If you want to sync with a remote directory, you can use ssh in the path specification (ssh://

It works with Linux, Mac, Windows (I found it on MacPorts for the mac).

1 comment:

Matt Smith said...

Pretty slick. I've been using rsync and have been loving it --- it saves me tons of time, when deploying website updates as I typically develop locally and then wish to push it to the live server. By using unison, I could get the latest user content from the live server (e.g., uploaded images and other files).