[etc] Using WGET to download files.
HOME


[Date Prev][Date Next][Date Index]

[etc] Using WGET to download files.


Wget is a very versatile tool for downloading multiple files from a web page. For e.g very often u see web pages that have listed files in *.pdf or *.tar.gz, and they are just too many of them to be downloaded by cinventional method.
WGET comes to the rescue. This is a tool available on major linux distros.A similar tool "Teleport" is available on Windows.
 
for e.g. consider the following web site.
http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf.html
 
There are many pdf's listed that need to be downloaded. This can be done using the following command
 
%>wget -r -l 1 -A pdf -nd http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf.html
 
Here -r flag denotes that recursively go through each link.
  -l 1 specifies that recurive depth is just 1
  -A pdf specifies that the files to be downloaded have a pdf extension.. Additional extenstions can be specified by seperating them using a comma
 -nd specifes that no directories should be formed. Hence all the files will be downloaded to the CURRENT directory
 
 
More info on this tool can be had by using the following command:
 
%>wget --help
 
Regards
Shashank