]> sjero.net Git - wget/blobdiff - doc/wget.texi
[svn] Remove the "lockable boolean" setting for passive_ftp.
[wget] / doc / wget.texi
index 940cecff2930a9924a4b59f7b0d8e7b2555ce34d..171e495ad91d6c90192da0767deb3719afa0b3f2 100644 (file)
@@ -44,7 +44,7 @@ notice identical to this one except for the removal of this paragraph
 (this paragraph not being relevant to the printed manual).
 @end ignore
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
 any later version published by the Free Software Foundation; with the
 Invariant Sections being ``GNU General Public License'' and ``GNU Free
 Documentation License'', with no Front-Cover Texts, and with no
@@ -486,10 +486,10 @@ Turn on verbose output, with all the available data.  The default output
 is verbose.
 
 @item -nv
-@itemx --non-verbose
-Non-verbose output---turn off verbose without being completely quiet
-(use @samp{-q} for that), which means that error messages and basic
-information still get printed.
+@itemx --no-verbose
+Turn off verbose without being completely quiet (use @samp{-q} for
+that), which means that error messages and basic information still get
+printed.
 
 @cindex input-file
 @item -i @var{file}
@@ -531,11 +531,11 @@ links in the file specified by @samp{-i}.
 @section Download Options
 
 @table @samp
-@cindex bind() address
+@cindex bind address
 @cindex client IP address
 @cindex IP address, client
 @item --bind-address=@var{ADDRESS}
-When making client TCP/IP connections, @code{bind()} to @var{ADDRESS} on
+When making client TCP/IP connections, bind to @var{ADDRESS} on
 the local machine.  @var{ADDRESS} may be specified as a hostname or IP
 address.  This option can be useful if your machine is bound to multiple
 IPs.
@@ -725,14 +725,17 @@ Set the network timeout to @var{seconds} seconds.  This is equivalent
 to specifying @samp{--dns-timeout}, @samp{--connect-timeout}, and
 @samp{--read-timeout}, all at the same time.
 
-Whenever Wget connects to or reads from a remote host, it checks for a
-timeout and aborts the operation if the time expires.  This prevents
-anomalous occurrences such as hanging reads or infinite connects.  The
-only timeout enabled by default is a 900-second timeout for reading.
-Setting timeout to 0 disables checking for timeouts.
+When interacting with the network, Wget can check for timeout and
+abort the operation if it takes too long.  This prevents anomalies
+like hanging reads and infinite connects.  The only timeout enabled by
+default is a 900-second read timeout.  Setting a timeout to 0 disables
+it altogether.  Unless you know what you are doing, it is best not to
+change the default timeout settings.
 
-Unless you know what you are doing, it is best not to set any of the
-timeout-related options.
+All timeout-related options accept decimal values, as well as
+subsecond values.  For example, @samp{0.1} seconds is a legal (though
+unwise) choice of timeout.  Subsecond timeouts are useful for checking
+server response times or for testing network latency.
 
 @cindex DNS timeout
 @cindex timeout, DNS
@@ -752,8 +755,14 @@ connect timeout, other than that implemented by system libraries.
 @cindex read timeout
 @cindex timeout, read
 @item --read-timeout=@var{seconds}
-Set the read (and write) timeout to @var{seconds} seconds.  Reads that
-take longer will fail.  The default value for read timeout is 900
+Set the read (and write) timeout to @var{seconds} seconds.  The
+``time'' of this timeout refers @dfn{idle time}: if, at any point in
+the download, no data is received for more than the specified number
+of seconds, reading fails and the download is restarted.  This option
+does not directly affect the duration of the entire download.
+
+Of course, the remote server may choose to terminate the connection
+sooner than this option requires.  The default read timeout is 900
 seconds.
 
 @cindex bandwidth, limit
@@ -763,9 +772,12 @@ seconds.
 Limit the download speed to @var{amount} bytes per second.  Amount may
 be expressed in bytes, kilobytes with the @samp{k} suffix, or megabytes
 with the @samp{m} suffix.  For example, @samp{--limit-rate=20k} will
-limit the retrieval rate to 20KB/s.  This kind of thing is useful when,
-for whatever reason, you don't want Wget to consume the entire available
-bandwidth.
+limit the retrieval rate to 20KB/s.  This is useful when, for whatever
+reason, you don't want Wget to consume the entire available bandwidth.
+
+This option allows the use of decimal numbers, usually in conjunction
+with power suffixes; for example, @samp{--limit-rate=2.5k} is a legal
+value.
 
 Note that Wget implements the limiting by sleeping the appropriate
 amount of time after a network read that took less time than specified
