Tips for using the Linux Network download command wget

Source: Internet
Author: User

 

Wget is a command line download tool. Linux users are using it almost every day. The following describes some useful wget tips to help you use wget more efficiently and flexibly.

 

$ Wget-r-NP-nd http://example.com/packages/

This command downloads all the files in the packages directory on the http://example.com website. Where,-NPDoes not traverse the parent directory,-NdIndicates that the directory structure is not re-created on the local machine.

 

$ Wget-r-NP-Nd -- accept = ISO http://example.com/centos-5/i386/.

Similar to the previous command, but with an additional-- Accept = ISOThis indicates that wget only downloads all files with the ISO extension in the i386 directory. You can also specify multiple extensions, which can be separated by commas.

 

$ Wget-I filename.txt

This command is often used for batch download. Put the addresses of all files to be downloaded into filename.txt, and wget will automatically download all files for you.

 

$ Wget-C http://example.com/really-big-file.iso

The-CThe option is used for resumable upload.

 

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

This command can be used to mirror a website. wget will convert the link. If the images on the website are placed on another site, you can use-H.

 

 

 

Usage tips:

The most frequently used download command is"Wget-C file path", That is, resumable download.

 

 

Appendix:Rename the downloaded wget File

 

 

 

 

 

 

 

 

 

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.