home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / wget153.zip / doc / wget-1.5.3.text < prev   
Text File  |  1998-05-22  |  106KB  |  2,283 lines

  1.  
  2.                                  GNU Wget
  3.                                      
  4. The noninteractive downloading utility
  5.  
  6. Updated for Wget 1.5.3, Sep 1998
  7.  
  8.    
  9.     by Hrvoje Niksic [1]hniksic@srce.hr
  10.     
  11.       __________________________________________________________
  12.     
  13.     
  14.                             Table of Contents
  15.                                      
  16.                                      
  17.      * [2]Overview
  18.      * [3]Invoking
  19.           + [4]URL Format
  20.           + [5]Option Syntax
  21.           + [6]Basic Startup Options
  22.           + [7]Logging and Input File Options
  23.           + [8]Download Options
  24.           + [9]Directory Options
  25.           + [10]HTTP Options
  26.           + [11]FTP Options
  27.           + [12]Recursive Retrieval Options
  28.           + [13]Recursive Accept/Reject Options
  29.      * [14]Recursive Retrieval
  30.      * [15]Following Links
  31.           + [16]Relative Links
  32.           + [17]Host Checking
  33.           + [18]Domain Acceptance
  34.           + [19]All Hosts
  35.           + [20]Types of Files
  36.           + [21]Directory-Based Limits
  37.           + [22]Following FTP Links
  38.      * [23]Time-Stamping
  39.           + [24]Time-Stamping Usage
  40.           + [25]HTTP Time-Stamping Internals
  41.           + [26]FTP Time-Stamping Internals
  42.      * [27]Startup File
  43.           + [28]Wgetrc Location
  44.           + [29]Wgetrc Syntax
  45.           + [30]Wgetrc Commands
  46.           + [31]Sample Wgetrc
  47.      * [32]Examples
  48.           + [33]Simple Usage
  49.           + [34]Advanced Usage
  50.           + [35]Guru Usage
  51.      * [36]Various
  52.           + [37]Proxies
  53.           + [38]Distribution
  54.           + [39]Mailing List
  55.           + [40]Reporting Bugs
  56.           + [41]Portability
  57.           + [42]Signals
  58.      * [43]Appendices
  59.           + [44]Robots
  60.                o [45]Introduction to RES
  61.                o [46]RES Format
  62.                o [47]User-Agent Field
  63.                o [48]Disallow Field
  64.                o [49]Norobots Examples
  65.           + [50]Security Considerations
  66.           + [51]Contributors
  67.      * [52]GNU GENERAL PUBLIC LICENSE
  68.           + [53]Preamble
  69.           + [54]TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
  70.             MODIFICATION
  71.           + [55]How to Apply These Terms to Your New Programs
  72.      * [56]Concept Index
  73.        
  74.       __________________________________________________________
  75.     
  76.     @dircategory Net Utilities @dircategory World Wide Web
  77.     @direntry * Wget: (wget). The non-interactive network
  78.     downloader.
  79.     Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
  80.     Permission is granted to make and distribute verbatim copies of
  81.     this manual provided the copyright notice and this permission
  82.     notice are preserved on all copies.
  83.     Permission is granted to copy and distribute modified versions
  84.     of this manual under the conditions for verbatim copying,
  85.     provided also that the sections entitled "Copying" and "GNU
  86.     General Public License" are included exactly as in the
  87.     original, and provided that the entire resulting derived work
  88.     is distributed under the terms of a permission notice identical
  89.     to this one.
  90.     Permission is granted to copy and distribute translations of
  91.     this manual into another language, under the above conditions
  92.     for modified versions, except that this permission notice may
  93.     be stated in a translation approved by the Free Software
  94.     Foundation.
  95.     
  96.                                [57]Overview
  97.                                      
  98.                                      
  99.     GNU Wget is a freely available network utility to retrieve
  100.     files from the World Wide Web, using HTTP (Hyper Text Transfer
  101.     Protocol) and FTP (File Transfer Protocol), the two most widely
  102.     used Internet protocols. It has many useful features to make
  103.     downloading easier, some of them being:
  104.     
  105.      * Wget is non-interactive, meaning that it can work in the
  106.        background, while the user is not logged on. This allows you
  107.        to start a retrieval and disconnect from the system, letting
  108.        Wget finish the work. By contrast, most of the Web browsers
  109.        require constant user's presence, which can be a great
  110.        hindrance when transferring a lot of data.
  111.      * Wget is capable of descending recursively through the
  112.        structure of HTML documents and FTP directory trees, making a
  113.        local copy of the directory hierarchy similar to the one on
  114.        the remote server. This feature can be used to mirror
  115.        archives and home pages, or traverse the web in search of
  116.        data, like a WWW robot (See section [58]Robots). In that
  117.        spirit, Wget understands the norobots convention.
  118.      * File name wildcard matching and recursive mirroring of
  119.        directories are available when retrieving via FTP. Wget can
  120.        read the time-stamp information given by both HTTP and FTP
  121.        servers, and store it locally. Thus Wget can see if the
  122.        remote file has changed since last retrieval, and
  123.        automatically retrieve the new version if it has. This makes
  124.        Wget suitable for mirroring of FTP sites, as well as home
  125.        pages.
  126.      * Wget works exceedingly well on slow or unstable connections,
  127.        retrying the document until it is fully retrieved, or until a
  128.        user-specified retry count is surpassed. It will try to
  129.        resume the download from the point of interruption, using
  130.        REST with FTP and Range with HTTP servers that support them.
  131.      * By default, Wget supports proxy servers, which can lighten
  132.        the network load, speed up retrieval and provide access
  133.        behind firewalls. However, if you are behind a firewall that
  134.        requires that you use a socks style gateway, you can get the
  135.        socks library and build wget with support for socks. Wget
  136.        also supports the passive FTP downloading as an option.
  137.      * Builtin features offer mechanisms to tune which links you
  138.        wish to follow (See section [59]Following Links).
  139.      * The retrieval is conveniently traced with printing dots, each
  140.        dot representing a fixed amount of data received (1KB by
  141.        default). These representations can be customized to your
  142.        preferences.
  143.      * Most of the features are fully configurable, either through
  144.        command line options, or via the initialization file
  145.        `.wgetrc' (See section [60]Startup File). Wget allows you to
  146.        define global startup files (`/usr/local/etc/wgetrc' by
  147.        default) for site settings.
  148.      * Finally, GNU Wget is free software. This means that everyone
  149.        may use it, redistribute it and/or modify it under the terms
  150.        of the GNU General Public License, as published by the Free
  151.        Software Foundation (See section [61]GNU GENERAL PUBLIC
  152.        LICENSE).
  153.        
  154.                                [62]Invoking
  155.                                      
  156.    By default, Wget is very simple to invoke. The basic syntax is:
  157. wget [option]... [URL]...
  158.  
  159.    Wget will simply download all the URLs specified on the command
  160.    line. URL is a Uniform Resource Locator, as defined below.
  161.    
  162.    However, you may wish to change some of the default parameters of
  163.    Wget. You can do it two ways: permanently, adding the appropriate
  164.    command to `.wgetrc' (See section [63]Startup File), or
  165.    specifying it on the command line.
  166.    
  167. [64]URL Format
  168.  
  169.    URL is an acronym for Uniform Resource Locator. A uniform
  170.    resource locator is a compact string representation for a
  171.    resource available via the Internet. Wget recognizes the URL
  172.    syntax as per RFC1738. This is the most widely used form (square
  173.    brackets denote optional parts):
  174. http://host[:port]/directory/file
  175. ftp://host[:port]/directory/file
  176.  
  177.    You can also encode your username and password within a URL:
  178. ftp://user:password@host/path
  179. http://user:password@host/path
  180.  
  181.    Either user or password, or both, may be left out. If you leave
  182.    out either the HTTP username or password, no authentication will
  183.    be sent. If you leave out the FTP username, `anonymous' will be
  184.    used. If you leave out the FTP password, your email address will
  185.    be supplied as a default password.[65](1)
  186.    
  187.    You can encode unsafe characters in a URL as `%xy', xy being the
  188.    hexadecimal representation of the character's ASCII value. Some
  189.    common unsafe characters include `%' (quoted as `%25'), `:'
  190.    (quoted as `%3A'), and `@' (quoted as `%40'). Refer to RFC1738
  191.    for a comprehensive list of unsafe characters.
  192.    
  193.    Wget also supports the type feature for FTP URLs. By default, FTP
  194.    documents are retrieved in the binary mode (type `i'), which
  195.    means that they are downloaded unchanged. Another useful mode is
  196.    the `a' (ASCII) mode, which converts the line delimiters between
  197.    the different operating systems, and is thus useful for text
  198.    files. Here is an example:
  199. ftp://host/directory/file;type=a
  200.  
  201.    Two alternative variants of URL specification are also supported,
  202.    because of historical (hysterical?) reasons and their
  203.    wide-spreadedness.
  204.    
  205.    FTP-only syntax (supported by NcFTP):
  206. host:/dir/file
  207.  
  208.    HTTP-only syntax (introduced by Netscape):
  209. host[:port]/dir/file
  210.  
  211.    These two alternative forms are deprecated, and may cease being
  212.    supported in the future.
  213.    
  214.    If you do not understand the difference between these notations,
  215.    or do not know which one to use, just use the plain ordinary
  216.    format you use with your favorite browser, like Lynx or Netscape.
  217.    
  218. [66]Option Syntax
  219.  
  220.    Since Wget uses GNU getopts to process its arguments, every
  221.    option has a short form and a long form. Long options are more
  222.    convenient to remember, but take time to type. You may freely mix
  223.    different option styles, or specify options after the
  224.    command-line arguments. Thus you may write:
  225. wget -r --tries=10 http://fly.cc.fer.hr/ -o log
  226.  
  227.    The space between the option accepting an argument and the
  228.    argument may be omitted. Instead `-o log' you can write `-olog'.
  229.    
  230.    You may put several options that do not require arguments
  231.    together, like:
  232. wget -drc URL
  233.  
  234.    This is a complete equivalent of:
  235. wget -d -r -c URL
  236.  
  237.    Since the options can be specified after the arguments, you may
  238.    terminate them with `--'. So the following will try to download
  239.    URL `-x', reporting failure to `log':
  240. wget -o log -- -x
  241.  
  242.    The options that accept comma-separated lists all respect the
  243.    convention that specifying an empty list clears its value. This
  244.    can be useful to clear the `.wgetrc' settings. For instance, if
  245.    your `.wgetrc' sets exclude_directories to `/cgi-bin', the
  246.    following example will first reset it, and then set it to exclude
  247.    `/~nobody' and `/~somebody'. You can also clear the lists in
  248.    `.wgetrc' (See section [67]Wgetrc Syntax).
  249. wget -X '' -X /~nobody,/~somebody
  250.  
  251. [68]Basic Startup Options
  252.  
  253.    `-V'
  254.    `--version'
  255.           Display the version of Wget.
  256.    `-h'
  257.    `--help'
  258.           Print a help message describing all of Wget's command-line
  259.           options.
  260.    `-b'
  261.    `--background'
  262.           Go to background immediately after startup. If no output
  263.           file is specified via the `-o', output is redirected to
  264.           `wget-log'.
  265.    `-e command'
  266.    `--execute command'
  267.           Execute command as if it were a part of `.wgetrc' (See
  268.           section [69]Startup File). A command thus invoked will be
  269.           executed after the commands in `.wgetrc', thus taking
  270.           precedence over them.
  271.           
  272. [70]Logging and Input File Options
  273.  
  274.    `-o logfile'
  275.    `--output-file=logfile'
  276.           Log all messages to logfile. The messages are normally
  277.           reported to standard error.
  278.    `-a logfile'
  279.    `--append-output=logfile'
  280.           Append to logfile. This is the same as `-o', only it
  281.           appends to logfile instead of overwriting the old log
  282.           file. If logfile does not exist, a new file is created.
  283.    `-d'
  284.    `--debug'
  285.           Turn on debug output, meaning various information
  286.           important to the developers of Wget if it does not work
  287.           properly. Your system administrator may have chosen to
  288.           compile Wget without debug support, in which case `-d'
  289.           will not work. Please note that compiling with debug
  290.           support is always safe--Wget compiled with the debug
  291.           support will not print any debug info unless requested
  292.           with `-d'. See section [71]Reporting Bugs for more
  293.           information on how to use `-d' for sending bug reports.
  294.    `-q'
  295.    `--quiet'
  296.           Turn off Wget's output.
  297.    `-v'
  298.    `--verbose'
  299.           Turn on verbose output, with all the available data. The
  300.           default output is verbose.
  301.    `-nv'
  302.    `--non-verbose'
  303.           Non-verbose output--turn off verbose without being
  304.           completely quiet (use `-q' for that), which means that
  305.           error messages and basic information still get printed.
  306.    `-i file'
  307.    `--input-file=file'
  308.           Read URLs from file, in which case no URLs need to be on
  309.           the command line. If there are URLs both on the command
  310.           line and in an input file, those on the command lines will
  311.           be the first ones to be retrieved. The file need not be an
  312.           HTML document (but no harm if it is)---it is enough if the
  313.           URLs are just listed sequentially. However, if you specify
  314.           `--force-html', the document will be regarded as `html'.
  315.           In that case you may have problems with relative links,
  316.           which you can solve either by adding <base href="url"> to
  317.           the documents or by specifying `--base=url' on the command
  318.           line.
  319.    `-F'
  320.    `--force-html'
  321.           When input is read from a file, force it to be treated as
  322.           an HTML file. This enables you to retrieve relative links
  323.           from existing HTML files on your local disk, by adding
  324.           <base href="url"> to HTML, or using the `--base'
  325.           command-line option.
  326.           
  327. [72]Download Options
  328.  
  329.    `-t number'
  330.    `--tries=number'
  331.           Set number of retries to number. Specify 0 or `inf' for
  332.           infinite retrying.
  333.    `-O file'
  334.    `--output-document=file'
  335.           The documents will not be written to the appropriate
  336.           files, but all will be concatenated together and written
  337.           to file. If file already exists, it will be overwritten.
  338.           If the file is `-', the documents will be written to
  339.           standard output. Including this option automatically sets
  340.           the number of tries to 1.
  341.    `-nc'
  342.    `--no-clobber'
  343.           Do not clobber existing files when saving to directory
  344.           hierarchy within recursive retrieval of several files.
  345.           This option is extremely useful when you wish to continue
  346.           where you left off with retrieval of many files. If the
  347.           files have the `.html' or (yuck) `.htm' suffix, they will
  348.           be loaded from the local disk, and parsed as if they have
  349.           been retrieved from the Web.
  350.    `-c'
  351.    `--continue'
  352.           Continue getting an existing file. This is useful when you
  353.           want to finish up the download started by another program,
  354.           or a previous instance of Wget. Thus you can write:
  355. wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z
  356.           If there is a file name `ls-lR.Z' in the current
  357.           directory, Wget will assume that it is the first portion
  358.           of the remote file, and will require the server to
  359.           continue the retrieval from an offset equal to the length
  360.           of the local file. Note that you need not specify this
  361.           option if all you want is Wget to continue retrieving
  362.           where it left off when the connection is lost--Wget does
  363.           this by default. You need this option only when you want
  364.           to continue retrieval of a file already halfway retrieved,
  365.           saved by another FTP client, or left by Wget being killed.
  366.           Without `-c', the previous example would just begin to
  367.           download the remote file to `ls-lR.Z.1'. The `-c' option
  368.           is also applicable for HTTP servers that support the Range
  369.           header.
  370.    `--dot-style=style'
  371.           Set the retrieval style to style. Wget traces the
  372.           retrieval of each document by printing dots on the screen,
  373.           each dot representing a fixed amount of retrieved data.
  374.           Any number of dots may be separated in a cluster, to make
  375.           counting easier. This option allows you to choose one of
  376.           the pre-defined styles, determining the number of bytes
  377.           represented by a dot, the number of dots in a cluster, and
  378.           the number of dots on the line. With the default style
  379.           each dot represents 1K, there are ten dots in a cluster
  380.           and 50 dots in a line. The binary style has a more
  381.           "computer"-like orientation--8K dots, 16-dots clusters and
  382.           48 dots per line (which makes for 384K lines). The mega
  383.           style is suitable for downloading very large files--each
  384.           dot represents 64K retrieved, there are eight dots in a
  385.           cluster, and 48 dots on each line (so each line contains
  386.           3M). The micro style is exactly the reverse; it is
  387.           suitable for downloading small files, with 128-byte dots,
  388.           8 dots per cluster, and 48 dots (6K) per line.
  389.    `-N'
  390.    `--timestamping'
  391.           Turn on time-stamping. See section [73]Time-Stamping for
  392.           details.
  393.    `-S'
  394.    `--server-response'
  395.           Print the headers sent by HTTP servers and responses sent
  396.           by FTP servers.
  397.    `--spider'
  398.           When invoked with this option, Wget will behave as a Web
  399.           spider, which means that it will not download the pages,
  400.           just check that they are there. You can use it to check
  401.           your bookmarks, e.g. with:
  402. wget --spider --force-html -i bookmarks.html
  403.           This feature needs much more work for Wget to get close to
  404.           the functionality of real WWW spiders.
  405.    `-T seconds'
  406.    `--timeout=seconds'
  407.           Set the read timeout to seconds seconds. Whenever a
  408.           network read is issued, the file descriptor is checked for
  409.           a timeout, which could otherwise leave a pending
  410.           connection (uninterrupted read). The default timeout is
  411.           900 seconds (fifteen minutes). Setting timeout to 0 will
  412.           disable checking for timeouts. Please do not lower the
  413.           default timeout value with this option unless you know
  414.           what you are doing.
  415.    `-w seconds'
  416.    `--wait=seconds'
  417.           Wait the specified number of seconds between the
  418.           retrievals. Use of this option is recommended, as it
  419.           lightens the server load by making the requests less
  420.           frequent. Instead of in seconds, the time can be specified
  421.           in minutes using the m suffix, in hours using h suffix, or
  422.           in days using d suffix. Specifying a large value for this
  423.           option is useful if the network or the destination host is
  424.           down, so that Wget can wait long enough to reasonably
  425.           expect the network error to be fixed before the retry.
  426.    `-Y on/off'
  427.    `--proxy=on/off'
  428.           Turn proxy support on or off. The proxy is on by default
  429.           if the appropriate environmental variable is defined.
  430.    `-Q quota'
  431.    `--quota=quota'
  432.           Specify download quota for automatic retrievals. The value
  433.           can be specified in bytes (default), kilobytes (with `k'
  434.           suffix), or megabytes (with `m' suffix). Note that quota
  435.           will never affect downloading a single file. So if you
  436.           specify `wget -Q10k ftp://wuarchive.wustl.edu/ls-lR.gz',
  437.           all of the `ls-lR.gz' will be downloaded. The same goes
  438.           even when several URLs are specified on the command-line.
  439.           However, quota is respected when retrieving either
  440.           recursively, or from an input file. Thus you may safely
  441.           type `wget -Q2m -i sites'---download will be aborted when
  442.           the quota is exceeded. Setting quota to 0 or to `inf'
  443.           unlimits the download quota.
  444.           
  445. [74]Directory Options
  446.  
  447.    `-nd'
  448.    `--no-directories'
  449.           Do not create a hierarchy of directories when retrieving
  450.           recursively. With this option turned on, all files will
  451.           get saved to the current directory, without clobbering (if
  452.           a name shows up more than once, the filenames will get
  453.           extensions `.n').
  454.    `-x'
  455.    `--force-directories'
  456.           The opposite of `-nd'---create a hierarchy of directories,
  457.           even if one would not have been created otherwise. E.g.
  458.           `wget -x http://fly.cc.fer.hr/robots.txt' will save the
  459.           downloaded file to `fly.cc.fer.hr/robots.txt'.
  460.    `-nH'
  461.    `--no-host-directories'
  462.           Disable generation of host-prefixed directories. By
  463.           default, invoking Wget with `-r http://fly.cc.fer.hr/'
  464.           will create a structure of directories beginning with
  465.           `fly.cc.fer.hr/'. This option disables such behavior.
  466.    `--cut-dirs=number'
  467.           Ignore number directory components. This is useful for
  468.           getting a fine-grained control over the directory where
  469.           recursive retrieval will be saved. Take, for example, the
  470.           directory at `ftp://ftp.xemacs.org/pub/xemacs/'. If you
  471.           retrieve it with `-r', it will be saved locally under
  472.           `ftp.xemacs.org/pub/xemacs/'. While the `-nH' option can
  473.           remove the `ftp.xemacs.org/' part, you are still stuck
  474.           with `pub/xemacs'. This is where `--cut-dirs' comes in
  475.           handy; it makes Wget not "see" number remote directory
  476.           components. Here are several examples of how `--cut-dirs'
  477.           option works.
  478. No options        -> ftp.xemacs.org/pub/xemacs/
  479. -nH               -> pub/xemacs/
  480. -nH --cut-dirs=1  -> xemacs/
  481. -nH --cut-dirs=2  -> .
  482.  
  483. --cut-dirs=1      -> ftp.xemacs.org/xemacs/
  484. ...
  485.           If you just want to get rid of the directory structure,
  486.           this option is similar to a combination of `-nd' and `-P'.
  487.           However, unlike `-nd', `--cut-dirs' does not lose with
  488.           subdirectories--for instance, with `-nH --cut-dirs=1', a
  489.           `beta/' subdirectory will be placed to `xemacs/beta', as
  490.           one would expect.
  491.    `-P prefix'
  492.    `--directory-prefix=prefix'
  493.           Set directory prefix to prefix. The directory prefix is
  494.           the directory where all other files and subdirectories
  495.           will be saved to, i.e. the top of the retrieval tree. The
  496.           default is `.' (the current directory).
  497.           
  498. [75]HTTP Options
  499.  
  500.    `--http-user=user'
  501.    `--http-passwd=password'
  502.           Specify the username user and password password on an HTTP
  503.           server. According to the type of the challenge, Wget will
  504.           encode them using either the basic (insecure) or the
  505.           digest authentication scheme. Another way to specify
  506.           username and password is in the URL itself (See section
  507.           [76]URL Format). For more information about security
  508.           issues with Wget, See section [77]Security Considerations.
  509.    `-C on/off'
  510.    `--cache=on/off'
  511.           When set to off, disable server-side cache. In this case,
  512.           Wget will send the remote server an appropriate directive
  513.           (`Pragma: no-cache') to get the file from the remote
  514.           service, rather than returning the cached version. This is
  515.           especially useful for retrieving and flushing out-of-date
  516.           documents on proxy servers. Caching is allowed by default.
  517.    `--ignore-length'
  518.           Unfortunately, some HTTP servers (CGI programs, to be more
  519.           precise) send out bogus Content-Length headers, which
  520.           makes Wget go wild, as it thinks not all the document was
  521.           retrieved. You can spot this syndrome if Wget retries
  522.           getting the same document again and again, each time
  523.           claiming that the (otherwise normal) connection has closed
  524.           on the very same byte. With this option, Wget will ignore
  525.           the Content-Length header--as if it never existed.
  526.    `--header=additional-header'
  527.           Define an additional-header to be passed to the HTTP
  528.           servers. Headers must contain a `:' preceded by one or
  529.           more non-blank characters, and must not contain newlines.
  530.           You may define more than one additional header by
  531.           specifying `--header' more than once.
  532. wget --header='Accept-Charset: iso-8859-2' \
  533.      --header='Accept-Language: hr'        \
  534.        http://fly.cc.fer.hr/
  535.           Specification of an empty string as the header value will
  536.           clear all previous user-defined headers.
  537.    `--proxy-user=user'
  538.    `--proxy-passwd=password'
  539.           Specify the username user and password password for
  540.           authentication on a proxy server. Wget will encode them
  541.           using the basic authentication scheme.
  542.    `-s'
  543.    `--save-headers'
  544.           Save the headers sent by the HTTP server to the file,
  545.           preceding the actual contents, with an empty line as the
  546.           separator.
  547.    `-U agent-string'
  548.    `--user-agent=agent-string'
  549.           Identify as agent-string to the HTTP server. The HTTP
  550.           protocol allows the clients to identify themselves using a
  551.           User-Agent header field. This enables distinguishing the
  552.           WWW software, usually for statistical purposes or for
  553.           tracing of protocol violations. Wget normally identifies
  554.           as `Wget/version', version being the current version
  555.           number of Wget. However, some sites have been known to
  556.           impose the policy of tailoring the output according to the
  557.           User-Agent-supplied information. While conceptually this
  558.           is not such a bad idea, it has been abused by servers
  559.           denying information to clients other than Mozilla or
  560.           Microsoft Internet Explorer. This option allows you to
  561.           change the User-Agent line issued by Wget. Use of this
  562.           option is discouraged, unless you really know what you are
  563.           doing. NOTE that Netscape Communications Corp. has claimed
  564.           that false transmissions of `Mozilla' as the User-Agent
  565.           are a copyright infringement, which will be prosecuted. DO
  566.           NOT misrepresent Wget as Mozilla.
  567.           
  568. [78]FTP Options
  569.  
  570.    `--retr-symlinks'
  571.           Retrieve symbolic links on FTP sites as if they were plain
  572.           files, i.e. don't just create links locally.
  573.    `-g on/off'
  574.    `--glob=on/off'
  575.           Turn FTP globbing on or off. Globbing means you may use
  576.           the shell-like special characters (wildcards), like `*',
  577.           `?', `[' and `]' to retrieve more than one file from the
  578.           same directory at once, like:
  579. wget ftp://gnjilux.cc.fer.hr/*.msg
  580.           By default, globbing will be turned on if the URL contains
  581.           a globbing character. This option may be used to turn
  582.           globbing on or off permanently. You may have to quote the
  583.           URL to protect it from being expanded by your shell.
  584.           Globbing makes Wget look for a directory listing, which is
  585.           system-specific. This is why it currently works only with
  586.           Unix FTP servers (and the ones emulating Unix ls output).
  587.    `--passive-ftp'
  588.           Use the passive FTP retrieval scheme, in which the client
  589.           initiates the data connection. This is sometimes required
  590.           for FTP to work behind firewalls.
  591.           
  592. [79]Recursive Retrieval Options
  593.  
  594.    `-r'
  595.    `--recursive'
  596.           Turn on recursive retrieving. See section [80]Recursive
  597.           Retrieval for more details.
  598.    `-l depth'
  599.    `--level=depth'
  600.           Specify recursion maximum depth level depth (See section
  601.           [81]Recursive Retrieval). The default maximum depth is 5.
  602.    `--delete-after'
  603.           This option tells Wget to delete every single file it
  604.           downloads, after having done so. It is useful for
  605.           pre-fetching popular pages through proxy, e.g.:
  606. wget -r -nd --delete-after http://whatever.com/~popular/page/
  607.           The `-r' option is to retrieve recursively, and `-nd' not
  608.           to create directories.
  609.    `-k'
  610.    `--convert-links'
  611.           Convert the non-relative links to relative ones locally.
  612.           Only the references to the documents actually downloaded
  613.           will be converted; the rest will be left unchanged. Note
  614.           that only at the end of the download can Wget know which
  615.           links have been downloaded. Because of that, much of the
  616.           work done by `-k' will be performed at the end of the
  617.           downloads.
  618.    `-m'
  619.    `--mirror'
  620.           Turn on options suitable for mirroring. This option turns
  621.           on recursion and time-stamping, sets infinite recursion
  622.           depth and keeps FTP directory listings. It is currently
  623.           equivalent to `-r -N -l inf -nr'.
  624.    `-nr'
  625.    `--dont-remove-listing'
  626.           Don't remove the temporary `.listing' files generated by
  627.           FTP retrievals. Normally, these files contain the raw
  628.           directory listings received from FTP servers. Not removing
  629.           them can be useful to access the full remote file list
  630.           when running a mirror, or for debugging purposes.
  631.           
  632. [82]Recursive Accept/Reject Options
  633.  
  634.    `-A acclist --accept acclist'
  635.    `-R rejlist --reject rejlist'
  636.           Specify comma-separated lists of file name suffixes or
  637.           patterns to accept or reject (See section [83]Types of
  638.           Files for more details).
  639.    `-D domain-list'
  640.    `--domains=domain-list'
  641.           Set domains to be accepted and DNS looked-up, where
  642.           domain-list is a comma-separated list. Note that it does
  643.           not turn on `-H'. This option speeds things up, even if
  644.           only one host is spanned (See section [84]Domain
  645.           Acceptance).
  646.    `--exclude-domains domain-list'
  647.           Exclude the domains given in a comma-separated domain-list
  648.           from DNS-lookup (See section [85]Domain Acceptance).
  649.    `-L'
  650.    `--relative'
  651.           Follow relative links only. Useful for retrieving a
  652.           specific home page without any distractions, not even
  653.           those from the same hosts (See section [86]Relative
  654.           Links).
  655.    `--follow-ftp'
  656.           Follow FTP links from HTML documents. Without this option,
  657.           Wget will ignore all the FTP links.
  658.    `-H'
  659.    `--span-hosts'
  660.           Enable spanning across hosts when doing recursive
  661.           retrieving (See section [87]All Hosts).
  662.    `-I list'
  663.    `--include-directories=list'
  664.           Specify a comma-separated list of directories you wish to
  665.           follow when downloading (See section [88]Directory-Based
  666.           Limits for more details.) Elements of list may contain
  667.           wildcards.
  668.    `-X list'
  669.    `--exclude-directories=list'
  670.           Specify a comma-separated list of directories you wish to
  671.           exclude from download (See section [89]Directory-Based
  672.           Limits for more details.) Elements of list may contain
  673.           wildcards.
  674.    `-nh'
  675.    `--no-host-lookup'
  676.           Disable the time-consuming DNS lookup of almost all hosts
  677.           (See section [90]Host Checking).
  678.    `-np'
  679.    `--no-parent'
  680.           Do not ever ascend to the parent directory when retrieving
  681.           recursively. This is a useful option, since it guarantees
  682.           that only the files below a certain hierarchy will be
  683.           downloaded. See section [91]Directory-Based Limits for
  684.           more details.
  685.           
  686.                          [92]Recursive Retrieval
  687.                                      
  688.    GNU Wget is capable of traversing parts of the Web (or a single
  689.    HTTP or FTP server), depth-first following links and directory
  690.    structure. This is called recursive retrieving, or recursion.
  691.    
  692.    With HTTP URLs, Wget retrieves and parses the HTML from the given
  693.    URL, documents, retrieving the files the HTML document was
  694.    referring to, through markups like href, or src. If the freshly
  695.    downloaded file is also of type text/html, it will be parsed and
  696.    followed further.
  697.    
  698.    The maximum depth to which the retrieval may descend is specified
  699.    with the `-l' option (the default maximum depth is five layers).
  700.    See section [93]Recursive Retrieval.
  701.    
  702.    When retrieving an FTP URL recursively, Wget will retrieve all
  703.    the data from the given directory tree (including the
  704.    subdirectories up to the specified depth) on the remote server,
  705.    creating its mirror image locally. FTP retrieval is also limited
  706.    by the depth parameter.
  707.    
  708.    By default, Wget will create a local directory tree,
  709.    corresponding to the one found on the remote server.
  710.    
  711.    Recursive retrieving can find a number of applications, the most
  712.    important of which is mirroring. It is also useful for WWW
  713.    presentations, and any other opportunities where slow network
  714.    connections should be bypassed by storing the files locally.
  715.    
  716.    You should be warned that invoking recursion may cause grave
  717.    overloading on your system, because of the fast exchange of data
  718.    through the network; all of this may hamper other users' work.
  719.    The same stands for the foreign server you are mirroring--the
  720.    more requests it gets in a rows, the greater is its load.
  721.    
  722.    Careless retrieving can also fill your file system unctrollably,
  723.    which can grind the machine to a halt.
  724.    
  725.    The load can be minimized by lowering the maximum recursion level
  726.    (`-l') and/or by lowering the number of retries (`-t'). You may
  727.    also consider using the `-w' option to slow down your requests to
  728.    the remote servers, as well as the numerous options to narrow the
  729.    number of followed links (See section [94]Following Links).
  730.    
  731.    Recursive retrieval is a good thing when used properly. Please
  732.    take all precautions not to wreak havoc through carelessness.
  733.    
  734.                            [95]Following Links
  735.                                      
  736.    When retrieving recursively, one does not wish to retrieve the
  737.    loads of unnecessary data. Most of the time the users bear in
  738.    mind exactly what they want to download, and want Wget to follow
  739.    only specific links.
  740.    
  741.    For example, if you wish to download the music archive from
  742.    `fly.cc.fer.hr', you will not want to download all the home pages
  743.    that happen to be referenced by an obscure part of the archive.
  744.    
  745.    Wget possesses several mechanisms that allows you to fine-tune
  746.    which links it will follow.
  747.    
  748. [96]Relative Links
  749.  
  750.    When only relative links are followed (option `-L'), recursive
  751.    retrieving will never span hosts. No time-expensive DNS-lookups
  752.    will be performed, and the process will be very fast, with the
  753.    minimum strain of the network. This will suit your needs often,
  754.    especially when mirroring the output of various x2html
  755.    converters, since they generally output relative links.
  756.    
  757. [97]Host Checking
  758.  
  759.    The drawback of following the relative links solely is that
  760.    humans often tend to mix them with absolute links to the very
  761.    same host, and the very same page. In this mode (which is the
  762.    default mode for following links) all URLs the that refer to the
  763.    same host will be retrieved.
  764.    
  765.    The problem with this option are the aliases of the hosts and
  766.    domains. Thus there is no way for Wget to know that
  767.    `regoc.srce.hr' and `www.srce.hr' are the same host, or that
  768.    `fly.cc.fer.hr' is the same as `fly.cc.etf.hr'. Whenever an
  769.    absolute link is encountered, the host is DNS-looked-up with
  770.    gethostbyname to check whether we are maybe dealing with the same
  771.    hosts. Although the results of gethostbyname are cached, it is
  772.    still a great slowdown, e.g. when dealing with large indices of
  773.    home pages on different hosts (because each of the hosts must be
  774.    and DNS-resolved to see whether it just might an alias of the
  775.    starting host).
  776.    
  777.    To avoid the overhead you may use `-nh', which will turn off
  778.    DNS-resolving and make Wget compare hosts literally. This will
  779.    make things run much faster, but also much less reliable (e.g.
  780.    `www.srce.hr' and `regoc.srce.hr' will be flagged as different
  781.    hosts).
  782.    
  783.    Note that modern HTTP servers allows one IP address to host
  784.    several virtual servers, each having its own directory hieratchy.
  785.    Such "servers" are distinguished by their hostnames (all of which
  786.    point to the same IP address); for this to work, a client must
  787.    send a Host header, which is what Wget does. However, in that
  788.    case Wget must not try to divine a host's "real" address, nor try
  789.    to use the same hostname for each access, i.e. `-nh' must be
  790.    turned on.
  791.    
  792.    In other words, the `-nh' option must be used to enabling the
  793.    retrieval from virtual servers distinguished by their hostnames.
  794.    As the number of such server setups grow, the behavior of `-nh'
  795.    may become the default in the future.
  796.    
  797. [98]Domain Acceptance
  798.  
  799.    With the `-D' option you may specify the domains that will be
  800.    followed. The hosts the domain of which is not in this list will
  801.    not be DNS-resolved. Thus you can specify `-Dmit.edu' just to
  802.    make sure that nothing outside of MIT gets looked up. This is
  803.    very important and useful. It also means that `-D' does not imply
  804.    `-H' (span all hosts), which must be specified explicitly. Feel
  805.    free to use this options since it will speed things up, with
  806.    almost all the reliability of checking for all hosts. Thus you
  807.    could invoke
  808. wget -r -D.hr http://fly.cc.fer.hr/
  809.  
  810.    to make sure that only the hosts in `.hr' domain get
  811.    DNS-looked-up for being equal to `fly.cc.fer.hr'. So
  812.    `fly.cc.etf.hr' will be checked (only once!) and found equal, but
  813.    `www.gnu.ai.mit.edu' will not even be checked.
  814.    
  815.    Of course, domain acceptance can be used to limit the retrieval
  816.    to particular domains with spanning of hosts in them, but then
  817.    you must specify `-H' explicitly. E.g.:
  818. wget -r -H -Dmit.edu,stanford.edu http://www.mit.edu/
  819.  
  820.    will start with `http://www.mit.edu/', following links across MIT
  821.    and Stanford.
  822.    
  823.    If there are domains you want to exclude specifically, you can do
  824.    it with `--exclude-domains', which accepts the same type of
  825.    arguments of `-D', but will exclude all the listed domains. For
  826.    example, if you want to download all the hosts from `foo.edu'
  827.    domain, with the exception of `sunsite.foo.edu', you can do it
  828.    like this:
  829. wget -rH -Dfoo.edu --exclude-domains sunsite.foo.edu http://www.foo.edu/
  830.  
  831. [99]All Hosts
  832.  
  833.    When `-H' is specified without `-D', all hosts are freely
  834.    spanned. There are no restrictions whatsoever as to what part of
  835.    the net Wget will go to fetch documents, other than maximum
  836.    retrieval depth. If a page references `www.yahoo.com', so be it.
  837.    Such an option is rarely useful for itself.
  838.    
  839. [100]Types of Files
  840.  
  841.    When downloading material from the web, you will often want to
  842.    restrict the retrieval to only certain file types. For example,
  843.    if you are interested in downloading GIFS, you will not be
  844.    overjoyed to get loads of Postscript documents, and vice versa.
  845.    
  846.    Wget offers two options to deal with this problem. Each option
  847.    description lists a short name, a long name, and the equivalent
  848.    command in `.wgetrc'.
  849.    
  850.    `-A acclist'
  851.    `--accept acclist'
  852.    `accept = acclist'
  853.           The argument to `--accept' option is a list of file
  854.           suffixes or patterns that Wget will download during
  855.           recursive retrieval. A suffix is the ending part of a
  856.           file, and consists of "normal" letters, e.g. `gif' or
  857.           `.jpg'. A matching pattern contains shell-like wildcards,
  858.           e.g. `books*' or `zelazny*196[0-9]*'. So, specifying `wget
  859.           -A gif,jpg' will make Wget download only the files ending
  860.           with `gif' or `jpg', i.e. GIFs and JPEGs. On the other
  861.           hand, `wget -A "zelazny*196[0-9]*"' will download only
  862.           files beginning with `zelazny' and containing numbers from
  863.           1960 to 1969 anywhere within. Look up the manual of your
  864.           shell for a description of how pattern matching works. Of
  865.           course, any number of suffixes and patterns can be
  866.           combined into a comma-separated list, and given as an
  867.           argument to `-A'.
  868.    `-R rejlist'
  869.    `--reject rejlist'
  870.    `reject = rejlist'
  871.           The `--reject' option works the same way as `--accept',
  872.           only its logic is the reverse; Wget will download all
  873.           files except the ones matching the suffixes (or patterns)
  874.           in the list. So, if you want to download a whole page
  875.           except for the cumbersome MPEGs and .AU files, you can use
  876.           `wget -R mpg,mpeg,au'. Analogously, to download all files
  877.           except the ones beginning with `bjork', use `wget -R
  878.           "bjork*"'. The quotes are to prevent expansion by the
  879.           shell.
  880.           
  881.    The `-A' and `-R' options may be combined to achieve even better
  882.    fine-tuning of which files to retrieve. E.g. `wget -A "*zelazny*"
  883.    -R .ps' will download all the files having `zelazny' as a part of
  884.    their name, but not the postscript files.
  885.    
  886.    Note that these two options do not affect the downloading of HTML
  887.    files; Wget must load all the HTMLs to know where to go at
  888.    all--recursive retrieval would make no sense otherwise.
  889.    
  890. [101]Directory-Based Limits
  891.  
  892.    Regardless of other link-following facilities, it is often useful
  893.    to place the restriction of what files to retrieve based on the
  894.    directories those files are placed in. There can be many reasons
  895.    for this--the home pages may be organized in a reasonable
  896.    directory structure; or some directories may contain useless
  897.    information, e.g. `/cgi-bin' or `/dev' directories.
  898.    
  899.    Wget offers three different options to deal with this
  900.    requirement. Each option description lists a short name, a long
  901.    name, and the equivalent command in `.wgetrc'.
  902.    
  903.    `-I list'
  904.    `--include list'
  905.    `include_directories = list'
  906.           `-I' option accepts a comma-separated list of directories
  907.           included in the retrieval. Any other directories will
  908.           simply be ignored. The directories are absolute paths. So,
  909.           if you wish to download from `http://host/people/bozo/'
  910.           following only links to bozo's colleagues in the `/people'
  911.           directory and the bogus scripts in `/cgi-bin', you can
  912.           specify:
  913. wget -I /people,/cgi-bin http://host/people/bozo/
  914.    `-X list'
  915.    `--exclude list'
  916.    `exclude_directories = list'
  917.           `-X' option is exactly the reverse of `-I'---this is a
  918.           list of directories excluded from the download. E.g. if
  919.           you do not want Wget to download things from `/cgi-bin'
  920.           directory, specify `-X /cgi-bin' on the command line. The
  921.           same as with `-A'/`-R', these two options can be combined
  922.           to get a better fine-tuning of downloading subdirectories.
  923.           E.g. if you want to load all the files from `/pub'
  924.           hierarchy except for `/pub/worthless', specify `-I/pub
  925.           -X/pub/worthless'.
  926.    `-np'
  927.    `--no-parent'
  928.    `no_parent = on'
  929.           The simplest, and often very useful way of limiting
  930.           directories is disallowing retrieval of the links that
  931.           refer to the hierarchy upper than the beginning directory,
  932.           i.e. disallowing ascent to the parent
  933.           directory/directories. The `--no-parent' option (short
  934.           `-np') is useful in this case. Using it guarantees that
  935.           you will never leave the existing hierarchy. Supposing you
  936.           issue Wget with:
  937. wget -r --no-parent http://somehost/~luzer/my-archive/
  938.           You may rest assured that none of the references to
  939.           `/~his-girls-homepage/' or `/~luzer/all-my-mpegs/' will be
  940.           followed. Only the archive you are interested in will be
  941.           downloaded. Essentially, `--no-parent' is similar to
  942.           `-I/~luzer/my-archive', only it handles redirections in a
  943.           more intelligent fashion.
  944.           
  945. [102]Following FTP Links
  946.  
  947.    The rules for FTP are somewhat specific, as it is necessary for
  948.    them to be. FTP links in HTML documents are often included for
  949.    purposes of reference, and it is often inconvenient to download
  950.    them by default.
  951.    
  952.    To have FTP links followed from HTML documents, you need to
  953.    specify the `--follow-ftp' option. Having done that, FTP links
  954.    will span hosts regardless of `-H' setting. This is logical, as
  955.    FTP links rarely point to the same host where the HTTP server
  956.    resides. For similar reasons, the `-L' options has no effect on
  957.    such downloads. On the other hand, domain acceptance (`-D') and
  958.    suffix rules (`-A' and `-R') apply normally.
  959.    
  960.    Also note that followed links to FTP directories will not be
  961.    retrieved recursively further.
  962.    
  963.                             [103]Time-Stamping
  964.                                      
  965.    One of the most important aspects of mirroring information from
  966.    the Internet is updating your archives.
  967.    
  968.    Downloading the whole archive again and again, just to replace a
  969.    few changed files is expensive, both in terms of wasted bandwidth
  970.    and money, and the time to do the update. This is why all the
  971.    mirroring tools offer the option of incremental updating.
  972.    
  973.    Such an updating mechanism means that the remote server is
  974.    scanned in search of new files. Only those new files will be
  975.    downloaded in the place of the old ones.
  976.    
  977.    A file is considered new if one of these two conditions are met:
  978.     1. A file of that name does not already exist locally.
  979.     2. A file of that name does exist, but the remote file was
  980.        modified more recently than the local file.
  981.        
  982.    To implement this, the program needs to be aware of the time of
  983.    last modification of both remote and local files. Such
  984.    information are called the time-stamps.
  985.    
  986.    The time-stamping in GNU Wget is turned on using `--timestamping'
  987.    (`-N') option, or through timestamping = on directive in
  988.    `.wgetrc'. With this option, for each file it intends to
  989.    download, Wget will check whether a local file of the same name
  990.    exists. If it does, and the remote file is older, Wget will not
  991.    download it.
  992.    
  993.    If the local file does not exist, or the sizes of the files do
  994.    not match, Wget will download the remote file no matter what the
  995.    time-stamps say.
  996.    
  997. [104]Time-Stamping Usage
  998.  
  999.    The usage of time-stamping is simple. Say you would like to
  1000.    download a file so that it keeps its date of modification.
  1001. wget -S http://www.gnu.ai.mit.edu/
  1002.  
  1003.    A simple ls -l shows that the time stamp on the local file equals
  1004.    the state of the Last-Modified header, as returned by the server.
  1005.    As you can see, the time-stamping info is preserved locally, even
  1006.    without `-N'.
  1007.    
  1008.    Several days later, you would like Wget to check if the remote
  1009.    file has changed, and download it if it has.
  1010. wget -N http://www.gnu.ai.mit.edu/
  1011.  
  1012.    Wget will ask the server for the last-modified date. If the local
  1013.    file is newer, the remote file will not be re-fetched. However,
  1014.    if the remote file is more recent, Wget will proceed fetching it
  1015.    normally.
  1016.    
  1017.    The same goes for FTP. For example:
  1018. wget ftp://ftp.ifi.uio.no/pub/emacs/gnus/*
  1019.  
  1020.    ls will show that the timestamps are set according to the state
  1021.    on the remote server. Reissuing the command with `-N' will make
  1022.    Wget re-fetch only the files that have been modified.
  1023.    
  1024.    In both HTTP and FTP retrieval Wget will time-stamp the local
  1025.    file correctly (with or without `-N') if it gets the stamps, i.e.
  1026.    gets the directory listing for FTP or the Last-Modified header
  1027.    for HTTP.
  1028.    
  1029.    If you wished to mirror the GNU archive every week, you would use
  1030.    the following command every week:
  1031. wget --timestamping -r ftp://prep.ai.mit.edu/pub/gnu/
  1032.  
  1033. [105]HTTP Time-Stamping Internals
  1034.  
  1035.    Time-stamping in HTTP is implemented by checking of the
  1036.    Last-Modified header. If you wish to retrieve the file `foo.html'
  1037.    through HTTP, Wget will check whether `foo.html' exists locally.
  1038.    If it doesn't, `foo.html' will be retrieved unconditionally.
  1039.    
  1040.    If the file does exist locally, Wget will first check its local
  1041.    time-stamp (similar to the way ls -l checks it), and then send a
  1042.    HEAD request to the remote server, demanding the information on
  1043.    the remote file.
  1044.    
  1045.    The Last-Modified header is examined to find which file was
  1046.    modified more recently (which makes it "newer"). If the remote
  1047.    file is newer, it will be downloaded; if it is older, Wget will
  1048.    give up.[106](2)
  1049.    
  1050.    Arguably, HTTP time-stamping should be implemented using the
  1051.    If-Modified-Since request.
  1052.    
  1053. [107]FTP Time-Stamping Internals
  1054.  
  1055.    In theory, FTP time-stamping works much the same as HTTP, only
  1056.    FTP has no headers--time-stamps must be received from the
  1057.    directory listings.
  1058.    
  1059.    For each directory files must be retrieved from, Wget will use
  1060.    the LIST command to get the listing. It will try to analyze the
  1061.    listing, assuming that it is a Unix ls -l listing, and extract
  1062.    the time-stamps. The rest is exactly the same as for HTTP.
  1063.    
  1064.    Assumption that every directory listing is a Unix-style listing
  1065.    may sound extremely constraining, but in practice it is not, as
  1066.    many non-Unix FTP servers use the Unixoid listing format because
  1067.    most (all?) of the clients understand it. Bear in mind that
  1068.    RFC959 defines no standard way to get a file list, let alone the
  1069.    time-stamps. We can only hope that a future standard will define
  1070.    this.
  1071.    
  1072.    Another non-standard solution includes the use of MDTM command
  1073.    that is supported by some FTP servers (including the popular
  1074.    wu-ftpd), which returns the exact time of the specified file.
  1075.    Wget may support this command in the future.
  1076.    
  1077.                             [108]Startup File
  1078.                                      
  1079.    Once you know how to change default settings of Wget through
  1080.    command line arguments, you may wish to make some of those
  1081.    settings permanent. You can do that in a convenient way by
  1082.    creating the Wget startup file---`.wgetrc'.
  1083.    
  1084.    Besides `.wgetrc' is the "main" initialization file, it is
  1085.    convenient to have a special facility for storing passwords. Thus
  1086.    Wget reads and interprets the contents of `$HOME/.netrc', if it
  1087.    finds it. You can find `.netrc' format in your system manuals.
  1088.    
  1089.    Wget reads `.wgetrc' upon startup, recognizing a limited set of
  1090.    commands.
  1091.    
  1092. [109]Wgetrc Location
  1093.  
  1094.    When initializing, Wget will look for a global startup file,
  1095.    `/usr/local/etc/wgetrc' by default (or some prefix other than
  1096.    `/usr/local', if Wget was not installed there) and read commands
  1097.    from there, if it exists.
  1098.    
  1099.    Then it will look for the user's file. If the environmental
  1100.    variable WGETRC is set, Wget will try to load that file. Failing
  1101.    that, no further attempts will be made.
  1102.    
  1103.    If WGETRC is not set, Wget will try to load `$HOME/.wgetrc'.
  1104.    
  1105.    The fact that user's settings are loaded after the system-wide
  1106.    ones means that in case of collision user's wgetrc overrides the
  1107.    system-wide wgetrc (in `/usr/local/etc/wgetrc' by default).
  1108.    Fascist admins, away!
  1109.    
  1110. [110]Wgetrc Syntax
  1111.  
  1112.    The syntax of a wgetrc command is simple:
  1113. variable = value
  1114.  
  1115.    The variable will also be called command. Valid values are
  1116.    different for different commands.
  1117.    
  1118.    The commands are case-insensitive and underscore-insensitive.
  1119.    Thus `DIr__PrefiX' is the same as `dirprefix'. Empty lines, lines
  1120.    beginning with `#' and lines containing white-space only are
  1121.    discarded.
  1122.    
  1123.    Commands that expect a comma-separated list will clear the list
  1124.    on an empty command. So, if you wish to reset the rejection list
  1125.    specified in global `wgetrc', you can do it with:
  1126. reject =
  1127.  
  1128. [111]Wgetrc Commands
  1129.  
  1130.    The complete set of commands is listed below, the letter after
  1131.    `=' denoting the value the command takes. It is `on/off' for `on'
  1132.    or `off' (which can also be `1' or `0'), string for any non-empty
  1133.    string or n for a positive integer. For example, you may specify
  1134.    `use_proxy = off' to disable use of proxy servers by default. You
  1135.    may use `inf' for infinite values, where appropriate.
  1136.    
  1137.    Most of the commands have their equivalent command-line option
  1138.    (See section [112]Invoking), except some more obscure or rarely
  1139.    used ones.
  1140.    accept/reject = string
  1141.           Same as `-A'/`-R' (See section [113]Types of Files).
  1142.    add_hostdir = on/off
  1143.           Enable/disable host-prefixed file names. `-nH' disables
  1144.           it.
  1145.    continue = on/off
  1146.           Enable/disable continuation of the retrieval, the same as
  1147.           `-c' (which enables it).
  1148.    background = on/off
  1149.           Enable/disable going to background, the same as `-b'
  1150.           (which enables it).
  1151.    base = string
  1152.           Set base for relative URLs, the same as `-B'.
  1153.    cache = on/off
  1154.           When set to off, disallow server-caching. See the `-C'
  1155.           option.
  1156.    convert links = on/off
  1157.           Convert non-relative links locally. The same as `-k'.
  1158.    cut_dirs = n
  1159.           Ignore n remote directory components.
  1160.    debug = on/off
  1161.           Debug mode, same as `-d'.
  1162.    delete_after = on/off
  1163.           Delete after download, the same as `--delete-after'.
  1164.    dir_prefix = string
  1165.           Top of directory tree, the same as `-P'.
  1166.    dirstruct = on/off
  1167.           Turning dirstruct on or off, the same as `-x' or `-nd',
  1168.           respectively.
  1169.    domains = string
  1170.           Same as `-D' (See section [114]Domain Acceptance).
  1171.    dot_bytes = n
  1172.           Specify the number of bytes "contained" in a dot, as seen
  1173.           throughout the retrieval (1024 by default). You can
  1174.           postfix the value with `k' or `m', representing kilobytes
  1175.           and megabytes, respectively. With dot settings you can
  1176.           tailor the dot retrieval to suit your needs, or you can
  1177.           use the predefined styles (See section [115]Download
  1178.           Options).
  1179.    dots_in_line = n
  1180.           Specify the number of dots that will be printed in each
  1181.           line throughout the retrieval (50 by default).
  1182.    dot_spacing = n
  1183.           Specify the number of dots in a single cluster (10 by
  1184.           default).
  1185.    dot_style = string
  1186.           Specify the dot retrieval style, as with `--dot-style'.
  1187.    exclude_directories = string
  1188.           Specify a comma-separated list of directories you wish to
  1189.           exclude from download, the same as `-X' (See section
  1190.           [116]Directory-Based Limits).
  1191.    exclude_domains = string
  1192.           Same as `--exclude-domains' (See section [117]Domain
  1193.           Acceptance).
  1194.    follow_ftp = on/off
  1195.           Follow FTP links from HTML documents, the same as `-f'.
  1196.    force_html = on/off
  1197.           If set to on, force the input filename to be regarded as
  1198.           an HTML document, the same as `-F'.
  1199.    ftp_proxy = string
  1200.           Use string as FTP proxy, instead of the one specified in
  1201.           environment.
  1202.    glob = on/off
  1203.           Turn globbing on/off, the same as `-g'.
  1204.    header = string
  1205.           Define an additional header, like `--header'.
  1206.    http_passwd = string
  1207.           Set HTTP password.
  1208.    http_proxy = string
  1209.           Use string as HTTP proxy, instead of the one specified in
  1210.           environment.
  1211.    http_user = string
  1212.           Set HTTP user to string.
  1213.    ignore_length = on/off
  1214.           When set to on, ignore Content-Length header; the same as
  1215.           `--ignore-length'.
  1216.    include_directories = string
  1217.           Specify a comma-separated list of directories you wish to
  1218.           follow when downloading, the same as `-I'.
  1219.    input = string
  1220.           Read the URLs from string, like `-i'.
  1221.    kill_longer = on/off
  1222.           Consider data longer than specified in content-length
  1223.           header as invalid (and retry getting it). The default
  1224.           behaviour is to save as much data as there is, provided
  1225.           there is more than or equal to the value in
  1226.           Content-Length.
  1227.    logfile = string
  1228.           Set logfile, the same as `-o'.
  1229.    login = string
  1230.           Your user name on the remote machine, for FTP. Defaults to
  1231.           `anonymous'.
  1232.    mirror = on/off
  1233.           Turn mirroring on/off. The same as `-m'.
  1234.    netrc = on/off
  1235.           Turn reading netrc on or off.
  1236.    noclobber = on/off
  1237.           Same as `-nc'.
  1238.    no_parent = on/off
  1239.           Disallow retrieving outside the directory hierarchy, like
  1240.           `--no-parent' (See section [118]Directory-Based Limits).
  1241.    no_proxy = string
  1242.           Use string as the comma-separated list of domains to avoid
  1243.           in proxy loading, instead of the one specified in
  1244.           environment.
  1245.    output_document = string
  1246.           Set the output filename, the same as `-O'.
  1247.    passive_ftp = on/off
  1248.           Set passive FTP, the same as `--passive-ftp'.
  1249.    passwd = string
  1250.           Set your FTP password to password. Without this setting,
  1251.           the password defaults to `username@hostname.domainname'.
  1252.    proxy_user = string
  1253.           Set proxy authentication user name to string, like
  1254.           `--proxy-user'.
  1255.    proxy_passwd = string
  1256.           Set proxy authentication password to string, like
  1257.           `--proxy-passwd'.
  1258.    quiet = on/off
  1259.           Quiet mode, the same as `-q'.
  1260.    quota = quota
  1261.           Specify the download quota, which is useful to put in
  1262.           global wgetrc. When download quota is specified, Wget will
  1263.           stop retrieving after the download sum has become greater
  1264.           than quota. The quota can be specified in bytes (default),
  1265.           kbytes `k' appended) or mbytes (`m' appended). Thus `quota
  1266.           = 5m' will set the quota to 5 mbytes. Note that the user's
  1267.           startup file overrides system settings.
  1268.    reclevel = n
  1269.           Recursion level, the same as `-l'.
  1270.    recursive = on/off
  1271.           Recursive on/off, the same as `-r'.
  1272.    relative_only = on/off
  1273.           Follow only relative links, the same as `-L' (See section
  1274.           [119]Relative Links).
  1275.    remove_listing = on/off
  1276.           If set to on, remove FTP listings downloaded by Wget.
  1277.           Setting it to off is the same as `-nr'.
  1278.    retr_symlinks = on/off
  1279.           When set to on, retrieve symbolic links as if they were
  1280.           plain files; the same as `--retr-symlinks'.
  1281.    robots = on/off
  1282.           Use (or not) `/robots.txt' file (See section [120]Robots).
  1283.           Be sure to know what you are doing before changing the
  1284.           default (which is `on').
  1285.    server_response = on/off
  1286.           Choose whether or not to print the HTTP and FTP server
  1287.           responses, the same as `-S'.
  1288.    simple_host_check = on/off
  1289.           Same as `-nh' (See section [121]Host Checking).
  1290.    span_hosts = on/off
  1291.           Same as `-H'.
  1292.    timeout = n
  1293.           Set timeout value, the same as `-T'.
  1294.    timestamping = on/off
  1295.           Turn timestamping on/off. The same as `-N' (See section
  1296.           [122]Time-Stamping).
  1297.    tries = n
  1298.           Set number of retries per URL, the same as `-t'.
  1299.    use_proxy = on/off
  1300.           Turn proxy support on/off. The same as `-Y'.
  1301.    verbose = on/off
  1302.           Turn verbose on/off, the same as `-v'/`-nv'.
  1303.    wait = n
  1304.           Wait n seconds between retrievals, the same as `-w'.
  1305.           
  1306. [123]Sample Wgetrc
  1307.  
  1308.    This is the sample initialization file, as given in the
  1309.    distribution. It is divided in two section--one for global usage
  1310.    (suitable for global startup file), and one for local usage
  1311.    (suitable for `$HOME/.wgetrc'). Be careful about the things you
  1312.    change.
  1313.    
  1314.    Note that all the lines are commented out. For any line to have
  1315.    effect, you must remove the `#' prefix at the beginning of line.
  1316. ###
  1317. ### Sample Wget initialization file .wgetrc
  1318. ###
  1319.  
  1320. ## You can use this file to change the default behaviour of wget or to
  1321. ## avoid having to type many many command-line options. This file does
  1322. ## not contain a comprehensive list of commands -- look at the manual
  1323. ## to find out what you can put into this file.
  1324. ##
  1325. ## Wget initialization file can reside in /usr/local/etc/wgetrc
  1326. ## (global, for all users) or $HOME/.wgetrc (for a single user).
  1327. ##
  1328. ## To use any of the settings in this file, you will have to uncomment
  1329. ## them (and probably change them).
  1330.  
  1331. ##
  1332. ## Global settings (useful for setting up in /usr/local/etc/wgetrc).
  1333. ## Think well before you change them, since they may reduce wget's
  1334. ## functionality, and make it behave contrary to the documentation:
  1335. ##
  1336.  
  1337. # You can set retrieve quota for beginners by specifying a value
  1338. # optionally followed by 'K' (kilobytes) or 'M' (megabytes).  The
  1339. # default quota is unlimited.
  1340. #quota = inf
  1341.  
  1342. # You can lower (or raise) the default number of retries when
  1343. # downloading a file (default is 20).
  1344. #tries = 20
  1345.  
  1346. # Lowering the maximum depth of the recursive retrieval is handy to
  1347. # prevent newbies from going too "deep" when they unwittingly start
  1348. # the recursive retrieval.  The default is 5.
  1349. #reclevel = 5
  1350.  
  1351. # Many sites are behind firewalls that do not allow initiation of
  1352. # connections from the outside.  On these sites you have to use the
  1353. # `passive' feature of FTP.  If you are behind such a firewall, you
  1354. # can turn this on to make Wget use passive FTP by default.
  1355. #passive_ftp = off
  1356.  
  1357. ##
  1358. ## Local settings (for a user to set in his $HOME/.wgetrc).  It is
  1359. ## *highly* undesirable to put these settings in the global file, since
  1360. ## they are potentially dangerous to "normal" users.
  1361. ##
  1362. ## Even when setting up your own ~/.wgetrc, you should know what you
  1363. ## are doing before doing so.
  1364. ##
  1365.  
  1366. # Set this to on to use timestamping by default:
  1367. #timestamping = off
  1368.  
  1369. # It is a good idea to make Wget send your email address in a `From:'
  1370. # header with your request (so that server administrators can contact
  1371. # you in case of errors).  Wget does *not* send `From:' by default.
  1372. #header = From: Your Name <username@site.domain>
  1373.  
  1374. # You can set up other headers, like Accept-Language.  Accept-Language
  1375. # is *not* sent by default.
  1376. #header = Accept-Language: en
  1377.  
  1378. # You can set the default proxy for Wget to use.  It will override the
  1379. # value in the environment.
  1380. #http_proxy = http://proxy.yoyodyne.com:18023/
  1381.  
  1382. # If you do not want to use proxy at all, set this to off.
  1383. #use_proxy = on
  1384.  
  1385. # You can customize the retrieval outlook.  Valid options are default,
  1386. # binary, mega and micro.
  1387. #dot_style = default
  1388.  
  1389. # Setting this to off makes Wget not download /robots.txt.  Be sure to
  1390. # know *exactly* what /robots.txt is and how it is used before changing
  1391. # the default!
  1392. #robots = on
  1393.  
  1394. # It can be useful to make Wget wait between connections.  Set this to
  1395. # the number of seconds you want Wget to wait.
  1396. #wait = 0
  1397.  
  1398. # You can force creating directory structure, even if a single is being
  1399. # retrieved, by setting this to on.
  1400. #dirstruct = off
  1401.  
  1402. # You can turn on recursive retrieving by default (don't do this if
  1403. # you are not sure you know what it means) by setting this to on.
  1404. #recursive = off
  1405.  
  1406. # To have Wget follow FTP links from HTML files by default, set this
  1407. # to on:
  1408. #follow_ftp = off
  1409.  
  1410.                               [124]Examples
  1411.                                      
  1412.    The examples are classified into three sections, because of
  1413.    clarity. The first section is a tutorial for beginners. The
  1414.    second section explains some of the more complex program
  1415.    features. The third section contains advice for mirror
  1416.    administrators, as well as even more complex features (that some
  1417.    would call perverted).
  1418.    
  1419. [125]Simple Usage
  1420.  
  1421.      * Say you want to download a URL. Just type:
  1422. wget http://fly.cc.fer.hr/
  1423.        The response will be something like:
  1424. --13:30:45--  http://fly.cc.fer.hr:80/en/
  1425.            => `index.html'
  1426. Connecting to fly.cc.fer.hr:80... connected!
  1427. HTTP request sent, awaiting response... 200 OK
  1428. Length: 4,694 [text/html]
  1429.  
  1430.     0K -> ....                                                   [100%]
  1431.  
  1432. 13:30:46 (23.75 KB/s) - `index.html' saved [4694/4694]
  1433.      * But what will happen if the connection is slow, and the file
  1434.        is lengthy? The connection will probably fail before the
  1435.        whole file is retrieved, more than once. In this case, Wget
  1436.        will try getting the file until it either gets the whole of
  1437.        it, or exceeds the default number of retries (this being 20).
  1438.        It is easy to change the number of tries to 45, to insure
  1439.        that the whole file will arrive safely:
  1440. wget --tries=45 http://fly.cc.fer.hr/jpg/flyweb.jpg
  1441.      * Now let's leave Wget to work in the background, and write its
  1442.        progress to log file `log'. It is tiring to type `--tries',
  1443.        so we shall use `-t'.
  1444. wget -t 45 -o log http://fly.cc.fer.hr/jpg/flyweb.jpg &
  1445.        The ampersand at the end of the line makes sure that Wget
  1446.        works in the background. To unlimit the number of retries,
  1447.        use `-t inf'.
  1448.      * The usage of FTP is as simple. Wget will take care of login
  1449.        and password.
  1450. $ wget ftp://gnjilux.cc.fer.hr/welcome.msg
  1451. --10:08:47--  ftp://gnjilux.cc.fer.hr:21/welcome.msg
  1452.            => `welcome.msg'
  1453. Connecting to gnjilux.cc.fer.hr:21... connected!
  1454. Logging in as anonymous ... Logged in!
  1455. ==> TYPE I ... done.  ==> CWD not needed.
  1456. ==> PORT ... done.    ==> RETR welcome.msg ... done.
  1457. Length: 1,340 (unauthoritative)
  1458.  
  1459.     0K -> .                                                      [100%]
  1460.  
  1461. 10:08:48 (1.28 MB/s) - `welcome.msg' saved [1340]
  1462.      * If you specify a directory, Wget will retrieve the directory
  1463.        listing, parse it and convert it to HTML. Try:
  1464. wget ftp://prep.ai.mit.edu/pub/gnu/
  1465. lynx index.html
  1466.        
  1467. [126]Advanced Usage
  1468.  
  1469.      * You would like to read the list of URLs from a file? Not a
  1470.        problem with that:
  1471. wget -i file
  1472.        If you specify `-' as file name, the URLs will be read from
  1473.        standard input.
  1474.      * Create a mirror image of GNU WWW site (with the same
  1475.        directory structure the original has) with only one try per
  1476.        document, saving the log of the activities to `gnulog':
  1477. wget -r -t1 http://www.gnu.ai.mit.edu/ -o gnulog
  1478.      * Retrieve the first layer of yahoo links:
  1479. wget -r -l1 http://www.yahoo.com/
  1480.      * Retrieve the index.html of `www.lycos.com', showing the
  1481.        original server headers:
  1482. wget -S http://www.lycos.com/
  1483.      * Save the server headers with the file:
  1484. wget -s http://www.lycos.com/
  1485. more index.html
  1486.      * Retrieve the first two levels of `wuarchive.wustl.edu',
  1487.        saving them to /tmp.
  1488. wget -P/tmp -l2 ftp://wuarchive.wustl.edu/
  1489.      * You want to download all the GIFs from an HTTP directory.
  1490.        `wget http://host/dir/*.gif' doesn't work, since HTTP
  1491.        retrieval does not support globbing. In that case, use:
  1492. wget -r -l1 --no-parent -A.gif http://host/dir/
  1493.        It is a bit of a kludge, but it works. `-r -l1' means to
  1494.        retrieve recursively (See section [127]Recursive Retrieval),
  1495.        with maximum depth of 1. `--no-parent' means that references
  1496.        to the parent directory are ignored (See section
  1497.        [128]Directory-Based Limits), and `-A.gif' means to download
  1498.        only the GIF files. `-A "*.gif"' would have worked too.
  1499.      * Suppose you were in the middle of downloading, when Wget was
  1500.        interrupted. Now you do not want to clobber the files already
  1501.        present. It would be:
  1502. wget -nc -r http://www.gnu.ai.mit.edu/
  1503.      * If you want to encode your own username and password to HTTP
  1504.        or FTP, use the appropriate URL syntax (See section [129]URL
  1505.        Format).
  1506. wget ftp://hniksic:mypassword@jagor.srce.hr/.emacs
  1507.      * If you do not like the default retrieval visualization (1K
  1508.        dots with 10 dots per cluster and 50 dots per line), you can
  1509.        customize it through dot settings (See section [130]Wgetrc
  1510.        Commands). For example, many people like the "binary" style
  1511.        of retrieval, with 8K dots and 512K lines:
  1512. wget --dot-style=binary ftp://prep.ai.mit.edu/pub/gnu/README
  1513.        You can experiment with other styles, like:
  1514. wget --dot-style=mega ftp://ftp.xemacs.org/pub/xemacs/xemacs-20.4/xemacs-2
  1515. 0.4.tar.gz
  1516. wget --dot-style=micro http://fly.cc.fer.hr/
  1517.        To make these settings permanent, put them in your `.wgetrc',
  1518.        as described before (See section [131]Sample Wgetrc).
  1519.        
  1520. [132]Guru Usage
  1521.  
  1522.      * If you wish Wget to keep a mirror of a page (or FTP
  1523.        subdirectories), use `--mirror' (`-m'), which is the
  1524.        shorthand for `-r -N'. You can put Wget in the crontab file
  1525.        asking it to recheck a site each Sunday:
  1526. crontab
  1527. 0 0 * * 0 wget --mirror ftp://ftp.xemacs.org/pub/xemacs/ -o /home/me/weekl
  1528. og
  1529.      * You may wish to do the same with someone's home page. But you
  1530.        do not want to download all those images--you're only
  1531.        interested in HTML.
  1532. wget --mirror -A.html http://www.w3.org/
  1533.      * But what about mirroring the hosts networkologically close to
  1534.        you? It seems so awfully slow because of all that DNS
  1535.        resolving. Just use `-D' (See section [133]Domain
  1536.        Acceptance).
  1537. wget -rN -Dsrce.hr http://www.srce.hr/
  1538.        Now Wget will correctly find out that `regoc.srce.hr' is the
  1539.        same as `www.srce.hr', but will not even take into
  1540.        consideration the link to `www.mit.edu'.
  1541.      * You have a presentation and would like the dumb absolute
  1542.        links to be converted to relative? Use `-k':
  1543. wget -k -r URL
  1544.      * You would like the output documents to go to standard output
  1545.        instead of to files? OK, but Wget will automatically shut up
  1546.        (turn on `--quiet') to prevent mixing of Wget output and the
  1547.        retrieved documents.
  1548. wget -O - http://jagor.srce.hr/ http://www.srce.hr/
  1549.        You can also combine the two options and make weird pipelines
  1550.        to retrieve the documents from remote hotlists:
  1551. wget -O - http://cool.list.com/ | wget --force-html -i -
  1552.        
  1553.                                [134]Various
  1554.                                      
  1555.    This chapter contains all the stuff that could not fit anywhere
  1556.    else.
  1557.    
  1558. [135]Proxies
  1559.  
  1560.    Proxies are special-purpose HTTP servers designed to transfer
  1561.    data from remote servers to local clients. One typical use of
  1562.    proxies is lightening network load for users behind a slow
  1563.    connection. This is achieved by channeling all HTTP and FTP
  1564.    requests through the proxy which caches the transferred data.
  1565.    When a cached resource is requested again, proxy will return the
  1566.    data from cache. Another use for proxies is for companies that
  1567.    separate (for security reasons) their internal networks from the
  1568.    rest of Internet. In order to obtain information from the Web,
  1569.    their users connect and retrieve remote data using an authorized
  1570.    proxy.
  1571.    
  1572.    Wget supports proxies for both HTTP and FTP retrievals. The
  1573.    standard way to specify proxy location, which Wget recognizes, is
  1574.    using the following environment variables:
  1575.    http_proxy
  1576.           This variable should contain the URL of the proxy for HTTP
  1577.           connections.
  1578.    ftp_proxy
  1579.           This variable should contain the URL of the proxy for HTTP
  1580.           connections. It is quite common that HTTP_PROXY and
  1581.           FTP_PROXY are set to the same URL.
  1582.    no_proxy
  1583.           This variable should contain a comma-separated list of
  1584.           domain extensions proxy should not be used for. For
  1585.           instance, if the value of no_proxy is `.mit.edu', proxy
  1586.           will not be used to retrieve documents from MIT.
  1587.           
  1588.    In addition to the environment variables, proxy location and
  1589.    settings may be specified from within Wget itself.
  1590.    `-Y on/off'
  1591.    `--proxy=on/off'
  1592.    `proxy = on/off'
  1593.           This option may be used to turn the proxy support on or
  1594.           off. Proxy support is on by default, provided that the
  1595.           appropriate environment variables are set.
  1596.    `http_proxy = URL'
  1597.    `ftp_proxy = URL'
  1598.    `no_proxy = string'
  1599.           These startup file variables allow you to override the
  1600.           proxy settings specified by the environment.
  1601.           
  1602.    Some proxy servers require authorization to enable you to use
  1603.    them. The authorization consists of username and password, which
  1604.    must be sent by Wget. As with HTTP authorization, several
  1605.    authentication schemes exist. For proxy authorization only the
  1606.    Basic authentication scheme is currently implemented.
  1607.    
  1608.    You may specify your username and password either through the
  1609.    proxy URL or through the command-line options. Assuming that the
  1610.    company's proxy is located at `proxy.srce.hr' at port 8001, a
  1611.    proxy URL location containing authorization data might look like
  1612.    this:
  1613. http://hniksic:mypassword@proxy.company.com:8001/
  1614.  
  1615.    Alternatively, you may use the `proxy-user' and `proxy-password'
  1616.    options, and the equivalent `.wgetrc' settings proxy_user and
  1617.    proxy_passwd to set the proxy username and password.
  1618.    
  1619. [136]Distribution
  1620.  
  1621.    Like all GNU utilities, the latest version of Wget can be found
  1622.    at the master GNU archive site prep.ai.mit.edu, and its mirrors.
  1623.    For example, Wget 1.5.3 can be found at
  1624.    [137]ftp://prep.ai.mit.edu/pub/gnu/wget-1.5.3.tar.gz
  1625.    
  1626. [138]Mailing List
  1627.  
  1628.    Wget has its own mailing list at [139]wget@sunsite.auc.dk, thanks
  1629.    to Karsten Thygesen. The mailing list is for discussion of Wget
  1630.    features and web, reporting Wget bugs (those that you think may
  1631.    be of interest to the public) and mailing announcements. You are
  1632.    welcome to subscribe. The more people on the list, the better!
  1633.    
  1634.    To subscribe, send mail to [140]wget-subscribe@sunsite.auc.dk.
  1635.    the magic word `subscribe' in the subject line. Unsubscribe by
  1636.    mailing to [141]wget-unsubscribe@sunsite.auc.dk.
  1637.    
  1638.    The mailing list is archived at
  1639.    [142]http://fly.cc.fer.hr/archive/wget.
  1640.    
  1641. [143]Reporting Bugs
  1642.  
  1643.    You are welcome to send bug reports about GNU Wget to
  1644.    [144]bug-wget@gnu.org. The bugs that you think are of the
  1645.    interest to the public (i.e. more people should be informed about
  1646.    them) can be Cc-ed to the mailing list at
  1647.    [145]wget@sunsite.auc.dk.
  1648.    
  1649.    Before actually submitting a bug report, please try to follow a
  1650.    few simple guidelines.
  1651.     1. Please try to ascertain that the behaviour you see really is
  1652.        a bug. If Wget crashes, it's a bug. If Wget does not behave
  1653.        as documented, it's a bug. If things work strange, but you
  1654.        are not sure about the way they are supposed to work, it
  1655.        might well be a bug.
  1656.     2. Try to repeat the bug in as simple circumstances as possible.
  1657.        E.g. if Wget crashes on `wget -rLl0 -t5 -Y0
  1658.        http://yoyodyne.com -o /tmp/log', you should try to see if it
  1659.        will crash with a simpler set of options. Also, while I will
  1660.        probably be interested to know the contents of your `.wgetrc'
  1661.        file, just dumping it into the debug message is probably a
  1662.        bad idea. Instead, you should first try to see if the bug
  1663.        repeats with `.wgetrc' moved out of the way. Only if it turns
  1664.        out that `.wgetrc' settings affect the bug, should you mail
  1665.        me the relevant parts of the file.
  1666.     3. Please start Wget with `-d' option and send the log (or the
  1667.        relevant parts of it). If Wget was compiled without debug
  1668.        support, recompile it. It is much easier to trace bugs with
  1669.        debug support on.
  1670.     4. If Wget has crashed, try to run it in a debugger, e.g. gdb
  1671.        `which wget` core and type where to get the backtrace.
  1672.     5. Find where the bug is, fix it and send me the patches. :-)
  1673.        
  1674. [146]Portability
  1675.  
  1676.    Since Wget uses GNU Autoconf for building and configuring, and
  1677.    avoids using "special" ultra--mega--cool features of any
  1678.    particular Unix, it should compile (and work) on all common Unix
  1679.    flavors.
  1680.    
  1681.    Various Wget versions have been compiled and tested under many
  1682.    kinds of Unix systems, including Solaris, Linux, SunOS, OSF (aka
  1683.    Digital Unix), Ultrix, *BSD, IRIX, and others; refer to the file
  1684.    `MACHINES' in the distribution directory for a comprehensive
  1685.    list. If you compile it on an architecture not listed there,
  1686.    please let me know so I can update it.
  1687.    
  1688.    Wget should also compile on the other Unix systems, not listed in
  1689.    `MACHINES'. If it doesn't, please let me know.
  1690.    
  1691.    Thanks to kind contributors, this version of Wget compiles and
  1692.    works on Microsoft Windows 95 and Windows NT platforms. It has
  1693.    been compiled successfully using MS Visual C++ 4.0, Watcom, and
  1694.    Borland C compilers, with Winsock as networking software.
  1695.    Naturally, it is crippled of some features available on Unix, but
  1696.    it should work as a substitute for people stuck with Windows.
  1697.    Note that the Windows port is neither tested nor maintained by
  1698.    me--all questions and problems should be reported to Wget mailing
  1699.    list at [147]wget@sunsite.auc.dk where the maintainers will look
  1700.    at them.
  1701.    
  1702. [148]Signals
  1703.  
  1704.    Since the purpose of Wget is background work, it catches the
  1705.    hangup signal (SIGHUP) and ignores it. If the output was on
  1706.    standard output, it will be redirected to a file named
  1707.    `wget-log'. Otherwise, SIGHUP is ignored. This is convenient when
  1708.    you wish to redirect the output of Wget after having started it.
  1709. $ wget http://www.ifi.uio.no/~larsi/gnus.tar.gz &
  1710. $ kill -HUP %%     # Redirect the output to wget-log
  1711.  
  1712.    Other than that, Wget will not try to interfere with signals in
  1713.    any way. C-c, kill -TERM and kill -KILL should kill it alike.
  1714.    
  1715.                              [149]Appendices
  1716.                                      
  1717.    This chapter contains some references I consider useful, like the
  1718.    Robots Exclusion Standard specification, as well as a list of
  1719.    contributors to GNU Wget.
  1720.    
  1721. [150]Robots
  1722.  
  1723.    Since Wget is able to traverse the web, it counts as one of the
  1724.    Web robots. Thus Wget understands Robots Exclusion Standard
  1725.    (RES)---contents of `/robots.txt', used by server administrators
  1726.    to shield parts of their systems from wanderings of Wget.
  1727.    
  1728.    Norobots support is turned on only when retrieving recursively,
  1729.    and never for the first page. Thus, you may issue:
  1730. wget -r http://fly.cc.fer.hr/
  1731.  
  1732.    First the index of fly.cc.fer.hr will be downloaded. If Wget
  1733.    finds anything worth downloading on the same host, only then will
  1734.    it load the robots, and decide whether or not to load the links
  1735.    after all. `/robots.txt' is loaded only once per host. Wget does
  1736.    not support the robots META tag.
  1737.    
  1738.    The description of the norobots standard was written, and is
  1739.    maintained by Martijn Koster [151]m.koster@webcrawler.com. With
  1740.    his permission, I contribute a (slightly modified) texified
  1741.    version of the RES.
  1742.    
  1743.   [152]Introduction to RES
  1744.   
  1745.    WWW Robots (also called wanderers or spiders) are programs that
  1746.    traverse many pages in the World Wide Web by recursively
  1747.    retrieving linked pages. For more information see the robots
  1748.    page.
  1749.    
  1750.    In 1993 and 1994 there have been occasions where robots have
  1751.    visited WWW servers where they weren't welcome for various
  1752.    reasons. Sometimes these reasons were robot specific, e.g.
  1753.    certain robots swamped servers with rapid-fire requests, or
  1754.    retrieved the same files repeatedly. In other situations robots
  1755.    traversed parts of WWW servers that weren't suitable, e.g. very
  1756.    deep virtual trees, duplicated information, temporary
  1757.    information, or cgi-scripts with side-effects (such as voting).
  1758.    
  1759.    These incidents indicated the need for established mechanisms for
  1760.    WWW servers to indicate to robots which parts of their server
  1761.    should not be accessed. This standard addresses this need with an
  1762.    operational solution.
  1763.    
  1764.    This document represents a consensus on 30 June 1994 on the
  1765.    robots mailing list (robots@webcrawler.com), between the majority
  1766.    of robot authors and other people with an interest in robots. It
  1767.    has also been open for discussion on the Technical World Wide Web
  1768.    mailing list (www-talk@info.cern.ch). This document is based on a
  1769.    previous working draft under the same title.
  1770.    
  1771.    It is not an official standard backed by a standards body, or
  1772.    owned by any commercial organization. It is not enforced by
  1773.    anybody, and there no guarantee that all current and future
  1774.    robots will use it. Consider it a common facility the majority of
  1775.    robot authors offer the WWW community to protect WWW server
  1776.    against unwanted accesses by their robots.
  1777.    
  1778.    The latest version of this document can be found at
  1779.    [153]http://info.webcrawler.com/mak/projects/robots/norobots.html
  1780.    .
  1781.    
  1782.   [154]RES Format
  1783.   
  1784.    The format and semantics of the `/robots.txt' file are as
  1785.    follows:
  1786.    
  1787.    The file consists of one or more records separated by one or more
  1788.    blank lines (terminated by CR, CR/NL, or NL). Each record
  1789.    contains lines of the form:
  1790. <field>:<optionalspace><value><optionalspace>
  1791.  
  1792.    The field name is case insensitive. Comments can be included in
  1793.    file using UNIX bourne shell conventions: the `#' character is
  1794.    used to indicate that preceding space (if any) and the remainder
  1795.    of the line up to the line termination is discarded. Lines
  1796.    containing only a comment are discarded completely, and therefore
  1797.    do not indicate a record boundary.
  1798.    
  1799.    The record starts with one or more User-agent lines, followed by
  1800.    one or more Disallow lines, as detailed below. Unrecognized
  1801.    headers are ignored.
  1802.    
  1803.    The presence of an empty `/robots.txt' file has no explicit
  1804.    associated semantics, it will be treated as if it was not
  1805.    present, i.e. all robots will consider themselves welcome.
  1806.    
  1807.   [155]User-Agent Field
  1808.   
  1809.    The value of this field is the name of the robot the record is
  1810.    describing access policy for.
  1811.    
  1812.    If more than one User-agent field is present the record describes
  1813.    an identical access policy for more than one robot. At least one
  1814.    field needs to be present per record.
  1815.    
  1816.    The robot should be liberal in interpreting this field. A case
  1817.    insensitive substring match of the name without version
  1818.    information is recommended.
  1819.    
  1820.    If the value is `*', the record describes the default access
  1821.    policy for any robot that has not matched any of the other
  1822.    records. It is not allowed to have multiple such records in the
  1823.    `/robots.txt' file.
  1824.    
  1825.   [156]Disallow Field
  1826.   
  1827.    The value of this field specifies a partial URL that is not to be
  1828.    visited. This can be a full path, or a partial path; any URL that
  1829.    starts with this value will not be retrieved. For example,
  1830.    `Disallow: /help' disallows both `/help.html' and
  1831.    `/help/index.html', whereas `Disallow: /help/' would disallow
  1832.    `/help/index.html' but allow `/help.html'.
  1833.    
  1834.    Any empty value, indicates that all URLs can be retrieved. At
  1835.    least one Disallow field needs to be present in a record.
  1836.    
  1837.   [157]Norobots Examples
  1838.   
  1839.    The following example `/robots.txt' file specifies that no robots
  1840.    should visit any URL starting with `/cyberworld/map/' or `/tmp/':
  1841. # robots.txt for http://www.site.com/
  1842.  
  1843. User-agent: *
  1844. Disallow: /cyberworld/map/ # This is an infinite virtual URL space
  1845. Disallow: /tmp/ # these will soon disappear
  1846.  
  1847.    This example `/robots.txt' file specifies that no robots should
  1848.    visit any URL starting with `/cyberworld/map/', except the robot
  1849.    called `cybermapper':
  1850. # robots.txt for http://www.site.com/
  1851.  
  1852. User-agent: *
  1853. Disallow: /cyberworld/map/ # This is an infinite virtual URL space
  1854.  
  1855. # Cybermapper knows where to go.
  1856. User-agent: cybermapper
  1857. Disallow:
  1858.  
  1859.    This example indicates that no robots should visit this site
  1860.    further:
  1861. # go away
  1862. User-agent: *
  1863. Disallow: /
  1864.  
  1865. [158]Security Considerations
  1866.  
  1867.    When using Wget, you must be aware that it sends unencrypted
  1868.    passwords through the network, which may present a security
  1869.    problem. Here are the main issues, and some solutions.
  1870.     1. The passwords on the command line are visible using ps. If
  1871.        this is a problem, avoid putting passwords from the command
  1872.        line--e.g. you can use `.netrc' for this.
  1873.     2. Using the insecure basic authentication scheme, unencrypted
  1874.        passwords are transmitted through the network routers and
  1875.        gateways.
  1876.     3. The FTP passwords are also in no way encrypted. There is no
  1877.        good solution for this at the moment.
  1878.     4. Although the "normal" output of Wget tries to hide the
  1879.        passwords, debugging logs show them, in all forms. This
  1880.        problem is avoided by being careful when you send debug logs
  1881.        (yes, even when you send them to me).
  1882.        
  1883. [159]Contributors
  1884.  
  1885.    GNU Wget was written by Hrvoje Niksic [160]hniksic@srce.hr.
  1886.    However, its development could never have gone as far as it has,
  1887.    were it not for the help of many people, either with bug reports,
  1888.    feature proposals, patches, or letters saying "Thanks!".
  1889.    
  1890.    Special thanks goes to the following people (no particular
  1891.    order):
  1892.      * Karsten Thygesen--donated the mailing list and the initial
  1893.        FTP space.
  1894.      * Shawn McHorse--bug reports and patches.
  1895.      * Kaveh R. Ghazi--on-the-fly ansi2knr-ization.
  1896.      * Gordon Matzigkeit---`.netrc' support.
  1897.      * Zlatko @v{C}alu@v{s}i'{c}, Tomislav Vujec and Dra@v{z}en
  1898.        Ka@v{c}ar--feature suggestions and "philosophical"
  1899.        discussions.
  1900.      * Darko Budor--initial port to Windows.
  1901.      * Antonio Rosella--help and suggestions, plust the Italian
  1902.        translation.
  1903.      * Tomislav Petrovi'{c}, Mario Miko@v{c}evi'{c}---many bug
  1904.        reports and suggestions.
  1905.      * Fran@,{c}ois Pinard--many thorough bug reports and
  1906.        discussions.
  1907.      * Karl Eichwalder--lots of help with internationalization and
  1908.        other things.
  1909.      * Junio Hamano--donated support for Opie and HTTP Digest
  1910.        authentication.
  1911.      * Brian Gough--a generous donation.
  1912.        
  1913.    The following people have provided patches, bug/build reports,
  1914.    useful suggestions, beta testing services, fan mail and all the
  1915.    other things that make maintenance so much fun:
  1916.    
  1917.    Tim Adam, Martin Baehr, Dieter Baron, Roger Beeman and the Gurus
  1918.    at Cisco, Mark Boyns, John Burden, Wanderlei Cavassin, Gilles
  1919.    Cedoc, Tim Charron, Noel Cragg, Kristijan @v{C}onka@v{s}, Damir
  1920.    D@v{z}eko, Andrew Davison, Ulrich Drepper, Marc Duponcheel,
  1921.    Aleksandar Erkalovi'{c}, Andy Eskilsson, Masashi Fujita, Howard
  1922.    Gayle, Marcel Gerrits, Hans Grobler, Mathieu Guillaume, Karl
  1923.    Heuer, Gregor Hoffleit, Erik Magnus Hulthen, Richard Huveneers,
  1924.    Simon Josefsson, Mario Juri'{c}, Goran Kezunovi'{c}, Robert
  1925.    Kleine, Fila Kolodny, Alexander Kourakos, Martin Kraemer, Tage
  1926.    Stabell-Kulo, Hrvoje Lacko, Dave Love, Jordan Mendelson, Lin Zhe
  1927.    Min, Charlie Negyesi, Andrew Pollock, Steve Pothier, Marin
  1928.    Purgar, Jan Prikryl, Keith Refson, Tobias Ringstrom, Heinz
  1929.    Salzmann, Robert Schmidt, Toomas Soome, Sven Sternberger, Markus
  1930.    Strasser, Szakacsits Szabolcs, Mike Thomas, Russell Vincent,
  1931.    Douglas E. Wegscheid, Jasmin Zainul, Bojan @v{Z}drnja, Kristijan
  1932.    Zimmer.
  1933.    
  1934.    Apologies to all who I accidentally left out, and many thanks to
  1935.    all the subscribers of the Wget mailing list.
  1936.    
  1937.                      [161]GNU GENERAL PUBLIC LICENSE
  1938.                                      
  1939.    Version 2, June 1991
  1940. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  1941. 675 Mass Ave, Cambridge, MA 02139, USA
  1942.  
  1943. Everyone is permitted to copy and distribute verbatim copies
  1944. of this license document, but changing it is not allowed.
  1945.  
  1946. [162]Preamble
  1947.  
  1948.    The licenses for most software are designed to take away your
  1949.    freedom to share and change it. By contrast, the GNU General
  1950.    Public License is intended to guarantee your freedom to share and
  1951.    change free software--to make sure the software is free for all
  1952.    its users. This General Public License applies to most of the
  1953.    Free Software Foundation's software and to any other program
  1954.    whose authors commit to using it. (Some other Free Software
  1955.    Foundation software is covered by the GNU Library General Public
  1956.    License instead.) You can apply it to your programs, too.
  1957.    
  1958.    When we speak of free software, we are referring to freedom, not
  1959.    price. Our General Public Licenses are designed to make sure that
  1960.    you have the freedom to distribute copies of free software (and
  1961.    charge for this service if you wish), that you receive source
  1962.    code or can get it if you want it, that you can change the
  1963.    software or use pieces of it in new free programs; and that you
  1964.    know you can do these things.
  1965.    
  1966.    To protect your rights, we need to make restrictions that forbid
  1967.    anyone to deny you these rights or to ask you to surrender the
  1968.    rights. These restrictions translate to certain responsibilities
  1969.    for you if you distribute copies of the software, or if you
  1970.    modify it.
  1971.    
  1972.    For example, if you distribute copies of such a program, whether
  1973.    gratis or for a fee, you must give the recipients all the rights
  1974.    that you have. You must make sure that they, too, receive or can
  1975.    get the source code. And you must show them these terms so they
  1976.    know their rights.
  1977.    
  1978.    We protect your rights with two steps: (1) copyright the
  1979.    software, and (2) offer you this license which gives you legal
  1980.    permission to copy, distribute and/or modify the software.
  1981.    
  1982.    Also, for each author's protection and ours, we want to make
  1983.    certain that everyone understands that there is no warranty for
  1984.    this free software. If the software is modified by someone else
  1985.    and passed on, we want its recipients to know that what they have
  1986.    is not the original, so that any problems introduced by others
  1987.    will not reflect on the original authors' reputations.
  1988.    
  1989.    Finally, any free program is threatened constantly by software
  1990.    patents. We wish to avoid the danger that redistributors of a
  1991.    free program will individually obtain patent licenses, in effect
  1992.    making the program proprietary. To prevent this, we have made it
  1993.    clear that any patent must be licensed for everyone's free use or
  1994.    not licensed at all.
  1995.    
  1996.    The precise terms and conditions for copying, distribution and
  1997.    modification follow.
  1998.    
  1999. [163]TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  2000.  
  2001.     1. This License applies to any program or other work which
  2002.        contains a notice placed by the copyright holder saying it
  2003.        may be distributed under the terms of this General Public
  2004.        License. The "Program", below, refers to any such program or
  2005.        work, and a "work based on the Program" means either the
  2006.        Program or any derivative work under copyright law: that is
  2007.        to say, a work containing the Program or a portion of it,
  2008.        either verbatim or with modifications and/or translated into
  2009.        another language. (Hereinafter, translation is included
  2010.        without limitation in the term "modification".) Each licensee
  2011.        is addressed as "you". Activities other than copying,
  2012.        distribution and modification are not covered by this
  2013.        License; they are outside its scope. The act of running the
  2014.        Program is not restricted, and the output from the Program is
  2015.        covered only if its contents constitute a work based on the
  2016.        Program (independent of having been made by running the
  2017.        Program). Whether that is true depends on what the Program
  2018.        does.
  2019.     2. You may copy and distribute verbatim copies of the Program's
  2020.        source code as you receive it, in any medium, provided that
  2021.        you conspicuously and appropriately publish on each copy an
  2022.        appropriate copyright notice and disclaimer of warranty; keep
  2023.        intact all the notices that refer to this License and to the
  2024.        absence of any warranty; and give any other recipients of the
  2025.        Program a copy of this License along with the Program. You
  2026.        may charge a fee for the physical act of transferring a copy,
  2027.        and you may at your option offer warranty protection in
  2028.        exchange for a fee.
  2029.     3. You may modify your copy or copies of the Program or any
  2030.        portion of it, thus forming a work based on the Program, and
  2031.        copy and distribute such modifications or work under the
  2032.        terms of Section 1 above, provided that you also meet all of
  2033.        these conditions:
  2034.          1. You must cause the modified files to carry prominent
  2035.             notices stating that you changed the files and the date
  2036.             of any change.
  2037.          2. You must cause any work that you distribute or publish,
  2038.             that in whole or in part contains or is derived from the
  2039.             Program or any part thereof, to be licensed as a whole
  2040.             at no charge to all third parties under the terms of
  2041.             this License.
  2042.          3. If the modified program normally reads commands
  2043.             interactively when run, you must cause it, when started
  2044.             running for such interactive use in the most ordinary
  2045.             way, to print or display an announcement including an
  2046.             appropriate copyright notice and a notice that there is
  2047.             no warranty (or else, saying that you provide a
  2048.             warranty) and that users may redistribute the program
  2049.             under these conditions, and telling the user how to view
  2050.             a copy of this License. (Exception: if the Program
  2051.             itself is interactive but does not normally print such
  2052.             an announcement, your work based on the Program is not
  2053.             required to print an announcement.)
  2054.        These requirements apply to the modified work as a whole. If
  2055.        identifiable sections of that work are not derived from the
  2056.        Program, and can be reasonably considered independent and
  2057.        separate works in themselves, then this License, and its
  2058.        terms, do not apply to those sections when you distribute
  2059.        them as separate works. But when you distribute the same
  2060.        sections as part of a whole which is a work based on the
  2061.        Program, the distribution of the whole must be on the terms
  2062.        of this License, whose permissions for other licensees extend
  2063.        to the entire whole, and thus to each and every part
  2064.        regardless of who wrote it. Thus, it is not the intent of
  2065.        this section to claim rights or contest your rights to work
  2066.        written entirely by you; rather, the intent is to exercise
  2067.        the right to control the distribution of derivative or
  2068.        collective works based on the Program. In addition, mere
  2069.        aggregation of another work not based on the Program with the
  2070.        Program (or with a work based on the Program) on a volume of
  2071.        a storage or distribution medium does not bring the other
  2072.        work under the scope of this License.
  2073.     4. You may copy and distribute the Program (or a work based on
  2074.        it, under Section 2) in object code or executable form under
  2075.        the terms of Sections 1 and 2 above provided that you also do
  2076.        one of the following:
  2077.          1. Accompany it with the complete corresponding
  2078.             machine-readable source code, which must be distributed
  2079.             under the terms of Sections 1 and 2 above on a medium
  2080.             customarily used for software interchange; or,
  2081.          2. Accompany it with a written offer, valid for at least
  2082.             three years, to give any third party, for a charge no
  2083.             more than your cost of physically performing source
  2084.             distribution, a complete machine-readable copy of the
  2085.             corresponding source code, to be distributed under the
  2086.             terms of Sections 1 and 2 above on a medium customarily
  2087.             used for software interchange; or,
  2088.          3. Accompany it with the information you received as to the
  2089.             offer to distribute corresponding source code. (This
  2090.             alternative is allowed only for noncommercial
  2091.             distribution and only if you received the program in
  2092.             object code or executable form with such an offer, in
  2093.             accord with Subsection b above.)
  2094.        The source code for a work means the preferred form of the
  2095.        work for making modifications to it. For an executable work,
  2096.        complete source code means all the source code for all
  2097.        modules it contains, plus any associated interface definition
  2098.        files, plus the scripts used to control compilation and
  2099.        installation of the executable. However, as a special
  2100.        exception, the source code distributed need not include
  2101.        anything that is normally distributed (in either source or
  2102.        binary form) with the major components (compiler, kernel, and
  2103.        so on) of the operating system on which the executable runs,
  2104.        unless that component itself accompanies the executable. If
  2105.        distribution of executable or object code is made by offering
  2106.        access to copy from a designated place, then offering
  2107.        equivalent access to copy the source code from the same place
  2108.        counts as distribution of the source code, even though third
  2109.        parties are not compelled to copy the source along with the
  2110.        object code.
  2111.     5. You may not copy, modify, sublicense, or distribute the
  2112.        Program except as expressly provided under this License. Any
  2113.        attempt otherwise to copy, modify, sublicense or distribute
  2114.        the Program is void, and will automatically terminate your
  2115.        rights under this License. However, parties who have received
  2116.        copies, or rights, from you under this License will not have
  2117.        their licenses terminated so long as such parties remain in
  2118.        full compliance.
  2119.     6. You are not required to accept this License, since you have
  2120.        not signed it. However, nothing else grants you permission to
  2121.        modify or distribute the Program or its derivative works.
  2122.        These actions are prohibited by law if you do not accept this
  2123.        License. Therefore, by modifying or distributing the Program
  2124.        (or any work based on the Program), you indicate your
  2125.        acceptance of this License to do so, and all its terms and
  2126.        conditions for copying, distributing or modifying the Program
  2127.        or works based on it.
  2128.     7. Each time you redistribute the Program (or any work based on
  2129.        the Program), the recipient automatically receives a license
  2130.        from the original licensor to copy, distribute or modify the
  2131.        Program subject to these terms and conditions. You may not
  2132.        impose any further restrictions on the recipients' exercise
  2133.        of the rights granted herein. You are not responsible for
  2134.        enforcing compliance by third parties to this License.
  2135.     8. If, as a consequence of a court judgment or allegation of
  2136.        patent infringement or for any other reason (not limited to
  2137.        patent issues), conditions are imposed on you (whether by
  2138.        court order, agreement or otherwise) that contradict the
  2139.        conditions of this License, they do not excuse you from the
  2140.        conditions of this License. If you cannot distribute so as to
  2141.        satisfy simultaneously your obligations under this License
  2142.        and any other pertinent obligations, then as a consequence
  2143.        you may not distribute the Program at all. For example, if a
  2144.        patent license would not permit royalty-free redistribution
  2145.        of the Program by all those who receive copies directly or
  2146.        indirectly through you, then the only way you could satisfy
  2147.        both it and this License would be to refrain entirely from
  2148.        distribution of the Program. If any portion of this section
  2149.        is held invalid or unenforceable under any particular
  2150.        circumstance, the balance of the section is intended to apply
  2151.        and the section as a whole is intended to apply in other
  2152.        circumstances. It is not the purpose of this section to
  2153.        induce you to infringe any patents or other property right
  2154.        claims or to contest validity of any such claims; this
  2155.        section has the sole purpose of protecting the integrity of
  2156.        the free software distribution system, which is implemented
  2157.        by public license practices. Many people have made generous
  2158.        contributions to the wide range of software distributed
  2159.        through that system in reliance on consistent application of
  2160.        that system; it is up to the author/donor to decide if he or
  2161.        she is willing to distribute software through any other
  2162.        system and a licensee cannot impose that choice. This section
  2163.        is intended to make thoroughly clear what is believed to be a
  2164.        consequence of the rest of this License.
  2165.     9. If the distribution and/or use of the Program is restricted
  2166.        in certain countries either by patents or by copyrighted
  2167.        interfaces, the original copyright holder who places the
  2168.        Program under this License may add an explicit geographical
  2169.        distribution limitation excluding those countries, so that
  2170.        distribution is permitted only in or among countries not thus
  2171.        excluded. In such case, this License incorporates the
  2172.        limitation as if written in the body of this License.
  2173.    10. The Free Software Foundation may publish revised and/or new
  2174.        versions of the General Public License from time to time.
  2175.        Such new versions will be similar in spirit to the present
  2176.        version, but may differ in detail to address new problems or
  2177.        concerns. Each version is given a distinguishing version
  2178.        number. If the Program specifies a version number of this
  2179.        License which applies to it and "any later version", you have
  2180.        the option of following the terms and conditions either of
  2181.        that version or of any later version published by the Free
  2182.        Software Foundation. If the Program does not specify a
  2183.        version number of this License, you may choose any version
  2184.        ever published by the Free Software Foundation.
  2185.    11. If you wish to incorporate parts of the Program into other
  2186.        free programs whose distribution conditions are different,
  2187.        write to the author to ask for permission. For software which
  2188.        is copyrighted by the Free Software Foundation, write to the
  2189.        Free Software Foundation; we sometimes make exceptions for
  2190.        this. Our decision will be guided by the two goals of
  2191.        preserving the free status of all derivatives of our free
  2192.        software and of promoting the sharing and reuse of software
  2193.        generally.
  2194.        NO WARRANTY
  2195.    12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  2196.        WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
  2197.        APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
  2198.        COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
  2199.        "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
  2200.        IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  2201.        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2202.        PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
  2203.        THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
  2204.        YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
  2205.        CORRECTION.
  2206.    13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  2207.        WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  2208.        MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  2209.        LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  2210.        INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  2211.        INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
  2212.        LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
  2213.        SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
  2214.        TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
  2215.        OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  2216.        DAMAGES.
  2217.        
  2218. END OF TERMS AND CONDITIONS
  2219.  
  2220. [164]How to Apply These Terms to Your New Programs
  2221.  
  2222.    If you develop a new program, and you want it to be of the
  2223.    greatest possible use to the public, the best way to achieve this
  2224.    is to make it free software which everyone can redistribute and
  2225.    change under these terms.
  2226.    
  2227.    To do so, attach the following notices to the program. It is
  2228.    safest to attach them to the start of each source file to most
  2229.    effectively convey the exclusion of warranty; and each file
  2230.    should have at least the "copyright" line and a pointer to where
  2231.    the full notice is found.
  2232. one line to give the program's name and an idea of what it does.
  2233. Copyright (C) 19yy  name of author
  2234.  
  2235. This program is free software; you can redistribute it and/or
  2236. modify it under the terms of the GNU General Public License
  2237. as published by the Free Software Foundation; either version 2
  2238. of the License, or (at your option) any later version.
  2239.  
  2240. This program is distributed in the hope that it will be useful,
  2241. but WITHOUT ANY WARRANTY; without even the implied warranty of
  2242. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2243. GNU General Public License for more details.
  2244.  
  2245. You should have received a copy of the GNU General Public License
  2246. along with this program; if not, write to the Free Software
  2247. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2248.  
  2249.    Also add information on how to contact you by electronic and
  2250.    paper mail.
  2251.    
  2252.    If the program is interactive, make it output a short notice like
  2253.    this when it starts in an interactive mode:
  2254. Gnomovision version 69, Copyright (C) 19yy name of author
  2255. Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  2256. type `show w'.  This is free software, and you are welcome
  2257. to redistribute it under certain conditions; type `show c'
  2258. for details.
  2259.  
  2260.    The hypothetical commands `show w' and `show c' should show the
  2261.    appropriate parts of the General Public License. Of course, the
  2262.    commands you use may be called something other than `show w' and
  2263.    `show c'; they could even be mouse-clicks or menu items--whatever
  2264.    suits your program.
  2265.    
  2266.    You should also get your employer (if you work as a programmer)
  2267.    or your school, if any, to sign a "copyright disclaimer" for the
  2268.    program, if necessary. Here is a sample; alter the names:
  2269. Yoyodyne, Inc., hereby disclaims all copyright
  2270. interest in the program `Gnomovision'
  2271. (which makes passes at compilers) written
  2272. by James Hacker.
  2273.  
  2274. signature of Ty Coon, 1 April 1989
  2275. Ty Coon, President of Vice
  2276.  
  2277.    This General Public License does not permit incorporating your
  2278.    program into proprietary programs. If your program is a
  2279.    subroutine library, you may consider it more useful to permit
  2280.    linking proprietary applications with the library. If this is
  2281.    what you want to do, use the GNU Library General Public License
  2282.    instead of this License.
  2283.