curl / Mailing Lists / curl-users / Single Mail

curl-users

RE: Download Only If Newer

From: Gerard Seibert <gerard_seibert_at_outlook.com>
Date: Wed, 12 Sep 2018 15:54:39 +0000

> From: curl-users <curl-users-bounces_at_cool.haxx.se> On Behalf Of Kees
> Nijssen
> Sent: Wednesday, September 12, 2018 11:27 AM
> To: curl-users_at_cool.haxx.se
> Subject: Re: Download Only If Newer
>
> 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://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> >>>
> w.spamhaus.org%2Fdrop%2Fdrop.txt&amp;data=02%7C01%7C%7Cd09983b
> d5a254
> >>>
> dcad4b508d618c53cc2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7
> C636
> >>>
> 723632732886107&amp;sdata=xGHCdWbjZQ9eLLzGZCsPjncrZczUOEmEHcT4Y
> 2Qz2X
> >>> o%3D&amp;reserved=0 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
>
I don't know. I just know that the change I did silences the error message.

-- 
Gerard

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html

  • application/pgp-signature attachment: stored
Received on 2018-09-12