Go to the first, previous, next, last section, table of contents.


5 Recursive Retrieval

Wget is capable of traversing parts of the Web (or a single HTTP or FTP server), following links and directory structure. This is called recusive retrieving, or recursion.

With HTTP URLs, Wget retrieves and parses the HTML from the given URL, documents, retrieving the files the HTML document was refering to, through markups like href, or src. If a downloaded document is also an HTML file, it will be parsed and followed further. The maximum depth of retrieval is specified with `-l' option (default 5). See section 3.2 Basic Options.

Wget will create a local hierarchy of files, corresponding to the one found on the remote server.

Recursion is an ideal possibility for various presentations, where slow connections should be bypassed.

When retrieving an FTP URL recursively, Wget will retrieve all the data from the given directory and subdirectories, also creating a local hierarchy.

You should be warned that invoking recursion may cause grave overloading on your system, both on client and server side, and your system administrator may choose not to enable it. The load can be minimized by lowering the maximum recursion level (`-l') and/or by lowering the number of retries (`-t').

Recursion is a good thing when used properly. Use it with utmost care.


Go to the first, previous, next, last section, table of contents.