The cURL tool is available in OS X (which curl
). Let’s assume that we want to download the jQuery library into our project 's directory from the official mirror:
http://code.jquery.com/jquery-2.1.1.min.js
Simply open any terminal app of your choice and go to the destination location where you want to pull the file, like:
cd /Users/slick/Code/my-example-wordpress-website/wp-content/themes/my-example-theme/js/
Now type:
curl http://code.jquery.com/jquery-2.1.1.min.js -o jquery-2.1.1.min.js
What's the purpose of the
-o
?
This option gives you the ability to specify an output file.