DAtum

Entrepreneurship, Software and the business of technology

The perfect cURL commandline (like wget)

curl -C – -OLR <URL>

What this does is:

  1. Resume any broken/failed/paused download (drop the “-C -” otherwise)
  2. Write the output to a file which is named the same as on the server (you can drop the “-O” and instead use “-o <filename>”to redirect to a filename of your choosing)
  3. Sets the remote file time on the local file (drop the “-R” otherwise)

 

Just as a side note, one of the solutions for resuming a paused download in curl is to use

cat file-that-failed-to-download.zip | curl -C – http://www.somewhere.com/file-I-want-to-download.zip >successfully-downloaded.zip

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.