Title: shell wget command notes Create:2019-01-02 ◊ :753

:2019-01-02 02:34
: TabKey9   :0   :0  


Wget Download

 #Download ftp file with password
wget ftp: // ftpdomain.cn: two thousand and three hundred / Data / one .tar.gz --ftp-user =usname--ftp-password=abcd

#Download all files in a directory
wget -r -np -nH -R index.html http: // url /
#Explain the meaning of each parameter:
#- r: traverse all subdirectories
#- np: cannot go to the previous subdirectory
#- nH: Do not save the file to the hostname folder
#- R index.html: Do not download the index.html file

#Wget follows robots.txt, which may not allow you to catch the website. Don't worry, you can turn it off:
wget -e robots =off http: // www.example.com /

List of the most common Wget commands:

http://man.linuxde.net/wget

 #Note: case sensitive! Uppercase and lowercase commands represent different operations
-P Indicates the directory to download to
-r Indicates recursive download
-np Do not trace back to the parent directory
-k Indicates that the link in the downloaded page is changed to a local link
-p Get all the elements needed to display the web page
-c Breakpoint resume
-nd When downloading recursively, do not create a directory layer by layer, and download all files to the current directory
-o Save the log to a file (create a new file)
-a. – append output=FILE appends the record to FILE file
-A zip Download only specified file types( zip
-N Do not download the file again unless it is newer than the local file
-O Test.zip download and save with a different file name
-nc Do not overwrite existing files or use #Prefix
-m. – mirror is equivalent to -r -N -l inf -nr

Author: Field in May

Source: CSDN

Original text: https://blog.csdn.net/luo617/article/details/81322590

Copyright notice: This is an original article of the blogger. Please attach a link to the blog for reprinting!