@@ -823,11 +835,9 @@ recommendation to block many unrelated users from a web site due to the
 actions of one.
 
 @cindex proxy
-@item -Y on/off
-@itemx --proxy
 @itemx --no-proxy
-Turn proxy support on or off.  The proxy is on by default if the
-appropriate environment variable is defined.
+Don't use proxies, even if the appropriate @code{*_proxy} environment
+variable is defined.
 
 For more information about the use of proxies with Wget, @xref{Proxies}.
 
@@ -956,6 +966,17 @@ site because failure to connect is taken as a sign that the server is
 not running at all and that retries would not help.  This option is
 for mirroring unreliable sites whose servers tend to disappear for
 short periods of time.
+
+@cindex user
+@cindex password
+@cindex authentication
+@item --user=@var{user}
+@itemx --password=@var{password}
+Specify the username @var{user} and password @var{password} for both
+@sc{ftp} and @sc{http} file retrieval.  These parameters can be overridden
+using the @samp{--ftp-user} and @samp{--ftp-password} options for 
+@sc{ftp} connections and the @samp{--http-user} and @samp{--http-password} 
+options for @sc{http} connections.
 @end table
 
 @node Directory Options
@@ -1060,7 +1081,7 @@ Retrieval Options}).
 @cindex http password
 @cindex authentication
 @item --http-user=@var{user}
-@itemx --http-passwd=@var{password}
+@itemx --http-password=@var{password}
 Specify the username @var{user} and password @var{password} on an
 @sc{http} server.  According to the type of the challenge, Wget will
 encode them using either the @code{basic} (insecure) or the
@@ -1074,8 +1095,10 @@ those files from other users with @code{chmod}.  If the passwords are
 really important, do not leave them lying in those files either---edit
 the files and delete them after Wget has started the download.
 
+@iftex
 For more information about security issues with Wget, @xref{Security
 Considerations}.
+@end iftex
 
 @cindex proxy
 @cindex cache
@@ -1225,12 +1248,12 @@ sending of duplicate headers.
 @cindex proxy password
 @cindex proxy authentication
 @item --proxy-user=@var{user}
-@itemx --proxy-passwd=@var{password}
+@itemx --proxy-password=@var{password}
 Specify the username @var{user} and password @var{password} for
 authentication on a proxy server.  Wget will encode them using the
 @code{basic} authentication scheme.
 
-Security considerations similar to those with @samp{--http-passwd}
+Security considerations similar to those with @samp{--http-password}
 pertain here as well.
 
 @cindex http referer
@@ -1260,11 +1283,15 @@ number of Wget.
 
 However, some sites have been known to impose the policy of tailoring
 the output according to the @code{User-Agent}-supplied information.
-While conceptually this is not such a bad idea, it has been abused by
-servers denying information to clients other than @code{Mozilla} or
-Microsoft @code{Internet Explorer}.  This option allows you to change
-the @code{User-Agent} line issued by Wget.  Use of this option is
-discouraged, unless you really know what you are doing.
+While this is not such a bad idea in theory, it has been abused by
+servers denying information to clients other than (historically)
+Netscape or, more frequently, Microsoft Internet Explorer.  This
+option allows you to change the @code{User-Agent} line issued by Wget.
+Use of this option is discouraged, unless you really know what you are
+doing.
+
+Specifying empty user agent with @samp{--user-agent=""} instructs Wget
+not to send the @code{User-Agent} header in @sc{http} requests.
 
 @cindex POST
 @item --post-data=@var{string}
@@ -1284,12 +1311,12 @@ use chunked unless it knows it's talking to an HTTP/1.1 server.  And it
 can't know that until it receives a response, which in turn requires the
 request to have been completed -- a chicken-and-egg problem.
 
