Download Files From The Web With wget

download files from wget

 download files from wget.

wget makes it possible for you to download files from the web using the terminal.

The syntax is as follows:

wget path/to/filename

For example:

wget http://sourceforge.net/projects/antix-linux/files/Final/MX-krete/antiX-15-V_386-full.iso/download

There are a large number of switches that can be used with wget such as -O which lets you output the filename to a new name.

In the example above I downloaded  AntiX Linux from Sourceforge. The filename antiX-15-V_386-full.iso is quite long. It would be nice to download it as just antix15.iso. To do this use the following command:

wget -O antix.iso http://sourceforge.net/projects/antix-linux/files/Final/MX-krete/antiX-15-V_386-full.iso/download

Downloading a single file doesn’t seem worth it, you could easily just navigate to the web page using a browser and click the link.

If, however, you want to download a dozen files then being able to add the links to an import file and use wget to download the files from those links will be much quicker.

Simply use the the -i switch as follows:

wget -i /path/to/importfile

For more about wget visit http://www.tecmint.com/10-wget-command-examples-in-linux/.