"Ant" in the Linux environment - WGET Introduction

zhaozj2021-02-11  211

"Ant" in the Linux environment - WGET Introduction

Skills administrator (2000-12-23 09:41) 〖Back〗 〖Forward〗

The Wget of use is: wget [Parameter List] URL first introduces the main parameters of Wget: · -b: Let wget run in the background, write file writing in the "wget-log" file in the current directory; · -t [ Nuber of Times]: Try how many times when Wget is not connected to the server. For example, "-t120" means an attempt 120 times. When this is "0", the specified attempt is infinite multiple times until the connection is successful, and this setting is very useful. When the other server is suddenly shut down or the network suddenly interrupted, it can continue to download the endless file after returning to normal. · -C: Breakpoint renewal, this is also a very useful setting, especially when downloading a relatively large file, if the middle is accidentally interrupted, then the connection is recovered, it will pass the last time. Instead of starting from scratch, using this requires remote server also supports breakpoints. Generally speaking, UNIX / Linux-based web / ftp server supports breakpoints; · -t [Number of Seconds]: Timeout Time, specify how long the remote server does not respond to the interrupt connection and start the next attempt. For example, "-t120" means that if the remote server does not send the data after 120 seconds, it will be retrieved.

If the network speed is faster, this time can be set, the longer, can be set, usually no more than 900, usually not less than 60, generally set at 120 or so appropriate; · -w [Number of Seconds ]: How many seconds wait between two attempts, such as "-w 100" indicates waiting for 100 seconds between the two attempts; · -Y ON / OFF: Pass / do not connect through the proxy server; · -q [Bytes] : Limit the total size of the download file to the total size, such as "-q2k" means that it is not more than 2k bytes, "- Q3M" indicates that the maximum can not exceed 3M bytes, and if the number does not add, it is said to be byte For the unit, such as "-Q200" indicates that you can not exceed 200 bytes; · -nd: Do not download the directory structure, piled up the files downloaded from the server to the current directory; · -X: with "-nd" Set the opposite, create a complete directory structure, such as "wget ​​-ndhttp://www.gnu.org" will create a "www.gnu.org" subdirectory in the current directory, then follow the actual directory structure of the server The first level is built until all the files are overloaded; · -nh: Do not create a directory of the target host domain named directory, direct down to the current directory; • --http-user = Username · --http-passwd = password: If the web server needs to specify the username and password, use these two items to set ;. --Proxy-user = username · --Proxy-passwd = password: If the proxy server needs to enter the user Name and password, use these two options; · -r: The server-side directory structure is established in this unit; · -l [defth]: download the depth of the remote server directory structure, such as "-l 5" download directory depth is less than or equal to 5 Directory structures or files within; · -M: Do the option when the site mirror, if you want to make a site mirror, use this option, it will automatically set other suitable options to facilitate site mirroring; · -np: only Download the target site Specify the contents of the directory and its subdirectories. This is also a very useful option, we assume that there is a connection to this site of the personal home page of someone, and we just want to download this person's personal page, if this option is not set, or even Grab the whole site, it is obviously what we usually don't want; u How to set the proxy server Wget used by WGET, you can use the user settings file ".wgetrc" to read a lot of settings, we mainly use this file to be Set the proxy server. Users use what user logs in, then what the user's home directory ".wgetrc" file works.

转载请注明原文地址:https://www.9cbs.com/read-3598.html

New Post(0)