Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Download files from web servers via ftp program UNIX
The command line BSD ftp utility that ships with OS X can be used to download files via HTTP as well as FTP. For example, in Terminal, you would do this to download a DMG file from some site:
$ cd ~/Downloads
$ ftp http://www.some_site.net/file.dmg
You will see the file automatically begin downloading into your current directory, which you set to your Downloads folder with the first command. Now you probably won't need to install the GNU wget utility.

[robg adds: Note that OS X also ships with curl installed, which can do the same thing and much more (man ftp and man curl for more on both these apps, of course.) To grab the same file with curl, you'd use curl -O file.dmg.]
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[10,774 views]  

Download files from web servers via ftp program | 6 comments | Create New Account
Click here to return to the 'Download files from web servers via ftp program' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Download files from web servers via ftp program
Authored by: jctull on Feb 13, '08 08:21:09AM
One minor note about the curl command Rob provided. You would need the full url path to the dmg file, not just the file name:

curl -O ftp://server.domain.name/file.dmg

[ Reply to This | # ]

Download files from web servers via ftp program
Authored by: googoo on Feb 14, '08 11:19:05AM
The following also works with curl.

curl -O http://server.domain.name/file.dmg

Notice the use of http:// in the URL instead of ftp://. Of course, you would use this to download a file from an HTTP server.

-Mark



[ Reply to This | # ]
Before the "ubergeeks" start complaining....
Authored by: voiceofra on Feb 13, '08 10:58:13AM

that this is a stupid hint or "old news"...
I've been using curl to download files since my linux/FreeBSD days, but for people new to OS X or those afraid of the command line, this is extremely useful.
You can close your web browser, go on to other things, etc and let curl do it's thing.



[ Reply to This | # ]
Interesting!
Authored by: macubergeek on Feb 13, '08 01:36:36PM

This is a cool little factoid that I hadn't connected up till just now ;-)
The http protocol supports ftp transfer per RFC (I forget the specific RFC). This enables you to use a web browser to surf to a ftp url and list directory contents and download with a click of the mouse. In that context this posting makes sense. Cool! very cool.



[ Reply to This | # ]
Download files from web servers via ftp program
Authored by: pcunix on Feb 14, '08 01:01:21PM
Actually, you can do much more with ftp (see "THE .netrc FILE" in "man ftp" ) but if you are doing anything complex, Perl and Net::FTP is much more flexible and powerful. See my http://aplawrence.com/Unixart/perlnetftp.html for a gentle intro.

---
--
Tony Lawrence
Free SCO, Mac OS X and Linux Skills Tests: http://aplawrence.com/skillstest.html

[ Reply to This | # ]

Download files from web servers via ftp program
Authored by: spiffyguy on Feb 24, '08 03:40:30PM

I find it a lot easier just to copy the URL you want into the clipboard. Then open up the downloads window in Safari and then choose Edit -> Paste or simply Apple - V on your keyboard. The URL will then start downloading and be saved in your Downloads folder.

- Matt
spiffyguy@propass.com



[ Reply to This | # ]