Wget command Detailed

Wget command interpreter

Wget is mainly used to download files, often used when installing the software, make the following brief description of wget.

1, download a single file: wget http://www.baidu.com. Command will directly download a file in the current directory index.html

2, the downloaded file stored in the specified folder, rename file download while using -O: wget -O / home / index http://www.baidu.com

3, download multiple files: First, create a file file.txt write two url (newline), as http://www.baidu.com; then, wget -i file.txt; after command will download two two files.

4, download, without the details, that is downloaded in the background: wget -b http://www.baidu.com. Command will be executed, downloading the detailed information is not displayed on the terminal, detailed information of a downloaded web-log records generated in the current directory.

5, download, without the details, and save the download information to a file executed (with 4): wget -o dw.txt http://www.baidu.com

6, HTTP: wget -c http://www.baidu.com

7, the download speed limit: wget --limit-rate = 100k -O zfj.html http://www.baidu.com

8, test whether the normal access: wget --spider http://www.baidu.com

9, set the number of retries downloads: wget --tries = 3 http://www.baidu.com

10, all of the files downloaded a complete website, namely the current page depends: wget --mirror -p --convert-links -P./test http: // localhost

  --mirror: Open Mirror Option

  -p: download all for a given display URL must file

  --convert-links: After the download, convert links for local display

  -P LOCAL_DIR: save all files or directories to the specified directory

11, the download process refused to download specific types of files: wget --reject = png --mirror -p --convert-links -P./test http: // localhost

12, multi-file download refused download files larger than the size of the set: wget -Q5m -i file.txt

  Note: This option is only useful when downloading multiple files, useless when you download a file.

13, download all of the specified type of file from a specified Web site: wget -r -A .png http://www.baidu.com

14, when wget to download, some resources must be used --no-check-certificate http://www.baidu.com

15, implemented using FTP download wget: wget --file-user = USERNAME --file-password = PASSWORD url

Guess you like

Origin blog.csdn.net/zhydream77/article/details/84876232