I wanted to download a part of a file. (Let's say http://mysite.com/myfile.zip)
So I used this command:
curl -r 200000-400000 -O http://mysite.com/myfile.zip
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 http://mysite.com/myfile.zip
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.)