
wget is a rudimentary program used to download files from the web. It can be configured to simply download single files, or, with the right options, much, much more. If used with the complete indiscretion, it can be turned into an efficient web spider, following links and voraciously downloading in an attempt to download the entire web. wget is available (and is sometimes standard) on most UNIX/Linux systems, including Mac OS X. Windows versions are available as well, but with some more work.
For our purposes, the following script downloads all of the mp3 files linked from a single webpage (www.keptshut.com), and places them in the current folder:
wget -r -l 1 -nd -A mp3 http://www.keptshut.com/
The items between the invocation of the wget command and the final URL are options that describe how wget should behave. In this case, we want wget to download recursively (-r), one link deep (-l 1), all mp3 files (-A mp3) found at www.keptshut.com. We also want the files to be placed in our current directory (-nd), rather the remote directory structure, as wget does by default.
Here are some other examples and explanations. Full documentation for wget can be found here.
Download all mp3 and wav files in the URLs listed in sites.txt. Copy the webserver’s directory structure:
wget -r -nc -A mp3 -i sites.txt
Follow all links indefinitely (spanning domains), starting at URL, and save all mp3 files in the current directory. This one can fill a hard drive quickly, and can be considered abusive:
wget -r -nd -nc -H -A mp3 URL
And, because I got off-topic, here’s a song by Danish Band, SMALL.
SMALL - Comic Girl





