http://rsync.samba.org/download.html
[[email protected] src]# yum install git
[[email protected] src]# git clone git://git.samba.org/rsync.git
[[email protected] src]# git clone git://git.samba.org/rsync.git Initialized empty Git repository in /usr/local/src/rsync/.git/ remote: Counting objects: 25470, done. remote: Compressing objects: 100% (9736/9736), done.
[[email protected] local]# which rsync /usr/bin/rsync
[[email protected] local]# rpm -qf /usr/bin/rsync rsync-3.0.6-12.el6.x86_64
[[email protected] www]# rsync -a webtest/ online/ [[email protected] www]# tree online/ online/ ├── authz ├── index.html └── index.php 0 directories, 3 files [[email protected] www]# cd online/ [[email protected] online]# ll -all total 24 drwxr-xr-x. 3 www www 4096 May 9 12:03 . dr-xr-xr-x. 6 www www 4096 May 9 12:42 .. -rw-r--r--. 1 root root 1080 May 9 12:03 authz -rw-r--r--. 1 root root 31 May 9 11:40 index.html -rw-r--r--. 1 root root 17 May 9 10:42 index.php drwxr-xr-x. 6 root root 4096 May 9 12:03 .svn
[[email protected] www]# rsync -v webtest/* online/ #如果加*(如:webtest/*),则.xxx的隐藏文件不会被同步 authz index.html index.php sent 1315 bytes received 69 bytes 2768.00 bytes/sec total size is 1128 speedup is 0.82 [[email protected] www]# cd online/ [[email protected] online]# ls authz index.html index.php [[email protected] online]# ll -all total 20 drwxr-xr-x. 2 root root 4096 May 9 12:51 . dr-xr-xr-x. 6 www www 4096 May 9 12:50 .. -rw-r--r--. 1 root root 1080 May 9 12:51 authz -rw-r--r--. 1 root root 31 May 9 12:51 index.html -rw-r--r--. 1 root root 17 May 9 12:51 index.php
时间: 2024-10-01 23:02:05