CURL is a command line tool which can download files using a wide range of protocols: HTTP, HTTPS, FTP, FTPS, POP3, IMAP, RTMP, RTSP and many more. It's ideal for automating regular downloads in your own custom scripts.
CURL's basic operations are very simple. Just start by giving it the name of something to download.
By default whatever you're downloading is displayed on the screen, but you can redirect this to a file, or use the Output option to save it somewhere.
curl http://www.example.com/page.html > page.html
curl -o downloadcrew.html http://www.downloadcrew.com
This is just the start, though. Is your resource password=protected? Use this:
You can download several files at once.
curl -o http://www.test.com/file1.txt http://www.test.com/file2.txt
(As we're downloading specific files, the -o option will this time save them locally as their online names, file1.txt and file2.txt).
Maybe you only need part of a file? Here's how to get the first and last 256 bytes of a file.
curl -r 0-255 http://www.domain.com/bigfile.ext
curl -r -256 http://www.domain.com/bigfile.ext
CURL can be smarter that you might expect. You'll often want to download files only if they're newer than a local copy, for example, with a command line this.
curl -z local.html http://www.domain.com/remote.html
Remote.html will be compared to Local.html, and only downloaded if it's more recent.
There are many other options. CURL can upload files, post forms, resume file transfers, set upper or lower transfer speed limits, set a custom referrer or user agent, use cookie authentication and more.
And although it is a command line tool, cURL does a good job of keeping you in touch with whatever it's downloading. A progress bar displays the total download size, the bytes downloaded so far, the average transfer speed, time elapsed, expected completion time and more.
Version 7.38.0 brings:
• supports HTTP/2 draft-14
• CURLE_HTTP2 is a new error code
• CURLAUTH_NEGOTIATE is a new auth define
• CURL_VERSION_GSSAPI is a new capability bit
• no longer use fbopenssl for anything
• schannel: use CryptGenRandom for random numbers
• axtls: define curlssl_random using axTLS's PRNG
• cyassl: use RNG_GenerateBlock to generate a good random number
• findprotocol: show unsupported protocol within quotes
• version: detect and show LibreSSL
• version: detect and show BoringSSL
• imap/pop3/smtp: Kerberos (SASL GSSAPI) authentication via Windows SSPI
• http2: requires nghttp2 0.6.0 or later