Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

krees91

macrumors newbie
Original poster
Jan 5, 2008
19
0
Risca, Wales
Hey, is there a command in Terminal to download files ? Say I wanted to download the google logo from the Google website without opening Safari. Thx, Plz Reply
 
Code:
curl -O http://www.google.com/intl/en_ALL/images/logo.gif

It'll download it to your home directory.
 
Thx a bunch !

Umm while we're still on topic, I was wondering if you could change the directory it downloads to. Thx
 
I use 'wget', i.e. 'wget http://www.example.com/examplefile.zip'

I know curl is a lot more flexible but wget is quick and easy. Wget has a nice little text progress bar, forget if curl has that or not.

To download to a different directory, change to the directory before using the command.
I.e.:
cd Downloads
wget http://whatever.com/whatever.zip
 
Is there a major difference between wget and curl? I've used both, just whichever command pops into my head first when I need to download something; I'm just wondering if I should use one over the other
 
Do you have to install wget? It doesn't seem to be on Leopard by default.

Curl works fine though.
 
Ah you're right, maybe I did have to install wget using Macports.

Need to install Macports, and then at the terminal do 'sudo port install wget' and then wait a while. I use it a lot, especially if I'm at work and want to get my Mac to download something while I'm away, I use wget via ssh :)

http://daniel.haxx.se/docs/curl-vs-wget.html is a comparison of the two, looks like curl is a lot more robust, but I like the straight shot 'wget <paste my url>', hit enter and I'm done, so I'll probably keep using it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.