]> sjero.net Git - wget/blobdiff - doc/wget.texi
[svn] Manually applied Rob Mayoff <mayoff@dqd.com>'s patch (vs. 1.5.3, not 1.5.3...
[wget] / doc / wget.texi
index 10dbf122d791bee99f3cfcd1a60c9690d38c2a01..0310cf639e55e2c2a862038133e63082489bfbd1 100644 (file)
@@ -14,8 +14,9 @@
 @afourpaper
 @end iftex
 
-@set VERSION 1.5.3
-@set UPDATED Sep 1998
+@c This should really be auto-generated!
+@set VERSION 1.5.3+dev
+@set UPDATED Feb 2000
 
 @dircategory Net Utilities
 @dircategory World Wide Web
@@ -27,7 +28,7 @@
 This file documents the the GNU Wget utility for downloading network
 data.
 
-Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -51,7 +52,7 @@ notice identical to this one.
 @title GNU Wget
 @subtitle The noninteractive downloading utility
 @subtitle Updated for Wget @value{VERSION}, @value{UPDATED}
-@author by Hrvoje Nik@v{s}i@'{c}
+@author by Hrvoje Nik@v{s}i@'{c} and the developers
 
 @page
 @vskip 0pt plus 1filll
@@ -138,7 +139,7 @@ pages.
 
 @sp 1
 @item
-Wget works exceedingly well on slow or unstable connections, 
+Wget works exceedingly well on slow or unstable connections,
 retrying the document until it is fully retrieved, or until a
 user-specified retry count is surpassed.  It will try to resume the
 download from the point of interruption, using @code{REST} with @sc{ftp}
@@ -263,7 +264,7 @@ ftp://host/directory/file;type=a
 @end example
 
 Two alternative variants of @sc{url} specification are also supported,
-because of historical (hysterical?) reasons and their wide-spreadedness.
+because of historical (hysterical?) reasons and their widespreaded use.
 
 @sc{ftp}-only syntax (supported by @code{NcFTP}):
 @example
@@ -430,12 +431,27 @@ file.  This enables you to retrieve relative links from existing
 @sc{html} files on your local disk, by adding @code{<base
 href="@var{url}">} to @sc{html}, or using the @samp{--base} command-line
 option.
+
+@cindex base for relative links in input file
+@item -B @var{URL}
+@itemx --base=@var{URL}
+When used in conjunction with @samp{-F}, prepends @var{URL} to relative
+links in the file specified by @samp{-i}.
 @end table
 
 @node Download Options, Directory Options, Logging and Input File Options, Invoking
 @section Download Options
 
 @table @samp
+@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
+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.
+
 @cindex retries
 @cindex tries
 @cindex number of retries
@@ -452,15 +468,42 @@ 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.
 
+@cindex clobbering, file
+@cindex downloading multiple times
 @cindex no-clobber
 @item -nc
 @itemx --no-clobber
-Do not clobber existing files when saving to directory hierarchy within
-recursive retrieval of several files. This option is @emph{extremely}
-useful when you wish to continue where you left off with retrieval of
-many files.  If the files have the @samp{.html} or (yuck) @samp{.htm}
-suffix, they will be loaded from the local disk, and parsed as if they
-have been retrieved from the Web.
+If a file is downloaded more than once in the same directory, wget's
+behavior depends on a few options, including @samp{-nc}.  In certain
+cases, the local file will be "clobbered", or overwritten, upon repeated
+download.  In other cases it will be preserved.
+
+When running wget without @samp{-N}, @samp{-nc}, or @samp{-r},
+downloading the same file in the same directory will result in the
+original copy of @samp{@var{file}} being preserved and the second copy
+being named @samp{@var{file}.1}.  If that file is downloaded yet again,
+the third copy will be named @samp{@var{file}.2}, and so on.  When
+@samp{-nc} is specified, this behavior is suppressed, and wget will
+refuse to download newer copies of @samp{@var{file}}.  Therefore,
+"no-clobber" is actually a misnomer in this mode -- it's not clobbering
+that's prevented (as the numeric suffixes were already preventing
+clobbering), but rather the multiple version saving that's prevented.
+
+When running wget with @samp{-r}, but without @samp{-N} or @samp{-nc},
+re-downloading a file will result in the new copy simply overwriting the
+old.  Adding @samp{-nc} will prevent this behavior, instead causing the
+original version to be preserved and any newer copies on the server to
+be ignored.
+
+When running wget with @samp{-N}, with or without @samp{-r}, the
+decision as to whether or not to download a newer copy of a file depends
+on the local and remote timestamp and size of the file
+(@xref{Time-Stamping}).  @samp{-nc} may not be specified at the same
+time as @samp{-N}.
+
+Note that when @samp{-nc} is specified, files with the suffixes
+@samp{.html} or (yuck) @samp{.htm} will be loaded from the local disk
+and parsed as if they had been retrieved from the Web.
 
 @cindex continue retrieval
 @item -c
@@ -488,6 +531,10 @@ Without @samp{-c}, the previous example would just begin to download the
 remote file to @file{ls-lR.Z.1}.  The @samp{-c} option is also
 applicable for @sc{http} servers that support the @code{Range} header.
 
