How do I download a single file in 2 parts to different locations using wget?

6

1

Hi I need to use wget (or curl or aget etc) to download a file to two different download destinations by downloading it in two halves:

First: 0 to 490000 bytes of file
Second: 490001 to 1000000 bytes of file.

I will be downloading this to separate download destinations and will merge them back to speed up the download. The file is really large and my ISP is really slow, so I need to get help from friends to download this in parts (actually in multiple parts)

The question below is similar but not the same as my need: How to download parts of the same file from different sources with curl/wget?

aget

aget seems to download in parts but I have no way of controlling precisely which part (either in percentage or in bytes) that I wish to download.

Extra Info

Just to be clear I do not wish to download from multiple locations, I want to download to multiple locations. I also do not want to download multiple files (it is just a single file). I want to download parts of the same file, and I want to specify the parts that I need to download.

Ravi Chhabra

Posted 2011-01-18T14:56:23.837

Reputation: 185

Answers

11

With curl you should be able to do

curl -o customname -r0-499 <url>

where 0 - 500 would be the byte range

curl man page look at the -r option

Posted by ewindisch in comment

It is better not to use -O here as the OP would like to specify the destinations. curl -o file.part1 -r0-490000 $url & curl -o file.part2 -r490001- $url – ewindisch

Viper_Sb

Posted 2011-01-18T14:56:23.837

Reputation: 936

2It is better not to use -O here as the OP would like to specify the destinations. curl -o file.part1 -r0-490000 $url & curl -o file.part2 -r490001- $url – ewindisch – 2011-01-18T15:19:52.503