How to download a file with wget using multiple connection in which each connection downloads a part of the file?
Wget Download Multiple Files From a File To download multiple files at once, use the -i option with the location of the file that contains the list of URLs to be downloaded. Each URL needs to be added on a separate line as shown. For example, the following file 'download-linux.
Downloading a file to a specific directory When downloading a file, Wget stores it in the current directory by default. You can change that by using the -P option to specify the name of the directory where you want to save the file.
wget solution doesn't download one file in multiple threads: The options used -r is recursive, -np ( --no-parent ) — don't ascend to the parent directory, -N ( --timestamping ) — don't re-retrieve files unless newer than local. But wget would definitely work if you're downloading a mirror of a site.
Download file from destination server. From receiving server, navigate to the directory you'd like to download it to. Type wget https://domain.com/backup.tar.gz – to download external file to your current directory. (Of course, your file path and filename may vary.) Wait for it to finish transferring.
use aria2
aria2c -x 16 [url] #where 16 is the number of connections
OR
Just repeat the wget -r -np -N [url]
for as many threads as you need. This isn’t pretty and there are surely better ways to do this, but if you want something quick and dirty it should do the trick.
Please look at http://blog.netflowdevelopments.com/2011/01/24/multi-threaded-downloading-with-wget/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With