Interrupted network transfers for large archives, ISO images, or backup files consume bandwidth and time without producing a usable result. Resuming an existing partial file avoids restarting from zero and makes unreliable connections more tolerable, especially over long-distance or congested links. Using wget for this purpose keeps the workflow scriptable and consistent across many Unix-like environments.

The wget command-line tool implements resuming by reusing the local file already present on disk and requesting only the missing portion from the remote server. When invoked with the --continue option, wget inspects the current file size, sends an HTTP Range header or protocol equivalent, and expects a partial response (typically 206 Partial Content) that begins at the correct byte offset. Combining this behavior with verbose output and header inspection simplifies troubleshooting of interrupted downloads.

Reliable resuming depends on server support for byte-range requests and on the remote file remaining unchanged between attempts. If the provider rotates files, modifies content under the same URL, or disables ranges, a partially downloaded file can no longer be trusted and must be discarded. Verifying length and checksums guards against silent corruption, and cautious handling of removal commands prevents accidental loss of unrelated data.

Steps to resume interrupted downloads using Wget:

  1. Open a terminal session on the system where the partial download is stored.
  2. Change to the directory that contains the partially downloaded file.
    $ cd ~/Downloads
    $ ls -lh
    total 1.0M
    -rw-r--r-- 1 alex alex 1.0M Dec 21 07:22 largefile.iso
    -rw-r--r-- 1 alex alex  12K Dec 21 08:37 readme.txt
  3. Resume the interrupted download using the original URL and the --continue option.
    $ wget --continue https://downloads.example.com/files/largefile.iso
    --2025-12-21 08:37:06--  https://downloads.example.com/files/largefile.iso
    Resolving downloads.example.com (downloads.example.com)... 172.17.0.10
    Connecting to downloads.example.com (downloads.example.com)|172.17.0.10|:443... connected.
    HTTP request sent, awaiting response... 206 Partial Content
    Length: 5242880 (5.0M), 4194304 (4.0M) remaining [application/octet-stream]
    Saving to: 'largefile.iso'
    
            [ skipping 1000K ]
      1000K .......... .......... .......... .......... .......... 20%  521M 0s
    ##### snipped #####

    --continue reuses the existing local file and asks the server to send only the remaining bytes when range requests are supported.

  4. Check whether the remote server advertises support for resumable downloads if the resume attempt restarts from zero or fails.
    $ wget --server-response --spider https://downloads.example.com/files/largefile.iso 2>&1 | grep -iE 'HTTP/|Accept-Ranges'
      HTTP/1.1 200 OK
      Accept-Ranges: bytes

    The combination of a successful HTTP status and an Accept-Ranges: bytes header indicates that the server allows byte-range requests suitable for resuming.

  5. Use the --output-document option when the desired local filename differs from the name used on the server while still resuming from existing data.
    $ wget --continue --output-document=backup-image.iso https://downloads.example.com/files/largefile.iso

    Specifying --output-document keeps a consistent local naming scheme even if the provider changes filenames or query-string parameters in the URL.

  6. Replace an invalid partial file with a clean download when verification or provider documentation indicates that the remote file has changed.
    $ rm largefile.iso
    $ wget https://downloads.example.com/files/largefile.iso

    Removing a file with rm is irreversible, so the filename and path should be checked carefully to avoid deleting unrelated data.

  7. Verify that the completed file matches the expected size and checksum after the transfer finishes.
    $ ls -lh largefile.iso
    -rw-r--r-- 1 alex alex 5.0M Dec 21 07:22 largefile.iso
    
    $ sha256sum largefile.iso
    c036cbb7553a909f8b8877d4461924307f27ecb66cff928eeeafd569c3887e29  largefile.iso

    Checksum verification is successful when the computed hash exactly matches the reference value published by the file provider.

  8. Confirm that no further data needs to be fetched by rerunning the resume command and observing that nothing is downloaded.
    $ wget --continue https://downloads.example.com/files/largefile.iso
    --2025-12-21 08:37:43--  https://downloads.example.com/files/largefile.iso
    Resolving downloads.example.com (downloads.example.com)... 172.17.0.10
    Connecting to downloads.example.com (downloads.example.com)|172.17.0.10|:443... connected.
    HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable
    
        The file is already fully retrieved; nothing to do.
Discuss the article:

Comment anonymously. Login not required.