]> sjero.net Git - wget/blobdiff - doc/wget.texi
[svn] Removed MACHINES.
[wget] / doc / wget.texi
index ab62760bb05cf44c86b7f64a9644e307ff912c9d..b2d042acfda4508ded4a8bc52e6d6e21a01a8022 100644 (file)
@@ -3,7 +3,7 @@
 @c %**start of header
 @setfilename wget.info
 @include version.texi
-@set UPDATED May 2003
+@set UPDATED Jan 2005
 @settitle GNU Wget @value{VERSION} Manual
 @c Disable the monstrous rectangles beside overfull hbox-es.
 @finalout
@@ -31,8 +31,8 @@ This file documents the the GNU Wget utility for downloading network
 data.
 
 @c man begin COPYRIGHT
-Copyright @copyright{} 1996, 1997, 1998, 2000, 2001, 2002, 2003 Free
-Software Foundation, Inc.
+Copyright @copyright{} 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -71,8 +71,8 @@ GNU Info entry for @file{wget}.
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1996, 1997, 1998, 2000, 2001, 2003 Free Software
-Foundation, Inc.
+Copyright @copyright{} 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2005,
+Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.2 or
@@ -90,8 +90,8 @@ entitled ``GNU Free Documentation License''.
 This manual documents version @value{VERSION} of GNU Wget, the freely
 available utility for network downloads.
 
-Copyright @copyright{} 1996, 1997, 1998, 2000, 2001, 2003 Free Software
-Foundation, Inc.
+Copyright @copyright{} 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2005
+Free Software Foundation, Inc.
 
 @menu
 * Overview::            Features of Wget.
@@ -177,9 +177,10 @@ download from where it left off.
 @item
 Wget supports proxy servers, which can lighten the network load, speed
 up retrieval and provide access behind firewalls.  However, if you are
-behind a firewall that requires that you use a socks style gateway, you
-can get the socks library and build Wget with support for socks.  Wget
-also supports the passive @sc{ftp} downloading as an option.
+behind a firewall that requires that you use a socks style gateway,
+you can get the socks library and build Wget with support for socks.
+Wget uses the passive @sc{ftp} downloading by default, active @sc{ftp}
+being an option.
 
 @sp 1
 @item
@@ -407,7 +408,9 @@ specified via the @samp{-o}, output is redirected to @file{wget-log}.
 Execute @var{command} as if it were a part of @file{.wgetrc}
 (@pxref{Startup File}).  A command thus invoked will be executed
 @emph{after} the commands in @file{.wgetrc}, thus taking precedence over
-them.
+them.  If you need to specify more than one wgetrc command, use multiple
+instances of @samp{-e}.
+
 @end table
 
 @node Logging and Input File Options
@@ -516,9 +519,11 @@ which are not retried.
 @itemx --output-document=@var{file}
 The documents will not be written to the appropriate files, but all will
 be concatenated together and written to @var{file}.  If @var{file}
-already exists, it will be overwritten.  If the @var{file} is @samp{-},
-the documents will be written to standard output.  Including this option
-automatically sets the number of tries to 1.
+already exists, it will be overwritten.  If the @var{file} is @samp{-}, 
+the documents will be written to standard output (disabling @samp{-k}).
+Note that a combination with @samp{-k} is only well-defined for downloading
+a single document.
 
 @cindex clobbering, file
 @cindex downloading multiple times
@@ -808,26 +813,24 @@ Setting quota to 0 or to @samp{inf} unlimits the download quota.
 
 @cindex DNS cache
 @cindex caching of DNS lookups
