Chinaunix首页 | 论坛 | 博客
  • 博客访问: 584217
  • 博文数量: 109
  • 博客积分: 1463
  • 博客等级: 上尉
  • 技术积分: 859
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-22 13:21
个人简介

希望和广大热爱技术的童鞋一起交流,成长。

文章分类

全部博文(109)

文章存档

2017年(1)

2016年(2)

2015年(18)

2014年(1)

2013年(9)

2012年(15)

2011年(63)

分类: LINUX

2013-02-08 12:11:22

scp和rsyc限速传输


转载地址: http://www.cnblogs.com/xuxm2007/archive/2010/08/10/1796752.html


  一、scp限速1M

  #scp -l 1000 文件名  账号@远程机器IP

  此时的传输速率就是1M/8=100K左右

  二、rsync是(限制为 100k Bytes/s):

  #rsync -auvzP--bwlimit=100 本地的文件 远程的文件

  参数说明:

  v:详细提示

  a:以archive模式操作,复制目录、符号连接,等价于 -rlptgoD 。

  z:压缩

  u:只进行更新,防止本地新文件被重写,注意两者机器的时钟的同时

  P:是综合了--partial --progress两个参数,

  所以此时的rsync支持了断点续传

 

 机房之间传文件一般都担心带宽占用太多,特别是在共用带宽的情况下。常用的两个软件都可以限速:


 

scp可以加上 -l 参数:

引用
     -l limit
             Limits the used bandwidth, specified in Kbit/s.


rsync可以加上 --bwlimit 参数

引用
        -i, --itemize-changes       output a change-summary for all updates
            --log-format=FORMAT     output filenames using the specified format
            --password-file=FILE    read password from FILE
            --list-only             list the files instead of copying them
            --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
            --write-batch=FILE      write a batched update to FILE
            --only-write-batch=FILE like --write-batch but w/o updating dest

阅读(1902) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~