Wget is a tool for extracting files from World Wide Web in a Linux environment. This is a free software under GPL licenses, which is HRVOJE NIKSIC
grammar:
Wget [options] [url-list]
URL Address Format Description: You can use the URL of the following format:
http:// Host [: port] / path
E.g:
http://fly.cc.fer.hr/
ftp://ftp.xemacs.org/pub/xemacs/xemacs-19.14.tar.gz
FTP: // Username: Password @ Host / Dir / File
In the last form, the username and password are provided for the FTP host in the URL encoding (of course, it can also be provided with the parameter, seeing).
Parameter Description:
Most of the parameters of Wget, but most applications only need the following common parameters:
-r recursive; for HTTP host, Wget first downloads the file specified by the URL, then (if the file is an HTML document) Recursively download all files referenced (super connection) of the file (the recursive depth is specified by the parameter -L). For the FTP host, this parameter means that all files in the directory specified by the URL are downloaded, and the recursive method is similar to the HTTP host.
-N timestamp: This parameter specifies that the WGE is downloaded to download updated, that is, the same file will not be downloaded with the length of the corresponding file in the local directory.
-m mirror: It is equivalent to using the -R and -N parameters simultaneously.
-l Sets the reclamation level; default is 5. -l1 is equivalent to not recursive; -L0 is endless; note that when the recursive depth increases, the number of files will increase in an index level.
-t sets the number of retries. When the connection is interrupted (or timeout), the WGET will attempt to reconnect. If -t0 is specified, the number of revolutions is set to infinite.
-c Specifies the breakpoint loop function. In fact, WGET default has a breakpoint function, only when you use other FTP tools to download some files, and I hope that Wget is then completed, this parameter is required.
Example:
Wget -m -l4 -t0 http://oneweb.com.cn/
The mirror image of http://oneweb.com.cn/ will be created in the local hard drive, the mirror file is stored in the current directory in the subdirectory named OneWeb.com (you can also specify that the child is specified using the -nh parameter) Directory, and directly in the current directory, the recursive depth is 4, the number of revisions is endless (if there is a problem, Wget will be toughly retryed forever, know the task is completed!)
Others have a slightly low frequency of frequencies as follows:
-A acclist / -r rejlist:
These two parameters are used to specify the file extension of the WGET acceptance or exclude, and multiple names are separated from comma. For example, suppose we don't want to download MPEG video files and .au sound files, you can use the following parameters: -r MPG, MPEG, Au
Other parameters are:
-L Only extension relative connection, this parameter is useful for grabbing the specified site, avoids spreading to other directories of the host host. For example, a personal website address is: http://www.xys.org/~ppfl/, use the following command line:
Wget -l http://www.xys.org/~ppfl/
This personal website is only extracted without involving other directories on www.xys.org.
-k Conversion connection: When the HTML file is stored, the non-relative connection conversion is relatively connected.
-X When downloading files on the FTP host, exclude several designated directories
In addition, the following parameters are used to set the work interface of the WGET:
-v Sets the WGET output detailed job information.
-q Set WGET does not output any information.
If we have stored the connection to the file to be extracted in an HTML document (or ordinary text document), you can make the WGET to extract information directly from the file without having to provide URL addresses in the command line. The parameter format is:
-i filename
The address file can also be not an HTML document, for example, a normal text file, where there is a list of URLs that need to be downloaded.
We can improve the download speed with the following techniques: Since Linux is a multi-task system, we can run multiple WGET processes at the same time to improve the download speed, for example, download a homepage file (index.html), then listed in the file All addresses are downloaded with a separate Wget process.
As for other parameters, refer to the WGET's MAN manual page, command to:
Man wget