-@item --dns-cache=off
-Turn off caching of DNS lookups.  Normally, Wget remembers the addresses
-it looked up from DNS so it doesn't have to repeatedly contact the DNS
-server for the same (typically small) set of addresses it retrieves
-from.  This cache exists in memory only; a new Wget run will contact DNS
-again.
-
-However, in some cases it is not desirable to cache host names, even for
-the duration of a short-running application like Wget.  For example,
-some HTTP servers are hosted on machines with dynamically allocated IP
-addresses that change from time to time.  Their DNS entries are updated
-along with each change.  When Wget's download from such a host gets
-interrupted by IP address change, Wget retries the download, but (due to
-DNS caching) it contacts the old address.  With the DNS cache turned
-off, Wget will repeat the DNS lookup for every connect and will thus get
-the correct dynamic address every time---at the cost of additional DNS
-lookups where they're probably not needed.
-
-If you don't understand the above description, you probably won't need
-this option.
+@item --no-dns-cache
+Turn off caching of DNS lookups.  Normally, Wget remembers the IP
+addresses it looked up from DNS so it doesn't have to repeatedly
+contact the DNS server for the same (typically small) set of hosts it
+retrieves from.  This cache exists in memory only; a new Wget run will
+contact DNS again.
+
+However, it has been reported that in some situations it is not
+desirable to cache host names, even for the duration of a
+short-running application like Wget.  With this option Wget issues a
+new DNS lookup (more precisely, a new call to @code{gethostbyname} or
+@code{getaddrinfo}) each time it makes a new connection.  Please note
+that this option will @emph{not} affect caching that might be
+performed by the resolving library or by an external caching layer,
+such as NSCD.
+
+If you don't understand exactly what this option does, you probably
+won't need it.
 
 @cindex file names, restrict
 @cindex Windows file names
@@ -891,6 +894,16 @@ Wget with @samp{-r http://fly.srk.fer.hr/} will create a structure of
 directories beginning with @file{fly.srk.fer.hr/}.  This option disables
 such behavior.
 
+@item --protocol-directories
+Use the protocol name as a directory component of local file names.  For
+example, with this option, @samp{wget -r http://@var{host}} will save to
+@samp{http/@var{host}/...} rather than just to @samp{@var{host}/...}.
+
+Disable generation of host-prefixed directories.  By default, invoking
+Wget with @samp{-r http://fly.srk.fer.hr/} will create a structure of
+directories beginning with @file{fly.srk.fer.hr/}.  This option disables
+such behavior.
+
 @cindex cut directories
 @item --cut-dirs=@var{number}
 Ignore @var{number} directory components.  This is useful for getting a
@@ -1050,7 +1063,7 @@ Write down the name and value of the cookie, and manually instruct Wget
 to send those cookies, bypassing the ``official'' cookie support:
 
 @example
-wget --cookies=off --header "Cookie: @var{name}=@var{value}"
+wget --no-cookies --header "Cookie: @var{name}=@var{value}"
 @end example
 
 @cindex saving cookies
@@ -1205,8 +1218,7 @@ wget --load-cookies cookies.txt \
 
 @table @samp
 @cindex .listing files, removing
-@item -nr
-@itemx --dont-remove-listing
+@item --no-remove-listing
 Don't remove the temporary @file{.listing} files generated by @sc{ftp}
 retrievals.  Normally, these files contain the raw directory listings
 received from @sc{ftp} servers.  Not removing them can be useful for
@@ -1251,10 +1263,17 @@ system-specific.  This is why it currently works only with Unix @sc{ftp}
 servers (and the ones emulating Unix @code{ls} output).
 
 @cindex passive ftp
-@item --passive-ftp
-Use the @dfn{passive} @sc{ftp} retrieval scheme, in which the client
-initiates the data connection.  This is sometimes required for @sc{ftp}
-to work behind firewalls.
+@item --no-passive-ftp
+Disable the use of the @dfn{passive} FTP transfer mode.  Passive FTP
+mandates that the client connect to the server to establish the data
+connection rather than the other way around.
+
+If the machine is connected to the Internet directly, both passive and
+active FTP should work equally well.  Behind most firewall and NAT
+configurations passive FTP has a better chance of working.  However,
+in some rare firewall configurations, active FTP actually works when
+passive FTP doesn't.  If you suspect this to be the case, use this
+option, or set @code{passive_ftp=off} in your init file.
 
 @cindex symbolic links, retrieving
 @item --retr-symlinks
@@ -1274,6 +1293,19 @@ Note that when retrieving a file (not a directory) because it was
 specified on the command-line, rather than because it was recursed to,
 this option has no effect.  Symbolic links are always traversed in this
 case.
+
+@cindex Keep-Alive, turning off
+@cindex Persistent Connections, disabling
+@item --no-http-keep-alive
+Turn off the ``keep-alive'' feature for HTTP downloads.  Normally, Wget
+asks the server to keep the connection open so that, when you download
+more than one document from the same server, they get transferred over
+the same TCP connection.  This saves time and at the same time reduces
+the load on the server.
+
+This option is useful when, for some reason, persistent (keep-alive)
+connections don't work for you, for example due to a server bug or due
+to the inability of server-side scripts to cope with the connections.
 @end table
 
 @node Recursive Retrieval Options
@@ -1366,7 +1398,7 @@ Internals}).
 Turn on options suitable for mirroring.  This option turns on recursion
 and time-stamping, sets infinite recursion depth and keeps @sc{ftp}
 directory listings.  It is currently equivalent to
-@samp{-r -N -l inf -nr}.
+@samp{-r -N -l inf --no-remove-listing}.
 
 @cindex page requisites
 @cindex required images, downloading
@@ -2162,8 +2194,9 @@ hostnames or dotted-quad IP addresses.  @var{n} can be any positive
 integer, or @samp{inf} for infinity, where appropriate.  @var{string}
 values can be any non-empty string.
 
-Most of these commands have command-line equivalents (@pxref{Invoking}),
-though some of the more obscure or rarely used ones do not.
+Most of these commands have direct command-line equivalents.  Also, any
+wgetrc command can be specified on the command line using the
+@samp{--execute} switch (@pxref{Basic Startup Options}.)
 
 @table @asis
 @item accept/reject = @var{string}
@@ -2289,6 +2322,10 @@ Add a @samp{.html} extension to @samp{text/html} or
 @samp{application/xhtml+xml} files without it, like
 @samp{-E}.
 
+@item http_keep_alive = on/off
+Turn the keep-alive feature on or off (defaults to on).  The same as
+`--http-keep-alive'.
+
 @item http_passwd = @var{string}
 Set @sc{http} password.
 
@@ -2356,10 +2393,11 @@ 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
-Set passive @sc{ftp}---the same as @samp{--passive-ftp}.  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.
+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.
 
 @item passwd = @var{string}
 Set your @sc{ftp} password to @var{password}.  Without this setting, the
@@ -2377,6 +2415,10 @@ Use POST as the method for all HTTP requests and send the contents of
 Set the type of the progress indicator.  Legal types are ``dot'' and
 ``bar''.
 
+@item protocol_directories = on/off
+When set, use the protocol name as a directory component of local file
+names.  The same as @samp{--protocol-directories}.
+
 @item proxy_user = @var{string}
 Set proxy authentication user name to @var{string}, like @samp{--proxy-user}.
 
@@ -2415,7 +2457,7 @@ Links}).
 
 @item remove_listing = on/off
 If set to on, remove @sc{ftp} listings downloaded by Wget.  Setting it
-to off is the same as @samp{-nr}.
+to off is the same as @samp{--no-remove-listing}.
 
 @item restrict_file_names = unix/windows
 Restrict the file names generated by Wget from URLs.  See
@@ -2908,28 +2950,29 @@ wget` core} and type @code{where} to get the backtrace.
 @cindex portability
 @cindex operating systems
 
