Download files from web servers via ftp program

Feb 13, '08 07:30:01AM

Contributed by: Anonymous

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.]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080205084952492