Quantcast
Channel: 钻戒 and 仁豆米
Viewing all articles
Browse latest Browse all 290

netcat远程用法

$
0
0

一、远程传输文件压缩包

tar zcvf - /export/A0 | nc 192.168.86.5 8732

nc -l 8732 > A0.tar.gz  

二、远程传输整个目录

tar cvf - /export/A0 | nc 192.168.86.5 8732

nc -l 8732 | tar xvf -  

三、远程备份分区到一个文件

dd if=/dev/sdb | gzip -c | nc 192.168.86.5 8732

nc -lp 8732 | dd of=/backup/sdb.img.gz  

四、将远程分区备份文件拉到本地并恢复分区

cat /backup/sdb.img.gz | nc 192.168.86.5 8732

nc -lp 8732 | gunzip -c | sudo dd of=/dev/sdb  

Viewing all articles
Browse latest Browse all 290

Trending Articles