]> sjero.net Git - wget/blob - doc/wget.info-2
[svn] * wget.texi (Download Options): --no-clobber's documentation was
[wget] / doc / wget.info-2
1 This is Info file wget.info, produced by Makeinfo version 1.68 from the
2 input file ./wget.texi.
3
4 INFO-DIR-SECTION Net Utilities
5 INFO-DIR-SECTION World Wide Web
6 START-INFO-DIR-ENTRY
7 * Wget: (wget).         The non-interactive network downloader.
8 END-INFO-DIR-ENTRY
9
10    This file documents the the GNU Wget utility for downloading network
11 data.
12
13    Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
14
15    Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
18
19    Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "Copying" and "GNU General Public License"
22 are included exactly as in the original, and provided that the entire
23 resulting derived work is distributed under the terms of a permission
24 notice identical to this one.
25
26 \1f
27 File: wget.info,  Node: HTTP Time-Stamping Internals,  Next: FTP Time-Stamping Internals,  Prev: Time-Stamping Usage,  Up: Time-Stamping
28
29 HTTP Time-Stamping Internals
30 ============================
31
32    Time-stamping in HTTP is implemented by checking of the
33 `Last-Modified' header.  If you wish to retrieve the file `foo.html'
34 through HTTP, Wget will check whether `foo.html' exists locally.  If it
35 doesn't, `foo.html' will be retrieved unconditionally.
36
37    If the file does exist locally, Wget will first check its local
38 time-stamp (similar to the way `ls -l' checks it), and then send a
39 `HEAD' request to the remote server, demanding the information on the
40 remote file.
41
42    The `Last-Modified' header is examined to find which file was
43 modified more recently (which makes it "newer").  If the remote file is
44 newer, it will be downloaded; if it is older, Wget will give up.(1)
45
46    When `--backup-converted' (`-K') is specified in conjunction with
47 `-N', server file `X' is compared to local file `X.orig', if extant,
48 rather than being compared to local file `X', which will always differ
49 if it's been converted by `--convert-links' (`-k').
50
51    Arguably, HTTP time-stamping should be implemented using the
52 `If-Modified-Since' request.
53
54    ---------- Footnotes ----------
55
56    (1) As an additional check, Wget will look at the `Content-Length'
57 header, and compare the sizes; if they are not the same, the remote
58 file will be downloaded no matter what the time-stamp says.
59
60 \1f
61 File: wget.info,  Node: FTP Time-Stamping Internals,  Prev: HTTP Time-Stamping Internals,  Up: Time-Stamping
62
63 FTP Time-Stamping Internals
64 ===========================
65
66    In theory, FTP time-stamping works much the same as HTTP, only FTP
67 has no headers--time-stamps must be received from the directory
68 listings.
69
70    For each directory files must be retrieved from, Wget will use the
71 `LIST' command to get the listing.  It will try to analyze the listing,
72 assuming that it is a Unix `ls -l' listing, and extract the
73 time-stamps.  The rest is exactly the same as for HTTP.
74
75    Assumption that every directory listing is a Unix-style listing may
76 sound extremely constraining, but in practice it is not, as many
77 non-Unix FTP servers use the Unixoid listing format because most (all?)
78 of the clients understand it.  Bear in mind that RFC959 defines no
79 standard way to get a file list, let alone the time-stamps.  We can
80 only hope that a future standard will define this.
81
82    Another non-standard solution includes the use of `MDTM' command
83 that is supported by some FTP servers (including the popular
84 `wu-ftpd'), which returns the exact time of the specified file.  Wget
85 may support this command in the future.
86
87 \1f
88 File: wget.info,  Node: Startup File,  Next: Examples,  Prev: Time-Stamping,  Up: Top
89
90 Startup File
91 ************
92
93    Once you know how to change default settings of Wget through command
94 line arguments, you may wish to make some of those settings permanent.
95 You can do that in a convenient way by creating the Wget startup
96 file--`.wgetrc'.
97
98    Besides `.wgetrc' is the "main" initialization file, it is
99 convenient to have a special facility for storing passwords.  Thus Wget
100 reads and interprets the contents of `$HOME/.netrc', if it finds it.
101 You can find `.netrc' format in your system manuals.
102
103    Wget reads `.wgetrc' upon startup, recognizing a limited set of
104 commands.
105
106 * Menu:
107
108 * Wgetrc Location::   Location of various wgetrc files.
109 * Wgetrc Syntax::     Syntax of wgetrc.
110 * Wgetrc Commands::   List of available commands.
111 * Sample Wgetrc::     A wgetrc example.
112
113 \1f
114 File: wget.info,  Node: Wgetrc Location,  Next: Wgetrc Syntax,  Prev: Startup File,  Up: Startup File
115
116 Wgetrc Location
117 ===============
118
119    When initializing, Wget will look for a "global" startup file,
120 `/usr/local/etc/wgetrc' by default (or some prefix other than
121 `/usr/local', if Wget was not installed there) and read commands from
122 there, if it exists.
123
124    Then it will look for the user's file.  If the environmental variable
125 `WGETRC' is set, Wget will try to load that file.  Failing that, no
126 further attempts will be made.
127
128    If `WGETRC' is not set, Wget will try to load `$HOME/.wgetrc'.
129
130    The fact that user's settings are loaded after the system-wide ones
131 means that in case of collision user's wgetrc *overrides* the
132 system-wide wgetrc (in `/usr/local/etc/wgetrc' by default).  Fascist
133 admins, away!
134
135 \1f
136 File: wget.info,  Node: Wgetrc Syntax,  Next: Wgetrc Commands,  Prev: Wgetrc Location,  Up: Startup File
137
138 Wgetrc Syntax
139 =============
140
141    The syntax of a wgetrc command is simple:
142
143      variable = value
144
145    The "variable" will also be called "command".  Valid "values" are
146 different for different commands.
147
148    The commands are case-insensitive and underscore-insensitive.  Thus
149 `DIr__PrefiX' is the same as `dirprefix'.  Empty lines, lines beginning
150 with `#' and lines containing white-space only are discarded.
151
152    Commands that expect a comma-separated list will clear the list on an
153 empty command.  So, if you wish to reset the rejection list specified in
154 global `wgetrc', you can do it with:
155
156      reject =
157
158 \1f
159 File: wget.info,  Node: Wgetrc Commands,  Next: Sample Wgetrc,  Prev: Wgetrc Syntax,  Up: Startup File
160
161 Wgetrc Commands
162 ===============
163
164    The complete set of commands is listed below, the letter after `='
165 denoting the value the command takes. It is `on/off' for `on' or `off'
166 (which can also be `1' or `0'), STRING for any non-empty string or N
167 for a positive integer.  For example, you may specify `use_proxy = off'
168 to disable use of proxy servers by default. You may use `inf' for
169 infinite values, where appropriate.
170
171    Most of the commands have their equivalent command-line option
172 (*Note Invoking::), except some more obscure or rarely used ones.
173
174 accept/reject = STRING
175      Same as `-A'/`-R' (*Note Types of Files::).
176
177 add_hostdir = on/off
178      Enable/disable host-prefixed file names.  `-nH' disables it.
179
180 continue = on/off
181      Enable/disable continuation of the retrieval, the same as `-c'
182      (which enables it).
183
184 background = on/off
185      Enable/disable going to background, the same as `-b' (which enables
186      it).
187
188 backup_converted = on/off
189      Enable/disable saving pre-converted files with the suffix `.orig'
190      - the same as `-K' (which enables it).
191
192 base = STRING
193      Set base for relative URLs, the same as `-B'.
194
195 cache = on/off
196      When set to off, disallow server-caching.  See the `-C' option.
197
198 convert links = on/off
199      Convert non-relative links locally.  The same as `-k'.
200
201 cut_dirs = N
202      Ignore N remote directory components.
203
204 debug = on/off
205      Debug mode, same as `-d'.
206
207 delete_after = on/off
208      Delete after download, the same as `--delete-after'.
209
210 dir_prefix = STRING
211      Top of directory tree, the same as `-P'.
212
213 dirstruct = on/off
214      Turning dirstruct on or off, the same as `-x' or `-nd',
215      respectively.
216
217 domains = STRING
218      Same as `-D' (*Note Domain Acceptance::).
219
220 dot_bytes = N
221      Specify the number of bytes "contained" in a dot, as seen
222      throughout the retrieval (1024 by default).  You can postfix the
223      value with `k' or `m', representing kilobytes and megabytes,
224      respectively.  With dot settings you can tailor the dot retrieval
225      to suit your needs, or you can use the predefined "styles" (*Note
226      Download Options::).
227
228 dots_in_line = N
229      Specify the number of dots that will be printed in each line
230      throughout the retrieval (50 by default).
231
232 dot_spacing = N
233      Specify the number of dots in a single cluster (10 by default).
234
235 dot_style = STRING
236      Specify the dot retrieval "style", as with `--dot-style'.
237
238 exclude_directories = STRING
239      Specify a comma-separated list of directories you wish to exclude
240      from download, the same as `-X' (*Note Directory-Based Limits::).
241
242 exclude_domains = STRING
243      Same as `--exclude-domains' (*Note Domain Acceptance::).
244
245 follow_ftp = on/off
246      Follow FTP links from HTML documents, the same as `-f'.
247
248 follow_tags = STRING
249      Only follow certain HTML tags when doing a recursive retrieval,
250      just like `--follow-tags'.
251
252 force_html = on/off
253      If set to on, force the input filename to be regarded as an HTML
254      document, the same as `-F'.
255
256 ftp_proxy = STRING
257      Use STRING as FTP proxy, instead of the one specified in
258      environment.
259
260 glob = on/off
261      Turn globbing on/off, the same as `-g'.
262
263 header = STRING
264      Define an additional header, like `--header'.
265
266 http_passwd = STRING
267      Set HTTP password.
268
269 http_proxy = STRING
270      Use STRING as HTTP proxy, instead of the one specified in
271      environment.
272
273 http_user = STRING
274      Set HTTP user to STRING.
275
276 ignore_length = on/off
277      When set to on, ignore `Content-Length' header; the same as
278      `--ignore-length'.
279
280 ignore_tags = STRING
281      Ignore certain HTML tags when doing a recursive retrieval, just
282      like `-G' / `--ignore-tags'.
283
284 include_directories = STRING
285      Specify a comma-separated list of directories you wish to follow
286      when downloading, the same as `-I'.
287
288 input = STRING
289      Read the URLs from STRING, like `-i'.
290
291 kill_longer = on/off
292      Consider data longer than specified in content-length header as
293      invalid (and retry getting it). The default behaviour is to save
294      as much data as there is, provided there is more than or equal to
295      the value in `Content-Length'.
296
297 logfile = STRING
298      Set logfile, the same as `-o'.
299
300 login = STRING
301      Your user name on the remote machine, for FTP.  Defaults to
302      `anonymous'.
303
304 mirror = on/off
305      Turn mirroring on/off.  The same as `-m'.
306
307 netrc = on/off
308      Turn reading netrc on or off.
309
310 noclobber = on/off
311      Same as `-nc'.
312
313 no_parent = on/off
314      Disallow retrieving outside the directory hierarchy, like
315      `--no-parent' (*Note Directory-Based Limits::).
316
317 no_proxy = STRING
318      Use STRING as the comma-separated list of domains to avoid in
319      proxy loading, instead of the one specified in environment.
320
321 output_document = STRING
322      Set the output filename, the same as `-O'.
323
324 passive_ftp = on/off
325      Set passive FTP, the same as `--passive-ftp'.
326
327 passwd = STRING
328      Set your FTP password to PASSWORD.  Without this setting, the
329      password defaults to `username@hostname.domainname'.
330
331 proxy_user = STRING
332      Set proxy authentication user name to STRING, like `--proxy-user'.
333
334 proxy_passwd = STRING
335      Set proxy authentication password to STRING, like `--proxy-passwd'.
336
337 quiet = on/off
338      Quiet mode, the same as `-q'.
339
340 quota = QUOTA
341      Specify the download quota, which is useful to put in the global
342      `wgetrc'. When download quota is specified, Wget will stop
343      retrieving after the download sum has become greater than quota.
344      The quota can be specified in bytes (default), kbytes `k'
345      appended) or mbytes (`m' appended).  Thus `quota = 5m' will set
346      the quota to 5 mbytes. Note that the user's startup file overrides
347      system settings.
348
349 reclevel = N
350      Recursion level, the same as `-l'.
351
352 recursive = on/off
353      Recursive on/off, the same as `-r'.
354
355 relative_only = on/off
356      Follow only relative links, the same as `-L' (*Note Relative
357      Links::).
358
359 remove_listing = on/off
360      If set to on, remove FTP listings downloaded by Wget.  Setting it
361      to off is the same as `-nr'.
362
363 retr_symlinks = on/off
364      When set to on, retrieve symbolic links as if they were plain
365      files; the same as `--retr-symlinks'.
366
367 robots = on/off
368      Use (or not) `/robots.txt' file (*Note Robots::).  Be sure to know
369      what you are doing before changing the default (which is `on').
370
371 server_response = on/off
372      Choose whether or not to print the HTTP and FTP server responses,
373      the same as `-S'.
374
375 simple_host_check = on/off
376      Same as `-nh' (*Note Host Checking::).
377
378 span_hosts = on/off
379      Same as `-H'.
380
381 timeout = N
382      Set timeout value, the same as `-T'.
383
384 timestamping = on/off
385      Turn timestamping on/off. The same as `-N' (*Note Time-Stamping::).
386
387 tries = N
388      Set number of retries per URL, the same as `-t'.
389
390 use_proxy = on/off
391      Turn proxy support on/off. The same as `-Y'.
392
393 verbose = on/off
394      Turn verbose on/off, the same as `-v'/`-nv'.
395
396 wait = N
397      Wait N seconds between retrievals, the same as `-w'.
398
399 waitretry = N
400      Wait up to N seconds between retries of failed retrievals only -
401      the same as `--waitretry'.  Note that this is turned on by default
402      in the global `wgetrc'.
403
404 \1f
405 File: wget.info,  Node: Sample Wgetrc,  Prev: Wgetrc Commands,  Up: Startup File
406
407 Sample Wgetrc
408 =============
409
410    This is the sample initialization file, as given in the distribution.
411 It is divided in two section--one for global usage (suitable for global
412 startup file), and one for local usage (suitable for `$HOME/.wgetrc').
413 Be careful about the things you change.
414
415    Note that almost all the lines are commented out.  For a command to
416 have any effect, you must remove the `#' character at the beginning of
417 its line.
418
419      ###
420      ### Sample Wget initialization file .wgetrc
421      ###
422      
423      ## You can use this file to change the default behaviour of wget or to
424      ## avoid having to type many many command-line options. This file does
425      ## not contain a comprehensive list of commands -- look at the manual
426      ## to find out what you can put into this file.
427      ##
428      ## Wget initialization file can reside in /usr/local/etc/wgetrc
429      ## (global, for all users) or $HOME/.wgetrc (for a single user).
430      ##
431      ## To use the settings in this file, you will have to uncomment them,
432      ## as well as change them, in most cases, as the values on the
433      ## commented-out lines are the default values (e.g. "off").
434      
435      
436      ##
437      ## Global settings (useful for setting up in /usr/local/etc/wgetrc).
438      ## Think well before you change them, since they may reduce wget's
439      ## functionality, and make it behave contrary to the documentation:
440      ##
441      
442      # You can set retrieve quota for beginners by specifying a value
443      # optionally followed by 'K' (kilobytes) or 'M' (megabytes).  The
444      # default quota is unlimited.
445      #quota = inf
446      
447      # You can lower (or raise) the default number of retries when
448      # downloading a file (default is 20).
449      #tries = 20
450      
451      # Lowering the maximum depth of the recursive retrieval is handy to
452      # prevent newbies from going too "deep" when they unwittingly start
453      # the recursive retrieval.  The default is 5.
454      #reclevel = 5
455      
456      # Many sites are behind firewalls that do not allow initiation of
457      # connections from the outside.  On these sites you have to use the
458      # `passive' feature of FTP.  If you are behind such a firewall, you
459      # can turn this on to make Wget use passive FTP by default.
460      #passive_ftp = off
461      
462      # The "wait" command below makes Wget wait between every connection.
463      # If, instead, you want Wget to wait only between retries of failed
464      # downloads, set waitretry to maximum number of seconds to wait (Wget
465      # will use "linear backoff", waiting 1 second after the first failure
466      # on a file, 2 seconds after the second failure, etc. up to this max).
467      waitretry = 10
468      
469      
470      ##
471      ## Local settings (for a user to set in his $HOME/.wgetrc).  It is
472      ## *highly* undesirable to put these settings in the global file, since
473      ## they are potentially dangerous to "normal" users.
474      ##
475      ## Even when setting up your own ~/.wgetrc, you should know what you
476      ## are doing before doing so.
477      ##
478      
479      # Set this to on to use timestamping by default:
480      #timestamping = off
481      
482      # It is a good idea to make Wget send your email address in a `From:'
483      # header with your request (so that server administrators can contact
484      # you in case of errors).  Wget does *not* send `From:' by default.
485      #header = From: Your Name <username@site.domain>
486      
487      # You can set up other headers, like Accept-Language.  Accept-Language
488      # is *not* sent by default.
489      #header = Accept-Language: en
490      
491      # You can set the default proxy for Wget to use.  It will override the
492      # value in the environment.
493      #http_proxy = http://proxy.yoyodyne.com:18023/
494      
495      # If you do not want to use proxy at all, set this to off.
496      #use_proxy = on
497      
498      # You can customize the retrieval outlook.  Valid options are default,
499      # binary, mega and micro.
500      #dot_style = default
501      
502      # Setting this to off makes Wget not download /robots.txt.  Be sure to
503      # know *exactly* what /robots.txt is and how it is used before changing
504      # the default!
505      #robots = on
506      
507      # It can be useful to make Wget wait between connections.  Set this to
508      # the number of seconds you want Wget to wait.
509      #wait = 0
510      
511      # You can force creating directory structure, even if a single is being
512      # retrieved, by setting this to on.
513      #dirstruct = off
514      
515      # You can turn on recursive retrieving by default (don't do this if
516      # you are not sure you know what it means) by setting this to on.
517      #recursive = off
518      
519      # To always back up file X as X.orig before converting its links (due
520      # to -k / --convert-links / convert_links = on having been specified),
521      # set this variable to on:
522      #backup_converted = off
523      
524      # To have Wget follow FTP links from HTML files by default, set this
525      # to on:
526      #follow_ftp = off
527
528 \1f
529 File: wget.info,  Node: Examples,  Next: Various,  Prev: Startup File,  Up: Top
530
531 Examples
532 ********
533
534    The examples are classified into three sections, because of clarity.
535 The first section is a tutorial for beginners.  The second section
536 explains some of the more complex program features.  The third section
537 contains advice for mirror administrators, as well as even more complex
538 features (that some would call perverted).
539
540 * Menu:
541
542 * Simple Usage::        Simple, basic usage of the program.
543 * Advanced Usage::      Advanced techniques of usage.
544 * Guru Usage::          Mirroring and the hairy stuff.
545
546 \1f
547 File: wget.info,  Node: Simple Usage,  Next: Advanced Usage,  Prev: Examples,  Up: Examples
548
549 Simple Usage
550 ============
551
552    * Say you want to download a URL.  Just type:
553
554           wget http://fly.cc.fer.hr/
555
556      The response will be something like:
557
558           --13:30:45--  http://fly.cc.fer.hr:80/en/
559                      => `index.html'
560           Connecting to fly.cc.fer.hr:80... connected!
561           HTTP request sent, awaiting response... 200 OK
562           Length: 4,694 [text/html]
563           
564               0K -> ....                                                   [100%]
565           
566           13:30:46 (23.75 KB/s) - `index.html' saved [4694/4694]
567
568    * But what will happen if the connection is slow, and the file is
569      lengthy?  The connection will probably fail before the whole file
570      is retrieved, more than once.  In this case, Wget will try getting
571      the file until it either gets the whole of it, or exceeds the
572      default number of retries (this being 20).  It is easy to change
573      the number of tries to 45, to insure that the whole file will
574      arrive safely:
575
576           wget --tries=45 http://fly.cc.fer.hr/jpg/flyweb.jpg
577
578    * Now let's leave Wget to work in the background, and write its
579      progress to log file `log'.  It is tiring to type `--tries', so we
580      shall use `-t'.
581
582           wget -t 45 -o log http://fly.cc.fer.hr/jpg/flyweb.jpg &
583
584      The ampersand at the end of the line makes sure that Wget works in
585      the background.  To unlimit the number of retries, use `-t inf'.
586
587    * The usage of FTP is as simple.  Wget will take care of login and
588      password.
589
590           $ wget ftp://gnjilux.cc.fer.hr/welcome.msg
591           --10:08:47--  ftp://gnjilux.cc.fer.hr:21/welcome.msg
592                      => `welcome.msg'
593           Connecting to gnjilux.cc.fer.hr:21... connected!
594           Logging in as anonymous ... Logged in!
595           ==> TYPE I ... done.  ==> CWD not needed.
596           ==> PORT ... done.    ==> RETR welcome.msg ... done.
597           Length: 1,340 (unauthoritative)
598           
599               0K -> .                                                      [100%]
600           
601           10:08:48 (1.28 MB/s) - `welcome.msg' saved [1340]
602
603    * If you specify a directory, Wget will retrieve the directory
604      listing, parse it and convert it to HTML.  Try:
605
606           wget ftp://prep.ai.mit.edu/pub/gnu/
607           lynx index.html
608
609 \1f
610 File: wget.info,  Node: Advanced Usage,  Next: Guru Usage,  Prev: Simple Usage,  Up: Examples
611
612 Advanced Usage
613 ==============
614
615    * You would like to read the list of URLs from a file?  Not a problem
616      with that:
617
618           wget -i file
619
620      If you specify `-' as file name, the URLs will be read from
621      standard input.
622
623    * Create a mirror image of GNU WWW site (with the same directory
624      structure the original has) with only one try per document, saving
625      the log of the activities to `gnulog':
626
627           wget -r -t1 http://www.gnu.ai.mit.edu/ -o gnulog
628
629    * Retrieve the first layer of yahoo links:
630
631           wget -r -l1 http://www.yahoo.com/
632
633    * Retrieve the index.html of `www.lycos.com', showing the original
634      server headers:
635
636           wget -S http://www.lycos.com/
637
638    * Save the server headers with the file:
639           wget -s http://www.lycos.com/
640           more index.html
641
642    * Retrieve the first two levels of `wuarchive.wustl.edu', saving them
643      to /tmp.
644
645           wget -P/tmp -l2 ftp://wuarchive.wustl.edu/
646
647    * You want to download all the GIFs from an HTTP directory.  `wget
648      http://host/dir/*.gif' doesn't work, since HTTP retrieval does not
649      support globbing.  In that case, use:
650
651           wget -r -l1 --no-parent -A.gif http://host/dir/
652
653      It is a bit of a kludge, but it works.  `-r -l1' means to retrieve
654      recursively (*Note Recursive Retrieval::), with maximum depth of 1.
655      `--no-parent' means that references to the parent directory are
656      ignored (*Note Directory-Based Limits::), and `-A.gif' means to
657      download only the GIF files.  `-A "*.gif"' would have worked too.
658
659    * Suppose you were in the middle of downloading, when Wget was
660      interrupted.  Now you do not want to clobber the files already
661      present.  It would be:
662
663           wget -nc -r http://www.gnu.ai.mit.edu/
664
665    * If you want to encode your own username and password to HTTP or
666      FTP, use the appropriate URL syntax (*Note URL Format::).
667
668           wget ftp://hniksic:mypassword@jagor.srce.hr/.emacs
669
670    * If you do not like the default retrieval visualization (1K dots
671      with 10 dots per cluster and 50 dots per line), you can customize
672      it through dot settings (*Note Wgetrc Commands::).  For example,
673      many people like the "binary" style of retrieval, with 8K dots and
674      512K lines:
675
676           wget --dot-style=binary ftp://prep.ai.mit.edu/pub/gnu/README
677
678      You can experiment with other styles, like:
679
680           wget --dot-style=mega ftp://ftp.xemacs.org/pub/xemacs/xemacs-20.4/xemacs-20.4.tar.gz
681           wget --dot-style=micro http://fly.cc.fer.hr/
682
683      To make these settings permanent, put them in your `.wgetrc', as
684      described before (*Note Sample Wgetrc::).
685
686 \1f
687 File: wget.info,  Node: Guru Usage,  Prev: Advanced Usage,  Up: Examples
688
689 Guru Usage
690 ==========
691
692    * If you wish Wget to keep a mirror of a page (or FTP
693      subdirectories), use `--mirror' (`-m'), which is the shorthand for
694      `-r -N'.  You can put Wget in the crontab file asking it to
695      recheck a site each Sunday:
696
697           crontab
698           0 0 * * 0 wget --mirror ftp://ftp.xemacs.org/pub/xemacs/ -o /home/me/weeklog
699
700    * You may wish to do the same with someone's home page.  But you do
701      not want to download all those images--you're only interested in
702      HTML.
703
704           wget --mirror -A.html http://www.w3.org/
705
706    * But what about mirroring the hosts networkologically close to you?
707      It seems so awfully slow because of all that DNS resolving.  Just
708      use `-D' (*Note Domain Acceptance::).
709
710           wget -rN -Dsrce.hr http://www.srce.hr/
711
712      Now Wget will correctly find out that `regoc.srce.hr' is the same
713      as `www.srce.hr', but will not even take into consideration the
714      link to `www.mit.edu'.
715
716    * You have a presentation and would like the dumb absolute links to
717      be converted to relative?  Use `-k':
718
719           wget -k -r URL
720
721    * You would like the output documents to go to standard output
722      instead of to files?  OK, but Wget will automatically shut up
723      (turn on `--quiet') to prevent mixing of Wget output and the
724      retrieved documents.
725
726           wget -O - http://jagor.srce.hr/ http://www.srce.hr/
727
728      You can also combine the two options and make weird pipelines to
729      retrieve the documents from remote hotlists:
730
731           wget -O - http://cool.list.com/ | wget --force-html -i -
732
733 \1f
734 File: wget.info,  Node: Various,  Next: Appendices,  Prev: Examples,  Up: Top
735
736 Various
737 *******
738
739    This chapter contains all the stuff that could not fit anywhere else.
740
741 * Menu:
742
743 * Proxies::             Support for proxy servers
744 * Distribution::        Getting the latest version.
745 * Mailing List::        Wget mailing list for announcements and discussion.
746 * Reporting Bugs::      How and where to report bugs.
747 * Portability::         The systems Wget works on.
748 * Signals::             Signal-handling performed by Wget.
749
750 \1f
751 File: wget.info,  Node: Proxies,  Next: Distribution,  Prev: Various,  Up: Various
752
753 Proxies
754 =======
755
756    "Proxies" are special-purpose HTTP servers designed to transfer data
757 from remote servers to local clients.  One typical use of proxies is
758 lightening network load for users behind a slow connection.  This is
759 achieved by channeling all HTTP and FTP requests through the proxy
760 which caches the transferred data.  When a cached resource is requested
761 again, proxy will return the data from cache.  Another use for proxies
762 is for companies that separate (for security reasons) their internal
763 networks from the rest of Internet.  In order to obtain information
764 from the Web, their users connect and retrieve remote data using an
765 authorized proxy.
766
767    Wget supports proxies for both HTTP and FTP retrievals.  The
768 standard way to specify proxy location, which Wget recognizes, is using
769 the following environment variables:
770
771 `http_proxy'
772      This variable should contain the URL of the proxy for HTTP
773      connections.
774
775 `ftp_proxy'
776      This variable should contain the URL of the proxy for HTTP
777      connections.  It is quite common that HTTP_PROXY and FTP_PROXY are
778      set to the same URL.
779
780 `no_proxy'
781      This variable should contain a comma-separated list of domain
782      extensions proxy should *not* be used for.  For instance, if the
783      value of `no_proxy' is `.mit.edu', proxy will not be used to
784      retrieve documents from MIT.
785
786    In addition to the environment variables, proxy location and settings
787 may be specified from within Wget itself.
788
789 `-Y on/off'
790 `--proxy=on/off'
791 `proxy = on/off'
792      This option may be used to turn the proxy support on or off.  Proxy
793      support is on by default, provided that the appropriate environment
794      variables are set.
795
796 `http_proxy = URL'
797 `ftp_proxy = URL'
798 `no_proxy = STRING'
799      These startup file variables allow you to override the proxy
800      settings specified by the environment.
801
802    Some proxy servers require authorization to enable you to use them.
803 The authorization consists of "username" and "password", which must be
804 sent by Wget.  As with HTTP authorization, several authentication
805 schemes exist.  For proxy authorization only the `Basic' authentication
806 scheme is currently implemented.
807
808    You may specify your username and password either through the proxy
809 URL or through the command-line options.  Assuming that the company's
810 proxy is located at `proxy.srce.hr' at port 8001, a proxy URL location
811 containing authorization data might look like this:
812
813      http://hniksic:mypassword@proxy.company.com:8001/
814
815    Alternatively, you may use the `proxy-user' and `proxy-password'
816 options, and the equivalent `.wgetrc' settings `proxy_user' and
817 `proxy_passwd' to set the proxy username and password.
818
819 \1f
820 File: wget.info,  Node: Distribution,  Next: Mailing List,  Prev: Proxies,  Up: Various
821
822 Distribution
823 ============
824
825    Like all GNU utilities, the latest version of Wget can be found at
826 the master GNU archive site prep.ai.mit.edu, and its mirrors.  For
827 example, Wget 1.5.3+dev can be found at
828 `ftp://prep.ai.mit.edu/gnu/wget/wget-1.5.3+dev.tar.gz'
829
830 \1f
831 File: wget.info,  Node: Mailing List,  Next: Reporting Bugs,  Prev: Distribution,  Up: Various
832
833 Mailing List
834 ============
835
836    Wget has its own mailing list at <wget@sunsite.auc.dk>, thanks to
837 Karsten Thygesen.  The mailing list is for discussion of Wget features
838 and web, reporting Wget bugs (those that you think may be of interest
839 to the public) and mailing announcements.  You are welcome to
840 subscribe.  The more people on the list, the better!
841
842    To subscribe, send mail to <wget-subscribe@sunsite.auc.dk>.  the
843 magic word `subscribe' in the subject line.  Unsubscribe by mailing to
844 <wget-unsubscribe@sunsite.auc.dk>.
845
846    The mailing list is archived at `http://fly.cc.fer.hr/archive/wget'.
847
848 \1f
849 File: wget.info,  Node: Reporting Bugs,  Next: Portability,  Prev: Mailing List,  Up: Various
850
851 Reporting Bugs
852 ==============
853
854    You are welcome to send bug reports about GNU Wget to
855 <bug-wget@gnu.org>.  The bugs that you think are of the interest to the
856 public (i.e. more people should be informed about them) can be Cc-ed to
857 the mailing list at <wget@sunsite.auc.dk>.
858
859    Before actually submitting a bug report, please try to follow a few
860 simple guidelines.
861
862   1. Please try to ascertain that the behaviour you see really is a
863      bug.  If Wget crashes, it's a bug.  If Wget does not behave as
864      documented, it's a bug.  If things work strange, but you are not
865      sure about the way they are supposed to work, it might well be a
866      bug.
867
868   2. Try to repeat the bug in as simple circumstances as possible.
869      E.g. if Wget crashes on `wget -rLl0 -t5 -Y0 http://yoyodyne.com -o
870      /tmp/log', you should try to see if it will crash with a simpler
871      set of options.
872
873      Also, while I will probably be interested to know the contents of
874      your `.wgetrc' file, just dumping it into the debug message is
875      probably a bad idea.  Instead, you should first try to see if the
876      bug repeats with `.wgetrc' moved out of the way.  Only if it turns
877      out that `.wgetrc' settings affect the bug, should you mail me the
878      relevant parts of the file.
879
880   3. Please start Wget with `-d' option and send the log (or the
881      relevant parts of it).  If Wget was compiled without debug support,
882      recompile it.  It is *much* easier to trace bugs with debug support
883      on.
884
885   4. If Wget has crashed, try to run it in a debugger, e.g. `gdb `which
886      wget` core' and type `where' to get the backtrace.
887
888   5. Find where the bug is, fix it and send me the patches. :-)
889
890 \1f
891 File: wget.info,  Node: Portability,  Next: Signals,  Prev: Reporting Bugs,  Up: Various
892
893 Portability
894 ===========
895
896    Since Wget uses GNU Autoconf for building and configuring, and avoids
897 using "special" ultra-mega-cool features of any particular Unix, it
898 should compile (and work) on all common Unix flavors.
899
900    Various Wget versions have been compiled and tested under many kinds
901 of Unix systems, including Solaris, Linux, SunOS, OSF (aka Digital
902 Unix), Ultrix, *BSD, IRIX, and others; refer to the file `MACHINES' in
903 the distribution directory for a comprehensive list.  If you compile it
904 on an architecture not listed there, please let me know so I can update
905 it.
906
907    Wget should also compile on the other Unix systems, not listed in
908 `MACHINES'.  If it doesn't, please let me know.
909
910    Thanks to kind contributors, this version of Wget compiles and works
911 on Microsoft Windows 95 and Windows NT platforms.  It has been compiled
912 successfully using MS Visual C++ 4.0, Watcom, and Borland C compilers,
913 with Winsock as networking software.  Naturally, it is crippled of some
914 features available on Unix, but it should work as a substitute for
915 people stuck with Windows.  Note that the Windows port is *neither
916 tested nor maintained* by me--all questions and problems should be
917 reported to Wget mailing list at <wget@sunsite.auc.dk> where the
918 maintainers will look at them.
919
920 \1f
921 File: wget.info,  Node: Signals,  Prev: Portability,  Up: Various
922
923 Signals
924 =======
925
926    Since the purpose of Wget is background work, it catches the hangup
927 signal (`SIGHUP') and ignores it.  If the output was on standard
928 output, it will be redirected to a file named `wget-log'.  Otherwise,
929 `SIGHUP' is ignored.  This is convenient when you wish to redirect the
930 output of Wget after having started it.
931
932      $ wget http://www.ifi.uio.no/~larsi/gnus.tar.gz &
933      $ kill -HUP %%     # Redirect the output to wget-log
934
935    Other than that, Wget will not try to interfere with signals in any
936 way. `C-c', `kill -TERM' and `kill -KILL' should kill it alike.
937
938 \1f
939 File: wget.info,  Node: Appendices,  Next: Copying,  Prev: Various,  Up: Top
940
941 Appendices
942 **********
943
944    This chapter contains some references I consider useful, like the
945 Robots Exclusion Standard specification, as well as a list of
946 contributors to GNU Wget.
947
948 * Menu:
949
950 * Robots::                  Wget as a WWW robot.
951 * Security Considerations:: Security with Wget.
952 * Contributors::            People who helped.
953
954 \1f
955 File: wget.info,  Node: Robots,  Next: Security Considerations,  Prev: Appendices,  Up: Appendices
956
957 Robots
958 ======
959
960    Since Wget is able to traverse the web, it counts as one of the Web
961 "robots".  Thus Wget understands "Robots Exclusion Standard"
962 (RES)--contents of `/robots.txt', used by server administrators to
963 shield parts of their systems from wanderings of Wget.
964
965    Norobots support is turned on only when retrieving recursively, and
966 *never* for the first page.  Thus, you may issue:
967
968      wget -r http://fly.cc.fer.hr/
969
970    First the index of fly.cc.fer.hr will be downloaded.  If Wget finds
971 anything worth downloading on the same host, only *then* will it load
972 the robots, and decide whether or not to load the links after all.
973 `/robots.txt' is loaded only once per host.  Wget does not support the
974 robots `META' tag.
975
976    The description of the norobots standard was written, and is
977 maintained by Martijn Koster <m.koster@webcrawler.com>.  With his
978 permission, I contribute a (slightly modified) TeXified version of the
979 RES.
980
981 * Menu:
982
983 * Introduction to RES::
984 * RES Format::
985 * User-Agent Field::
986 * Disallow Field::
987 * Norobots Examples::
988
989 \1f
990 File: wget.info,  Node: Introduction to RES,  Next: RES Format,  Prev: Robots,  Up: Robots
991
992 Introduction to RES
993 -------------------
994
995    "WWW Robots" (also called "wanderers" or "spiders") are programs
996 that traverse many pages in the World Wide Web by recursively
997 retrieving linked pages. For more information see the robots page.
998
999    In 1993 and 1994 there have been occasions where robots have visited
1000 WWW servers where they weren't welcome for various reasons. Sometimes
1001 these reasons were robot specific, e.g. certain robots swamped servers
1002 with rapid-fire requests, or retrieved the same files repeatedly. In
1003 other situations robots traversed parts of WWW servers that weren't
1004 suitable, e.g. very deep virtual trees, duplicated information,
1005 temporary information, or cgi-scripts with side-effects (such as
1006 voting).
1007
1008    These incidents indicated the need for established mechanisms for
1009 WWW servers to indicate to robots which parts of their server should
1010 not be accessed. This standard addresses this need with an operational
1011 solution.
1012
1013    This document represents a consensus on 30 June 1994 on the robots
1014 mailing list (`robots@webcrawler.com'), between the majority of robot
1015 authors and other people with an interest in robots. It has also been
1016 open for discussion on the Technical World Wide Web mailing list
1017 (`www-talk@info.cern.ch'). This document is based on a previous working
1018 draft under the same title.
1019
1020    It is not an official standard backed by a standards body, or owned
1021 by any commercial organization. It is not enforced by anybody, and there
1022 no guarantee that all current and future robots will use it. Consider
1023 it a common facility the majority of robot authors offer the WWW
1024 community to protect WWW server against unwanted accesses by their
1025 robots.
1026
1027    The latest version of this document can be found at
1028 `http://info.webcrawler.com/mak/projects/robots/norobots.html'.
1029
1030 \1f
1031 File: wget.info,  Node: RES Format,  Next: User-Agent Field,  Prev: Introduction to RES,  Up: Robots
1032
1033 RES Format
1034 ----------
1035
1036    The format and semantics of the `/robots.txt' file are as follows:
1037
1038    The file consists of one or more records separated by one or more
1039 blank lines (terminated by `CR', `CR/NL', or `NL').  Each record
1040 contains lines of the form:
1041
1042      <field>:<optionalspace><value><optionalspace>
1043
1044    The field name is case insensitive.
1045
1046    Comments can be included in file using UNIX Bourne shell conventions:
1047 the `#' character is used to indicate that preceding space (if any) and
1048 the remainder of the line up to the line termination is discarded.
1049 Lines containing only a comment are discarded completely, and therefore
1050 do not indicate a record boundary.
1051
1052    The record starts with one or more User-agent lines, followed by one
1053 or more Disallow lines, as detailed below. Unrecognized headers are
1054 ignored.
1055
1056    The presence of an empty `/robots.txt' file has no explicit
1057 associated semantics, it will be treated as if it was not present, i.e.
1058 all robots will consider themselves welcome.
1059
1060 \1f
1061 File: wget.info,  Node: User-Agent Field,  Next: Disallow Field,  Prev: RES Format,  Up: Robots
1062
1063 User-Agent Field
1064 ----------------
1065
1066    The value of this field is the name of the robot the record is
1067 describing access policy for.
1068
1069    If more than one User-agent field is present the record describes an
1070 identical access policy for more than one robot.  At least one field
1071 needs to be present per record.
1072
1073    The robot should be liberal in interpreting this field. A case
1074 insensitive substring match of the name without version information is
1075 recommended.
1076
1077    If the value is `*', the record describes the default access policy
1078 for any robot that has not matched any of the other records. It is not
1079 allowed to have multiple such records in the `/robots.txt' file.
1080
1081 \1f
1082 File: wget.info,  Node: Disallow Field,  Next: Norobots Examples,  Prev: User-Agent Field,  Up: Robots
1083
1084 Disallow Field
1085 --------------
1086
1087    The value of this field specifies a partial URL that is not to be
1088 visited. This can be a full path, or a partial path; any URL that
1089 starts with this value will not be retrieved. For example,
1090 `Disallow: /help' disallows both `/help.html' and `/help/index.html',
1091 whereas `Disallow: /help/' would disallow `/help/index.html' but allow
1092 `/help.html'.
1093
1094    Any empty value, indicates that all URLs can be retrieved. At least
1095 one Disallow field needs to be present in a record.
1096
1097 \1f
1098 File: wget.info,  Node: Norobots Examples,  Prev: Disallow Field,  Up: Robots
1099
1100 Norobots Examples
1101 -----------------
1102
1103    The following example `/robots.txt' file specifies that no robots
1104 should visit any URL starting with `/cyberworld/map/' or `/tmp/':
1105
1106      # robots.txt for http://www.site.com/
1107      
1108      User-agent: *
1109      Disallow: /cyberworld/map/ # This is an infinite virtual URL space
1110      Disallow: /tmp/ # these will soon disappear
1111
1112    This example `/robots.txt' file specifies that no robots should
1113 visit any URL starting with `/cyberworld/map/', except the robot called
1114 `cybermapper':
1115
1116      # robots.txt for http://www.site.com/
1117      
1118      User-agent: *
1119      Disallow: /cyberworld/map/ # This is an infinite virtual URL space
1120      
1121      # Cybermapper knows where to go.
1122      User-agent: cybermapper
1123      Disallow:
1124
1125    This example indicates that no robots should visit this site further:
1126
1127      # go away
1128      User-agent: *
1129      Disallow: /
1130
1131 \1f
1132 File: wget.info,  Node: Security Considerations,  Next: Contributors,  Prev: Robots,  Up: Appendices
1133
1134 Security Considerations
1135 =======================
1136
1137    When using Wget, you must be aware that it sends unencrypted
1138 passwords through the network, which may present a security problem.
1139 Here are the main issues, and some solutions.
1140
1141   1. The passwords on the command line are visible using `ps'.  If this
1142      is a problem, avoid putting passwords from the command line--e.g.
1143      you can use `.netrc' for this.
1144
1145   2. Using the insecure "basic" authentication scheme, unencrypted
1146      passwords are transmitted through the network routers and gateways.
1147
1148   3. The FTP passwords are also in no way encrypted.  There is no good
1149      solution for this at the moment.
1150
1151   4. Although the "normal" output of Wget tries to hide the passwords,
1152      debugging logs show them, in all forms.  This problem is avoided by
1153      being careful when you send debug logs (yes, even when you send
1154      them to me).
1155
1156 \1f
1157 File: wget.info,  Node: Contributors,  Prev: Security Considerations,  Up: Appendices
1158
1159 Contributors
1160 ============
1161
1162    GNU Wget was written by Hrvoje Niksic <hniksic@iskon.hr>.  However,
1163 its development could never have gone as far as it has, were it not for
1164 the help of many people, either with bug reports, feature proposals,
1165 patches, or letters saying "Thanks!".
1166
1167    Special thanks goes to the following people (no particular order):
1168
1169    * Karsten Thygesen--donated the mailing list and the initial FTP
1170      space.
1171
1172    * Shawn McHorse--bug reports and patches.
1173
1174    * Kaveh R. Ghazi--on-the-fly `ansi2knr'-ization.
1175
1176    * Gordon Matzigkeit--`.netrc' support.
1177
1178    * Zlatko Calusic, Tomislav Vujec and Drazen Kacar--feature
1179      suggestions and "philosophical" discussions.
1180
1181    * Darko Budor--initial port to Windows.
1182
1183    * Antonio Rosella--help and suggestions, plus the Italian
1184      translation.
1185
1186    * Tomislav Petrovic, Mario Mikocevic--many bug reports and
1187      suggestions.
1188
1189    * Francois Pinard--many thorough bug reports and discussions.
1190
1191    * Karl Eichwalder--lots of help with internationalization and other
1192      things.
1193
1194    * Junio Hamano--donated support for Opie and HTTP `Digest'
1195      authentication.
1196
1197    * Brian Gough--a generous donation.
1198
1199    The following people have provided patches, bug/build reports, useful
1200 suggestions, beta testing services, fan mail and all the other things
1201 that make maintenance so much fun:
1202
1203    Tim Adam, Martin Baehr, Dieter Baron, Roger Beeman and the Gurus at
1204 Cisco, Dan Berger, Mark Boyns, John Burden, Wanderlei Cavassin, Gilles
1205 Cedoc, Tim Charron, Noel Cragg, Kristijan Conkas, Andrew Deryabin,
1206 Damir Dzeko, Andrew Davison, Ulrich Drepper, Marc Duponcheel,
1207 Aleksandar Erkalovic, Andy Eskilsson, Masashi Fujita, Howard Gayle,
1208 Marcel Gerrits, Hans Grobler, Mathieu Guillaume, Dan Harkless, Heiko
1209 Herold, Karl Heuer, HIROSE Masaaki, Gregor Hoffleit, Erik Magnus
1210 Hulthen, Richard Huveneers, Simon Josefsson, Mario Juric, Goran
1211 Kezunovic, Robert Kleine, Fila Kolodny, Alexander Kourakos, Martin
1212 Kraemer, Simos KSenitellis, Hrvoje Lacko, Daniel S. Lewart, Dave Love,
1213 Jordan Mendelson, Lin Zhe Min, Charlie Negyesi, Andrew Pollock, Steve
1214 Pothier, Jan Prikryl, Marin Purgar, Keith Refson, Tobias Ringstrom,
1215 Juan Jose Rodrigues, Edward J. Sabol, Heinz Salzmann, Robert Schmidt,
1216 Toomas Soome, Tage Stabell-Kulo, Sven Sternberger, Markus Strasser,
1217 Szakacsits Szabolcs, Mike Thomas, Russell Vincent, Charles G Waldman,
1218 Douglas E. Wegscheid, Jasmin Zainul, Bojan Zdrnja, Kristijan Zimmer.
1219
1220    Apologies to all who I accidentally left out, and many thanks to all
1221 the subscribers of the Wget mailing list.
1222