Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .