Skip to content

Instantly share code, notes, and snippets.

@milesrichardson
Last active December 1, 2018 22:36
Show Gist options
  • Save milesrichardson/ca0d2b25baa8a0374910e750908b14e4 to your computer and use it in GitHub Desktop.
Save milesrichardson/ca0d2b25baa8a0374910e750908b14e4 to your computer and use it in GitHub Desktop.
Using `wget --continue` to resume broken downloads from Google Chrome

The Problem

You're downloading a big 1GB SQL file with Chrome. It stalls at 120mb. Ok, you try again. Looks like it's working this time. Thirty minutes later... stalls at 800mb. You are pulling your hair out.

What do?

wget --continue to the rescue!

Assumptions:

Download URL: https://s3.amazonaws.com/bucket/bigfile.sql

Download Destination: ~/Downloads/bucket/bigfile.sql

Steps:

  1. Pause download in chrome

  2. Go to terminal

$ cd ~/Downloads/bucket/

$ ls
bigfile.sql.crdownload

$ mv bigfile.sql.crdownload bigfile.sql

$ wget --continue https://s3.amazonaws.com/bucket/bigfile.sql
--2017-03-28 11:34:46--  https://s3.amazonaws.com/bucket/bigfile.sql
Resolving s3.amazonaws.com... 52.216.64.19
Connecting to s3.amazonaws.com|52.216.64.19|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 972035060 (927M), 110548361 (105M) remaining [application/x-www-form-urlencoded]
Saving to: 'bigfile.sql'

bigfile.sql                     100%[+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=========>] 927.00M   655KB/s    in 2m 39s  

2017-03-28 11:37:26 (677 KB/s) - 'bigfile.sql' saved [972035060/972035060]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment