文件同步工具-Unison
2014-10-29 10:13:43 阿炯

Unison是一款跨平台的文件同步工具,不仅支持本地对本地同步,也支持通过SSH、RSH和Socket等网络协议进行同步。更棒的是,Unison支持双向同步操作,你既可以从A同步到B,也可以从B同步到A,这些都不需要额外的设定。采用C/C++开发并在GPL协议下授权。


Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

Unison与一般的Linux软件一样,都是有一个核心的命令行组成。那些命令可能会令上手比较困难。不过幸运的是,Unison有基于GTK+的图形版本。

安装完后,应该会在“应用程序”->“互联网”中出现。如果没有的话,就在终端下输入unison-gtk或按(Alt+F2)输入unison启动它。


首次启动时,会让你选择根目录和目标目录。因为Unison运行时至少有一个Profile,所以你必须指定。Unison的多案例支持可以让你通过统一的界面来管理多个同步。使用图形界面一目了然,有Right to Left和Left to Right,即双向同步,还有Merge、Diff等文件合并或比较的操作。相信有点经验的朋友都能很熟练的使用这款软件。


Unison shares a number of features with tools such as configuration management packages (CVS, PRCS, Subversion, BitKeeper, etc.), distributed filesystems (Coda, etc.), uni-directional mirroring utilities (rsync, etc.), and other synchronizers (Intellisync, Reconcile, etc). However, there are several points where it differs:

Unison runs on both Windows and many flavors of Unix (Solaris, Linux, OS X, etc.) systems. Moreover, Unison works across platforms, allowing you to synchronize a Windows laptop with a Unix server, for example.

Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed.

Unlike a distributed filesystem, Unison is a user-level program: there is no need to modify the kernel or to have superuser privileges on either host.

Unison works between any pair of machines connected to the internet, communicating over either a direct socket link or tunneling over an encrypted ssh connection. It is careful with network bandwidth, and runs well over slow links such as PPP connections. Transfers of small updates to large files are optimized using a compression protocol similar to rsync.

Unison is resilient to failure. It is careful to leave the replicas and its own private structures in a sensible state at all times, even in case of abnormal termination or communication failures.
Unison has a clear and precise specification.

最新版本:2.40


项目主页:http://www.cis.upenn.edu/~bcpierce/unison/