C.W.K.
Stream
Lesson 05 of 13 · published

wget

~10 min · wget, download, mirror

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

The download specialist

Where curl is a Swiss Army knife, wget is a fishing rod — purpose-built for downloading files. Two killer features: it resumes interrupted downloads natively (-c), and it can mirror entire websites recursively. Not installed by default on macOS but a one-line brew away.

Code

Download patterns·bash
# Install on macOS
brew install wget

# Simple download
wget https://example.com/file.tar.gz

# Save with a different filename
wget -O custom-name.tar.gz https://example.com/file.tar.gz

# Resume an interrupted download
wget -c https://example.com/large-file.iso

# Quiet (good in scripts)
wget -q https://example.com/file.tar.gz

# Mirror a documentation site
wget --mirror --convert-links --page-requisites \
     --no-parent https://example.com/docs/
wget vs curl quick reference·plaintext
Task                    | Preferred
-------------------------+----------
Download one file        | wget (-c resumes natively)
API request              | curl (more flexible)
Mirror a site            | wget (built-in recursion)
Custom headers/methods   | curl
Resume interrupted DL    | both (wget -c, curl -C -)

External links

Exercise

Install wget on macOS. Download a known file: wget https://speed.hetzner.de/100MB.bin. Interrupt it midway with Ctrl+C, then re-run with -c (wget -c https://...) — watch it resume. Compare: try the same with curl -C - -O https://.... Both work; wget feels slightly cleaner for this use case.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.