复制代码代码如下: [root@localhost /]# rsync -zvr /home/aloft/ /backuphomedir building file list ... done .bash_logout .bash_profile .bashrc sent 472 bytes received 86 bytes 1116.00 bytes/sec total size is 324 speedup is 0.58
复制代码代码如下: [root@localhost /]# rsync -azvr /home/aloft/ /backuphomedir building file list ... done ./ .bash_logout .bash_profile .bashrc sent 514 bytes received 92 bytes 1212.00 bytes/sec total size is 324 speedup is 0.53
复制代码代码如下: root@localhost /]# rsync -avz /home/aloft/ azmath@192.168.1.4:192.168.1.4:/share/rsysnctest/ Password: building file list ... done ./ .bash_logout .bash_profile .bashrc sent 514 bytes received 92 bytes 1212.00 bytes/sec total size is 324 speedup is 0.53
复制代码代码如下: [root@localhost /]# rsync -avz azmath@192.168.1.4:192.168.1.4:/share/rsysnctest/ /home/aloft/ Password: building file list ... done ./ .bash_logout .bash_profile .bashrc sent 514 bytes received 92 bytes 1212.00 bytes/sec total size is 324 speedup is 0.53
上面的命令同步远程文件到本地。 示例: 5 - 找出文件间的不同
复制代码代码如下: [root@localhost backuphomedir]# rsync -avzi /backuphomedir /home/aloft/ building file list ... done cd+++++++ backuphomedir/ >f+++++++ backuphomedir/.bash_logout >f+++++++ backuphomedir/.bash_profile >f+++++++ backuphomedir/.bashrc >f+++++++ backuphomedir/abc >f+++++++ backuphomedir/xyz sent 650 bytes received 136 bytes 1572.00 bytes/sec total size is 324 speedup is 0.41