Common wget parameters are as follows (the following information can also be obtained by running wget -- help ):
GNY Wget 1.5.3 is a non-interactive network file capturing tool.
Usage: wget [Option]... [URL]...
The number of arguments for a command is the same as that for a long project.
Start:
-V, -- version displays the Wget version and leaves.
-H, -- help displays this instruction file.
-B,-background jumps to the background after startup.
-E,-execute = COMMAND to execute the COMMAND in '. wgetrc.
Record Files and input files:
-O, -- output-file = FILE records to FILE.
-A,-append-output = FILE: Add a message to FILE.
-D, -- debug displays the output of the debugging.
-Q, -- quiet mode (no message is input ).
-V, -- verbose lengthy mode (this is the internal value ).
-Nv, -- non-verbose disable verboseness, but not quiet mode.
-I, -- input-file = FILE: reads the URL from the FILE.
-F, -- force-html treats the input file as HTML.
Download:
-T, -- tries = NUMBER indicates the NUMBER of repeated attempts (0 is unlimited ).
-O -- output-document = FILE: Write the FILE to FILE.
-Nc, -- no-clobber does not destroy existing files.
-C, -- continue re-obtains an existing file.
-- Dot-style = STYLE: Set the display style of the retrieved status.
-N, -- timestamping does not retrieve older files than local files.
-S, -- server-response: displays the server response status.
-- Spider does not download anything.
-T, -- timeout = SECONDS: set the time that exceeds the read time to SECONDS.
-W, -- wait = SECONDS waits for SECONDS to retrieve the file.
-Y, -- proxy = on/off enable or disable Proxy.
-Q, -- quota = NUMBER: set the quota for retrieving files to NUMBER.
Directory:
-Nd -- no-directories does not create a directory.
-X, -- force-directories force Directory Creation.
-NH, -- no-host-directories do not create a host directory.
-P, -- directory-prefix = PREFIX: Save the file to PREFIX /...
-- Cut-dirs = NUMBER ignore the NUMBER of remote directory components.
Http options:
-- Http-user = USER: Set the http USER to user.
-- Http0passwd = PASS: Set the http user's password to PASS.
-C, -- cache = on/off To provide/disable data on the cache Server (normally ).
-- Ignore-length ignores the 'content-length' header field.
-- Proxy-user = USER: Set USER to the Proxy user name.
-- Proxy-passwd = PASS: Set PASS as the Proxy password.
-S, -- save-headers stores the HTTP header as a file.
-U, -- user-agent = use AGENT to replace Wget/VERSION as the identification code.
FTP options:
-- Retr-symlinks: obtains the FTP symbolic link.
-G, -- glob = on/off turn file name globbing on ot off.
-- Passive-ftp uses the "passive" transmission mode.
Use the progressive retrieval method:
-R, -- recursive is like the retrieval of inhaled web -- please be careful !.
-L, -- level = maximum value of the NUMBER returned level (0 is not limited ).
-- Delete-after: deletes the downloaded file.
-K, -- convert-links changes unrelated links to related connections.
-M, -- mirror enables the ing options.
-Nr, -- dont-remove-listing do not remove the '. listing' file.
Options for permission and rejection of a progressive job:
-A, -- accept = LIST: the LIST of extended projects allowed.
-R, -- reject = LIST: the LIST of extended projects rejected.
-D, -- domains = LIST of allowed domains.
-- Exclude-domains = List of rejected domains (separated by commas ).
-L, -- relative only follows the link.
-- Follow-FTP follows the FTP link in the HTML file.
-H, -- span-hosts will be handed back to the external host.
-I, -- include-directories = List: List of allowed directories.
-X, -- exclude-directories = List list of excluded directories.
-NH, -- no-host-lookup does not search hosts through DNS.
-NP, -- no-parent does not trace the origin directory.
Example 1: mirror a website
Wget-r www.redhat.com
Example 2: A directory under a mirror Website:
Wget-r www.redhat.com/mirrors/ldp