curl-users
Using options -C and -z
Date: Thu, 03 Mar 2011 14:26:38 +0100
Hi all,
I am trying to use curl to syncronize large files between two machines
with a misbehaving connection. Since the files are large, the -C -
(--continue-at) is very nice feature. The -z (--time-cond) also works as
expected and only tries to download files that have been updated since
the last download. My problem is when I am trying to use these options
at the same time while automating the procedure.
This is the command I am using:
curl -R -z "$localfile" -C - -o "$localfile" "$URL"
I would have hoped that if curl realizes that the remote file is newer
than the local, it would discard the "-C" option and restart the
download from byte 0. Unfortunately for me, curl now tries to resume
from the last position in the local(older) file and corrupts my download.
Have I misunderstood something, or am I trying to use curl in ways it
was not intented?
Cheers,
Gabriel
-------------------------------------------------------------------
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 2011-03-03