2009-05-06 xiao H Posted in 系统管理
A dir 目录下有N多小文件,要copy 到B 机去
a机 $ tar cf – dir | nc -l -p 1234
b机 $ nc 192.168.0.a 1234 | tar xf -
虽然linux 主机之间互传文件的方法很多,但这个方法的最大优点就是快。当然如果是海量数据还是直接按块读取比较靠谱。
标签:nc, NetCat
a机 $ tar cf – dir | nc -l -p 1234 (这里不应该有“-p” 笔误吧)
nc manpage:
-p source_port Specifies the source port nc should use, subject to privilege restrictions and availability. It is an error to use this option in conjunction with the -l option.
名字 (不填不行的)
邮箱 (打死也不泄露的) (不填不行的)
Website(方便俺杀过去的)
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">
a机
$ tar cf – dir | nc -l -p 1234 (这里不应该有“-p” 笔误吧)
nc manpage:
-p source_port
Specifies the source port nc should use, subject to privilege restrictions and availability. It is an error to use this option
in conjunction with the -l option.