Clever Curl



Anders' personal cURL cheat sheet

Downloading files

Resuming failed download. Need to make sure filename is the same in order for it to automatically determine the offset:

curl -O -C -

Uploading files

Basic (prefer --data-binary to --data/-d because it doesn't mess with newlines etc):

curl --data-binary @filename.bin

-T option will make a PUT request. Advantage over --data-binary is that it doesn't load the entire file into memory on the client.

curl -T filename.bin

Like what I have to say? Consider subscribing to my newsletter. I don't send very many updates.