cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl semi-newbie | -z problem

From: Brian Dessent <brian_at_dessent.net>
Date: Thu, 22 Dec 2005 20:13:11 -0800

Evan Cooch wrote:

> curl --silent --data-binary --get
> http://remote.hoste.machine/setup.exe -o /local/directory/for/file/setup.exe

Specifying "--data-binary --get" makes no sense at all if you don't
specify any form fields. They probably don't mean what you think they
mean. If you just want to fetch a file and store it, you don't need any
of that: curl -so filename http://url

Now about the date/time stamp thing. You will first have to use -R to
tell curl to save the file with the timestamp as it exists on the
server, otherwise you will have no timestamp to compare against.

Secondly, -z must take an option of either a date string or a filename.
You seem to be aware of this when you said you tried putting it before
the filename. But -o also needs an argument, so you will have to repeat
the filename twice. They can't share.

curl -Rso setup.exe -z setup.exe http://url/setup.exe

Brian
Received on 2005-12-23