wget -c: Resume an Interrupted Download
wget -c continues a download from where a previous attempt left off, if the server supports byte ranges.
Large artifact downloads sometimes get cut off. -c lets the next attempt pick up the remaining bytes rather than re-fetching the whole file.
What it does
wget -c (--continue) resumes getting a partially downloaded file. It sends a Range request for the bytes after the current local file size. The server must support range requests; if it does not, wget restarts from the beginning.
Common usage
wget -c https://example.com/large-artifact.tar.gz
# resume into a specific filename
wget -c -O artifact.tar.gz https://example.com/large-artifact.tar.gzOptions
| Flag | What it does |
|---|---|
| -c / --continue | Resume a partially downloaded file |
| -O <file> | Target filename to resume into |
| --tries=<n> | Retry the transfer up to n times |
In CI
Caching a partial download across job retries with -c saves bandwidth on big artifacts, but only if the cache directory persists between runs. On a fresh runner there is nothing to continue, so -c behaves like a normal download.
Common errors in CI
Cannot continue, file already retrieved (or wget re-downloading from the start) means the server ignored the Range header and answered 200 instead of 206 Partial Content. The warning "the existing file is larger than the remote one" appears when a stale or corrupt local file is bigger than the source; delete it and re-download.