代码改变世界

freebsd 同步工具unison

2013-02-27 16:00  好动的树懒  阅读(399)  评论(0编辑  收藏  举报

unison 是在linux和unix下一个同步软件,可以实现双向同步。freebsd下的安装如下:

1、#/usr/ports/net/unison-nox11

     #make install clean

    此版本为文字版没有UI,需要UI可以装#/usr/ports/net/unison 带UI版本。

2、安装完成后通过unison 这个命令来使用,命令路径/usr/local/bin/unison。

一个简单实例:

新建文件夹 test1 test2,在test1文件中新建一个hello.c 的文件。

hsb@asus %unison test1 test2
Contacting server...
Looking for changes
Reconciling changes

test1          test2              
new file ---->            hello.c  [f] f                            #表示左边的文件夹有新的文件,是否同步到右边的文件夹,f表示force

Proceed with propagating updates? [] y
Propagating updates

UNISON 2.40.63 started propagating changes at 17:18:16.15 on 29 Nov 2012
[BGN] Copying hello.c from /usr/home/hsb/test1 to /usr/home/hsb/test2
[END] Copying hello.c
UNISON 2.40.63 finished propagating changes at 17:18:16.16 on 29 Nov 2012

Saving synchronizer state
Synchronization complete at 17:18:16  (1 item transferred, 0 skipped, 0 failed)

 

 

hsb@asus %cd test2
hsb@asus %ls
hello.c
同步成功!