Linux Network download Command wget introduction

Source: Internet
Author: User

wget is a command-line download tool. For us Linux users, it is used almost every day. Here are a few useful wget tips that will allow you to use wget more efficiently and flexibly.

$ wget-r-np-nd http://example.com/packages/

This command can download all the files in the packages directory on the http://example.com Web site. -npThe role of this is not to traverse the parent directory, which -nd means that the directory structure is not recreated natively.

$ wget-r-np-nd--accept=iso http://example.com/centos-5/i386/

Similar to the previous command, but with an --accept=iso additional option, this instructs wget to download only files in the I386 directory that have the extension ISO. You can also specify multiple extensions, just separated by commas.

$ wget-i filename.txt

This command is often used for bulk downloads, putting all the addresses that need to be downloaded into filename.txt, and then wget automatically downloads all the files for you.

$ wget-c Http://example.com/really-big-file.iso

The -c option specified here is the function of the breakpoint continuation.

$ wget-m-K (-h) http://www.example.com/

This command can be used to mirror a Web site, and wget will convert the link. If the images in your site are placed on a different site, you can use the -H options.

Usage Experience:

usually download files use the most download command for the " wget-c file path", that is, the breakpoint continues to download.

wget download file re-name?

Before using wget, always in wget after the batch rename, later found that wget in fact, can be renamed at the time of the download.

You can use that.

wget-c "www.baidu.com"-O baidu.index.html

If you want to save the output log, you can use

wget-c "www.baidu.com"-O baidu.index.html-o wget.log

Note: the first "O", the uppercase O

Second "O", for lowercase O

Linux Network download Command wget introduction

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.