Downloading with Terminal

Discussion in 'Mac Basics and Help' started by krees91, Feb 5, 2008.

  1. krees91 macrumors newbie

    Joined:
    Jan 5, 2008
    Location:
    Risca, Wales
    #1
    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
     
  2. WildCowboy Administrator/Editor

    WildCowboy

    Staff Member

    Joined:
    Jan 20, 2005
    #2
    Code:
    curl -O http://www.google.com/intl/en_ALL/images/logo.gif
    It'll download it to your home directory.
     
  3. krees91 thread starter macrumors newbie

    Joined:
    Jan 5, 2008
    Location:
    Risca, Wales
    #3
    Thx a bunch !

    Umm while we're still on topic, I was wondering if you could change the directory it downloads to. Thx
     
  4. XianPalin macrumors 6502

    XianPalin

    Joined:
    May 26, 2006
    #4
    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
     
  5. yg17 macrumors G5

    yg17

    Joined:
    Aug 1, 2004
    Location:
    St. Louis, MO
    #5
    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
     
  6. Osarkon macrumors 68020

    Osarkon

    Joined:
    Aug 30, 2006
    Location:
    Wales
    #6
    Do you have to install wget? It doesn't seem to be on Leopard by default.

    Curl works fine though.
     
  7. XianPalin macrumors 6502

    XianPalin

    Joined:
    May 26, 2006
    #7
    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.
     

Share This Page