 |
 |
http download via terminal
|
 |
|
 |
|
Junior Member
Join Date: Jun 2002
Location: Belgium
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
If you're running Mac OS X 10.2 (Jaguar) or later, use curl. Download the file using a command like this:
curl -O "http://www.example.com/example.zip"
That's a capital oh, not a number. Put the URL inside quotes in case it contains characters that will be interpreted by the shell (characters like ? or * will be interpreted by the shell).
If you're running Mac OS X 10.1 (Puma) or earlier, you'll want to use wget instead.
wget "http://www.example.com/example.zip"
If you need to use a proxy, prefix the command with something like:
env http_proxy http://proxy.example.com:8080/
- proton
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Jun 2002
Location: Belgium
Status:
Offline
|
|
Curl is the best!!
Thank you so much.
I wonder why anybody still needs all those fancy download managers, cURL is IT! 
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jul 2001
Location: NC
Status:
Offline
|
|
Originally posted by Sheep:
Curl is the best!!
I'm sure you mean that curl is great. curl and wget are both great and which is better depends on usage. For my purposes, wget is usually better. If you want to download multiple files, wget is usually better. For instance, if you want to download a web page plus all of the images and other files used on the page, then wget is better. If you want to download entire directories then wget is easily preferable because it will even rewrite the links on the page so that the site can be browsed locally. If you're running Jaguar then wget doesn't come with it but Fink will install it.
|
|
Gary
A computer scientist is someone who, when told to "Go to Hell", sees the
"go to", rather than the destination, as harmful.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2000
Location: south
Status:
Offline
|
|
Hi I am trying to download a linux iso but the curl command doesn't seem to work. THis is what is says:
userX% curl -O http://adelie.polymtl.ca/releases/pp...rp-1.4-cd1.iso
curl: Command not found.
what am I doing wrong here? I even put the url in quotes:
userX% curl -O "http://adelie.polymtl.ca/releases/ppc/1.4/livecd/livecd-g3-grp-1.4-cd1.iso"
curl: Command not found.
I am running 10.2.6
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
If you didn't install the BSD Subsystem when you installed Mac OS X (10.2 or later), curl will not be installed. You can install it by installing the BSD.pkg file off your Mac OS X 10.2 install disks. I believe it's in the "Additional Packages" or something similar folder on disk 1, but I don't have them handy to check.
After doing that you should probably apply the 10.2.6 Combo updater to update any files in the BSD subsystem that have been patched since the release, but won't have been on your machine because you didn't have them installed.
- proton
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2000
Location: south
Status:
Offline
|
|
Thanks I don't think I installed that, I will give it a shot.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status:
Offline
|
|
Here's a handy alias for your ~/.*chshrc:
cd /downloads/ && curl -O "`pbpaste`" && cd -
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jul 2001
Location: NC
Status:
Offline
|
|
Originally posted by gatorparrots:
Here's a handy alias for your ~/.*chshrc:
cd /downloads/ && curl -O "`pbpaste`" && cd -
I do like that! Even nicer would be to put it in a "do shell script" AppleScript statement in a script that captured the selection from the frontmost app and which was invoked from a contextual menu. That way you could highlight a link and then download it immediately!
Unfortunately, my current contextual menu managing program doesn't like AppleScripts. Does anyone out there know of one that does?
|
|
Gary
A computer scientist is someone who, when told to "Go to Hell", sees the
"go to", rather than the destination, as harmful.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by Gary Kerbaugh:
I do like that! Even nicer would be to put it in a "do shell script" AppleScript statement in a script that captured the selection from the frontmost app and which was invoked from a contextual menu. That way you could highlight a link and then download it immediately!
Unfortunately, my current contextual menu managing program doesn't like AppleScripts. Does anyone out there know of one that does?
Doesn't your contextual menu have a thing for that already? In Mozilla I can right click on any link and get the option "Save Link Target As..." and a slew of others.
|
|
-DU-...etc...
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Jun 2002
Location: Belgium
Status:
Offline
|
|
Well, my goal was to download a couple of hunderd file all of the following structure 0001.gif thru 0446.gif. I thought curl could just get one file and then you had to retype with 0002 etc. Wanted to make a shell script that loops that, but curl has this nifty option that it can get a alphanumeric series of its own just by putting the first (0001) and last (0446) filename between [].
So you get something like this: www.domain.com/[0001-0446].gif
And thats very cool!
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Gary Kerbaugh:
If you're running Jaguar then wget doesn't come with it but Fink will install it.
i do wish people wouldn't harp on about Fink all the time, when it isn't needed for a lot of things. all you have to do, is look properly:
http://www.apple.com/downloads/macos...urce/wget.html
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jul 2001
Location: NC
Status:
Offline
|
|
Properly???? Wow! I was wondering who decided that! Since, we now know, I have a few bones to pick with you. Could you get that link that link to work "properly" and keep my version always updated to the latest automatically? While you're at it, there are several thousand UNIX ports that don't seem to have proper listings there; could you fix that? Last but not least, there's a president I'd like to talk to you about ...
|
|
Gary
A computer scientist is someone who, when told to "Go to Hell", sees the
"go to", rather than the destination, as harmful.
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jul 2001
Location: NC
Status:
Offline
|
|
Originally posted by utidjian:
Doesn't your contextual menu have a thing for that already? In Mozilla I can right click on any link and get the option "Save Link Target As..." and a slew of others.
In a browser, yes, of course. I misspoke, sorry. I meant to say highlight a URL instead of link. I was thinking of something that worked in any application. BigCat Scripts don't work consistently. I'm now trying "On My Command" which seems to work better but it's rather difficult to customize. I thought someone might have other suggestions.
|
|
Gary
A computer scientist is someone who, when told to "Go to Hell", sees the
"go to", rather than the destination, as harmful.
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Gary Kerbaugh:
Last but not least, there's a president I'd like to talk to you about ...
sorry, that would be a matter for the political lounge, and i don't go in there.
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Mar 2002
Location: NY
Status:
Offline
|
|
Originally posted by Sheep:
Well, my goal was to download a couple of hunderd file all of the following structure 0001.gif thru 0446.gif. I thought curl could just get one file and then you had to retype with 0002 etc. Wanted to make a shell script that loops that, but curl has this nifty option that it can get a alphanumeric series of its own just by putting the first (0001) and last (0446) filename between [].
So you get something like this: www.domain.com/[0001-0446].gif
And thats very cool!
I've read the man page and discovered that feature, but curl doesn't work for me when I do that.
Can I use the [] in the middle of a file. For example for file2000-10-04t[01-10].zip ?
I've tried that and other permutations and all I get is a curl: no match error. I can only specify each file one at a time. What am I missing? This is with 10.2.6 and the man page says curl is 7.7.2
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2001
Location: State of Denial
Status:
Offline
|
|
Originally posted by msh:
I've read the man page and discovered that feature, but curl doesn't work for me when I do that.
Can I use the [] in the middle of a file. For example for file2000-10-04t[01-10].zip ?
I've tried that and other permutations and all I get is a curl: no match error. I can only specify each file one at a time. What am I missing? This is with 10.2.6 and the man page says curl is 7.7.2
Yes; you need to wrap your URL in quotes.
e.g.,
curl -O 'http://somedomain.com/file2000-10-04t[01-10].zip'
|
|
[Wevah setPostCount:[Wevah postCount] + 1];
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
Can you get multible files in one url in wget aswell ? Couldn't get curl to work with user and passwords :-(
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by pisosse:
Can you get multible files in one url in wget aswell ? Couldn't get curl to work with user and passwords :-(
run man wget and check that out
or wget -r http://username:password@www.somesite.com/ will grab everything for you
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
curl supports user authentication. Just get the file something like this:
curl -u username:password "http://www.example.com/file.tgz"
- proton
[Edit: kill smilies]
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
tried that a couple of times but couldn't get it to work.. I should try when sober and fresh maybe??
dunno 
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Try this:
Code:
curl -u orange:orange "http://www.orangeusd.k12.ca.us/training/vtcmovies/flashmxdesign/movies/19/1906.mov
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Well, you have to specify output, or you get the file to standard out (in this case, your terminal).
To put it in a specified file (myfile.mov), do this:
Code:
curl -o myfile.mov -u orange:orange "http://www.orangeusd.k12.ca.us/training/vtcmovies/flashmxdesign/movies/19/1906.mov
If you want to accept the default output name (which is the filename, in this case 1906.mov), do this:
Code:
curl -O -u orange:orange "http://www.orangeusd.k12.ca.us/training/vtcmovies/flashmxdesign/movies/19/1906.mov
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
ALAS SUCCES AT LAST!!!!!!!
thanks everybody (especially you arkham_c!)
This unix thing is marvolus!!
and this forum made me an happy camper

|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Status:
Offline
|
|
Ok I'm still happy but just one quistion...
when I tell curl to download from chapter one tru nineteen
like this
*****/[01-19]/[0101-1906]/***
but theres only 4 files in chapter 01 and 5 files in chapter 01 and so one
so curl gets the 4 files in chapter 1 and then try and download from 0105 and probably all the way to 9999 before it goes to chapter 02.
Is there anyway around downloading chapter by chapter???
thanks again folks
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|