Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wanted to download a part of a file. (Let's say
So I used this command:

curl -r 200000-400000 -O

Unfortunately my Internet connection was dropped in the middle of downloading.
However, 1MB was downloaded so far. I've 3MB more to go.

So I used this command, to download the file, from where it was left off:

curl -r 200000-400000 -C - -O

The download resumes form the 3rd megabyte, but the problem is it doesn't end with 4th. Curl exceeds the range I specified, and continues to download the entire file. Why is this happening? Any help is appreciated!

(Actually, the file I'm downloading is a huge one. It's supposed to download over night. I want to avoid downloading what I already have, to save the bandwidth. I have to do this with several files. So I'm seeking for fix which is independent from the file's unique properties.)

share|improve this question

migrated from Jun 13 '13 at 16:28

This question came from our site for professional and enthusiast programmers.

I have tried to reproduce your results, and for me it worked. Can you share more information about your OS and the version of curl you are using? curl -V will provide good info. – Squeezy Jun 13 '13 at 16:58
Thanks for the reply. I'm using Curl 7.29.0 on Ubuntu 13.04 64bit. – Naveen Jun 18 '13 at 6:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.