-Since Wget uses GNU Autoconf for building and configuring, and avoids
-using ``special'' ultra--mega--cool features of any particular Unix, it
-should compile (and work) on all common Unix flavors.
-
-Various Wget versions have been compiled and tested under many kinds of
-Unix systems, including Solaris, Linux, SunOS, OSF (aka Digital Unix),
-Ultrix, *BSD, IRIX, and others; refer to the file @file{MACHINES} in the
-distribution directory for a comprehensive list.  If you compile it on
-an architecture not listed there, please let me know so I can update it.
-
-Wget should also compile on the other Unix systems, not listed in
-@file{MACHINES}.  If it doesn't, please let me know.
-
-Thanks to kind contributors, this version of Wget compiles and works on
-Microsoft Windows 95 and Windows NT platforms.  It has been compiled
-successfully using MS Visual C++ 4.0, Watcom, and Borland C compilers,
-with Winsock as networking software.  Naturally, it is crippled of some
-features available on Unix, but it should work as a substitute for
-people stuck with Windows.  Note that the Windows port is
-@strong{neither tested nor maintained} by me---all questions and
-problems should be reported to Wget mailing list at
-@email{wget@@sunsite.dk} where the maintainers will look at them.
+Like all GNU software, Wget works on the GNU system.  However, since it
+uses GNU Autoconf for building and configuring, and mostly avoids using
+``special'' features of any particular Unix, it should compile (and
+work) on all common Unix flavors.
+
+Various Wget versions have been compiled and tested under many kinds
+of Unix systems, including GNU/Linux, Solaris, SunOS 4.x, OSF (aka
+Digital Unix or Tru64), Ultrix, *BSD, IRIX, AIX, and others.  Some of
+those systems are no longer in widespread use and may not be able to
+support recent versions of Wget.  If Wget fails to compile on your
+system, we would like to know about it.
+
+Thanks to kind contributors, this version of Wget compiles and works
+on 32-bit Microsoft Windows platforms.  It has been compiled
+successfully using MS Visual C++ 6.0, Watcom, Borland C, and GCC
+compilers.  Naturally, it is crippled of some features available on
+Unix, but it should work as a substitute for people stuck with
+Windows.  Note that Windows-specific portions of Wget are not
+guaranteed to be supported in the future, although this has been the
+case in practice for many years now.  All questions and problems in
+Windows usage should be reported to Wget mailing list at
+@email{wget@@sunsite.dk} where the volunteers who maintain the
+Windows-related features might look at them.
 
 @node Signals
 @section Signals
