How to download files via command line – OS X, Ubuntu : Wget, cURL
Posted by Command-Line, Linux, OS X, Ubuntu | Posted on 21-07-2009
| Posted inFor most server administrators doing system updates or installing patches via a command shell is normal, but for the average user trying to patch his new system, this task might be a little difficult. Opening a terminal and downloading a file, just by typing in a few words, is not as simple as clicking a download icon on a website, tho, once you learn how to use Wget or cURL, it will be.
From my understanding, Wget is a stand-alone application, that is command-line only. And, cURL is a cross-platfrom API library called libcurl. Personally, I like Wget better then cURL, but that’s just because I am bias.
If you want to know all the nitty-gritty differences, check out curl vs Wget.
Wget – The non-interactive network downloader. (I refer to it as, WWW Get or Web Get).
wget [option]… [URL]…
curl – transfer a URL
curl [options] [URL...]
How to download a file with wget:
wget http://domain.com/path/to/file.zip
How to download a file with cURL:
curl -O http://domain.com/path/to/file.zip or curl http://domain.com/path/to/file.zip > file.zip