- --bind-address=ADRESA
- When making client TCP/IP connections, bind to ADDRESS on the local machine. ADDRESS may be specified as a hostname or IP address. This option can be useful if your machine is bound to multiple IPs.
- --bind-dns-address=ADRESA
- [libcares only] This address overrides the route for DNS requests. If you ever need to circumvent the standard settings from /etc/resolv.conf, this option together with --dns-servers is your friend. ADDRESS must be specified either as IPv4 or IPv6 address. Wget needs to be built with libcares for this option to be available.
- --dns-servers=ADDRESSES
- [libcares only] The given address(es) override the standard nameserver addresses, e.g. as configured in /etc/resolv.conf. ADDRESSES may be specified either as IPv4 or IPv6 addresses, comma-separated. Wget needs to be built with libcares for this option to be available.
- -t počet
- --tries=počet
- Set number of tries to number. Specify 0 or inf for infinite retrying. The default is to retry 20 times, with the exception of fatal errors like "connection refused" or "not found" (404), which are not retried.
- -O soubor
- --output-document=soubor
- Dokumenty nebudou zapisovány do příslušných souborů, ale všechny budou připojeny do jediného souboru se jménem, určeným v parametru. Když je jméno souboru určeno jako -, budou dokumenty zapisovány na standardní výstup. (Pro zápis do souboru pojmenovaného - použijte ./-.)
Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to shell redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated immediately, and all downloaded content will be written there.
For this reason, -N (for timestamp-checking) is not supported in combination with -O: since file is always newly created, it will always have a very new timestamp. A warning will be issued if this combination is used.
Similarly, using -r or -p with -O may not work as you expect: Wget won't just download the first file to file and then download the rest to their normal names: all downloaded content will be placed in file. This was disabled in version 1.11, but has been reinstated (with a warning) in 1.11.2, as there are some cases where this behavior can actually have some use.
A combination with -nc is only accepted if the given output file does not exist.
Note that a combination with -k is only permitted when downloading a single document, as in that case it will just convert all relative URIs to external ones; -k makes no sense for multiple URIs when they're all being downloaded to a single file; -k can be used only when the output is a regular file.
- -nc
- --no-clobber
- Pokud je soubor ukládán do stejného adresáře více než jednou, závisí chování Wgetu na několika volbách, včetně -nc. V některých případech je lokální soubor přepsán (clobbered), jindy je zachován.
When running Wget without -N, -nc, -r, or -p, downloading the same file in the same directory will result in the original copy of file being preserved and the second copy being named file.1. If that file is downloaded yet again, the third copy will be named file.2, and so on. (This is also the behavior with -nd, even if -r or -p are in effect.) When -nc is specified, this behavior is suppressed, and Wget will refuse to download newer copies of file. Therefore, ""no-clobber"" is actually a misnomer in this mode---it's not clobbering that's prevented (as the numeric suffixes were already preventing clobbering), but rather the multiple version saving that's prevented.
When running Wget with -r or -p, but without -N, -nd, or -nc, re-downloading a file will result in the new copy simply overwriting the old. Adding -nc will prevent this behavior, instead causing the original version to be preserved and any newer copies on the server to be ignored.
When running Wget with -N, with or without -r or -p, the decision as to whether or not to download a newer copy of a file depends on the local and remote timestamp and size of the file. -nc may not be specified at the same time as -N.
A combination with -O/--output-document is only accepted if the given output file does not exist.
Pozor, pokud je použita volba -nc, budou soubory s příponou .html nebo .htm nahrány z lokálního disku a zpracovány jako by byly staženy z webu.
- --backups=backups
- Before (over)writing a file, back up an existing file by adding a .1 suffix (_1 on VMS) to the file name. Such backup files are rotated to .2, .3, and so on, up to backups (and lost beyond that).
- --no-netrc
- Do not try to obtain credentials from .netrc file. By default .netrc file is searched for credentials in case none have been passed on command line and authentication is required.
- -c
- --continue
- Pokračování v příjmu částečně staženého souboru. To se hodí, pokud chcete dokončit stahování započaté předchozí instancí Wgetu nebo jiným programem. Např.:
wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z
Pokud je v aktuálním adresáři soubor s názvem ls-lR.Z, Wget bude předpokládat, že se jedná o první část vzdáleného souboru a požádá server o pokračování v přenosu od offsetu rovnému délce lokálního souboru.
Všimněte si, že tento parametr není nutné zadávat, pokud pouze chcete, aby Wget pokračoval ve stahování souboru po přerušení spojení. To je jeho výchozí chování. -c má vliv pouze na obnovení stahování započatých před spuštěním aktuální instance Wgetu, a pokud stále ještě jsou k dispozici lokální soubory.
Bez volby -c by předchozí příklad pouze stáhnul vzdálený soubor jako ls-lR.Z.1 a zkrácený soubor ls-lR.Z by nechal být.
If you use -c on a non-empty file, and the server does not support continued downloading, Wget will restart the download from scratch and overwrite the existing file entirely.
Beginning with Wget 1.7, if you use -c on a file which is of equal size as the one on the server, Wget will refuse to download the file and print an explanatory message. The same happens when the file is smaller on the server than locally (presumably because it was changed on the server since your last download attempt)---because "continuing" is not meaningful, no download occurs.
Na druhou stranu při použití -c je jakýkoliv soubor, který je na serveru větší než soubor lokální, považován za nedokončené stahování a bude staženo a připojeno na konec lokálního souboru pouze "(délka(vzdálený) - délka(lokální))" bajtů. To se může někdy hodit---například při použití wget -c ke stažení pouze nové části připojené k souboru dat nebo logu.
Nicméně pokud je soubor na serveru větší, protože byl změněn, na rozdíl od pouhého připojení, vznikne pokažený soubor. Wget nemá žádnou možnost ověřit, že lokální soubor je skutečně platnou částí vzdáleného souboru. Zvláštní pozornost je potřeba při použití -c spolu s -r, protože každý soubor bude považován za potenciální "nedokončené stahování".
Dalším případem, kdy dojde s volbou -c k poškození souboru je hloupá HTTP proxy vkládající do lokálního souboru řetězec "transfer interrupted". V budoucnu může být pro tyto případy přidána volba "rollback".
Pozor, -c funguje pouze s FTP servery a s HTTP servery, které podporují hlavičku "Range".
- --start-pos=OFFSET
- Start downloading at zero-based position OFFSET. Offset may be expressed in bytes, kilobytes with the `k' suffix, or megabytes with the `m' suffix, etc.
--start-pos has higher precedence over --continue. When --start-pos and --continue are both specified, wget will emit a warning then proceed as if --continue was absent.
Server support for continued download is required, otherwise --start-pos cannot help. See -c for details.
- --progress=druh
- Vybere druh ukazatele postupu, který má být použit. Platné druhy jsou "dot" a "bar".
Jako výchozí je nastaven "bar" (čárový). Vykresluje ASCII čáru postupu (alias "teploměr"), který ukazuje stav stahování.Pokud výstup není TTY, je jako výchozí použit "dot" (tečkový).
Pro přepnutí na "dot" použijte --progress=dot. Při stahování vypisuje na obrazovku tečky; každá tečka reprezentuje fixní objem stažených dat.
The progress type can also take one or more parameters. The parameters vary based on the type selected. Parameters to type are passed by appending them to the type sperated by a colon (:) like this: --progress=type:parameter1:parameter2.
When using the dotted retrieval, you may set the style by specifying the type as dot:style. Different styles assign different meaning to one dot. 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 48 dots per line (which makes for 384K lines). The "mega" style is suitable for downloading 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). If "mega" is not enough then you can use the "giga" style---each dot represents 1M retrieved, there are eight dots in a cluster, and 32 dots on each line (so each line contains 32M).
With --progress=bar, there are currently two possible parameters, force and noscroll.
When the output is not a TTY, the progress bar always falls back to "dot", even if --progress=bar was passed to Wget during invocation. This behaviour can be overridden and the "bar" output forced by using the "force" parameter as --progress=bar:force.
By default, the bar style progress bar scroll the name of the file from left to right for the file being downloaded if the filename exceeds the maximum length allotted for its display. In certain cases, such as with --progress=bar:force, one may not want the scrolling filename in the progress bar. By passing the "noscroll" parameter, Wget can be forced to display as much of the filename as possible without scrolling through it.
Note that you can set the default style using the "progress" command in .wgetrc. That setting may be overridden from the command line. For example, to force the bar output without scrolling, use --progress=bar:force:noscroll.
- --show-progress
- Force wget to display the progress bar in any verbosity.
By default, wget only displays the progress bar in verbose mode. One may however, want wget to display the progress bar on screen in conjunction with any other verbosity modes like --no-verbose or --quiet. This is often a desired a property when invoking wget to download several small/large files. In such a case, wget could simply be invoked with this parameter to get a much cleaner output on the screen.
This option will also force the progress bar to be printed to stderr when used alongside the --output-file option.
- -N
- --timestamping
- Zapne časové označení (timestamping).
- --no-if-modified-since
- Do not send If-Modified-Since header in -N mode. Send preliminary HEAD request instead. This has only effect in -N mode.
- --no-use-server-timestamps
- Don't set the local file's timestamp by the one on the server.
By default, when a file is downloaded, its timestamps are set to match those from the remote file. This allows the use of --timestamping on subsequent invocations of wget. However, it is sometimes useful to base the local file's timestamp on when it was actually downloaded; for that purpose, the --no-use-server-timestamps option has been provided.
- -S
- --server-response
- Vypíše hlavičky odeslané HTTP serverem a odpovědi odeslané FTP serverem.
- --spider
- Při spuštění s touto volbou se bude Wget chovat jako Web spider, tj. nebude stránky stahovat, jenom kontrolovat, jestli existují. Např. je možné použít wget na kontrolu záložek:
wget --spider --force-html -i bookmarks.html
Na této funkcionalitě se ještě musí zapracovat, aby se alespoň přiblížila skutečným web spiders.
- -T vteřin
- --timeout=vteřin
- Nastavení časového limitu sítě na zadaný počet vteřin. Je ekvivalentní společnému nastavení --dns-timeout, --connect-timeout a --read-timeout.
Kdykoliv probíhá síťová operace, Wget může ověřovat prodlevu a operaci přerušit, pokud trvá příliš dlouho. Tak lze zabránit zamrznutí nebo nekonečným spojením. Jediným časovým limitem, který je jako výchozí nastaven, je 900 vteřin na čtení. Nastavením na 0 se vyřadí. Výchozí hodnotu je záhodno měnit pouze v případě, že skutečně víte, co děláte.
Všechny volby týkající se časových limitů akceptují hodnoty v desítkové soustavě, včetně hodnot pod vteřinu. Např. 0.1 vteřin je platnou (ačkoliv nevhodnou) hodnotou. Hodnoty pod vteřinu se hodí při testování časů odpovědi serveru nebo latence sítě.
- --dns-timeout=vteřin
- Nastaví časový limit pro DNS dotaz na zadaný počet vteřin. DNS dotazy, které nejsou ve stanoveném čase dokončeny, selžou. Jako výchozí není pro DNS dotazy stanoven žádný časový limit nad rámec implementace knihovnami systému.
- --connect-timeout=vteřin
- Nastaví časový limit na zadaný počet vteřin. TCP spojení, která se za tu dobu nepodaří sestavit budou přerušena. Jako výchozí není pro sestavení spojení stanoven žádný časový limit nad rámec implementace knihovnami systému.
- --read-timeout=vteřin
- Nastaví časový limit pro čtení (a zápis) na zadaný v počet vteřin. "Čas" v tomto případě znamená nečinný čas: pokud v jakékoliv fázi stahování nejsou přijata žádná data po více než zadaný počet vteřin, čtení selže a stahování začne znovu. Tato volba neovlivňuje přímo trvání celého stahování.
Samozřejmě vzdálený server se může rozhodnout ukončit spojení dříve než stanoví tato volba. Výchozí hodnotou časového limitu pro čtení je 900 vteřin.
- --limit-rate=počet
- Omezí rychlost stahování na počet bajtů za vteřinu. Počet může být vyjádřen v bajtech, s příponou k v kilobajtech nebo s příponou m v megabajtech. Např. --limit-rate=20k omezí rychlost stahování na 20KB/s. To se hodí pokud z jakéhokoliv důvodu nechcete, aby Wget zabral celé přenosové pásmo.
Tato volba umožňuje použít desetiny, obvykle spolu s příponami; např. --limit-rate=2.5k je platné nastavení.
Všimněte si, že Wget implementuje omezování nečinností po určitý čas, v případě, že čtení ze sítě trvalo méně nežli je určeno limitem. Tato strategie způsobí, že TCP přenos se zpomalí zhruba na rychlost danou limitem. Nicméně dosažení rovnováhy může chvíli trvat, takže v případě velmi malých souborů to moc dobře nefunguje.
- -w vteřin
- --wait=vteřin
- Čekat zadaný počet vteřin mezi jednotlivými staženími. Použití této volby se doporučuje, protože se tak snižuje zatížení serveru. Namísto v sekundách může být určeno v minutách pomocí přípony "m", v hodinách s příponou "h" nebo dnech s příponou "d".
Specifying a large value for this option is useful if the network or the destination host is down, so that Wget can wait long enough to reasonably expect the network error to be fixed before the retry. The waiting interval specified by this function is influenced by "--random-wait", which see.
- --waitretry=vteřin
- Pokud nechcete, aby Wget čekal mezi každým stažením, ale jen mezi staženími, která selhala, použijte tuto volbu. Wget použije lineární ústup (linear backoff), tj. čekání 1 vteřinu po prvním selhání u souboru, 2 vteřiny po druhém selhání u stejného souboru, až po zadaný počet vteřin.
By default, Wget will assume a value of 10 seconds.
- --random-wait
- Některé www servery mohou provádět analýzu záznamů za účelem identifikace programů jako je Wget hledáním statisticky podobných časů mezi požadavky. Tato volba způsobí, že čas mezi požadavky se bude pohybovat mezi 0.5 a 1.5 * wait vteřinami, kde wait je hodnota daná volbou --wait, aby nemohl být Wget identifikován.
A 2001 article in a publication devoted to development on a popular consumer platform provided code to perform this analysis on the fly. Its author suggested blocking at the class C address level to ensure automated retrieval programs were blocked despite changing DHCP-supplied addresses.
The --random-wait option was inspired by this ill-advised recommendation to block many unrelated users from a web site due to the actions of one.
- --no-proxy
- nepoužívat proxy, i pokud je příslušná proměnná prostředí *_proxy definována.
- -Q kvóta
- --quota=kvóta
- Nastaví kvótu pro automatická stahování. Hodnota může být určena v bajtech (výchozí), kilobajtech (s příponou k) nebo megabajtech (s příponou m).
Note that quota will never affect downloading a single file. So if you specify wget -Q10k https://example.com/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. The quota is checked only at the end of each downloaded file, so it will never result in a partially downloaded file. Thus you may safely type wget -Q2m -i sites---download will be aborted after the file that exhausts the quota is completely downloaded.
Zadáním kvóty na 0 nebo inf se kvóta nastaví na nekonečno.
- --no-dns-cache
- Vypne vyrovnávací paměť DNS dotazů. Za normálních okolností si Wget pamatuje IP adresy, které získal z DNS, takže nemusí pravidelně kontaktovat DNS server pro stejnou (obvykle malou) sadu hostitelů, z nichž stahuje. Tato vyrovnávací paměť existuje pouze v paměti a nová instance Wgetu musí DNS kontaktovat znovu.
Nicméně jsou případy, kdy není žádoucí udržovat jména hostitelů ve vyrovnávací paměti, a to ani po krátkou dobu. S touto volbou Wget pro každé nové spojení použije nový DNS dotaz (přesněji nové volání "gethostbyname" nebo "getaddrinfo"). Tato volba neovlivní cachování, které může provádět DNS knihovna nebo externí vyrovnávací vrstva, jako je třeba NSCD.
Pokud přesně nerozumíte, k čemu tato volba slouží, pravděpodobně ji nepotřebujete.
- --restrict-file-names=modes
- Change which characters found in remote URLs must be escaped during generation of local filenames. Characters that are restricted by this option are escaped, i.e. replaced with %HH, where HH is the hexadecimal number that corresponds to the restricted character. This option may also be used to force all alphabetical cases to be either lower- or uppercase.
By default, Wget escapes the characters that are not valid or safe as part of file names on your operating system, as well as control characters that are typically unprintable. This option is useful for changing these defaults, perhaps because you are downloading to a non-native partition, or because you want to disable escaping of the control characters, or you want to further restrict characters to only those in the ASCII range of values.
The modes are a comma-separated set of text values. The acceptable values are unix, windows, nocontrol, ascii, lowercase, and uppercase. The values unix and windows are mutually exclusive (one will override the other), as are lowercase and uppercase. Those last are special cases, as they do not change the set of characters that would be escaped, but rather force local file paths to be converted either to lower- or uppercase.
When "unix" is specified, Wget escapes the character / and the control characters in the ranges 0--31 and 128--159. This is the default on Unix-like operating systems.
When "windows" is given, Wget escapes the characters \, |, /, :, ?, ", *, <, >, and the control characters in the ranges 0--31 and 128--159. In addition to this, Wget in Windows mode uses + instead of : to separate host and port in local file names, and uses @ instead of ? to separate the query portion of the file name from the rest. Therefore, a URL that would be saved as www.xemacs.org:4300/search.pl?input=blah in Unix mode would be saved as www.xemacs.org+4300/search.pl@input=blah in Windows mode. This mode is the default on Windows.
If you specify nocontrol, then the escaping of the control characters is also switched off. This option may make sense when you are downloading URLs whose names contain UTF-8 characters, on a system which can save and display filenames in UTF-8 (some possible byte values used in UTF-8 byte sequences fall in the range of values designated by Wget as "controls").
The ascii mode is used to specify that any bytes whose values are outside the range of ASCII characters (that is, greater than 127) shall be escaped. This can be useful when saving filenames whose encoding does not match the one used locally.
- -4
- --inet4-only
- -6
- --inet6-only
- Vynutí připojování k IPv4 nebo IPv6 adresám. S --inet4-only nebo -4 se Wget bude připojovat pouze k IPv4 hostitelům, ignorujíc AAAA záznamy v DNS a odmítne se připojit k IPv6 adresám určeným v URL. Naopak s --inet6-only nebo -6 se Wget bude připojovat pouze k IPv6 hostitelům a bude ignorovat A záznamy a IPv4 adresy.
Žádnou z těchto voleb by nemělo být nutné nastavovat ručně. Jako výchozí Wget, který IPv6 umí, použije druh adres, určený DNS záznamem hostitele. Pokud DNS odpoví IPv4 i IPv6 adresou, Wget je postupně zkusí, dokud nenajde tu, ke které se dá připojit. (Také viz volba "--prefer-family" popsaná níže.)
Tyto volby mohou být použity k vynucení užití IPv4 nebo IPv6 adres na systémech, které podporují obě možnosti, obvykle za účelem ladění nebo řešení rozbité konfigurace sítě. Najednou může být použita pouze jedna z voleb --inet6-only a --inet4-only. Pokud nebyl Wget zkompilován s podporou IPv6, nejsou tyto volby dostupné.
- --prefer-family=none/IPv4/IPv6
- When given a choice of several addresses, connect to the addresses with specified address family first. The address order returned by DNS is used without change by default.
Tím se vyhne falešným chybám a pokusům o spojení, při přístupu z IPv4 sítí k hostitelům, kteří mají jak IPv6 tak IPv4 záznam. Například www.kame.net se překládá na 2001:200:0:8002:203:47ff:fea5:3085 a na 203.178.141.194. Je-li preferováno "IPv4", poižije se IPv4 adresa jako první; je-li preferováno "IPv6", použije se jako první IPv6 adresa; je-li zadána hodnota "none", je pořadí adres vrácených DNS použito beze změny.
Na rozdíl od -4 a -6 tato volba neomezuje používání na jediný druh adres, pouze mění pořadí, ve kterém je k adresám přistupováno. Také si všimněte, že provedená změna pořadí je stabilní---neovlivnuje pořadí adres stejného druhu, tj. relativní pořadí všech IPv4 adres a všech IPv6 adres zůstává ve všech případech nedotčeno.
- --retry-connrefused
- Považuj "connection refused" za dočasnou chybu a zkoušej znovu. Normálně Wget pokus o stažení URL vzdá, pokud se k serveru nedokáže připojit, protože takové selhání se bere jako znamení, že server vůbec neběží a další pokusy by nikam nevedly. Tato volba se hodí k zrcadlení nespolehlivých serverů, které na krátké časové úseky vypadávají.
- --user=uživatel
- --password=heslo
- Nastaví uživatele a heslo heslo pro stahování přes FTP i HTTP. Tyto parametry lze potlačit použitím voleb --ftp-user a --ftp-password pro FTP přenosy a --http-user a --http-password pro HTTP přenosy.
- --ask-password
- Prompt for a password for each connection established. Cannot be specified when --password is being used, because they are mutually exclusive.
- --use-askpass=příkaz
- Prompt for a user and password using the specified command. If no command is specified then the command in the environment variable WGET_ASKPASS is used. If WGET_ASKPASS is not set then the command in the environment variable SSH_ASKPASS is used.
You can set the default command for use-askpass in the .wgetrc. That setting may be overridden from the command line.
- --no-iri
- Turn off internationalized URI (IRI) support. Use --iri to turn it on. IRI support is activated by default.
You can set the default state of IRI support using the "iri" command in .wgetrc. That setting may be overridden from the command line.
- --local-encoding=encoding
- Force Wget to use encoding as the default system encoding. That affects how Wget converts URLs specified as arguments from locale to UTF-8 for IRI support.
Wget use the function "nl_langinfo()" and then the "CHARSET" environment variable to get the locale. If it fails, ASCII is used.
You can set the default local encoding using the "local_encoding" command in .wgetrc. That setting may be overridden from the command line.
- --remote-encoding=encoding
- Force Wget to use encoding as the default remote server encoding. That affects how Wget converts URIs found in files from remote encoding to UTF-8 during a recursive fetch. This options is only useful for IRI support, for the interpretation of non-ASCII characters.
For HTTP, remote encoding can be found in HTTP "Content-Type" header and in HTML "Content-Type http-equiv" meta tag.
You can set the default encoding using the "remoteencoding" command in .wgetrc. That setting may be overridden from the command line.
- --unlink
- Force Wget to unlink file instead of clobbering existing file. This option is useful for downloading to the directory with hardlinks.