LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-06-2009, 03:53 PM   #1
sl33p
Member
 
Registered: Dec 2008
Location: Tahiti
Distribution: Kali Linux
Posts: 42

Rep: Reputation: 17
Red face 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:

Code:
$curl -C - -L http://cdimage.debian.org/debian-cd/5.0.2/amd64/iso-dvd/debian-502-amd64-DVD-[1-5].iso -o "debian-502-amd64-DVD-#1.iso"
The download starts correctly, with the output:
Code:
[1/5]: http://cdimage.debian.org/debian-cd/5.0.2/amd64/iso-dvd/debian-502-amd64-DVD-1.iso --> 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!
sl33p
 
Old 07-06-2009, 04:18 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
from the curl manpage:
Code:
       -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
              curl.

              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
              used.
 
  


Reply

Tags
curl, syntax


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt in a simple basic C program.... thefountainhead100 Programming 9 03-15-2008 01:01 AM
Syntax for performing bash simple math calculations kinetik Linux - General 3 03-31-2006 08:03 PM
BASH - simple script issue - syntax? tw1ggy5 Programming 11 05-21-2004 09:09 AM
perl - simple array syntax problem lrt2003 Programming 3 05-09-2004 01:35 PM
A Simple MySQL Query Question (I have Bad Syntax) bpk General 1 12-02-2003 09:04 PM


All times are GMT -5. The time now is 08:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration