Quick tip - recover a failed download using Wget

  • September 10, 2007
  • Avatar for peter

GNU wget is a brilliant tool for downloading. Whether it's from the web, FTP or elsewhere, wget is a very powerful and useful tool.

Unfortunately, internet connections are often far from completely stable and if you're downloading something and that download subsequently fails, it can be quite frustrating (especially if it's a big file).

In the vast majority of cases though, there's no need to go about deleting the file and restarting the download from scratch. Wget includes a -c switch that you can use to continue a failed download from where you left off.

Say we're downloading a big file:

$ wget bigfile

And bang - our connection goes dead (you can simulate this by quitting with Ctrl-C if you like). Once we're back up and running and making sure you're in the same directory you were during the original download:

$ wget -c bigfile

Provided where you're downloading from supports it, you should get going from exactly where you left off.

It's a nice quick tip, but it can be a real time (and sanity) saver when you've got a dodgy connection!

Avatar for peter Peter Upfold

Home » Articles »