2 GNU Wget 1.12, a non-interactive network retriever.
4 WGET :== $ device:[directory]WGET.EXE ! Define foreign command.
5 WGET [OPTION [...]] [URL [...]]
7 Mandatory arguments for long options are also mandatory for short options.
9 Mail bug reports and suggestions to <bug-wget@gnu.org>.
12 -V, --version display the version of Wget and exit.
13 -h, --help print this help.
14 -b, --background go to background after startup. (Ignored on VMS.)
15 -e, --execute=COMMAND execute a `.wgetrc'-style command.
17 2 Logging_and_input_file
18 -o, --output-file=FILE log messages to FILE.
19 -a, --append-output=FILE append messages to FILE.
20 -d, --debug print debugging information.
21 -q, --quiet quiet (no output).
22 -v, --verbose be verbose. (This is the default.)
23 -nv, --non-verbose turn off verboseness, without being quiet.
24 -i, --input-file=FILE download URLs found in FILE.
25 -F, --force-html treat input file as HTML.
26 -B, --base=URL prepends URL to relative links in -F -i file.
29 -t, --tries=NUMBER set number of retries to NUMBER
31 --retry-connrefused retry even if connection is refused.
32 -O --output-document=FILE write documents to FILE.
33 -nc, --no-clobber skip downloads that would download to
34 existing files (overwriting them).
35 -c, --continue resume getting a partially downloaded file.
36 --progress=TYPE select progress gauge type.
37 -N, --timestamping don't re-retrieve files unless newer than
39 -S, --server-response print server response.
40 --spider don't download anything.
41 -T, --timeout=SECONDS set all timeout values to SECONDS.
42 --dns-timeout=SECS set the DNS lookup timeout to SECS.
43 --connect-timeout=SECS set the connect timeout to SECS.
44 --read-timeout=SECS set the read timeout to SECS.
45 -w, --wait=SECONDS wait SECONDS between retrievals.
46 --waitretry=SECS wait 1...SECS between retrieval retries.
47 --random-wait wait from 0...2*WAIT secs between
49 --no-proxy explicitly turn off proxy.
50 -Q, --quota=NUMBER set retrieval quota to NUMBER.
51 --bind-address=ADDRESS bind to ADDRESS (hostname or IP) on local
53 --limit-rate=RATE limit download rate to RATE.
54 --no-dns-cache disable caching DNS lookups.
55 --restrict-file-names=OS restrict file name chars to ones OS allows.
56 --ignore-case ignore case when matching files/dirs.
57 -4, --inet4-only connect only to IPv4 addresses.
58 -6, --inet6-only connect only to IPv6 addresses.
59 --prefer-family=FAMILY connect first to addresses of specified
60 family, one of IPv6, IPv4, or none.
61 --user=USER set both FTP and HTTP user to USER.
62 --password=PASS set both FTP and HTTP password to PASS.
63 --ask-password prompt for passwords.
64 --no-iri turn off IRI support.
65 --local-encoding=ENC use ENC as the local encoding for IRIs.
66 --remote-encoding=ENC use ENC as the default remote encoding.
69 -nd --no-directories don't create directories.
70 -x, --force-directories force creation of directories.
71 -nH, --no-host-directories don't create host directories.
72 --protocol-directories use protocol name in directories.
73 -P, --directory-prefix=PREFIX save files to PREFIX/...
74 --cut-dirs=NUMBER ignore NUMBER remote directory components.
77 --http-user=USER set HTTP user to USER.
78 --http-passwd=PASS set HTTP password to PASS.
79 --no-cache disallow server-cached data.
80 --default-page=NAME Change the default page name. (Normally
81 this is `index.html'.)
82 -E, --html-extension save HTML/CSS docs with proper extensions.
83 --ignore-length ignore "Content-Length" header field.
84 --header=STRING insert STRING among the headers.
85 --max-redirect maximum redirections allowed per page.
86 --proxy-user=USER set USER as proxy username.
87 --proxy-passwd=PASS set PASS as proxy password.
88 --referer=URL include "Referer: URL" header in HTTP
90 --save-headers save the HTTP headers to file.
91 -U, --user-agent=AGENT identify as AGENT instead of Wget/VERSION.
92 --no-http-keep-alive disable HTTP keep-alive (persistent
94 --no-cookies don't use cookies.
95 --load-cookies=FILE load cookies from FILE before session.
96 --save-cookies=FILE save cookies to FILE after session.
97 --keep-session-cookies load and save session (non-permanent)
99 --post-data=STRING use the POST method; send STRING as the data.
100 --post-file=FILE use the POST method; send contents of FILE.
101 --content-disposition honor the Content-Disposition header when
102 choosing local file names (EXPERIMENTAL).
103 --auth-no-challenge send Basic HTTP authentication information
104 without first waiting for the server's
107 2 HTTPS (SSL/TLS) options:
108 --secure-protocol=PR choose secure protocol, PR, one of: auto,
109 SSLv2, SSLv3, and TLSv1.
110 --no-check-certificate don't validate the server's certificate.
111 --certificate=FILE client certificate file.
112 --certificate-type=TYPE client certificate type, PEM or DER.
113 --private-key=FILE private key file.
114 --private-key-type=TYPE private key type, PEM or DER.
115 --ca-certificate=FILE file with the bundle of CA's.
116 --ca-directory=DIR directory where hash list of CA's is stored.
117 --random-file=FILE FILE with random data to seed the SSL PRNG.
118 --egd-file=FILE FILE naming the EGD socket with random data.
121 --ftp-stmlf All binary FTP files use Stream_LF format.
122 --ftp-user=USER set FTP user to USER.
123 --ftp-password=PASS set FTP password to PASS.
124 --no-remove-listing don't remove ".listing" files.
125 --no-glob turn off FTP file name globbing.
126 --no-passive-ftp disable the "passive" transfer mode.
127 --retr-symlinks when recursing, get linked-to files (not
129 --preserve-permissions preserve remote file permissions.
131 2 Recursive_retrieval
132 -r, --recursive recursive download.
133 -l, --level=NUMBER maximum recursion depth (inf or 0 for infinite).
134 --delete-after delete files locally after downloading them.
135 -k, --convert-links make links in downloaded HTML or CSS point to
137 -K, --backup-converted before converting file X, back up as X_orig.
138 -m, --mirror shortcut for -r -N -l inf --no-remove-listing.
139 -p, --page-requisites get all images, etc. needed by HTML page.
140 --strict-comments turn on strict (SGML) handling of HTML comments.
142 2 Recursive_accept-reject
143 -A, --accept=LIST comma-sep'd list of accepted extensions.
144 -R, --reject=LIST comma-sep'd list of rejected extensions.
145 -D, --domains=LIST comma-separated list of accepted domains.
146 --exclude-domains=LIST comma-separated list of rejected domains.
147 --follow-ftp follow FTP links from HTML documents.
148 --follow-tags=LIST comma-sep'd list of followed HTML tags.
149 -G, --ignore-tags=LIST comma-sep'd list of ignored HTML tags.
150 -H, --span-hosts go to foreign hosts when recursive.
151 -L, --relative follow relative links only.
152 -I, --include-directories=LIST list of allowed directories.
153 -X, --exclude-directories=LIST list of excluded directories.
154 -np, --no-parent don't ascend to the parent directory.
157 Wget on VMS systems may behave differently in some ways from Wget on other
160 The "-b" or "--background" command-line option is ignored on VMS systems.
162 Other differences involve command-line case, restrictions on directory
163 and file names, some FTP behavior, and some RMS default parameters.
166 On non-VAX systems, Wget for VMS enables the following DECC$* run-time
168 DECC$ARGV_PARSE_STYLE
170 This way, with extended command parsing enabled ("SET PROCESS
171 /PARSE_STYLE = EXTENDED"), command-line case is preserved, which
172 obviates quoting case-sensitive option switches, URLs, and other
175 3 Directory_and_file_names
176 When the destination for a downloaded file is an ODS2 file system,
177 excessive dots (".") in file names and directory names generated by
178 recursive retrieval (which would be illegal in ODS2 directory or file
179 names) are replaced by underscores ("_"). All tildes ("~") are replaced
180 by hyphens ("-"), and all "at" signs ("@") are replaced by dollar signs
181 ("$"). Any other invalid characters are replaced by underscores ("_").
182 Also, case information is lost.
184 For example, the command:
185 wget -r "ftp://ftp.xfree86.org/pub/XFree86/3.3.5/binaries/NetBSD-1.3/"
187 on a UNIX system, should put files into the directory:
188 ./ftp.xfree86.org/pub/XFree86/3.3.5/binaries/NetBSD-1.3/
190 while on a VMS ODS2 file system, the directory would be:
191 [.FTP_XFREE86_ORG.PUB.XFREE86.3_3_5.BINARIES.NETBSD-1_3]
193 When the destination for a downloaded file is an ODS5 file system, the
194 ODS5-invalid characters "?" and "*" are converted to "!" and "#",
197 On non-VAX systems, Wget for VMS enables the following DECC$* run-time
200 DECC$EFS_CASE_PRESERVE
202 This way, when the destination for a downloaded file is an ODS5 file
203 system, multiple dots will be permitted and case will be preserved in
204 directory and file names, so the previous example directory would be:
205 [.ftp^.xfree86^.org.pub.XFree86.3^.3^.5.binaries.NetBSD-1^.3]
208 Files downloaded using FTP from some servers may get date-time info in
209 server-local time. Define an environment variable (symbol or logical
210 name) WGET_TIMEZONE_DIFFERENTIAL (a signed time in seconds) to offset
214 By default, when Wget does a binary (Image) FTP transfer, the
215 destination file is created with fixed-length, 512-byte records. When
216 Wget does an ASCII FTP transfer, the destination file is created with
219 In Wget versions before 1.10.1, an FTP destination file was always
220 created with Stream_LF format.
222 A command-line option, --ftp-stmlf, forces all FTP destination files to
223 Stream_LF format, as in Wget versions before 1.10.1.
225 Add ";type=a" to the end of an FTP URL to specify an ASCII transfer.
227 Destination files specified using "-O" ("--output-document") are always
228 created with Stream_LF format.
231 To specify an explicit ";nnn" version number in an FTP URL, escape the
232 ";" as "%3B", or, if the (VMS) FTP server will accept it, use a second
233 dot. For example, for "file.type;25" use a URL like:
234 ftp://server/directory/file.type%3B25
236 ftp://server/directory/file.type.25
238 3 RMS_default_parameters
239 For improved I/O speed, when writing a downloaded file, Wget uses these
240 RMS parameter values by default: BLOCK_COUNT = 127, BUFFER_COUNT = 2,
241 EXTEND_QUANTITY = 16384.
243 The user may overide these values by specifying different (non-zero)
244 values for these parameters using the SET RMS_DEFAULT command.
247 As with many C programs which originated on non-VMS systems, Wget may
248 make some assumptions about file attributes which can cause some
249 problems. One example is the "--post-file=FILE" option, which requires
250 that the "FILE" be in Stream_LF format. (In this case, HTTP 1.0
251 requires the length of the request to be known, and the method used to
252 determine the size of the file will fail for Variable-length format