scp rsync wget 限速

一、scp

  #scp -l 1000(Kbit/S) 文件名  账号@远程机器IP

  此时的传输速率就是1000(Kbit)/8(bit/Byte)=100 KByte/s 左右

  scp -l 参数:

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

 

二、rsync

  #rsync -auvzP--bwlimit=100(KBytes/s) 本地的文件 远程的文件

  参数说明:

  v:详细提示

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

  z:压缩

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

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

  所以此时的rsync支持了断点续传
  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


三、wget

     wget --limit -rate

 限速200kByte/s

     wget --limit-rate=200k

 限速3mB/s

     wget --limit-rate=3m

引用

--limit-rate=amount
           Limit the download speed to amount bytes per second.  Amount may be expressed in bytes, kilobytes with thek suffix,
           or megabytes with the m suffix.  For example, --limit-rate=20k will limit the retrieval rate to 20KB/s.  This is
           useful when, for whatever reason, you don't want Wget to consume the entire available bandwidth.

           This option allows the use of decimal numbers, usually in conjunction with power suffixes; for example,
           --limit-rate=2.5k is a legal value.

           Note that Wget implements the limiting by sleeping the appropriate amount of time after a network read that took
           less time than specified by the rate.  Eventually this strategy causes the TCP transfer to slow down to approxi-
           mately the specified rate.  However, it may take some time for this balance to be achieved, so don't be surprised if
           limiting the rate doesn't work well with very small files.

你可能感兴趣的:(linux,scp限速,wget限速)