Networking
下載時限制wget或curl的下載速度
是否可以限制(限制)
wget
或的下載速度curl
?下載時是否可以更改油門值?
是的 wget 和 curl 都支持限制您的下載速率。手冊頁中直接提到了這兩個選項。
捲曲
--limit-rate <speed> Specify the maximum transfer rate you want curl to use. This feature is useful if you have a limited pipe and you'd like your transfer not to use your entire bandwidth. The given speed is measured in bytes/second, unless a suffix is appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
例如:
curl --limit-rate 423K
wget
--limit-rate=amount Limit the download speed to amount bytes per second. Amount may be expressed in bytes, kilobytes with the k 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.
例如:
wget --limit-rate=423k