Skip to content

Instantly share code, notes, and snippets.

@chandeeland
Created January 22, 2016 18:10
Show Gist options
  • Save chandeeland/2cdc04f837c20f8567a1 to your computer and use it in GitHub Desktop.
Save chandeeland/2cdc04f837c20f8567a1 to your computer and use it in GitHub Desktop.
how to curl part of large files
# check to see if the server supports RANGES
> curl -sI <url> |grep -i range
> Accept-Ranges: bytes
# see file size
> curl -sI <url> |grep -i length
> Content-Length: 2251775322
# curl a portion of file
> curl -H Range:bytes:1-10000 <url>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment