WGET(1) WGET(1) (NAME) wget - (SYNOPSIS) wget []... [_]... (DESCRIPTION) GNU Wget . HTTP HTTPS FTP HTTP . Wget . Wget . . Wget HTML XHTML CSS . << >> . Wget (/robots.txt) . Wget . Wget Wget . Wget . (OPTIONS) (Option Syntax) Wget getopt . . . : wget -r --tries=10 http://fly.srk.fer.hr -o log . -o log -olog. : wget -drc : wget -d -r -c -- . -x log : wget -o log -- -x . .wgetrc . .wgetrc "exclude_directories" /cgi-bin /~nobody /~somebody . .wgetrc . wget -X "" -X /~nobody,/~somebody (boolean) / () . --follow-ftp Wget FTP HTML --no-glob (globbing) FTP . ( --no ). . . --follow-ftp FTP HTML . --no- --no- . . "follow_ftp = on" .wgetrc Wget FTP --no-follow-ftp . (Basic Startup Options) -V --version Wget. -h --help Wget. -b --background . -o wget-log . -e command --execute command .wgetrc . .wgetrc . wgetrc -e . (Logging and Input File Options) -o logfile --output-file=logfile logfile. . -a logfile --append-output=logfile logfile. -o . logfile . -d --debug () Wget . Wget -d . Wget -d . -q --quiet Wget ( ). -v --verbose . . -nv --no-verbose ( -q ) . --report-speed=type type. bits . -i file --input-file=file file . - file . ( - ./- .) . . --force-html file . --force-html html . "" --base=url . file Content-Type text/html html . base href . file "O_NONBLOCK" . Wget (EOF) . (Stream) . . --input-metalink=file file (Metalink). . --keep-badhash (bad hash). .badhash . --metalink-over-http HTTP HEAD GET . . HTTP . Content-Type: application/metalink4+xml . --metalink-index=number metaurl application/metalink4+xml. "application/metalink4+xml". 0 inf . metaurl ( --metalink-over-http) . --preferred-location . . --xattr (extended attributes) HTTP Referer . . -F --force-html HTML . "" HTML --base HTML . -B URL --base=URL HTML -i/--input-file ( --force-html HTML ) URL . "BASE" HTML URL "href" . http://foo/bar/a.html URL Wget ../baz/b.html http://foo/baz/b.html . --config=FILE () . --no-config . --config --no-config --no-config . --rejected-log=logfile logfile (CSV). . (Download Options) --bind-address=ADDRESS TCP/IP ADDRESS (bind) . ADDRESS IP . IP . --bind-dns-address=ADDRESS [ libcares] DNS (override) . /etc/resolv.conf --dns-servers . ADDRESS IPv4 IPv6 . Wget libcares . --dns-servers=ADDRESSES [ libcares] () (nameserver) /etc/resolv.conf . ADDRESSES IPv4 IPv6 . Wget libcares . -t number --tries=number number. 0 inf . << >> (connection refused) << >> (404) . -O file --output-document=file file . - file . ( - ./- .) -O << file >> (redirection) : wget -O file http://foo wget -O - http://foo > file file . -N ( ) -O : file . . -r -p -O : Wget file file . 1.11 1.11.2 ( ) . -nc . -k -k -k . -nc --no-clobber Wget -nc . (clobbered) . . Wget -N -nc -r -p file file.1 . file.2 . ( -nd -r -p .) -nc Wget file . ""no-clobber"" ( ) . Wget -r -p -N -nd -nc . -nc . Wget -N -r -p . -nc -N . -O/--output-document . -nc .html .htm . --backups=backups .1 ( _1 VMS) . .2 .3 backups ( ). --no-netrc .netrc. .netrc . -c --continue . Wget . : wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z ls-lR.Z Wget . Wget . -c Wget . -c ls-lR.Z.1 ls-lR.Z . -c Wget . Wget 1.7 -c Wget . ( ) . -c "(length(remote) - length(local))" . wget -c . . Wget . -c -r << >> . HTTP "transfer interrupted" . -c FTP HTTP "Range" . --start-pos=OFFSET OFFSET ( ). `k` `m` . --start-pos --continue . Wget --continue . --start-pos . -c . --progress=type . "dot" "bar". "bar" . ( ) . TTY "dot" . --progress=dot . . type . type (:) : --progress=type:parameter1:parameter2. dot:style . . "default" . "binary" : ( ). "mega" : ( ). "mega" "giga" : ( ). --progress=bar : force noscroll. TTY "dot" --progress=bar . "force" --progress=bar:force . bar (scroll) . --progress=bar:force . "noscroll" Wget . "progress" .wgetrc . --show-progress Wget (verbosity). Wget (verbose) . --no-verbose --quiet . . --output-file stderr . -N --timestamping (time-stamping). --no-if-modified-since If-Modified-Since -N. HEAD . -N . --no-use-server-timestamps . . --timestamping . --no-use-server-timestamps . -S --server-response HTTP FTP. --spider Wget () . : wget --spider --force-html -i bookmarks.html . -T seconds --timeout=seconds ( ) seconds . --dns-timeout --connect-timeout --read-timeout . Wget . . . 0 . . . 0.1 ( ) . . --dns-timeout=seconds DNS seconds . DNS . DNS . --connect-timeout=seconds seconds . TCP . . --read-timeout=seconds ( ) seconds . <<>> (idle time) : . . . . --limit-rate=amount amount . k m . --limit-rate=20k 20KB/s . Wget . --limit-rate=2.5k . Wget (Sleep) . TCP . . -w seconds --wait=seconds . . "m" "h" "d" . Wget . "--random-wait" . --waitretry=seconds Wget . Wget (linear backoff) : seconds . Wget . --random-wait Wget . . . --wait Wget . C . --random-wait . --no-proxy (*_proxy) . -Q quota --quota=quota () . () ( k) ( m) . wget -Q10k https://example.com/ls-lR.gz ls-lR.gz . . . wget -Q2m -i sites . 0 inf . --no-dns-cache () DNS. Wget IP DNS DNS . Wget . . Wget DNS . NSCD . . --restrict-file-names=modes . %HH HH . . Wget . . modes . unix windows nocontrol ascii lowercase uppercase. unix windows lowercase uppercase . "unix" / . . "windows" \ | / : ? " * < > . + : @ ? . . nocontrol . UTF-8 . ascii ( ) . -4 --inet4-only -6 --inet6-only IPv4 IPv6. --inet4-only -4 Wget IPv4 AAAA . --inet6-only -6 IPv6 A IPv4 . . Wget DNS . . --inet6-only --inet4-only . --prefer-family=none/IPv4/IPv6 . DNS . IPv4 IPv4 IPv6 . -4 -6 . . --retry-connrefused << >> (connection refused) . Wget . . --user=user --password=password user password FTP HTTP. --ftp-user --ftp-password FTP --http-user --http-password HTTP . --ask-password . --password . --use-askpass=command . WGET_ASKPASS . SSH_ASKPASS . .wgetrc . --no-iri (IRI). --iri . IRI . "iri" .wgetrc . --local-encoding=encoding Wget encoding . UTF-8 IRI . Wget nl_langinfo() "CHARSET" . ASCII . --remote-encoding=encoding Wget encoding . URI UTF-8 . HTTP "Content-Type" HTML "Content-Type http-equiv" . --unlink Wget (unlink) . (hardlink) . (Directory Options) -nd --no-directories . ( .n ). -x --force-directories -nd . wget -x http://fly.srk.fer.hr/robots.txt fly.srk.fer.hr/robots.txt . -nH --no-host-directories . Wget -r http://fly.srk.fer.hr fly.srk.fer.hr/ . . --protocol-directories . wget -r http://host host/... http/host/... . --cut-dirs=number number . . ftp://ftp.xemacs.org/pub/xemacs . -r ftp.xemacs.org/pub/xemacs/ . -nH ftp.xemacs.org/ pub/xemacs . --cut-dirs Wget . : No options -> ftp.xemacs.org/pub/xemacs/ -nH -> pub/xemacs/ -nH --cut-dirs=1 -> xemacs/ -nH --cut-dirs=2 -> . --cut-dirs=1 -> ftp.xemacs.org/xemacs/ ... -nd -P . -nd --cut-dirs -nH --cut-dirs=1 beta/ xemacs/beta . -P prefix --directory-prefix=prefix prefix. ( ). . ( ) . HTTP (HTTP Options) --default-page=name name ( ) index.html. -E --adjust-extension application/xhtml+xml text/html \.[Hh][Tt][Mm][Ll]? .html . .asp . CGI http://site.com/article.cgi?25 article.cgi?25.html . Wget X.html X ( text/html application/xhtml+xml ). 1.12 Wget text/css .css --html-extension . . 1.19.2 Wget "Content-Encoding" br compress deflate gzip .br .Z .zlib .gz . . --http-user=user --http-password=password user password HTTP. Wget "basic" () "digest" "NTLM" . . "ps" . --use-askpass .wgetrc .netrc "chmod" . --no-http-keep-alive << >> (keep-alive) HTTP. Wget TCP . . . --no-cache () . Wget (Cache-Control: no-cache Pragma: no-cache) . . . --no-cookies . . "Set-Cookie" . . --load-cookies file file HTTP. file cookies.txt . () . . --load-cookies cookies.txt Wget . : "Netscape 4.x." ~/.netscape/cookies.txt . "Mozilla Netscape 6.x." cookies.txt ~/.mozilla . "Internet Explorer." File Import and Export Export Cookies Wget . " ." --load-cookies . --load-cookies : wget --no-cookies --header "Cookie: =" --save-cookies file file . ( ) --keep-session-cookies. --keep-session-cookies --save-cookies (session cookies) . . . Wget . Wget 0 . --load-cookies . --ignore-length HTTP ( CGI) "Content-Length" Wget . Wget . Wget "Content-Length" . --header=header-line header-line HTTP. . --header : wget --header='Accept-Charset: iso-8859-2' \ --header='Accept-Language: fa' \ http://fly.srk.fer.hr . 1.10 . Wget foo.bar "Host" : wget --header="Host: foo.bar" http://localhost --compression=type . auto gzip none. auto gzip Wget gzip . "Content-Encoding" . none Wget . . "bug-wget@gnu.org" . --max-redirect=number (redirections) . . ( ) . --proxy-user=user --proxy-password=password user password . Wget ("basic") . --http-password . --referer=url `Referer: url` HTTP. Referer . --save-headers HTTP . -U agent-string --user-agent=agent-string HTTP agent-string. HTTP "User-Agent" . . Wget Wget/version version Wget . "User-Agent" . "User-Agent" Wget . --user-agent="" Wget "User-Agent" HTTP . --post-data=string --post-file=file POST HTTP . --post-data string --post-file file . . "key1=value1&key2=value2" . --post-file "key=value" . Wget "multipart/form-data" "application/x-www-form-urlencoded" . --post-data --post-file . Wget POST "--post-file" FIFO /dev/stdin . 1.15 POST Wget . 301 302 307 RFC2616 POST . GET 303 See Other . POST : # . . wget --save-cookies cookies.txt \ --post-data 'user=foo&password=bar' \ http://example.com/auth.php # . wget --load-cookies cookies.txt \ -p http://example.com/interesting/article.php --save-cookies --keep-session-cookies . --method=HTTP-Method RESTful Wget HTTP --header=Header-Line . Wget --method HTTP . --body-data=Data-String --body-file=Data-File --method . --body-data string --body-file file . . Wget GET 307 Temporary Redirect . --content-disposition "Content-Disposition" . CGI . --metalink-over-http --trust-server-names Content-Type: application/metalink4+xml filename "Content-Disposition" . --content-on-error Wget HTTP . --trust-server-names . . . --auth-no-challenge Wget HTTP ( ) . . --retry-on-host-error << >> (Temporary failure in name resolution) . --retry-on-http-error=code[,code,...] HTTP . HTTP . 503 ( ) 429 ( ) . . HTTPS (SSL/TLS) (HTTPS (SSL/TLS) Options) HTTP ( HTTPS) Wget SSL . GnuTLS . Wget HSTS ( HTTP) . Wget SSL . --secure-protocol=protocol . auto SSLv2 SSLv3 TLSv1 TLSv1_1 TLSv1_2 TLSv1_3 PFS. auto SSL TLSv1 . . SSLv2 SSLv3 TLSv1 TLSv1_1 TLSv1_2 TLSv1_3 . SSL . PFS (Perfect Forward Security) . PFS SSL . TLS PFS ( RSA) . --https-only HTTPS . --ciphers (cipher list). ( GnuTLS << >> ). SSL/TLS ( GnuTLS) . Wget . --no-check-certificate (CA) (Common Name) . Wget 1.10 SSL . (self-signed) . <<>> . . . --check-certificate=quiet . --certificate=file file. . --certificate-type=type . PEM () DER ( ASN1) . --private-key=file file. . --private-key-type=type . PEM () DER . --ca-certificate=file file ("CA") . PEM . Wget CA . --ca-directory=directory CA PEM. CA ( "c_rehash") . --ca-directory --ca-certificate . --crl-file=file (CRL) file. CA . --pinnedpubkey=file/hashes Wget ( ) (Public Key Pinning). PEM DER sha256 base64 "sha256//" ";" . TLS Wget . --random-file=file [ OpenSSL LibreSSL] file /dev/urandom. --egd-file=file [ OpenSSL] file EGD ( ). /dev/urandom EGD . --no-hsts Wget HSTS ( HTTP RFC 6797) . --no-hsts Wget "Strict-Transport-Security" HSTS . --hsts-file=file Wget HSTS ~/.wget-hsts . --hsts-file . HSTS HSTS . "#" . . HSTS : " SP [] SP SP SP " Wget Wget . --warc-file=file file WARC ( ). --warc-header=string string warcinfo. --warc-max-size=size WARC size. --warc-cdx CDX. --warc-dedup=file CDX ( ). --no-warc-compression WARC GZIP. --no-warc-digests SHA1. --no-warc-keep-log WARC. --warc-tempdir=dir WARC. FTP (FTP Options) --ftp-user=user --ftp-password=password user password FTP. -wget@ FTP (Anonymous) . . "ps" . .wgetrc .netrc . --no-remove-listing .listing FTP. FTP . . "root" Wget index.html /etc/passwd root Wget -N -r . --no-glob (globbing) FTP. * ? [ ] : wget ftp://gnjilux.srk.fer.hr/*.msg . . --no-passive-ftp (passive) FTP. . NAT . (active) . --preserve-permissions umask . --retr-symlinks FTP . Wget . --retr-symlinks=no . FTP . . FTPS (FTPS Options) --ftps-implicit Wget FTPS (implicit). SSL/TLS "AUTH TLS" . FTPS (990) (21) . --no-ftps-resume-ssl SSL/TLS . Wget SSL/TLS . SSL/TLS . --ftps-clear-data-connection (Plain Text) SSL/TLS . Wget "PROT C" . --ftps-fallback-to-ftp FTP FTPS . . (Recursive Retrieval Options) -r --recursive . . -l depth --level=depth depth. . -l 0 -l inf . wget -r -l 0 http:///1.html 1.html -l 0 -l inf ( ) . -r -l . --page-requisites . --delete-after Wget . (pre-fetching) : wget -r -nd --delete-after http://whatever.com/~popular/page --delete-after . . -k --convert-links . ( CSS ) . : o Wget . /foo/doc.html /bar/img.gif doc.html ../bar/img.gif . o Wget . /foo/doc.html /bar/img.gif http://hostname/bar/img.gif . . Wget -k . --convert-file-only URL . --adjust-extension () . -K --backup-converted .orig . -N . -m --mirror (mirroring). FTP . -r -N -l inf --no-remove-listing . -p --page-requisites Wget HTML . CSS . HTML . . : wget -p http:///1.html . : wget -E -H -k -K -p http:/// --strict-comments () HTML SGML. --> . 1.9 Wget . / (Recursive Accept/Reject Options) -A acclist --accept acclist -R rejlist --reject rejlist . * ? [ ] (pattern) . -A "*.mp3". --accept-regex urlregex --reject-regex urlregex (Regex) (URL). --regex-type regextype . posix pcre. pcre Wget libpcre . -D domain-list --domains=domain-list . domain-list . -H . --exclude-domains domain-list . --follow-ftp FTP HTML. Wget FTP . --follow-tags=list Wget / HTML . . --ignore-tags=list --follow-tags . --ignore-case . -R -A -I -X FTP . -H --span-hosts (span-hosts) . -L --relative . . -I list --include-directories=list . list (wildcard) . -X list --exclude-directories=list . -np --no-parent . . (ENVIRONMENT) Wget HTTP FTP . Wget : http_proxy https_proxy http_proxy https_proxy HTTP HTTPS . ftp_proxy FTP . http_proxy ftp_proxy . no_proxy . no_proxy .mit.edu MIT . (EXIT STATUS) Wget : 0 (). 1 . 2 (Parse error) .wgetrc .netrc... 3 / (File I/O). 4 . 5 SSL. 6 /. 7 . 8 . . 1.12 Wget . () . (FILES) /usr/local/etc/wgetrc (global). .wgetrc . (BUGS) GNU Wget ( ) . ( ) . : 1. . Wget . 2. . .wgetrc . 3. Wget -d . ( ) . 4. Wget gdb "where" (backtrace) . (SEE ALSO) GNU Wget . .wgetrc -e Info wget . wget2(1) HTTP/2 . (AUTHORS) Hrvoje Niksic . Darshit Shah Tim Ruhsen . (COPYRIGHT) (C) 1996--2011, 2015, 2018--2024 (Free Software Foundation, Inc.) / (GNU Free Documentation License) 1.3 . GNU Wget 1.25.0 2026-07-15 WGET(1)