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. -np
The 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