@@ -2943,8 +2986,10 @@ Otherwise, @code{SIGHUP} is ignored.  This is convenient when you wish
 to redirect the output of Wget after having started it.
 
 @example
-$ wget http://www.ifi.uio.no/~larsi/gnus.tar.gz &
-$ kill -HUP %%     # Redirect the output to wget-log
+$ wget http://www.gnus.org/dist/gnus.tar.gz &
+...
+$ kill -HUP %%
+SIGHUP received, redirecting output to `wget-log'.
 @end example
 
 Other than that, Wget will not try to interfere with signals in any way.
@@ -3053,12 +3098,12 @@ through the network, which may present a security problem.  Here are the
 main issues, and some solutions.
 
 @enumerate
-@item The passwords on the command line are visible using @code{ps}.
-The best way around it is to use @code{wget -i -} and feed the @sc{url}s
-to Wget's standard input, each on a separate line, terminated by
-@kbd{C-d}.  Another workaround is to use @file{.netrc} to store
-passwords; however, storing unencrypted passwords is also considered a
-security risk.
+@item
+The passwords on the command line are visible using @code{ps}.  The best
+way around it is to use @code{wget -i -} and feed the @sc{url}s to
+Wget's standard input, each on a separate line, terminated by @kbd{C-d}.
+Another workaround is to use @file{.netrc} to store passwords; however,
+storing unencrypted passwords is also considered a security risk.
 
 @item
 Using the insecure @dfn{basic} authentication scheme, unencrypted
@@ -3165,6 +3210,7 @@ Dieter Baron,
 Roger Beeman,
 Dan Berger,
 T. Bharath,
+Christian Biere,
 Paul Bludov,
 Daniel Bodea,
 Mark Boyns,
@@ -3200,6 +3246,7 @@ Aleksandar Erkalovic,
 @end ifnottex
 Andy Eskilsson,
 Christian Fraenkel,
+David Fritz,
 Masashi Fujita,
 Howard Gayle,
 Marcel Gerrits,
@@ -3297,6 +3344,7 @@ Maciej W. Rozycki,
 Edward J. Sabol,
 Heinz Salzmann,
 Robert Schmidt,
+Nicolas Schodet,
 Andreas Schwab,
 Chris Seawood,
 Toomas Soome,
@@ -3320,7 +3368,13 @@ Bojan @v{Z}drnja,
 @ifnottex
 Bojan Zdrnja,
 @end ifnottex
-Kristijan Zimmer.
+Kristijan Zimmer,
+YAMAZAKI Makoto,
+Leonid Petrov,
+Hans-Andreas Engel,
+Ulf Harnhammar,
+Jan Minar,
+Simone Piunno.
 
 Apologies to all who I accidentally left out, and many thanks to all the
 subscribers of the Wget mailing list.
@@ -3734,7 +3788,7 @@ the ``copyright'' line and a pointer to where the full notice is found.
 
 @smallexample
 @var{one line to give the program's name and an idea of what it does.}
-Copyright (C) 19@var{yy}  @var{name of author}
+Copyright (C) 20@var{yy}  @var{name of author}
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -3757,7 +3811,7 @@ If the program is interactive, make it output a short notice like this
 when it starts in an interactive mode:
 
 @smallexample
-Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
+Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
 type `show w'.  This is free software, and you are welcome
 to redistribute it under certain conditions; type `show c'