linux局域网传输文件

转载:http://blog.sina.com.cn/s/blog_4b0f5a020100nccq.html

想必大家在linux下面局域网内传东东还是有些郁闷的。下面介绍一个命令,可以让你在局域网内随意传东东,不需要开任何服务。以下均是抄来的。

Using netcat and tar to quickly transfer files between machinesaka tar pipe

So you have gigs of data to transfer between two machines over ethernet. nice quick and dirty method is to use netcat and tar. This is by no means secure, but if you haven't got the time or desire to setup NFS, FTPd, Samba. Or wait hours for scp to do it's job then this can save you lot of time.

Linux System using tar and netcat

On the receiving end do:
netcat -l -p 7000 | tar x

And on the sending end do:
tar cf netcat otherhost 7000
Notes

Depending on your hardware you might want to use compression with tar. You'll probably find your hard disk drive is bottleneck on fast network. Compression is useless if you can't saturate your network and will probably just slow things down. tar cf is copy everythinin thcurrent working directory. And your files will be untared at the other end from where you started the listening netcat. It won't be obivous that the operation is finished so you'll need to check network activity or top. This is indeed quick and dirty.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值