wget Download files from the web
Downloads files over HTTP, HTTPS and FTP. It saves to disk by default, can resume a broken download, and can copy whole sites. It is not installed by default on macOS, where curl is the built-in tool.
Synopsis
wget [OPTION]... URL...
Common options
| Option or form | What it does |
|---|---|
-O FILE | Save the download as FILE. Use -O - to write to the terminal (standard output) |
-c | Continue a partly downloaded file instead of starting again |
-q | Quiet mode: print nothing |
-P DIR | Save files into the folder DIR |
-r | Download recursively, following links |
-np | No parent: when downloading recursively, never go up to the parent folder |
-i FILE | Read the list of URLs to download from FILE, one per line |
--limit-rate=RATE | Cap the download speed, for example --limit-rate=500k |
Examples
wget https://example.com/files/report.pdf
wget -O latest.tar.gz https://example.com/download/latest
wget -c https://example.com/files/big.iso
wget -i urls.txt -P downloads
wget -qO- https://example.com
wget -r -np https://example.com/docs/
Notes
- wget is not installed by default on macOS. Install it with Homebrew (brew install wget), or use curl, which is already there. It is installed on most Linux systems.
- Unlike curl, wget saves to a file by default and follows redirects without being asked.
- If the target file already exists, wget saves the new download as file.1 rather than overwriting. Use -O to choose the name, or -c to resume.
- Recursive downloads (-r) can fetch a very large number of files. Add -np and limit the depth with -l 2 before pointing it at a site you do not own.
- -O replaces the target file even if the download fails, so a failed run can leave you with an empty file.
See also
Last reviewed 2026-10-07.