Wget help documentation and its simple use
Wget help
Slave --------------------------------------------------------------------------------------------------------------------------------
Start:
-V, -- version: displays the wget version and exits.
-H, -- help print this help.
-B,-enter the background operation after the background is started.
-E,-Execute = command to run the '. wgetrc' command.
Log records and input files:
-O, -- output-file = file: Write the log message to the specified file.
-A, -- append-output = file: append the log message to the end of the specified file.
-D, -- debug prints the debugging output.
-Q, -- Quiet quiet mode (no output ).
-V, -- verbose detailed output mode (default ).
-NV, -- Non-verbose disable detailed output mode, but do not enter quiet mode.
-I, -- input-file = download the URL found in the specified file.
-F, -- force-HTML process the input file in HTML format.
-B, -- base = URL when the-f-I file option is used, add the specified URL before the relative link.
Download:
-T, -- tries = number of retries (0 indicates unlimited ).
-- Retry-connrefused: Try again even if the connection is rejected.
-O -- output-document = the file writes data to the file.
-NC, -- no-clobber does not change an existing file or use it after the file name
Add a. # (# Is a number) method to write a new file.
-C, -- continue continues to receive a part of the downloaded files.
-- Progress = indicates the download progress.
-N, -- timestamping will not be retrieved unless the remote file is newer.
-S, -- server-response: displays the Server Response Message.
-- Spider does not download any data.
-T, -- timeout = number of seconds to configure the timeout time (in seconds) for Data Reading ).
-W, -- Wait = number of seconds to wait for receiving different files.
-- Waitretry = the number of seconds waits for a period of time between each retry (from 1 second to the specified number of seconds ).
-- Random-Wait: Wait for a while to receive different files (from 0 seconds to 2 * Wait seconds ).
-Y, -- proxy = On/Off enable or disable the proxy server.
-Q, -- quota = size: specify the size of the data to be received.
-- Bind-address = the address is connected using the specified address (host name or IP address) of the local machine.
-- Limit-rate = the download speed limit.
-- DNS-Cache = off disable searching for DNS in the cache.
-- Restrict-file-names = OS restrict the characters in the file name to the characters allowed by the specified OS (operating system.
Directory:
-Nd -- no-directories does not create a directory.
-X, -- force-directories force Directory Creation.
-NH, -- no-host-directories do not create a directory containing the remote host name.
-P, -- directory-Prefix = create a directory with the specified name before saving the file by name.
-- Cut-dirs = Number ignore the specified number of directory layers in the remote directory.
Http options:
-- Http-user = configure the HTTP user name.
-- Http-passwd = password: configure the HTTP user password.
-C, -- cache = On/Off (not) use the data in the high-speed cache on the server (which is used by default ). -E, -- HTML-extension adds. html extension file names to all mime-type text/html files.
-- Ignore-length ignores the Content-Length header field.
-- Header = string Add the specified string to the file header.
-- Proxy-user = the user configures the Proxy Server Username.
-- Proxy-passwd = password: configure the user password of the proxy server.
-- Referer = URL contains the "Referer: URL" header in the HTTP request.
-S, -- save-headers: saves the HTTP header to a file.
-U, -- User-Agent = agent indicates agent instead of wget/version.
-- No-http-keep-alive disable HTTP keep-alive (persistent connection ).
-- Cookies = off disable cookies.
-- Load-Cookies = the cookie is loaded by the specified file before the file session starts.
-- Save-Cookies = Save the cookie to the specified file after the file session ends.
-- Post-Data = string: Use the POST method to send the specified string.
-- Post-file = the POST method is used to send the content in the specified file.
HTTPS (SSL) Options:
-- Sslcertfile = optional client segment certificate for the file.
-- Sslcertkey = "key file" available for this certificate ".
-- EGD-file = file EGD socket file name.
-- Sslcadir = directory where the CA hash is located.
-- Sslcafile = the file contains the CA file.
-- Sslcerttype = 0/1 client-Cert Type 0 = PEM (default)/1 = ASN1 (DER)
-- Sslcheckcert = 0/1 check the server certificate based on the provided ca
-- Sslprotocol = 0-3 select SSL protocol; 0 = automatically select,
1 = SSLv2 2 = SSLv3 3 = tlsv1
FTP options:
-Nr, -- Dont-Remove-listing does not delete the ". Listing" file.
-G, -- glob = On/Off sets whether to expand the file name with wildcards.
-- Passive-FTP uses "passive" transmission mode.
-- Retr-symlinks: In recursive mode, download the file indicated by the Link (connected to the directory)
).
Recursive download:
-R, -- Recursive recursive download.
-L, -- level = maximum recursive depth of a number (inf or 0 indicates unlimited ).
-- Delete-after: Delete the downloaded file.
-K, -- convert-links converts absolute links to relative links.
-K, -- backup-converted file X is backed up as X. orig before conversion.
-M, -- mirror is equivalent to the-r-N-l INF-Nr option.
-P, -- page-requisites download all the files required to display the complete web page, such.
-- Strict-Comments: Enable the strict (SGML) processing option for HTML remarks.
Options for receiving/rejecting recursive downloads:
-A, -- accept = List of accepted file styles, separated by commas.
-R, -- reject = list of excluded file styles, separated by commas.
-D, -- domains = List of accepted domains, separated by commas.
-- Exclude-domains = list of excluded domains, separated by commas.
-- Follow-FTP follows the FTP link in the HTML file.
-- Follow-tags = List of HTML tags to be followed, separated by commas.
-G, -- ignore-tags = List of HTML tags to be ignored, separated by commas.
-H, -- span-hosts can enter other hosts recursively.
-L, -- relative only follows the relative link.
-I, -- include-directories = List of directories to be downloaded.
-X, -- exclude-directories = List of directories to be excluded.
-NP, -- no-parent does not search for upper-level directories.
Slave --------------------------------------------------------------------------------------------------------------------------------
now let's try to catch the whole site, because my FreeBSD is installed in VMware, and NO x is installed at all. Usually I use Putty to connect to the FreeBSD in VMware through SSH, freeBSD in VMware also launched its own ftpd service.
put
Emacs User's Guide address: http://www.cbi.pku.edu.cn/chinese/documents/csdoc/emacs/
in the file get, upload the FTP file to BSD and execute
% wget -- input-file get-M
in a short time, complete the 10 HTML files.