Continue Download with cURL

By  on  

One of the most useful but least talked about utilities a developer has at their disposal is cURL.  The cURL command line utility has been so amazing that Chrome lets you copy requests as cURL from the developer tools Requests panel.  cURL lets you post form data, follow redirects, get response headers, determine redirect URL, check gzip encoding, and much more.

One more awesome feature that cURL has baked in is allowing the developer to continue interrupted downloads.  You can use cURL to download via the -O option:

curl -O https://davidwalsh.name

If that download gets interrupted, you can use the -C - addition to continue the download:

curl -C - -O https://davidwalsh.name

If you remember the 14k modem days, there was nothing worse than starting a download from scratch.  The internet speed is much faster these days but the average download has increased as well, so if you're using cURL, be sure to use this option to avoid fresh downloads!

Recent Features

  • By
    Facebook Open Graph META Tags

    It's no secret that Facebook has become a major traffic driver for all types of websites.  Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly.  And of course there are Facebook "Like" and "Recommend" widgets on every website.  One...

  • By
    Create a CSS Cube

    CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals.  Add animation and you've got something really neat.  Unfortunately each CSS cube tutorial I've read is a bit...

Incredible Demos

  • By
    Spatial Navigation

    Spatial navigation is the ability to navigate to focusable elements based on their position in a given space.  Spatial navigation is a must when your site or app must respond to arrow keys, a perfect example being a television with directional pad remote.  Firefox OS TV apps are simply...

  • By
    Retrieve Your Gmail Emails Using PHP and IMAP

    Grabbing emails from your Gmail account using PHP is probably easier than you think. Armed with PHP and its IMAP extension, you can retrieve emails from your Gmail account in no time! Just for fun, I'll be using the MooTools Fx.Accordion plugin...

Discussion

  1. If you are using wget you can resume a broken download with -c or --continue option.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!