-   Linux - General (
-   -   simple curl syntax doubt (

sl33p 07-06-2009 03:53 PM

simple curl syntax doubt
Hello LQ people,

I read about the correct way to download a file with both resuming and redirecting functions, on the Debian website: When I run the following command:


$curl -C - -L[1-5].iso -o "debian-502-amd64-DVD-#1.iso"
The download starts correctly, with the output:

[1/5]: --> debian-502-amd64-DVD-1.iso
So it works!

My doubt is only about the syntax of this command options. I mean, why the second dash following -C ?? Does it mean it should resume automatically if the download fails? I couldn't find anything related on the man page.

Thanks in advance!

acid_kewpie 07-06-2009 04:18 PM

from the curl manpage:

      -C/--continue-at <offset>
              Continue/Resume a previous file transfer at the  given  off‐
              set. The given offset is the exact number of bytes that will
              be skipped counted from the beginning  of  the  source  file
              before  it  is transferred to the destination.  If used with
              uploads, the ftp server command SIZE will  not  be  used  by

              Use  "-C -" to tell curl to automatically find out where/how
              to resume the transfer. It then uses the given  output/input
              files to figure that out.

              If  this  option is used several times, the last one will be

All times are GMT -5. The time now is 09:10 PM.