-Note: if Wget is redirected after the POST request is completed, it will
-not send the POST data to the redirected URL.  This is because URLs that
-process POST often respond with a redirection to a regular page
-(although that's technically disallowed), which does not desire or
-accept POST.  It is not yet clear that this behavior is optimal; if it
-doesn't work out, it will be changed.
+Note: if Wget is redirected after the POST request is completed, it
+will not send the POST data to the redirected URL.  This is because
+URLs that process POST often respond with a redirection to a regular
+page, which does not desire or accept POST.  It is not completely
+clear that this behavior is optimal; if it doesn't work out, it might
+be changed in the future.
 
 This example shows how to log to a server using POST and then proceed to
 download the desired pages, presumably only accessible to authorized
@@ -1340,9 +1367,27 @@ quite rare.
 
 @cindex SSL certificate, check
 @item --no-check-certificate
-Don't check the server certificate against the available client
-authorities.  If this is not specified, Wget will break the SSL
-handshake if the server certificate is not valid.
+Don't check the server certificate against the available certificate
+authorities.  Also don't require the URL host name to match the common
+name presented by the certificate.
+
+As of Wget 1.10, the default is to verify the server's certificate
+against the recognized certificate authorities, breaking the SSL
+handshake and aborting the download if the verification fails.
+Although this provides more secure downloads, it does break
+interoperability with some sites that worked with previous Wget
+versions, particularly those using self-signed, expired, or otherwise
+invalid certificates.  This option forces an ``insecure'' mode of
+operation that turns the certificate verification errors into warnings
+and allows you to proceed.
+
+If you encounter ``certificate verification'' errors or ones saying
+that ``common name doesn't match requested host name'', you can use
+this option to bypass the verification and proceed with the download.
+@emph{Only use this option if you are otherwise convinced of the
+site's authenticity, or if you really don't care about the validity of
+its certificate.}  It is almost always a bad idea not to check the
+certificates when transmitting confidential or important data.
 
 @cindex SSL certificate
 @item --certificate=@var{file}
@@ -1385,6 +1430,24 @@ it allows Wget to fetch certificates on demand.
 Without this option Wget looks for CA certificates at the
 system-specified locations, chosen at OpenSSL installation time.
 
+@cindex entropy, specifying source of
+@cindex randomness, specifying source of
+@item --random-file=@var{file}
+Use @var{file} as the source of random data for seeding the
+pseudo-random number generator on systems without @file{/dev/random}.
+
+On such systems the SSL library needs an external source of randomness
+to initialize.  Randomness may be provided by EGD (see
+@samp{--egd-file} below) or read from an external source specified by
+the user.  If this option is not specified, Wget looks for random data
+in @code{$RANDFILE} or, if that is unset, in @file{$HOME/.rnd}.  If
+none of those are available, it is likely that SSL encryption will not
+be usable.
+
+If you're getting the ``Could not seed OpenSSL PRNG; disabling SSL.'' 
+error, you should provide random data using some of the methods
+described above.
+
 @cindex EGD
 @item --egd-file=@var{file}
 Use @var{file} as the EGD socket.  EGD stands for @dfn{Entropy
@@ -1408,11 +1471,28 @@ systems that support @file{/dev/random}.
 @section FTP Options
 
 @table @samp
-@cindex password, FTP
-@item --ftp-passwd=@var{string}
-Set the default FTP password to @var{string}.  Without this, or the
-corresponding startup option, the password defaults to @samp{-wget@@},
-normally used for anonymous FTP.
+@cindex ftp user
+@cindex ftp password
+@cindex ftp authentication
+@item --ftp-user=@var{user}
+@itemx --ftp-password=@var{password}
+Specify the username @var{user} and password @var{password} on an
+@sc{ftp} server.  Without this, or the corresponding startup option, 
+the password defaults to @samp{-wget@@}, normally used for anonymous 
+FTP.
+
+Another way to specify username and password is in the @sc{url} itself
+(@pxref{URL Format}).  Either method reveals your password to anyone who
+bothers to run @code{ps}.  To prevent the passwords from being seen,
+store them in @file{.wgetrc} or @file{.netrc}, and make sure to protect
+those files from other users with @code{chmod}.  If the passwords are
+really important, do not leave them lying in those files either---edit
+the files and delete them after Wget has started the download.
+
+@iftex
+For more information about security issues with Wget, @xref{Security
+Considerations}.
+@end iftex
 
 @cindex .listing files, removing
 @item --no-remove-listing
@@ -2379,12 +2459,7 @@ reject =
 
 The complete set of commands is listed below.  Legal values are listed
 after the @samp{=}.  Simple Boolean values can be set or unset using
-@samp{on} and @samp{off} or @samp{1} and @samp{0}.  A fancier kind of
-Boolean allowed in some cases is the @dfn{lockable Boolean}, which may
-be set to @samp{on}, @samp{off}, @samp{always}, or @samp{never}.  If an
-option is set to @samp{always} or @samp{never}, that value will be
-locked in for the duration of the Wget invocation---command-line options
-will not override.
+@samp{on} and @samp{off} or @samp{1} and @samp{0}.
 
 Some commands take pseudo-arbitrary values.  @var{address} values can be
 hostnames or dotted-quad IP addresses.  @var{n} can be any positive
@@ -2528,7 +2603,7 @@ just like @samp{--follow-tags=@var{string}}.
 If set to on, force the input filename to be regarded as an @sc{html}
 document---the same as @samp{-F}.
 
-@item ftp_passwd = @var{string}
+@item ftp_password = @var{string}
 Set your @sc{ftp} password to @var{string}.  Without this setting, the
 password defaults to @samp{-wget@@}, which is a useful default for
 anonymous @sc{ftp} access.
@@ -2539,6 +2614,11 @@ This command used to be named @code{passwd} prior to Wget 1.10.
 Use @var{string} as @sc{ftp} proxy, instead of the one specified in
 environment.
 
+@item ftp_user = @var{string}
+Set @sc{ftp} user to @var{string}.
+
+This command used to be named @code{login} prior to Wget 1.10.
+
 @item glob = on/off
 Turn globbing on/off---the same as @samp{--glob} and @samp{--no-glob}.
 
@@ -2554,9 +2634,9 @@ Add a @samp{.html} extension to @samp{text/html} or
 Turn the keep-alive feature on or off (defaults to on).  Turning it
 off is equivalent to @samp{--no-http-keep-alive}.
 
-@item http_passwd = @var{string}
+@item http_password = @var{string}
 Set @sc{http} password, equivalent to
-@samp{--http-passwd=@var{string}}.
+@samp{--http-password=@var{string}}.
 
 @item http_proxy = @var{string}
 Use @var{string} as @sc{http} proxy, instead of the one specified in
@@ -2608,10 +2688,6 @@ Load cookies from @var{file}.  See @samp{--load-cookies @var{file}}.
 @item logfile = @var{file}
 Set logfile to @var{file}, the same as @samp{-o @var{file}}.
 
-@item login = @var{string}
-Your user name on the remote machine, for @sc{ftp}.  Defaults to
-@samp{anonymous}.
-
 @item mirror = on/off
 Turn mirroring on/off.  The same as @samp{-m}.
 
@@ -2636,12 +2712,14 @@ Set the output filename---the same as @samp{-O @var{file}}.
 Download all ancillary documents necessary for a single @sc{html} page to
 display properly---the same as @samp{-p}.
 
-@item passive_ftp = on/off/always/never
+@item passive_ftp = on/off
 Change setting of passive @sc{ftp}, equivalent to the
-@samp{--passive-ftp} option.  Some scripts and @samp{.pm} (Perl
-module) files download files using @samp{wget --passive-ftp}.  If your
-firewall does not allow this, you can set @samp{passive_ftp = never}
-to override the command-line.
+@samp{--passive-ftp} option.
+
+@itemx password = @var{string}
+Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval. 
+This command can be overridden using the @samp{ftp_password} and 
+@samp{http_password} command for @sc{ftp} and @sc{http} respectively.
 
 @item post_data = @var{string}
 Use POST as the method for all HTTP requests and send @var{string} in
@@ -2679,9 +2757,9 @@ names.  The same as @samp{--protocol-directories}.
 Set proxy authentication user name to @var{string}, like
 @samp{--proxy-user=@var{string}}.
 
-@item proxy_passwd = @var{string}
+@item proxy_password = @var{string}
 Set proxy authentication password to @var{string}, like
-@samp{--proxy-passwd=@var{string}}.
+@samp{--proxy-password=@var{string}}.
 
 @item quiet = on/off
 Quiet mode---the same as @samp{-q}.
@@ -2695,6 +2773,10 @@ mbytes (@samp{m} appended).  Thus @samp{quota = 5m} will set the quota
 to 5 megabytes.  Note that the user's startup file overrides system
 settings.
 
+@item random_file = @var{file}
+Use @var{file} as a source of randomness on systems lacking
+@file{/dev/random}.
+
 @item read_timeout = @var{n}
 Set the read (and write) timeout---the same as
 @samp{--read-timeout=@var{n}}.
@@ -2771,6 +2853,11 @@ When set to off, don't use proxy even when proxy-related environment
 variables are set.  In that case it is the same as using
 @samp{--no-proxy}.
 
+@item user = @var{string}
+Specify username @var{string} for both @sc{ftp} and @sc{http} file retrieval. 
+This command can be overridden using the @samp{ftp_user} and 
+@samp{http_user} command for @sc{ftp} and @sc{http} respectively.
+
 @item verbose = on/off
 Turn verbose on/off---the same as @samp{-v}/@samp{-nv}.
 
@@ -3112,13 +3199,10 @@ In addition to the environment variables, proxy location and settings
 may be specified from within Wget itself.
 
 @table @samp
-@item -Y on/off
-@itemx --proxy
 @itemx --no-proxy
 @itemx proxy = on/off
-This option may be used to turn the proxy support on or off.  Proxy
-support is on by default, provided that the appropriate environment
-variables are set.
+This option and the corresponding command may be used to suppress the
+use of proxy, even if the appropriate environment variables are set.
 
 @item http_proxy = @var{URL}
 @itemx ftp_proxy = @var{URL}
@@ -3145,7 +3229,7 @@ http://hniksic:mypassword@@proxy.company.com:8001/
 
 Alternatively, you may use the @samp{proxy-user} and
 @samp{proxy-password} options, and the equivalent @file{.wgetrc}
-settings @code{proxy_user} and @code{proxy_passwd} to set the proxy
+settings @code{proxy_user} and @code{proxy_password} to set the proxy
 username and password.
 
 @node Distribution
@@ -3530,8 +3614,10 @@ Kristijan @v{C}onka@v{s},
 Kristijan Conkas,
 @end ifnottex
 John Daily,
+Andreas Damm,
 Ahmon Dancy,
 Andrew Davison,
+Bertrand Demiddelaer,
 Andrew Deryabin,
 Ulrich Drepper,
 Marc Duponcheel,
@@ -3552,6 +3638,7 @@ Aleksandar Erkalovic,
 Andy Eskilsson,
 Christian Fraenkel,
 David Fritz,
+Charles C. Fu,
 FUJISHIMA Satsuki,
 Masashi Fujita,
 Howard Gayle,
@@ -3591,6 +3678,7 @@ Goran Kezunovi@'{c},
 @ifnottex
 Goran Kezunovic,
 @end ifnottex
+Igor Khristophorov,
 Robert Kleine,
 KOJIMA Haime,
 Fila Kolodny,
@@ -3605,6 +3693,7 @@ $\Sigma\acute{\iota}\mu o\varsigma\;
 @ifnottex
 Simos KSenitellis,
 @end ifnottex
+Christian Lackas,
 Hrvoje Lacko,
 Daniel S. Lewart,
 @iftex
@@ -3616,11 +3705,15 @@ Nicolas Lichtmeier,
 Dave Love,
 Alexander V. Lukyanov,
 Thomas Lussnig,
+Andre Majorel,
 Aurelien Marchand,
+Matthew J. Mellon,
 Jordan Mendelson,
 Lin Zhe Min,
 Jan Minar,
 Tim Mooney,
+Keith Moore,
+Adam D. Moss,
 Simon Munton,
 Charlie Negyesi,
 R. K. Owen,
@@ -3647,10 +3740,10 @@ Tyler Riddle,
 Tobias Ringstrom,
 @c Texinfo doesn't grok @'{@i}, so we have to use TeX itself.
 @tex
-Juan Jos\'{e} Rodr\'{\i}gues,
+Juan Jos\'{e} Rodr\'{\i}guez,
 @end tex
 @ifnottex
-Juan Jose Rodrigues,
+Juan Jose Rodriguez,
 @end ifnottex
 Maciej W. Rozycki,
 Edward J. Sabol,
@@ -3659,8 +3752,11 @@ Robert Schmidt,
 Nicolas Schodet,
 Andreas Schwab,
 Chris Seawood,
+Dennis Smit,
 Toomas Soome,
 Tage Stabell-Kulo,
+Philip Stadermann,
+Daniel Stenberg,
 Sven Sternberger,
 Markus Strasser,
 John Summerfield,