cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: redirecting an http download

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Mon, 1 Feb 2010 09:33:12 -0500

On Mon, Feb 1, 2010 at 7:50 AM, Jose Morales <jemo07_at_gmail.com> wrote:

> Hi,
>
>
> I am new to curl and was looking now for some time on how to redirect a
> download of a curl file like the following example:
>
>
> culr -O "http://mydomain.com/whatever-path/xyz.cgi?idorsomthing=1234565"
>
> I want to save this to foo.out.
>
> so I attemted the simple command to test it:
>
> culr -O "http://mydomain.com/whatever-path/xyz.cgi?idorsomthing=1234565" >
> foo.out
>
> But it does not work as expected, I get two file the foo.out empty and
> "xyz.cgi?idorsomthing=1234565"
>

You need to use the -o option, not -O:

    curl -o foo.out http://my.domain.com/........

Ralph Mitchell

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-01