Sunday, September 11, 2011

15 wget command examples

Wget is to download  download of files from the Web.
It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
wget [option] … [URL] …
Multiple options can be, for example
Usage Examples
Download file
Download a file whose URL contains a “&” (note quotes)
wget “”
Download, in addition to the specified file, all files required for optimal viewing
Draw an entire site (recursive download)
Resume a download
Specify the name of the file once downloaded
wget – output-document = index.html
Download files only an extension (here,. Jpg)
Limit download speed
wget – limit-rate = 30k
Using a file containing addresses for download
wget-i liste_de_zyx.txt
Mp3 download all addresses contained in this list
wget-r-l1-H-t1-nd-N-np-a.mp3 erobots = off-imp3_sites.txt
Links automatically convert to a local consultation pages
Download via ftp (With authentication)
wget-r l4 ftp://username:password @ /
Create a backup of your bookmarks
Use wget to display the page source on the terminal
wget-qO –
For instance, if your .wgetrc
sets “exclude_directories” to /cgi-bin, the following example will
first reset it, and then set it to exclude /~nobody and /~somebody.
You can also clear the lists in .wgetrc.
wget -X ” -X /~nobody,/~somebody