Linux wget command, support for breakpoint continuation, FTP, HTTP, HTTPS and other protocols

Source: Internet
Author: User

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
    1. 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
    1. 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
    1. 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
    1. 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
    1. 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
    1. Ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work report/xx.doc
    2. Ftp://xiaoxin:[email protected]10.10. 17.193:9999/office/Zhengzhou/Work report/xy.doc
    3. 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
    1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.