Linux download tool Wget is a very common command line download tool. Most Linux releases contain this tool by default. If not installed, you can download the latest version in http://www.gnu.org/software/wget/wget.html and compile the installation using the following command:
- #tar zxvf wget-1.9.1.tar.gz
- #cd wget-1.9.1 #./configure
- #make #make install
The usage of the Linux download tool Wget is very simple. The format of the Linux download tool Wget is as follows: # wget [Options] []
Common Wget parameters of Linux download Tool
◆-B: download files in the background. Wget downloads files to the current directory by default.
◆-O: download the file to the specified directory.
◆-P: create a directory with the specified name before saving the file.
◆-T: number of attempts to connect. How many attempts will be made when Wget cannot establish a connection with the server.
◆-C: resumable upload. If the download is interrupted, the download starts from the last breakpoint when the connection is restored.
In addition to the common functions described above, the Linux download tool Wget also supports HTTP and FTP Proxy functions, editing its configuration file "/etc/wgetrc. The specific method is to use the VI editor to open the above file, remove the # Before "http_proxy" and "ftp_proxoy", and then enter the address of the corresponding proxy server after the two items, save and exit. In addition, Wget can download the entire site, such as downloading the entire Man manual center of the http://man.chinaunix.net. Enter the following command: # wget-r-p-np-k http://man.chinaunix.net where the-r parameter refers to recursive download, -p Refers to downloading all files, slices, and other files required to display the complete web page.-np refers to not searching the upper-level directory, and-k refers to converting absolute links into relative links.