Limit wget download speed
Limit wget download speed
wget, formally named geturl, is one of the most used command for downloading content on the internet within servers. I namely use it when downloading large amount of files that requires to have a lot of time until it finish. In such cases, wget can be used in a screen and it will resume automatically in case the download breaks or something happens temporarily. I did however found a nice option on wget that you can use, this is to limit wget download speed so that the rate with which you download is not too high. I currently have set limit I use for bandwidth, this is so that the amount I pay for bandwidth is not that high. Normally I do not limit this, but when you are being rate limited by the source server, then you will either use the limit set by them, or you could very well set a limit that you know its best for you.
How to limit download speed?
Ok, enough with the gibberish talk, lets see how we can get this in practice. The parameter you need to use is –limit-rate
1 2 3 4 5 6 7 8 9 |
:~$ wget --limit-rate=30k http://domain.net/file.zip --2013-11-10 19:32:53-- http://domain.net/file.zip Resolving domain.net (domain.net)... 127.0.0.1 Connecting to domain.net (domain.net)|127.0.0.1|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 91681274 (87M) [application/zip] Saving to: `file.zip' 8% [==> ] 97,032 30.0K/s eta 49m 41s |
From manual, the option is:
- –limit-rate=RATE – limit download rate to RATE
This will limit the download rate to 30K, you can use a different value of course, I only used this for showing you an example. Again I don’t use this unless I’m being rate limited by the source server, normally it is pretty fast.
See you again in our next tutorial tomorrow.