Reprinted address: Http://blog.163.com/[email protected]/blog/static/32097310201171833420905/
Operation of the remote machine today found that less than one installation package, the need to upload to each other's machine, but also can use the old way, directly ssh connected up, found that the transmission is very slow, only 40K look, look at the time will take two hours is a little unbearable. Think of an FTP server with this file, you can download directly from the FTP server. I want to call guide operation, but think of the opposite operation ability, can not help heart and beat up the drum.
Using Google search, found the wget command. The format is as follows:
[Plain]View PlainCopy
- wget--ftp-user=xiaoxin--ftp-password=54321-r Ftp://10.10.10.10/tool/smc20
Then began to download, and soon there was 300K, only a few minutes to download the finished. Download installation complete.
The following are the parameters and commands commonly used by wget.
[Python]View PlainCopy
- wget ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/cmdl32.exe
Download the Cmdl32.exe file directly using the wget command, specifying the user name and password for xiaoxin and 123456
[Python]View PlainCopy
- wget ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work Report/*
Use the wget command to download all files and directories under the FTP work report directory and download them to the current directory.
[Python]View PlainCopy
- Wget-r ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work Report/
The use of the parameter-R is the following directory, which is similar to the above command, but the difference is that using-R directly will generate a folder named after the target IP address under the current stop. Also, using-r will download all files under the specified directory, including some external chain files, so you can configure the-l parameter to be used.
[Python]View PlainCopy
- Wget-r-C ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work Report/
-C indicates the use of the breakpoint continuation function. It is useful in the case of poor network conditions.
Wget-i Down.txt
Directly using the URL specified in the Down.txt download, you can download different files in bulk, very convenient, no one has been involved, more in the form of
Wget-t 0-w 31-i Down.txt represents the-t number of retries, 0 means that the Retry-W represents the wait time to fail.
The contents of the Down.txt file should be a full URL as shown in
[Python]View PlainCopy
- Ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work report/xx.doc
- Ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work report/xy.doc
- Wget-i Down.txt-o Down.log
Download the URL specified in down.txt and dump the download prompt into the Down.log file.
[Python]View PlainCopy
- Wget-r-nd-a.doc ftp://xiaoxin:[email protected]10.10. 17.193:9999
Search all the doc files in the 10.10.17.193FTP server and download them to the current directory.
Linux wget command, support for breakpoint continuation, FTP, HTTP, HTTPS and other protocols