Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a list of URLs to some files to download. These are actual URLs ending with complete file names in the form of http://domain.com/foobar.jpg.

All of those are stored in a file called urls.txt.

How can I download them, with a possibility to resume those downloads?

share|improve this question
3  
Operating System? –  Lamar B May 16 '12 at 20:14
    
Next time, please ask the actual question instead. –  slhck May 16 '12 at 22:24

1 Answer 1

wget – available for most Unixes (and if you look hard, Windows):

wget -c http://domain.com/foobar.jpg

curl – available for almost any PC OS:

curl -C - -O http://domain.com/foobar.jpg

curl -C - --remote-name-all http://domain.com/foo.jpg http://domain.com/bar.jpg

To loop over a set of files stored in urls.txt:

while read line; do wget -c "$line"; done < urls.txt
share|improve this answer
    
I have many URLs that're stored in a file urls.txt. How to feed that to curl? –  qazwsx May 16 '12 at 20:55
    
@duperuser as Lamar asked, Operating system? How you get the URLs can depend on OS. –  Rich Homolka May 16 '12 at 21:19
    
@duperuser See update in grawity's answer. grawity, hope you don't mind? –  slhck May 16 '12 at 22:33
    
Wouldn't -i urls.txt do it? –  qazwsx May 16 '12 at 22:55
    
Is it possible to do it with curl? –  qazwsx May 16 '12 at 22:56

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.