Go to the first, previous, next, last section, table of contents.
The following table contains the alphabetically sorted list of the
advanced command line arguments, for people familiar with basic
operating of Wget, wishing to change its default behavior. Not for
the faint of heart.
- `-A acclist --accept acclist'
-
- `-R rejlist --reject rejlist'
-
Specify comma-separated lists of file name suffices or patterns to
accept or reject (See section Types of Files for more details).
- `-c'
-
- `--continue'
-
Continue retrieval of FTP documents, from where it was left off by
another program or a previous instance of Wget. Thus you can write:
wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z
If there is a file name `ls-lR.Z' in the current directory, Wget
will assume that it is the first portion of the remote file, and will
require the server to continue the retrieval from an offset equal to the
length of the local file.
Note that you need not specify this option if all you want is Wget to
continue retrieving where it left off when the connection is lost--Wget
does this by default. You need this option only when you want to
continue retrieval of a file already halfway retrieved, saved by another
FTP client, or left by Wget being killed.
Without `-c', the previous example would just begin to download the
remote file to `ls-lR.Z.1'. The `-c' option is also
applicable for HTTP servers that support the Range header.
- `-D domain-list'
-
- `--domains=domain-list'
-
Set domains to be accepted and DNS looked-up, where
domain-list is a comma-separated list. Note that it does
not turn on `-H'. This option speeds things up, even if
only one host is spanned (See section Domain Acceptance).
- `--delete-after'
-
This option tells Wget to delete every single file it downloads,
after having done so. It is useful for pre-fetching popular
pages through PROXY, e.g.:
wget -r -nd --delete-after http://whatever.com/~popular/page/
The `-r' option is to retrieve recursively, and `-nd' not to
create directories.
- `--dot-style=style'
-
Set the retrieval style to style. Wget traces the retrieval of
each document by printing dots on the screen, each dot representing a
fixed amount of retrieved data. Any number of dots may be separated in
a cluster, to make counting easier. This option allows you to
choose one of the pre-defined styles, determining the number of bytes
represented by a dot, the number of dots in a cluster, and the number of
dots on the line.
With the
default style each dot represents 1K, there are ten dots
in a cluster and 50 dots in a line. The binary style has a more
"computer"-like orientation--8K dots, 16-dots clusters and 64 dots
per line (which makes for 512K lines). The mega style is
suitable for downloading very large files--each dot represents 64K
retrieved, there are eight dots in a cluster, and 48 dots on each line
(so each line contains 3M). The micro style is exactly the
reverse; it is suitable for downloading small files, with 128-byte dots,
8 dots per cluster, and 48 dots (6K) per line.
- `-e command'
-
- `--execute command'
-
Execute command as if it were a part of `.wgetrc'
(See section Startup File). A command thus invoked will be executed
after the commands in `.wgetrc', thus taking precedence over
them.
- `--exclude-domains domain-list'
-
Exclude the domains given in a comma-separated domain-list from
DNS-lookup (See section Domain Acceptance).
- `--follow-ftp'
-
Follow FTP links from HTML documents. Without this option,
Wget will ignore all the FTP links.
- `-F'
-
- `--force-html'
-
When input is read from a file, force it to be treated as an HTML
file. This enables you to retrieve relative links from existing
HTML files on your local disk, by adding
<base
href="url"> to HTML, or using the `--base' command-line
option.
- `-g on/off'
-
- `--glob=on/off'
-
Turn FTP globbing on or off. Globbing means you may use the
shell-like special characters (wildcards), like `*',
`?', `[' and `]' to retrieve more than one file from the
same directory at once, like:
wget ftp://gnjilux.cc.fer.hr/*.msg
By default, globbing will be turned on if the URL contains a
globbing character. This option may be used to turn globbing on or off
permanently.
You may have to quote the URL to protect it from being expanded by
your shell. Globbing makes Wget look for a directory listing, which is
system-specific. This is why it currently works only with Unix FTP
servers (and the ones emulating Unix ls output).
- `--ignore-length'
-
Unfortunately, some HTTP servers (CGI programs, to be more
precise) send out bogus
Content-Length headers, which makes Wget
go wild, as it thinks not all the document was retrieved. You can spot
this syndrome if Wget retries getting the same document again and again,
each time claiming that the (otherwise normal) connection has closed on
the very same byte.
With this option, Wget will ignore the Content-Length header--as
if it never existed.
- `--retr-symlinks'
-
Retrieve symbolic links on FTP sites as if they were plain files,
i.e. don't just create links locally.
- `-H'
-
- `--span-hosts'
-
Enable spanning across hosts when doing recursive retrieving (See section All Hosts).
- `--header=additional-header'
-
Define an additional-header to be passed to the HTTP servers.
Headers must contain a `:' preceded by one or more non-blank
characters, and must not contain newlines.
You may define more than one additional header by specifying
`--header' more than once.
wget --header='Accept-Charset: iso-8859-2' \
--header='Accept-Language: hr' \
http://fly.cc.fer.hr/
Specification of an empty string as the header value will clear all
previous user-defined headers.
- `--http-user=user'
-
- `--http-passwd=password'
-
Specify the username user and password password on an
HTTP server. Wget will encode them using the
basic
(insecure) WWW authentication scheme. You can also encode the
username and password to the URL (See section URL Format).
For more data about security issues with Wget, See section Security Considerations.
- `-I list'
-
- `--include-directories=list'
-
Specify a comma-separated list of directories you wish to follow when
downloading (See section Directory-Based Limits for more details)
- `-k'
-
- `--convert-links'
-
Convert the non-relative links to relative ones locally. Only the
references to the documents actually downloaded will be converted; the
rest will be left unchanged.
Note that only at the end of the download can Wget know which links
have been downloaded. Because of that, much of the work done by `-k'
will be performed at the end of the downloads.
- `-L'
-
- `--relative'
-
Follow relative links only. Useful for retrieving a specific home page
without any distractions, not even those from the same hosts
(See section Relative Links).
- `-m'
-
- `--mirror'
-
Turn on options suitable for mirroring. This option turns on recursion
and time-stamping, sets infinite recursion depth and keeps FTP
directory listings. It is currently equivalent to `-r -N -l0 -nr'.
- `-N'
-
- `--timestamping'
-
Turn on time-stamping (See section Time-Stamping for details).
- `-nd'
-
Do not create a hierarchy of directories when retrieving
recursively. With this option turned on, all files will get saved to the
current directory, without clobbering (if a name shows up more than
once, the filenames will get extensions `.n').
- `-nH'
-
Disable generation of host-prefixed directories. By default, invoking
Wget with `-r http://fly.cc.fer.hr/' will create a structure of
directories beginning with `fly.cc.fer.hr/'. This option disables
such behavior.
- `-nh'
-
Disable the time-consuming DNS lookup of almost all hosts
(See section Host Checking).
- `-np'
-
- `--no-parent'
-
Do not ever ascend to the parent directory when retrieving recursively.
This is a useful option, since it guarantees that only the files
below a certain hierarchy will be downloaded.
See section Directory-Based Limits for more details.
- `-nr'
-
Do not remove the `.listing' files generated by FTP. This is
useful when running a mirror to see the remote file list. It can also
be used for debugging purposes.
- `-nv'
-
Non-verbose output--turn off verbose without being completely quiet
(use `-q' for that), which means that error messages and basic
information still get printed.
- `-O file'
-
- `--output-document=file'
-
The documents will not be written to the appropriate files, but all will
be appended to a unique file specified by this option. The number of
tries will be set to 1 automatically. If the file is `-',
the documents will be written to standard output, and `--quiet'
will be turned on. This option is useful for making Wget a part of
pipelines (See section Advanced Usage).
Be careful, however, since setting `--quiet' turns off all the
useful diagnostics Wget can otherwise give. This option is usually a
bad choice, as it disables a great number of Wget features,
e.g. recursive retrieval.
- `--passive-ftp'
-
Use the passive FTP retrieval scheme, in which the client
initiates the data connection. This is sometimes required for FTP
to work behind firewalls.
- `-P prefix'
-
- `--directory-prefix=prefix'
-
Set directory prefix to prefix. The directory prefix is the
directory where all other files and subdirectories will be saved to,
i.e. the top of the retrieval tree. The default is `.' (the
current directory).
- `--proxy-user=user'
-
- `--proxy-passwd=password'
-
Specify the username user and password password for
authentication on a PROXY server. Like with `--http-user' and
`--http-passwd', Wget will encode them using the
basic
authentication scheme.
- `-Q quota'
-
- `--quota=quota'
-
Specify download quota for automatic retrievals. The value can be
specified in bytes (default), kilobytes (with `k' suffix), or
megabytes (with `m' suffix).
Note that quota will never affect downloading a single file. So if you
specify `wget -Q10k ftp://wuarchive.wustl.edu/ls-lR.gz', all of the
`ls-lR.gz' will be downloaded. The same goes even when several
URLs are specified on the command-line. However, quota is
respected when retrieving either recursively, or from an input file.
Thus you may safely type `wget -Q2m -i sites'---download will be
aborted when the quota is exceeded.
Setting quota to 0 or to `inf' unlimits the download quota.
- `-S'
-
- `--server-response'
-
Print the headers sent by HTTP servers and responses sent by
FTP servers.
- `-s'
-
- `--save-headers'
-
Save the headers sent by the HTTP server to the file, preceding the
actual contents, with an empty line as the separator.
- `--spider'
-
When invoked with this option, Wget will behave as a Web spider,
which means that it will not download the pages, just check that they
are there. You can use it to check your bookmarks, e.g. with:
wget --spider --force-html -i bookmarks.html
This feature needs much more work for Wget to get close to the
functionality of real WWW spiders.
- `-T seconds'
-
- `--timeout=seconds'
-
Set the read timeout to seconds seconds. Whenever a network read
is issued, the file descriptor is checked for a timeout, which could
otherwise leave a pending connection (uninterrupted read). The default
timeout is 900 seconds (fifteen minutes). Setting timeout to 0 will
disable checking for timeouts.
Please do not lower the default timeout value with this option unless
you know what you are doing.
- `-w seconds'
-
- `--wait=seconds'
-
Wait the specified number of seconds between the retrievals. Use of
this option is recommended, as it lightens the server load by making the
requests less frequent.
- `-X list'
-
- `--exclude-directories=list'
-
Specify a comma-separated list of directories you wish to exclude from
download (See section Directory-Based Limits for more details).
- `-x'
-
The opposite of `-nd'---create a hierarchy of directories, even if
one would not have been created otherwise. E.g. `wget -x
http://fly.cc.fer.hr/robots.txt' will save the downloaded file to
`fly.cc.fer.hr/robots.txt'.
- `-Y on/off'
-
- `--proxy=on/off'
-
Turn PROXY support on or off. The proxy is on by default if the
appropriate environmental variable is defined.
Go to the first, previous, next, last section, table of contents.