curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Download Only If Newer

From: Kees Nijssen <kees.nijssen_at_quicknet.nl>
Date: Wed, 12 Sep 2018 17:26:48 +0200

On 12 Sep 2018, at 11:41, Gerard Seibert <gerard_seibert_at_outlook.com> wrote:

>> From: curl-users <curl-users-bounces_at_cool.haxx.se> On Behalf Of Ray Satiro
>> Sent: Tuesday, September 11, 2018 3:35 PM
>> To: curl-users_at_cool.haxx.se
>> Subject: Re: Download Only If Newer
>>
>>> On 9/11/2018 2:32 PM, Gerard Seibert wrote:
>>> I am using curl 7.61.1 on an amd64 FreeBSD 11.2 machine.
>>>
>>> I am trying to download a file from SpamHaus, but only if it is newer. This is
>> the command line syntax I am using:
>>>
>>> curl --s -L -R -z drop.txt -o drop.tmp
>>> https://www.spamhaus.org/drop/drop.txt
>>> Failed to set filetime 1536603588 on outfile: No such file or
>>> directory
>>>
>>> As you can see, if the file is not newer, it produces an error message. I am
>> trying to find a way to suppress that error message, but without any success.
>> I have tried adding "2>&1" to the end of the command, but it doesn't help.
>>
>> curl's --silent is documented as "Don't show progress meter or error
>> messages." [1] but does not go as far as changing the error stream which is
>> what you are seeing [2]. That could be clarified or fixed. The reason
>> ...
>
> I am using Bash 4.4 here. I found that adding "&> /dev/null" to the command silenced the noise.
>
> --
> Gerard
>

I see that you are using the --s option. Shouldn’t that be either the short form -s or the long form --silent to achieve what is promised in the manual?

With regards,

Kees

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-09-12