What happens if you use wget -c on a full download?
Using the continue flag (-c or --continue)
in wget on a file that has already been fully downloaded
tells the utility to check the file size on the remote server against
the local file size. Instead of restarting the download or overwriting
the existing data, wget identifies that the local file is
already complete and safely terminates the process without downloading
any additional data. This article explains the exact behavior of
wget in this scenario, how it compares file sizes, and what
to expect from the terminal output.
The Mechanism Behind
wget -c
When you execute wget -c, the program performs a
specific sequence of checks before transferring any data:
- Size Comparison:
wgetfetches the HTTP header or FTP file details from the remote server to determine the official file size. It then looks at the size of the local file with the same name. - The “Equal Size” Rule: If the local file size is
exactly equal to (or larger than) the file on the server,
wgetassumes the download is already complete. - Process Termination: Because the sizes match,
wgetskips the download entirely to conserve bandwidth and prevent file corruption.
Note:
wgetprimarily relies on file size for this check, not cryptographic hashes (like MD5 or SHA-256). If the remote file has changed but remains the exact same size,wget -cwill still assume it is complete.
Terminal Output to Expect
When you run the command on a fully downloaded file, your terminal will not show the typical progress bar. Instead, you will see an output message indicating that the file is already fully retrieved.
The output generally looks like this:
File ‘example.zip’ already fully retrieved; nothing to do.
After displaying this message, wget cleanly exits,
leaving your original, fully downloaded file completely untouched.