Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to throttle (limit) the download speed of wget or curl ?

Is it possible to change the throttle value while it is downloading ?

share|improve this question
2  
No it is not possible to change the speed while downloading. Have a look at gui download managers like fatrat or multiget – Ulrich Dangel May 23 '12 at 15:48
1  
You can however suspend the process via SIGSTOP or ctrl+z and resume it later with SIGCONT or fg. This should pause the download process. – Ulrich Dangel May 23 '12 at 15:54

2 Answers

up vote 8 down vote accepted

Yes both wget and curl support limiting your download rate. Both options are directly mentioned in the man page.

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.

E.g: 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.

E.g: wget --limit-rate=423k

share|improve this answer
Is it possible to change it dynamically while a download is in progress ? – mataug May 23 '12 at 14:34
1  
@GautamK No as neither wget nor curl are interactive programs. – Ulrich Dangel May 23 '12 at 15:28
1  
@GautamK For one large file, if the server accepts it, you can kill the wget or curl process and resume with wget -c or curl -C. If you really need to reconfigure a running process, use trickle with a daemon — but the setup is a bit complicated. Alternatively, look into traffic shaping — again, the setup if complicated. – Gilles May 23 '12 at 23:08

You have to throttle the network-link that is being used for the transfer.

share|improve this answer
1  
How would one achieve this? – uther May 23 '12 at 20:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.