Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

62.4. Unison File Synchronizer

If you are looking for a tool to sync your laptop with your workstation, you better have a look at Unison.

homepage: http://www.cis.upenn.edu/~bcpierce/unison/

installation

$ sudo apt-get install unison	
	

62.4.1. local

dir to dir

unison dir1 dir2		
		

62.4.2. remote

ssh

unison dir1 ssh://username@remotehostname(ip)//absolute/path/to/dir2		
		

socket

target host

# unison -socket NNNN	
		

source host

# unison dir1 socket://remotehost(ip):port//absolute/path/to/dir2			
		

62.4.3. config

create a config file under '.unison' directory.

vim ~/.unison/config.prf

root = /var/www
root = ssh://netkiller@netkiller.8800.org//var/www
force = /var/www
ignore = Path templates_compiled
ignore = Name tmp/*.pdf
auto = true
log = true
logfile = /home/netkiller/.unison/netkiller.8800.org.log