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