标签:rsync
rsync工具介绍[root@akuilinux02 ~]# rsync -av /etc/passwd /tmp/1.txt
sending incremental file list
passwd
sent 938 bytes received 35 bytes 1,946.00 bytes/sec
total size is 846 speedup is 0.87
[root@akuilinux02 ~]# rsync -av /etc/passwd root@192.168.21.129:/tmp/1.txt
root@192.168.21.129‘s password:
sending incremental file list
sent 45 bytes received 12 bytes 6.71 bytes/sec
total size is 846 speedup is 14.84
这里的root@可以不加,默认当前终端的用户一样
[root@akuilinux02 111]# rsync -avL --exclude "*.txt" --exclude "aming*" /root/111/ /tmp/111_dest/
sending incremental file list
created directory /tmp/111_dest
./
1.tx1
1.txt.swp
22323
222/
sent 258 bytes received 120 bytes 756.00 bytes/sec
total size is 0 speedup is 0.00
[root@akuilinux02 111]# rsync -av /etc/passwd 192.168.21.128:/tmp/1.txt
sending incremental file list
passwd
sent 938 bytes received 35 bytes 1,946.00 bytes/sec
total size is 846 speedup is 0.87
[root@akuilinux02 111]# ssh -p 22 192.168.21.128
Last login: Mon May 14 20:11:54 2018 from 192.168.21.1
[root@akuilinux01 ~]# 登出
Connection to 192.168.21.128 closed.
[root@akuilinux02 111]# rsync -avP -e "ssh -p 22" /etc/passwd 192.168.21.128:/tmp/1.txt
sending incremental file list
passwd
846 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/1)
sent 938 bytes received 35 bytes 1,946.00 bytes/sec
total size is 846 speedup is 0.87
[root@akuilinux02 111]# rsync -avP -e "ssh -p 22" 192.168.21.128:/tmp/1.txt /tmp/3.txt
receiving incremental file list
1.txt
846 100% 826.17kB/s 0:00:00 (xfr#1, to-chk=0/1)
sent 43 bytes received 937 bytes 1,960.00 bytes/sec
total size is 846 speedup is 0.86
标签:rsync
原文地址:http://blog.51cto.com/akui2521/2116297