Download a file / folder using mac terminal and curl

June 15, 2009    curl download mac terminal

Simply use the following command:

curl -O

Will simply download the file to your local machine and your current location.

To change the current location on your local machine firstly you can find out where you are by hittng 'ls' which will list all possible directories and files. Then you can cd into whichever the directory is that you want to end up in.

For example 'cd Desktop/Backups/'

Then when you run the command it will end up in your current location. If you mess up or want to move that file at a later date you can use the following command:

'mv  myfile.tar.gz   newlocation'

Hopefully this helps someone.

blog comments powered by Disqus