0

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?

2
  • 3
    Operating System?
    – Lamar B
    May 16, 2012 at 20:14
  • Next time, please ask the actual question instead.
    – slhck
    May 16, 2012 at 22:24

1 Answer 1

5

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
7
  • I have many URLs that're stored in a file urls.txt. How to feed that to curl?
    – qazwsx
    May 16, 2012 at 20:55
  • @duperuser as Lamar asked, Operating system? How you get the URLs can depend on OS. May 16, 2012 at 21:19
  • @duperuser See update in grawity's answer. grawity, hope you don't mind?
    – slhck
    May 16, 2012 at 22:33
  • Wouldn't -i urls.txt do it?
    – qazwsx
    May 16, 2012 at 22:55
  • Is it possible to do it with curl?
    – qazwsx
    May 16, 2012 at 22:56

You must log in to answer this question.

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