+Note that if you use @samp{-c} on a file that's already downloaded
+completely, @samp{@var{file}} will not be changed, nor will a second
+@samp{@var{file}.1} copy be created.
+
 @cindex dot style
 @cindex retrieval tracing style
 @item --dot-style=@var{style}
@@ -559,6 +606,20 @@ Specifying a large value for this option is useful if the network or the
 destination host is down, so that Wget can wait long enough to
 reasonably expect the network error to be fixed before the retry.
 
+@cindex retries, waiting between
+@cindex waiting between retries
+@item --waitretry=@var{seconds}
+If you don't want Wget to wait between @emph{every} retrieval, but only
+between retries of failed downloads, you can use this option.  Wget will
+use "linear backoff", waiting 1 second after the first failure on a
+given file, then waiting 2 seconds after the second failure on that
+file, up to the maximum number of @var{seconds} you specify.  Therefore,
+a value of 10 will actually make Wget wait up to (1 + 2 + ... + 10) = 55
+seconds per file.
+
+Note that this option is turned on by default in the global
+@file{wgetrc} file.
+
 @cindex proxy
 @item -Y on/off
 @itemx --proxy=on/off
@@ -654,6 +715,27 @@ current directory).
 @section HTTP Options
 
 @table @samp
+@cindex .html extension
+@item -E
+@itemx --html-extension
+If a file of type @samp{text/html} is downloaded and the URL does not
+end with the regexp "\.[Hh][Tt][Mm][Ll]?", this option will cause the
+suffix @samp{.html} to be appended to the local filename.  This is
+useful, for instance, when you're mirroring a remote site that uses
+@samp{.asp} pages, but you want the mirrored pages to be viewable on
+your stock Apache server.  Another good use for this is when you're
+downloading the output of CGIs.  A URL like
+@samp{http://site.com/article.cgi?25} will be saved as
+@file{article.cgi?25.html}.
+
+Note that filenames changed in this way will be re-downloaded every time
+you re-mirror a site, because wget can't tell that the local
+@file{@var{X}.html} file corresponds to remote URL @samp{@var{X}} (since
+it doesn't yet know that the URL produces output of type
+@samp{text/html}.  To prevent this re-downloading, you must use
+@samp{-k} and @samp{-K} so that the original version of the file will be
+saved as @file{@var{X}.orig} (@xref{Recursive Retrieval Options}).
+
 @cindex http user
 @cindex http password
 @cindex authentication
@@ -722,6 +804,14 @@ 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.
 
+@cindex http referer
+@cindex referer, http
+@item --referer=@var{url}
+Include `Referer: @var{url}' header in HTTP request.  Useful for
+retrieving documents with server-side processing that assume they are
+always being retrieved by interactive web browsers and only come out
+properly when Referer is set to one of the pages that point to them.
+
 @cindex server response, save
 @item -s
 @itemx --save-headers
@@ -747,21 +837,30 @@ 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.
-
-@strong{NOTE} that Netscape Communications Corp. has claimed that false
-transmissions of @samp{Mozilla} as the @code{User-Agent} are a copyright
-infringement, which will be prosecuted.  @strong{DO NOT} misrepresent
-Wget as Mozilla.
 @end table
 
 @node FTP Options, Recursive Retrieval Options, HTTP Options, Invoking
 @section FTP Options
 
 @table @samp
-@cindex retrieve symbolic links
+@cindex symbolic links, retrieving
 @item --retr-symlinks
-Retrieve symbolic links on @sc{ftp} sites as if they were plain files,
-i.e. don't just create links locally.
+Usually, when retrieving @sc{ftp} directories recursively and a symbolic
+link is encountered, the linked-to file is not downloaded.  Instead, a
+matching symbolic link is created on the local filesystem.  The
+pointed-to file will not be downloaded unless this recursive retrieval
+would have encountered it separately and downloaded it anyway.
+
+When @samp{--retr-symlinks} is specified, however, symbolic links are
+traversed and the pointed-to files are retrieved.  At this time, this
+option does not cause wget to traverse symlinks to directories and
+recurse through them, but in the future it should be enhanced to do
+this.
+
+Note that when retrieving a file (not a directory) because it was
+specified on the commandline, rather than because it was recursed to,
+this option has no effect.  Symbolic links are always traversed in this
+case.
 
 @cindex globbing, toggle
 @item -g on/off
@@ -811,17 +910,23 @@ Retrieval}).  The default maximum depth is 5.
 @item --delete-after
 This option tells Wget to delete every single file it downloads,
 @emph{after} having done so.  It is useful for pre-fetching popular
-pages through proxy, e.g.:
+pages through proxy, e.g.:
 
 @example
 wget -r -nd --delete-after http://whatever.com/~popular/page/
 @end example
 
-The @samp{-r} option is to retrieve recursively, and @samp{-nd} not to
-create directories.
+The @samp{-r} option is to retrieve recursively, and @samp{-nd} to not
+create directories.  
+
+Note that @samp{--delete-after} deletes files on the local machine.  It
+does not issue the @samp{DELE} command to remote FTP sites, for
+instance.  Also note that when @samp{--delete-after} is specified,
+@samp{--convert-links} is ignored, so @samp{.orig} files are simply not
+created in the first place.
 
 @cindex conversion of links
-@cindex links conversion
+@cindex link conversion
 @item -k
 @itemx --convert-links
 Convert the non-relative links to relative ones locally.  Only the
@@ -835,7 +940,9 @@ will be performed at the end of the downloads.
 @cindex backing up converted files
 @item -K
 @itemx --backup-converted
-When converting a file, back up the original version with a @samp{.orig} suffix.
+When converting a file, back up the original version with a @samp{.orig}
+suffix.  Affects the behavior of @samp{-N} (@xref{HTTP Time-Stamping
+Internals}).
 
 @item -m
 @itemx --mirror
@@ -851,6 +958,82 @@ retrievals.  Normally, these files contain the raw directory listings
 received from @sc{ftp} servers.  Not removing them can be useful to
 access the full remote file list when running a mirror, or for debugging
 purposes.
+
+@cindex page requisites
+@cindex required images, downloading
+@item -p
+@itemx --page-requisites
+This option causes wget to download all the files that are necessary to
+properly display a given HTML page.  This includes such things as
+inlined images, sounds, and referenced stylesheets.
+
+Ordinarily, when downloading a single HTML page, any requisite documents
+that may be needed to display it properly are not downloaded.  Using
+@samp{-r} together with @samp{-l} can help, but since wget does not
+ordinarily distinguish between external and inlined documents, one is
+generally left with "leaf documents" that are missing their requisites.
+
+For instance, say document @file{1.html} contains an @code{<IMG>} tag
+referencing @file{1.gif} and an @code{<A>} tag pointing to external
+document @file{2.html}.  Say that @file{2.html} is the same but that its
+image is @file{2.gif} and it links to @file{3.html}.  Say this
+continues up to some arbitrarily high number.
+
+If one executes the command:
+
+@example
+wget -r -l 2 http://@var{site}/1.html
+@end example
+
+then @file{1.html}, @file{1.gif}, @file{2.html}, @file{2.gif}, and
+@file{3.html} will be downloaded.  As you can see, @file{3.html} is
+without its requisite @file{3.gif} because wget is simply counting the
+number of hops (up to 2) away from @file{1.html} in order to determine
+where to stop the recursion.  However, with this command:
+
+@example
+wget -r -l 2 -p http://@var{site}/1.html
+@end example
+
+all the above files @emph{and} @file{3.html}'s requisite @file{3.gif}
+will be downloaded.  Similarly,
+
+@example
+wget -r -l 1 -p http://@var{site}/1.html
+@end example
+
+will cause @file{1.html}, @file{1.gif}, @file{2.html}, and @file{2.gif}
+to be downloaded.  One might think that:
+
+@example
+wget -r -l 0 -p http://@var{site}/1.html
+@end example
+
+would download just @file{1.html} and @file{1.gif}, but unfortunately
+this is not the case, because @samp{-l 0} is equivalent to @samp{-l inf}
+-- that is, infinite recursion.  To download a single HTML page (or a
+handful of them, all specified on the commandline or in a @samp{-i} @sc{url}
+input file) and its requisites, simply leave off @samp{-p} and @samp{-l}:
+
+@example
+wget -p http://@var{site}/1.html
+@end example
+
+Note that wget will behave as if @samp{-r} had been specified, but only
+that single page and its requisites will be downloaded.  Links from that
+page to external documents will not be followed.  Actually, to download
+a single page and all its requisites (even if they exist on separate
+websites), and make sure the lot displays properly locally, this author
+likes to use a few options in addition to @samp{-p}:
+
+@example
+wget -E -H -k -K -nh -p http://@var{site}/@var{document}
+@end example
+
+To finish off this topic, it's worth knowing that wget's idea of an
+external document link is any URL specified in an @code{<A>} tag, an
+@code{<AREA>} tag, or a @code{<LINK>} tag other than @code{<LINK
+REL="stylesheet">}.
 @end table
 
 @node Recursive Accept/Reject Options,  , Recursive Retrieval Options, Invoking
@@ -873,22 +1056,50 @@ only one host is spanned (@xref{Domain Acceptance}).
 Exclude the domains given in a comma-separated @var{domain-list} from
 @sc{dns}-lookup (@xref{Domain Acceptance}).
 
-@item -L
-@itemx --relative
-Follow relative links only.  Useful for retrieving a specific home page
-without any distractions, not even those from the same hosts
-(@xref{Relative Links}).
-
 @cindex follow FTP links
 @item --follow-ftp
 Follow @sc{ftp} links from @sc{html} documents.  Without this option,
 Wget will ignore all the @sc{ftp} links.
 
+@cindex tag-based recursive pruning
+@item --follow-tags=@var{list}
+Wget has an internal table of HTML tag / attribute pairs that it
+considers when looking for linked documents during a recursive
+retrieval.  If a user wants only a subset of those tags to be
+considered, however, he or she should be specify such tags in a
+comma-separated @var{list} with this option.
+
+@item -G @var{list}
+@itemx --ignore-tags=@var{list}
+This is the opposite of the @samp{--follow-tags} option.  To skip
+certain HTML tags when recursively looking for documents to download,
+specify them in a comma-separated @var{list}.  
+
+In the past, the @samp{-G} option was the best bet for downloading a
+single page and its requisites, using a commandline like:
+
+@example
+wget -Ga,area -H -k -K -nh -r http://@var{site}/@var{document}
+@end example
+
+However, the author of this option came across a page with tags like
+@code{<LINK REL="home" HREF="/">} and came to the realization that
+@samp{-G} was not enough.  One can't just tell wget to ignore
+@code{<LINK>}, because then stylesheets will not be downloaded.  Now the
+best bet for downloading a single page and its requisites is the
+dedicated @samp{--page-requisites} option.
+
 @item -H
 @itemx --span-hosts
 Enable spanning across hosts when doing recursive retrieving (@xref{All
 Hosts}).
 
+@item -L
+@itemx --relative
+Follow relative links only.  Useful for retrieving a specific home page
+without any distractions, not even those from the same hosts
+(@xref{Relative Links}).
+
 @item -I @var{list}
 @itemx --include-directories=@var{list}
 Specify a comma-separated list of directories you wish to follow when
@@ -955,7 +1166,7 @@ network; all of this may hamper other users' work.  The same stands for
 the foreign server you are mirroring---the more requests it gets in a
 rows, the greater is its load.
 
-Careless retrieving can also fill your file system unctrollably, which
+Careless retrieving can also fill your file system uncontrollably, which
 can grind the machine to a halt.
 
 The load can be minimized by lowering the maximum recursion level
@@ -972,7 +1183,7 @@ precautions not to wreak havoc through carelessness.
 @cindex links
 @cindex following links
 
-When retrieving recursively, one does not wish to retrieve the loads of
+When retrieving recursively, one does not wish to retrieve loads of
 unnecessary data.  Most of the time the users bear in mind exactly what
 they want to download, and want Wget to follow only specific links.
 
@@ -1013,7 +1224,7 @@ generally output relative links.
 The drawback of following the relative links solely is that humans often
 tend to mix them with absolute links to the very same host, and the very
 same page.  In this mode (which is the default mode for following links)
-all @sc{url}s the that refer to the same host will be retrieved.
+all @sc{url}s that refer to the same host will be retrieved.
 
 The problem with this option are the aliases of the hosts and domains.
 Thus there is no way for Wget to know that @samp{regoc.srce.hr} and
@@ -1023,8 +1234,8 @@ encountered, the host is @sc{dns}-looked-up with @code{gethostbyname} to
 check whether we are maybe dealing with the same hosts.  Although the
 results of @code{gethostbyname} are cached, it is still a great
 slowdown, e.g. when dealing with large indices of home pages on different
-hosts (because each of the hosts must be and @sc{dns}-resolved to see
-whether it just @emph{might} an alias of the starting host).
+hosts (because each of the hosts must be @sc{dns}-resolved to see
+whether it just @emph{might} be an alias of the starting host).
 
 To avoid the overhead you may use @samp{-nh}, which will turn off
 @sc{dns}-resolving and make Wget compare hosts literally.  This will
@@ -1032,15 +1243,15 @@ make things run much faster, but also much less reliable
 (e.g. @samp{www.srce.hr} and @samp{regoc.srce.hr} will be flagged as
 different hosts).
 
-Note that modern @sc{http} servers allows one IP address to host several
-@dfn{virtual servers}, each having its own directory hieratchy.  Such
+Note that modern @sc{http} servers allow one IP address to host several
+@dfn{virtual servers}, each having its own directory hierarchy.  Such
 ``servers'' are distinguished by their hostnames (all of which point to
 the same IP address); for this to work, a client must send a @code{Host}
 header, which is what Wget does.  However, in that case Wget @emph{must
 not} try to divine a host's ``real'' address, nor try to use the same
 hostname for each access, i.e. @samp{-nh} must be turned on.
 
-In other words, the @samp{-nh} option must be used to enabling the
+In other words, the @samp{-nh} option must be used to enable the
 retrieval from virtual servers distinguished by their hostnames.  As the
 number of such server setups grow, the behavior of @samp{-nh} may become
 the default in the future.
@@ -1105,8 +1316,8 @@ rarely useful for itself.
 
 When downloading material from the web, you will often want to restrict
 the retrieval to only certain file types.  For example, if you are
-interested in downloading @sc{gifs}, you will not be overjoyed to get
-loads of Postscript documents, and vice versa.
+interested in downloading @sc{gif}s, you will not be overjoyed to get
+loads of PostScript documents, and vice versa.
 
 Wget offers two options to deal with this problem.  Each option
 description lists a short name, a long name, and the equivalent command
@@ -1157,7 +1368,7 @@ expansion by the shell.
 The @samp{-A} and @samp{-R} options may be combined to achieve even
 better fine-tuning of which files to retrieve.  E.g. @samp{wget -A
 "*zelazny*" -R .ps} will download all the files having @samp{zelazny} as
-a part of their name, but @emph{not} the postscript files.
+a part of their name, but @emph{not} the PostScript files.
 
 Note that these two options do not affect the downloading of @sc{html}
 files; Wget must load all the @sc{html}s to know where to go at
@@ -1220,7 +1431,7 @@ want to load all the files from @file{/pub} hierarchy except for
 @itemx no_parent = on
 The simplest, and often very useful way of limiting directories is
 disallowing retrieval of the links that refer to the hierarchy
-@dfn{upper} than the beginning directory, i.e. disallowing ascent to the
+@dfn{above} than the beginning directory, i.e. disallowing ascent to the
 parent directory/directories.
 
 The @samp{--no-parent} option (short @samp{-np}) is useful in this case.
@@ -1382,6 +1593,12 @@ up.@footnote{As an additional check, Wget will look at the
 same, the remote file will be downloaded no matter what the time-stamp
 says.}
 
+When @samp{--backup-converted} (@samp{-K}) is specified in conjunction
+with @samp{-N}, server file @samp{@var{X}} is compared to local file
+@samp{@var{X}.orig}, if extant, rather than being compared to local file
+@samp{@var{X}}, which will always differ if it's been converted by
+@samp{--convert-links} (@samp{-k}).
+
 Arguably, @sc{http} time-stamping should be implemented using the
 @code{If-Modified-Since} request.
 
@@ -1490,16 +1707,22 @@ reject =
 @section Wgetrc Commands
 @cindex wgetrc commands
 
-The complete set of commands is listed below, the letter after @samp{=}
-denoting the value the command takes. It is @samp{on/off} for @samp{on}
-or @samp{off} (which can also be @samp{1} or @samp{0}), @var{string} for
-any non-empty string or @var{n} for a positive integer.  For example,
-you may specify @samp{use_proxy = off} to disable use of proxy servers
-by default. You may use @samp{inf} for infinite values, where
-appropriate.
+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 "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 -- commandline options
+will not override.
 
-Most of the commands have their equivalent command-line option
-(@xref{Invoking}), except some more obscure or rarely used ones.
+Some commands take pseudo-arbitrary values.  @var{address} values can be
+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 commandline equivalents (@xref{Invoking}),
+though some of the more obscure or rarely used ones do not.
 
 @table @asis
 @item accept/reject = @var{string}
@@ -1509,11 +1732,11 @@ Same as @samp{-A}/@samp{-R} (@xref{Types of Files}).
 Enable/disable host-prefixed file names.  @samp{-nH} disables it.
 
 @item continue = on/off
-Enable/disable continuation of the retrieval, the same as @samp{-c}
+Enable/disable continuation of the retrieval -- the same as @samp{-c}
 (which enables it).
 
 @item background = on/off
-Enable/disable going to background, the same as @samp{-b} (which enables 
+Enable/disable going to background -- the same as @samp{-b} (which enables
 it).
 
 @item backup_converted = on/off
@@ -1522,8 +1745,14 @@ Enable/disable saving pre-converted files with the suffix @samp{.orig}
 
 @c @item backups = @var{number}
 @c #### Document me!
+@c
 @item base = @var{string}
-Set base for relative @sc{url}s, the same as @samp{-B}.
+Consider relative @sc{url}s in @sc{url} input files forced to be
+interpreted as @sc{html} as being relative to @var{string} -- the same
+as @samp{-B}.
+
+@item bind_address = @var{address}
+Bind to @var{address}, like the @samp{--bind-address} option.
 
 @item cache = on/off
 When set to off, disallow server-caching.  See the @samp{-C} option.
@@ -1538,13 +1767,13 @@ Ignore @var{n} remote directory components.
 Debug mode, same as @samp{-d}.
 
 @item delete_after = on/off
-Delete after download, the same as @samp{--delete-after}.
+Delete after download -- the same as @samp{--delete-after}.
 
 @item dir_prefix = @var{string}
-Top of directory tree, the same as @samp{-P}.
+Top of directory tree -- the same as @samp{-P}.
 
 @item dirstruct = on/off
-Turning dirstruct on or off, the same as @samp{-x} or @samp{-nd},
+Turning dirstruct on or off -- the same as @samp{-x} or @samp{-nd},
 respectively.
 
 @item domains = @var{string}
@@ -1570,28 +1799,36 @@ Specify the dot retrieval @dfn{style}, as with @samp{--dot-style}.
 
 @item exclude_directories = @var{string}
 Specify a comma-separated list of directories you wish to exclude from
-download, the same as @samp{-X} (@xref{Directory-Based Limits}).
+download -- the same as @samp{-X} (@xref{Directory-Based Limits}).
 
 @item exclude_domains = @var{string}
 Same as @samp{--exclude-domains} (@xref{Domain Acceptance}).
 
 @item follow_ftp = on/off
-Follow @sc{ftp} links from @sc{html} documents, the same as @samp{-f}.
+Follow @sc{ftp} links from @sc{html} documents -- the same as @samp{-f}.
+
+@item follow_tags = @var{string}
+Only follow certain HTML tags when doing a recursive retrieval, just like
+@samp{--follow-tags}. 
 
 @item force_html = on/off
 If set to on, force the input filename to be regarded as an @sc{html}
-document, the same as @samp{-F}.
+document -- the same as @samp{-F}.
 
 @item ftp_proxy = @var{string}
 Use @var{string} as @sc{ftp} proxy, instead of the one specified in
 environment.
 
 @item glob = on/off
-Turn globbing on/off, the same as @samp{-g}.
+Turn globbing on/off -- the same as @samp{-g}.
 
 @item header = @var{string}
 Define an additional header, like @samp{--header}.
 
+@item html_extension = on/off
+Add a @samp{.html} extension to @samp{text/html} files without it, like
+@samp{-E}.
+
 @item http_passwd = @var{string}
 Set @sc{http} password.
 
@@ -1606,9 +1843,13 @@ Set @sc{http} user to @var{string}.
 When set to on, ignore @code{Content-Length} header; the same as
 @samp{--ignore-length}.
 
+@item ignore_tags = @var{string}
+Ignore certain HTML tags when doing a recursive retrieval, just like
+@samp{-G} / @samp{--ignore-tags}. 
+
 @item include_directories = @var{string}
 Specify a comma-separated list of directories you wish to follow when
-downloading, the same as @samp{-I}.
+downloading -- the same as @samp{-I}.
 
 @item input = @var{string}
 Read the @sc{url}s from @var{string}, like @samp{-i}.
@@ -1620,7 +1861,7 @@ as much data as there is, provided there is more than or equal
 to the value in @code{Content-Length}.
 
 @item logfile = @var{string}
-Set logfile, the same as @samp{-o}.
+Set logfile -- the same as @samp{-o}.
 
 @item login = @var{string}
 Your user name on the remote machine, for @sc{ftp}.  Defaults to
@@ -1644,42 +1885,52 @@ Use @var{string} as the comma-separated list of domains to avoid in
 proxy loading, instead of the one specified in environment.
 
 @item output_document = @var{string}
-Set the output filename, the same as @samp{-O}.
+Set the output filename -- the same as @samp{-O}.
+
+@item page_requisites = on/off
+Download all ancillary documents necessary for a single HTML page to
+display properly -- the same as @samp{-p}.
 
-@item passive_ftp = on/off
-Set passive @sc{ftp}, the same as @samp{--passive-ftp}.
+@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 commandline.
 
 @item passwd = @var{string}
 Set your @sc{ftp} password to @var{password}.  Without this setting, the
 password defaults to @samp{username@@hostname.domainname}.
 
 @item proxy_user = @var{string}
-Set proxy authentication user name to @var{string}, like
-@samp{--proxy-user}.
+Set proxy authentication user name to @var{string}, like @samp{--proxy-user}.
 
 @item proxy_passwd = @var{string}
-Set proxy authentication password to @var{string}, like
-@samp{--proxy-passwd}.
+Set proxy authentication password to @var{string}, like @samp{--proxy-passwd}.
+
+@item referer = @var{string}
+Set HTTP @samp{Referer:} header just like @samp{--referer}.  (Note it
+was the folks who wrote the @sc{http} spec who got the spelling of
+"referrer" wrong.)
 
 @item quiet = on/off
-Quiet mode, the same as @samp{-q}.
+Quiet mode -- the same as @samp{-q}.
 
 @item quota = @var{quota}
-Specify the download quota, which is useful to put in global
-wgetrc. When download quota is specified, Wget will stop retrieving
+Specify the download quota, which is useful to put in the global
+@file{wgetrc}. When download quota is specified, Wget will stop retrieving
 after the download sum has become greater than quota.  The quota can be
 specified in bytes (default), kbytes @samp{k} appended) or mbytes
 (@samp{m} appended).  Thus @samp{quota = 5m} will set the quota to 5
 mbytes. Note that the user's startup file overrides system settings.
 
 @item reclevel = @var{n}
-Recursion level, the same as @samp{-l}.
+Recursion level -- the same as @samp{-l}.
 
 @item recursive = on/off
-Recursive on/off, the same as @samp{-r}.
+Recursive on/off -- the same as @samp{-r}.
 
 @item relative_only = on/off
-Follow only relative links, the same as @samp{-L} (@xref{Relative
+Follow only relative links -- the same as @samp{-L} (@xref{Relative
 Links}).
 
 @item remove_listing = on/off
@@ -1696,7 +1947,7 @@ what you are doing before changing the default (which is @samp{on}).
 
 @item server_response = on/off
 Choose whether or not to print the @sc{http} and @sc{ftp} server
-responses, the same as @samp{-S}.
+responses -- the same as @samp{-S}.
 
 @item simple_host_check = on/off
 Same as @samp{-nh} (@xref{Host Checking}).
@@ -1705,22 +1956,27 @@ Same as @samp{-nh} (@xref{Host Checking}).
 Same as @samp{-H}.
 
 @item timeout = @var{n}
-Set timeout value, the same as @samp{-T}.
+Set timeout value -- the same as @samp{-T}.
 
 @item timestamping = on/off
 Turn timestamping on/off. The same as @samp{-N} (@xref{Time-Stamping}).
 
 @item tries = @var{n}
-Set number of retries per @sc{url}, the same as @samp{-t}.
+Set number of retries per @sc{url} -- the same as @samp{-t}.
 
 @item use_proxy = on/off
 Turn proxy support on/off. The same as @samp{-Y}.
 
 @item verbose = on/off
-Turn verbose on/off, the same as @samp{-v}/@samp{-nv}.
+Turn verbose on/off -- the same as @samp{-v}/@samp{-nv}.
 
 @item wait = @var{n}
-Wait @var{n} seconds between retrievals, the same as @samp{-w}.
+Wait @var{n} seconds between retrievals -- the same as @samp{-w}.
+
+@item waitretry = @var{n}
+Wait up to @var{n} seconds between retries of failed retrievals only --
+the same as @samp{--waitretry}.  Note that this is turned on by default
+in the global @file{wgetrc}.
 @end table
 
 @node Sample Wgetrc,  , Wgetrc Commands, Startup File
@@ -1732,105 +1988,12 @@ It is divided in two section---one for global usage (suitable for global
 startup file), and one for local usage (suitable for
 @file{$HOME/.wgetrc}).  Be careful about the things you change.
 
-Note that all the lines are commented out.  For any line to have effect,
-you must remove the @samp{#} prefix at the beginning of line.
+Note that almost all the lines are commented out.  For a command to have
+any effect, you must remove the @samp{#} character at the beginning of
+its line.
 
 @example
-###
-### Sample Wget initialization file .wgetrc
-###
-
-## You can use this file to change the default behaviour of wget or to
-## avoid having to type many many command-line options. This file does
-## not contain a comprehensive list of commands -- look at the manual
-## to find out what you can put into this file.
-## 
-## Wget initialization file can reside in /usr/local/etc/wgetrc
-## (global, for all users) or $HOME/.wgetrc (for a single user).
-##
-## To use any of the settings in this file, you will have to uncomment
-## them (and probably change them).
-
-
-##
-## Global settings (useful for setting up in /usr/local/etc/wgetrc).
-## Think well before you change them, since they may reduce wget's
-## functionality, and make it behave contrary to the documentation:
-##
-
-# You can set retrieve quota for beginners by specifying a value
-# optionally followed by 'K' (kilobytes) or 'M' (megabytes).  The
-# default quota is unlimited.
-#quota = inf
-
-# You can lower (or raise) the default number of retries when
-# downloading a file (default is 20).
-#tries = 20
-
-# Lowering the maximum depth of the recursive retrieval is handy to
-# prevent newbies from going too "deep" when they unwittingly start
-# the recursive retrieval.  The default is 5.
-#reclevel = 5
-
-# Many sites are behind firewalls that do not allow initiation of
-# connections from the outside.  On these sites you have to use the
-# `passive' feature of FTP.  If you are behind such a firewall, you
-# can turn this on to make Wget use passive FTP by default.
-#passive_ftp = off
-
-
-##
-## Local settings (for a user to set in his $HOME/.wgetrc).  It is
-## *highly* undesirable to put these settings in the global file, since
-## they are potentially dangerous to "normal" users.
-##
-## Even when setting up your own ~/.wgetrc, you should know what you
-## are doing before doing so.
-##
-
-# Set this to on to use timestamping by default:
-#timestamping = off
-
-# It is a good idea to make Wget send your email address in a `From:'
-# header with your request (so that server administrators can contact
-# you in case of errors).  Wget does *not* send `From:' by default.
-#header = From: Your Name <username@@site.domain>
-
-# You can set up other headers, like Accept-Language.  Accept-Language
-# is *not* sent by default.
-#header = Accept-Language: en
-
-# You can set the default proxy for Wget to use.  It will override the
-# value in the environment.
-#http_proxy = http://proxy.yoyodyne.com:18023/
-
-# If you do not want to use proxy at all, set this to off.
-#use_proxy = on
-
-# You can customize the retrieval outlook.  Valid options are default,
-# binary, mega and micro.
-#dot_style = default
-
-# Setting this to off makes Wget not download /robots.txt.  Be sure to
-# know *exactly* what /robots.txt is and how it is used before changing
-# the default!
-#robots = on
-
-# It can be useful to make Wget wait between connections.  Set this to
-# the number of seconds you want Wget to wait.
-#wait = 0
-
-# You can force creating directory structure, even if a single is being
-# retrieved, by setting this to on.
-#dirstruct = off
-
-# You can turn on recursive retrieving by default (don't do this if
-# you are not sure you know what it means) by setting this to on.
-#recursive = off
-
-# To have Wget follow FTP links from HTML files by default, set this
-# to on:
-#follow_ftp = off
+@include sample.wgetrc.munged_for_texi_inclusion
 @end example
 
 @node Examples, Various, Startup File, Top
@@ -2144,11 +2307,11 @@ connections.
 
 @item ftp_proxy
 This variable should contain the @sc{url} of the proxy for @sc{http}
-connections.  It is quite common that @sc{http_proxy} and @sc{ftp_proxy} 
+connections.  It is quite common that @sc{http_proxy} and @sc{ftp_proxy}
 are set to the same @sc{url}.
 
 @item no_proxy
-This variable should contain a comma-separated list of domain extensions 
+This variable should contain a comma-separated list of domain extensions
 proxy should @emph{not} be used for.  For instance, if the value of
 @code{no_proxy} is @samp{.mit.edu}, proxy will not be used to retrieve
 documents from MIT.
@@ -2199,7 +2362,7 @@ username and password.
 Like all GNU utilities, the latest version of Wget can be found at the
 master GNU archive site prep.ai.mit.edu, and its mirrors.  For example,
 Wget @value{VERSION} can be found at
-@url{ftp://prep.ai.mit.edu/pub/gnu/wget-@value{VERSION}.tar.gz}
+@url{ftp://prep.ai.mit.edu/gnu/wget/wget-@value{VERSION}.tar.gz}
 
 @node Mailing List, Reporting Bugs, Distribution, Various
 @section Mailing List
@@ -2353,7 +2516,7 @@ the robots @code{META} tag.
 
 The description of the norobots standard was written, and is maintained
 by Martijn Koster @email{m.koster@@webcrawler.com}.  With his
-permission, I contribute a (slightly modified) texified version of the
+permission, I contribute a (slightly modified) TeXified version of the
 @sc{res}.
 
 @menu
@@ -2418,8 +2581,8 @@ record contains lines of the form:
 @end example
 
 The field name is case insensitive.
-   
-Comments can be included in file using UNIX bourne shell conventions:
+
+Comments can be included in file using UNIX Bourne shell conventions:
 the @samp{#} character is used to indicate that preceding space (if any)
 and the remainder of the line up to the line termination is discarded.
 Lines containing only a comment are discarded completely, and therefore
@@ -2539,10 +2702,10 @@ me).
 @cindex contributors
 
 @iftex
-GNU Wget was written by Hrvoje Nik@v{s}i@'{c} @email{hniksic@@srce.hr}.
+GNU Wget was written by Hrvoje Nik@v{s}i@'{c} @email{hniksic@@arsdigita.com}.
 @end iftex
 @ifinfo
-GNU Wget was written by Hrvoje Niksic @email{hniksic@@srce.hr}.
+GNU Wget was written by Hrvoje Niksic @email{hniksic@@arsdigita.com}.
 @end ifinfo
 However, its development could never have gone as far as it has, were it
 not for the help of many people, either with bug reports, feature
@@ -2578,7 +2741,7 @@ and ``philosophical'' discussions.
 Darko Budor---initial port to Windows.
 
 @item
-Antonio Rosella---help and suggestions, plust the Italian translation.
+Antonio Rosella---help and suggestions, plus the Italian translation.
 
 @item
 @iftex
@@ -2617,6 +2780,7 @@ Tim Adam,
 Martin Baehr,
 Dieter Baron,
 Roger Beeman and the Gurus at Cisco,
+Dan Berger,
 Mark Boyns,
 John Burden,
 Wanderlei Cavassin,
@@ -2629,6 +2793,7 @@ Kristijan @v{C}onka@v{s},
 @ifinfo
 Kristijan Conkas,
 @end ifinfo
+Andrew Deryabin,
 @iftex
 Damir D@v{z}eko,
 @end iftex
@@ -2650,7 +2815,10 @@ Howard Gayle,
 Marcel Gerrits,
 Hans Grobler,
 Mathieu Guillaume,
+Dan Harkless,
+Heiko Herold,
 Karl Heuer,
+HIROSE Masaaki,
 Gregor Hoffleit,
 Erik Magnus Hulthen,
 Richard Huveneers,
@@ -2679,16 +2847,16 @@ $\Sigma\acute{\iota}\mu o\varsigma\;
 @ifinfo
 Simos KSenitellis,
 @end ifinfo
-Tage Stabell-Kulo,
 Hrvoje Lacko,
+Daniel S. Lewart,
 Dave Love,
 Jordan Mendelson,
 Lin Zhe Min,
 Charlie Negyesi,
 Andrew Pollock,
 Steve Pothier,
-Marin Purgar,
 Jan Prikryl,
+Marin Purgar,
 Keith Refson,
 Tobias Ringstrom,
 @c Texinfo doesn't grok @'{@i}, so we have to use TeX itself.
@@ -2698,14 +2866,17 @@ Juan Jos\'{e} Rodr\'{\i}gues,
 @ifinfo
 Juan Jose Rodrigues,
 @end ifinfo
+Edward J. Sabol,
 Heinz Salzmann,
 Robert Schmidt,
 Toomas Soome,
+Tage Stabell-Kulo,
 Sven Sternberger,
 Markus Strasser,
 Szakacsits Szabolcs,
 Mike Thomas,
 Russell Vincent,
+Charles G Waldman,
 Douglas E. Wegscheid,
 Jasmin Zainul,
 @iftex
@@ -3086,7 +3257,7 @@ when it starts in an interactive mode:
 Gnomovision version 69, Copyright (C) 19@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' 
+to redistribute it under certain conditions; type `show c'
 for details.
 @end smallexample
 
@@ -3104,7 +3275,7 @@ necessary.  Here is a sample; alter the names:
 @group
 Yoyodyne, Inc., hereby disclaims all copyright
 interest in the program `Gnomovision'
-(which makes passes at compilers) written 
+(which makes passes at compilers) written
 by James Hacker.
 
 @var{signature of Ty Coon}, 1 April 1989