wget/curl speed limit example
This commit is contained in:
parent
3183d72e79
commit
7221ecbf88
39
content/posts/2024/linux/wget-speed-limit.md
Normal file
39
content/posts/2024/linux/wget-speed-limit.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
title: "🐢 Ограничение скорости Wget"
|
||||||
|
date: 2024-11-25T22:11:18+03:00
|
||||||
|
draft: false
|
||||||
|
tags: [tools, tips]
|
||||||
|
---
|
||||||
|
|
||||||
|
В cURL и Wget имеется параметр `limit-rate`
|
||||||
|
для установки максимальной скорости загрузки.
|
||||||
|
|
||||||
|
Информация с [man.freebsd.org](https://man.freebsd.org/cgi/man.cgi?wget).
|
||||||
|
|
||||||
|
```text
|
||||||
|
--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.
|
||||||
|
|
||||||
|
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 approximately 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.
|
||||||
|
```
|
||||||
|
|
||||||
|
Пример команды:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
wget -c --limit-rate=500K https://iiiypuk.me/Koe_no_Katachi.mkv
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user