curl <URL>
curl http://example.org/file[1-24].txt
curl -C - -o partial_file.zip http://example.com/file.zip
- -o : Name the output file
- -O : Download and name it according to its remote name
- -u [:]
- --key : Use private (PEM) key in SSL/SSH request
- --key-type <(DER|PEM|ENG)>: Specify key format
- -x :: Add a proxy
- --limit-rate B: Limit download rate to bytes/sec
- -I: Only fetch headers
- -i: Include headers in output
- -H : Add header to request, e.g.
curl -H "Foo: bar"
- -L: Follow 3xx (relocate) responses
- -v: Verbose, shows request and response headers
- --cacert : Specify CA-certificate (PEM) file
- --cert-type <(DER|PEM|ENG)>: Specify cacert format
- -k: Insecure SSL connection (ignore certificate validation failure)
curl -w "foo: %{some_var}\nbar: %{some_other_var}\n" <url>
curl -w @<template_file> <url>
Template:
status: conn:%{http_connect} http:%{http_code}\n
ip: %{local_ip}:%{local_port} → %{remote_ip}:%{remote_port} (%{num_connects})\n
redir: %{url_effective} → %{redirect_url} (%{num_redirects})\n
up: %{size_request}/%{size_upload}/%{speed_upload}\n
down: %{size_header}/%{size_download}/%{speed_download}\n
ssl: %{ssl_verify_result}\n
type: %{content_type}\n
outfile: %{filename_effective}\n
xargs -n 1 curl -O < list.txt