Mac-terminal.com

Mac-Terminal.com

An introduction of the Terminal for Mac OS X

Using cURL in the Terminal for Mac OS X

Syntax: curl [-Options] <URL>

Usagea: cURL is an inbuilt tool in Mac OS X which lets you transfer data from or to a server, using one of the many supported protocols (HTTP,HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE).

cURL can be used for alot of things, for example:

Example

curl whatismyip.orgOutputs your IP address directly in the Terminal window
curl yourdomain.comDisplays the source code of yourdomain.com directly in the Terminal window.
curl http://www.yourdomain.com/backup/backup.zip -o /local/path/on/your/mac/backup.zipFetch a backup file created on your remote server.

More information