wget Cheatsheet - Download Command
wget is the most reliable command-line downloader, especially for scripts and unattended runs: -c resumes after interruption, --retry retries automatically, -b runs in the background, and -r mirrors a site recursively. This table covers these high-frequency combos so interrupted downloads restart from where they broke.
Basic Download 7
wget URLDownload a file to the current directory
wget -O filename URLDownload and save as a given name
wget -P /path/to/dir URLDownload to a given directory
wget -b URLDownload in the background
wget -q URLQuiet download (no progress)
wget -v URLVerbose output
wget -nc URLSkip existing files (no-clobber)
Resume 3
wget -c URLResume a partial download
wget -c -O filename URLResume and save as a given name
wget --continue URLResume (same as -c)
Recursive 8
wget -r URLRecursive download (default depth 5)
wget -r -l 2 URLRecursive, depth 2
wget -r -np URLRecursive, no parent directories
wget -r -nd URLRecursive, no directory structure
wget -r -N URLRecursive, newer files only
wget -m URLMirror a site (equiv. -r -N -l inf --no-remove-listing)
wget --mirror URLMirror a site (same as -m)
wget -r -H -D example.com URLCross-host but limit to a domain (-H host, -D domain)
Filter 6
wget -A "*.pdf,*.doc" URLDownload only given types
wget -R "*.tmp,*.log" URLReject given types
wget --accept-regex ".*\.pdf$" URLAccept by regex
wget --reject-regex ".*\.tmp$" URLReject by regex
wget -I /dir1,/dir2 URLDownload only given directories
wget -X /dir1,/dir2 URLExclude given directories
Auth & Proxy 6
wget --user=username --password=pass URLHTTP authentication
wget --ftp-user=user --ftp-password=pass URLFTP authentication
wget -e use_proxy=yes -e http_proxy=URLUse an HTTP proxy
wget -e use_proxy=yes -e https_proxy=URLUse an HTTPS proxy
wget --no-check-certificate URLSkip SSL certificate verification
wget --user-agent="Mozilla/5.0" URLCustom User-Agent (bypass UA checks)
Common Patterns 8
wget -i urls.txtDownload from a list of URLs
wget -r -l 1 -A "*.jpg,*.png" URLDownload all images on a page
wget -r -l 1 --convert-links URLDownload and rewrite links to local
wget -r -l 1 -k -E -p URLDownload a full page (images, CSS, JS)
wget --limit-rate=100k URLLimit download speed
wget --timeout=30 --tries=3 URLSet timeout and retry count
wget --spider URLCheck only, don't download (link test)
wget -w 2 --random-wait -r URLPolite crawl: 2s wait plus random jitter
Tips
- wget supports HTTP, HTTPS and FTP, with resume and recursive download.
- Mind the depth (-l) on recursive downloads to avoid pulling too many files.
- Use -m to mirror a site; it auto-handles link conversion and timestamps.
Official References
Each command links to its official documentation below, so you can verify the latest usage and read deeper.
Maintained by LaoHand
Publicly updated on Jul 21, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us