download - Can One Extract a Hyphenated Filename File From a Server Using Curl?
2014-04
The images I'm dealing with have file names like part-1.jpg, object-a.jpg, Aspect-0.jpg. What I'm wondering is what I put in place of ???
:
curl -O http://server/[???].jpg
I have a quite large file hosted on five different servers.
I would like to be able to download different parts of the file from each server and subsequently concatenate the parts, in order to produce the original file.
Is there any way to do this with curl/wget or any other OS X command-line tools?
aria2 is the solution for multiple downloads of same file from different locations
in your case : aria2c -s5 host1/bigfile host2/bigfile ... host5/bigfile
better late than never...
I've wanted this at least once a year for the past decade. I've taken the time to write the script; you can find the latest version here.
Sources: https://github.com/calebgray/scripts/blob/master/usr/local/bin/download-multiple
Just save it somewhere, make it executable, and give it a shot:
cd /usr/bin
curl -o download-multiple https://raw.github.com/calebgray/scripts/master/usr/local/bin/download-multiple
chmod +x download-multiple
./download-multiple http://mirror.pnl.gov/releases/oneiric/ubuntu-11.10-desktop-amd64.iso http://linuxfreedom.com/ubuntu-releases/.pool/ubuntu-11.10-desktop-amd64.iso ftp://mirror.us.leaseweb.net/ubuntu-releases/oneiric/ubuntu-11.10-desktop-amd64.iso ftp://mirror.lstn.net/ubuntu-releases/oneiric/ubuntu-11.10-desktop-amd64.iso
Sources