Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: curl -fRL -o zhwiki.dict.yaml -z zhwiki.dict.yaml https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/0.2. 1/zhwiki-20201120.dict.yaml
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-users <curl-users_at_cool.haxx.se>
Date: Tue, 8 Dec 2020 10:59:36 +0100 (CET)
On Tue, 8 Dec 2020, Hongyi Zhao via curl-users wrote:
> $ curl -fRL -o zhwiki.dict.yaml -z zhwiki.dict.yaml
> https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/0.2.1/zhwiki-20201120.dict.yaml
>
> Even I've inspected for the manual of curl, I'm still confused on the usage
> of the options -R/-z here. Any hints will be highly appreciated.
-R is the short form of --remote-time. It makes sure the saved file gets the
same time as the remote one. As the man page says:
This will make curl attempt to figure out the timestamp of the remote file,
and if that is available make the local file get that same timestamp.
-z is the short form of --time-zond. It introduces a "time condition" in the
request which will ask the HTTP server to only return a contents if the remote
resource is newer than the given timestamp.
And since the -z flag gets a file name, curl will use the time stamp from that
file in the the time condition.
Conclusion: this is setup to make sure you only get a new download if the file
has been updated remotely and make sure the local file gets the same time
stamp as that remote version.
Date: Tue, 8 Dec 2020 10:59:36 +0100 (CET)
On Tue, 8 Dec 2020, Hongyi Zhao via curl-users wrote:
> $ curl -fRL -o zhwiki.dict.yaml -z zhwiki.dict.yaml
> https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/0.2.1/zhwiki-20201120.dict.yaml
>
> Even I've inspected for the manual of curl, I'm still confused on the usage
> of the options -R/-z here. Any hints will be highly appreciated.
-R is the short form of --remote-time. It makes sure the saved file gets the
same time as the remote one. As the man page says:
This will make curl attempt to figure out the timestamp of the remote file,
and if that is available make the local file get that same timestamp.
-z is the short form of --time-zond. It introduces a "time condition" in the
request which will ask the HTTP server to only return a contents if the remote
resource is newer than the given timestamp.
And since the -z flag gets a file name, curl will use the time stamp from that
file in the the time condition.
Conclusion: this is setup to make sure you only get a new download if the file
has been updated remotely and make sure the local file gets the same time
stamp as that remote version.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ----------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2020-12-08