Downloading https urls from the commandline through cURL for Windows
Posted by jpluimers on 2014/01/27
Lately I moved more and more away from wget, mainly because out of the box, wget (and also aria2, which I like for the bittorrent support) handle https downloads so badly: you need to manually setup your CA store on each and every installed system.
Not so with cURL, especially not on Windows any more, as “recently” (that is: since the last time I examined it, which is over a year ago now), there is a new kid in town: cURL for Windows: a Windows Installer for the Web Transfer Tool.
You don’t even need to download the installer. Grabbing the stuff from the bin directory in the zip download is enough: it contains a prepackaged CA certificate set that works splendid.
So now downloading https://dl.google.com/update2/installers/ChromeStandaloneSetup.exe to the current directory is as simple as
curl -O https://dl.google.com/update2/installers/ChromeStandaloneSetup.exe
(right now that download doesn’t install Chrome at all, but that’s a different story)
Like wget and aria2, it is multi-platform and cURL supports a lot of features besides http, https, ftp, sftp, etc, so definitely look into it.
It lacks mirroring like wget does, so that is one of the few scenarios I still use wget.
To choose for yourself, here are a few links on cURL, wget and aria2 you might want to review:
- wget vs curl: How to Download Files Using wget and curl.
- 15 Practical Linux cURL Command Examples (cURL Download Examples).
- The Ultimate Wget Download Guide With 15 Awesome Examples.
- bash – save file to specific folder with curl command – Stack Overflow.
You can get an older cURL for Windows supporting http2 at [WayBack] curl 7.53.1 for Windows with HTTP/2 & IPv6 support: Pre-compiled builds of curl 7.53.1 for Windows built with OpenSSL (1.0.2k), HTTP/2 (ngttp2/1.19.0), zlib (1.2.11) & IPv6 support. Plus it has no install dependencies!
The most current cURL for Windows is at [WayBack] curl – Download
–jeroen
Leave a Reply