Home » Home » How To Resume Broken Downloads Using Curl or Wget in Linux?

A notification pop up to my mobile, that I have something on my to-do list to re-download today. I surfed Internet for a while to hunt a Internet download manager for Linux, unfortunately I end up in finding absolute solution with Curl and Wget for my re-download problem.

How To Resume Broken Downloads Using Wget?

Let me explain a bit about Wget and Curl utility. Wget is a GNU free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

The basic syntax of wget command to start the download is,

$ wget http://ftp.ussg.iu.edu/linux/ubuntu-releases/12.04.4/ubuntu-12.04.4-alternate-amd64.iso

If you got some problem due to power supply or unstable Internet connection you may loose your download in the middle, then again you need to restart the download from scratch. Instead the man page of Wget, gives the solution for this problem. The syntax should include parameter -c or –continue to resume the broken download.

$ wget -c http://ftp.ussg.iu.edu/linux/ubuntu-releases/12.04.4/ubuntu-12.04.4-alternate-amd64.iso

If there is a file named ubuntu-12.04.4-alternate-amd64.iso already present in the current directory, Wget will assume that it is the first portion of the remote file, and will ask the server to continue the retrieval from an offset equal to the length of the local file. Thus, it saves both time and bandwidth.

To know How To Download Entire Website Using Wget Click Here.

How To Resume Broken Downloads Using Curl?

Similar to Wget, the other utility called Curl can also fix this issue. The major difference between these is that curl works depend on a library “libcurl”, and that library is widely used by other applications. Wget is standalone command line tool. Curl offers upload and sending capabilities. Wget only offers plain HTTP POST support.

The basic syntax of curl to fetch a file is,

$ curl -o http://ftp.ussg.iu.edu/linux/ubuntu-releases/12.04.4/ubuntu-12.04.4-alternate-amd64.iso

To resume broken download, the man of curl shows the following parameter to pass along with the curl command

$ curl -o -L -c URL

$ curl -o -L -c http://ftp.ussg.iu.edu/linux/ubuntu-releases/12.04.4/ubuntu-12.04.4-alternate-amd64.iso

Hope the article helps you to resume your broken download back, please feel free to leave your comments and do share.

Leave a Reply

Your email address will not be published. Required fields are marked *