OS X Terminal Download File Commands is a Guide to Offer You Different Options with Explanations to Download File from Remote Server/Website. We have many comprehensive guides on Command Line Interface, mainly for the new users. Mac is more about OS X; that is UNIX and Command Line Interface provides the most wider range of tools. To use your Mac properly for Power Usage, learning these basics are important. We are using Homebrew – which is a Package Manager (you can read on how we installed Homebrew as step by step Guide.)
There are various package managers, it is wise to create a profile file before hand. In fact, we can install apt-get on OS X, apt-get is mainly intended for Linux not UNIX. Let us come back to our main topic – OS X Terminal Download File Commands is a Guide.
OS X Terminal Download File Commands is a Guide : Understanding the Whats
A download can be offered in various ways, over SSH, over HTTP, via FTP and so on. By default, OS X has cURL installed. Supported protocols by cURL include HTTP , HTTPS , FTP , FTPS , DICT , LDAP , RTMP etc.
On Linux, usually wget is more used; which we can also install on OS X (via Homebrew Package manager). It is better if the user has minimum idea about the commonly used UNIX Commands.
OS X Terminal Download File Commands is a Guide
As cURL is pre-installed and supports a wider protocols, usually examples for typical tutorial on OS X Terminal Download File Commands is started with cURL. A typical example is :
# Format: curl <option> <url>
curl -O http://cie-wc.edu/Microprocessor-7-19-2011.pdf
Apple has big guide on usage of cURL :
From the options you will understand that, if we use this command instead, we will get a kind of progress bar :
curl -# -O http://cie-wc.edu/Microprocessor-7-19-2011.pdf
We said about wget, indeed; to install wget; you can cURL the source :
curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
But, we can use Homebrew to easily install wget :
brew install wget
Usage of wget is easy and official examples are here :
You can wget the wget source-code indeed :
wget has lot of options too. Third common way is to use scp-command, it runs on top of SSH :
scp firstname.lastname@example.org:/path/to/file localfile
If you can’t use scp or SFTP for tar bals, you can use tar over SSH:
tar cf - . | ssh otherhost "cd /mydir; tar xvf -"
rsync has different usage, we are not mentioning here.
Follow the Author of this article :