Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download multiple URLs using wget using a single command?

People also ask

How do I download multiple files from wget?

If you want to download multiple files at once, use the -i option followed by the path to a local or external file containing a list of the URLs to be downloaded. Each URL needs to be on a separate line. If you specify - as a filename, URLs will be read from the standard input.

How do I download a list of files from wget?

In order to download a file using Wget, type wget followed by the URL of the file that you wish to download. Wget will download the file in the given URL and save it in the current directory.


From man wget:

2 Invoking
By default, Wget is very simple to invoke. The basic syntax is:
wget [option]... [URL]...

So, just use multiple URLs:

wget URL1 URL2

Or using the links from comments:

$ cat list.txt
http://www.vodafone.de/privat/tarife/red-smartphone-tarife.html
http://www.verizonwireless.com/smartphones-2.shtml
http://www.att.com/shop/wireless/devices/smartphones.html

and your command line:

wget -E -H -k -K -p -e robots=off -P /Downloads/ -i ./list.txt

works as expected.


First create a text file with the URLs that you need to download. eg: download.txt

download.txt will as below:

http://www.google.com
http://www.yahoo.com

then use the command wget -i download.txt to download the files. You can add many URLs to the text file.