or you can get sequences of alphanumeric series by using [] as in:
- ftp://ftp.numericals.com/file[1-100].txt
+ ftp://ftp.example.com/file[1-100].txt
- ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
+ ftp://ftp.example.com/file[001-100].txt (with leading zeros)
- ftp://ftp.letters.com/file[a-z].txt
+ ftp://ftp.example.com/file[a-z].txt
Nested sequences are not supported, but you can use several ones next to each
other:
- http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
+ http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order.
You can specify a step counter for the ranges to get every Nth number or
letter:
- http://www.numericals.com/file[1-100:10].txt
+ http://example.com/file[1-100:10].txt
- http://www.letters.com/file[a-z:2].txt
+ http://example.com/file[a-z:2].txt
When using [] or {} sequences when invoked from a command line prompt, you
probably have to put the full URL within double quotes to avoid the shell from
invokes.
.SH "PROGRESS METER"
curl normally displays a progress meter during operations, indicating the
-amount of transferred data, transfer speeds and estimated time left, etc.
+amount of transferred data, transfer speeds and estimated time left, etc. The
+progress meter displays number of bytes and the speeds are in bytes per
+second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024
+bytes. 1M is 1048576 bytes.
curl displays this data to the terminal by default, so if you invoke curl to
do an operation and it is about to write data to the terminal, it
.IP "--http2"
(HTTP) Tells curl to issue its requests using HTTP 2. This requires that the
underlying libcurl was built to support it. (Added in 7.33.0)
+.IP "--http2-prior-knowledge"
+(HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without
+HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2
+straight away. HTTPS requests will still do HTTP/2 the standard way with
+negotiated protocol version in the TLS handshake.
+
+HTTP/2 support in general also requires that the underlying libcurl was built
+to support it. (Added in 7.49.0)
.IP "--no-npn"
Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
with an SSL library that supports NPN. NPN is used by a libcurl that supports
recognized as password delimiter. If the nickname contains "\\", it needs to
be escaped as "\\\\" so that it is not recognized as an escape character.
-(iOS and Mac OS X only) If curl is built against Secure Transport, then the
+(iOS and macOS only) If curl is built against Secure Transport, then the
certificate string can either be the name of a certificate/private key in the
system or user keychain, or the path to a PKCS#12-encoded certificate and
private key. If you want to use a file from the current directory, please
If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
(libnsspem.so) needs to be available for this option to work properly.
+(iOS and macOS only) If curl is built against Secure Transport, then this
+option is supported for backward compatibility with other SSL engines, but it
+should not be set. If the option is not set, then curl will use the
+certificates in the system and user Keychain to verify the peer, which is the
+preferred method of verifying the peer's certificate chain.
+
If this option is used several times, the last one will be used.
.IP "--capath <CA certificate directory>"
(SSL) Tells curl to use the specified certificate directory to verify the
if it does not exactly match the public key provided to this option, curl will
abort the connection before sending or receiving any data.
-Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for NSS and
-wolfSSL/CyaSSL. sha256 support added in 7.44.0 for OpenSSL,
-GnuTLS, NSS and wolfSSL/CyaSSL. Other SSL backends not supported.
+PEM/DER support:
+ 7.39.0: OpenSSL, GnuTLS and GSKit
+ 7.43.0: NSS and wolfSSL/CyaSSL
+ 7.47.0: mbedtls
+ 7.49.0: PolarSSL
+sha256 support:
+ 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL.
+ 7.47.0: mbedtls
+ 7.49.0: PolarSSL
+Other SSL backends not supported.
If this option is used several times, the last one will be used.
.IP "--cert-status"
attached in the post as a file upload, while the < makes a text field and just
get the contents for that text field from a file.
-Example, to send your password file to the server, where
-\&'password' is the name of the form-field to which /etc/passwd will be the
-input:
+Example: to send an image to a server, where \&'profile' is the name of the
+form-field to which portrait.jpg will be the input:
-\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
+\fBcurl\fP -F profile=@portrait.jpg https://example.com/upload.cgi
To read content from stdin instead of a file, use - as the filename. This goes
for both @ and < constructs. Unfortunately it does not support reading the
You can also tell curl what Content-Type to use by using 'type=', in a manner
similar to:
-\fBcurl\fP -F "web=@index.html;type=text/html" url.com
+\fBcurl\fP -F "web=@index.html;type=text/html" example.com
or
-\fBcurl\fP -F "name=daniel;type=text/foo" url.com
+\fBcurl\fP -F "name=daniel;type=text/foo" example.com
You can also explicitly change the name field of a file upload part by setting
filename=, like this:
-\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
+\fBcurl\fP -F "file=@localfile;filename=nameinpost" example.com
If filename/path contains ',' or ';', it must be quoted by double-quotes like:
-\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com
+\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" example.com
or
-\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
+\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' example.com
Note that if a filename/path is quoted by double-quotes, any double-quote
or backslash within the filename must be escaped by backslash.
authentication, but non-encrypted data transfers for efficiency. Fails the
transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
that can still be used but will be removed in a future version.
+.IP "--ftp-ssl"
+(FTP) This deprecated option is now known as \fI--ssl\fP.
+.IP "--ftp-ssl-reqd"
+(FTP) This deprecated option is now known as \fI--ssl-reqd\fP.
.IP "--form-string <name=string>"
(HTTP) Similar to \fI--form\fP except that the value string for the named
parameter is used literally. Leading \&'@' and \&'<' characters, and the
Example:
-\&# curl -H "X-First-Name: Joe" http://192.168.0.1/
+\&# curl -H "X-First-Name: Joe" http://example.com/
\fBWARNING\fP: headers set with this option will be set in all requests - even
after redirects are followed, like when told with \fB-L, --location\fP. This
Perform an operation using a specified interface. You can enter interface
name, IP address or host name. An example could look like:
- curl --interface eth0:1 http://www.netscape.com/
+ curl --interface eth0:1 https://www.example.com/
If this option is used several times, the last one will be used.
.IP "-j, --junk-session-cookies"
.nf
# --- Example file ---
# this is a comment
-url = "curl.haxx.se"
+url = "example.com"
output = "curlhere.html"
user-agent = "superagent/1.0"
# and fetch another URL too
-url = "curl.haxx.se/docs/manpage.html"
+url = "example.com/docs/manpage.html"
-O
-referer = "http://nowhereatall.com/"
+referer = "http://nowhereatall.example.com/"
# --- End of example file ---
.fi
very common. Use \fI-V, --version\fP to see if your curl supports it.
If this option is used several times, the last one will be used.
+.IP "--krb4 <level>"
+(FTP) This is the former name for \fI--krb\fP. Do not use.
.IP "-l, --list-only"
(FTP)
When listing an FTP directory, this switch forces a name-only view. This is
Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
-The given rate is the average speed counted during the entire transfer. It
-means that curl might use higher transfer speeds in short bursts, but over
-time it uses no more than the given rate.
-
If you also use the \fI-Y, --speed-limit\fP option, that option will take
precedence and might cripple the rate-limiting slightly, to help keeping the
speed-limit logic working.
files this option has no effect even if the file transfer ends up being larger
than this given limit. This concerns both FTP and HTTP transfers.
.IP "--mail-rcpt <address>"
-(SMTP) Specify a single address, user name or mailing list name.
+(SMTP) Specify a single address, user name or mailing list name. Repeat this
+option several times to send to multiple recipients.
When performing a mail transfer, the recipient should specify a valid email
address to send the mail to. (Added in 7.20.0)
a domain which contains the hostname, or the hostname itself. For example,
local.com would match local.com, local.com:80, and www.local.com, but not
www.notlocal.com. (Added in 7.19.4).
+.IP "--connect-to <host:port:connect-to-host:connect-to-port>"
+For a request to the given "host:port" pair, connect to
+"connect-to-host:connect-to-port" instead.
+This is suitable to direct the request at a specific server, e.g. at a specific
+cluster node in a cluster of servers.
+This option is only used to establish the network connection. It does NOT
+affect the hostname/port that is used for TLS/SSL (e.g. SNI, certificate
+verification) or for the application protocols.
+"host" and "port" may be the empty string, meaning "any host/port".
+"connect-to-host" and "connect-to-port" may also be the empty string,
+meaning "use the request's original host/port".
+This option can be used many times to add many connect rules.
+(Added in 7.49.0).
.IP "--ntlm"
(HTTP) Enables NTLM authentication. The NTLM authentication method was
designed by Microsoft and is used by IIS web servers. It is a proprietary
\fI-V, --version\fP to see if your curl supports NTLM.
If this option is used several times, only the first one is used.
+.IP "--ntlm-wb"
+(HTTP) Enables NTLM much in the style \fI--ntlm\fP does, but hand over the
+authentication to the separate binary ntlmauth application that is executed
+when needed.
.IP "-o, --output <file>"
Write output to <file> instead of stdout. If you are using {} or [] to fetch
multiple documents, you can use '#' followed by a number in the <file>
specifier. That variable will be replaced with the current string for the URL
being fetched. Like in:
- curl http://{one,two}.site.com -o "file_#1.txt"
+ curl http://{one,two}.example.com -o "file_#1.txt"
or use several variables like:
private key file, so passing this option is generally not required. Note that
this public key extraction requires libcurl to be linked against a copy of
libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
-.IP "-q"
+.IP "-q, --disable"
If used as the first parameter on the command line, the \fIcurlrc\fP config
file will not be read and used. See the \fI-K, --config\fP for details on the
default config file search path.
you need several entries if you want to provide address for the same host but
different ports.
+The provided address set by this option will be used even if \fI-4, --ipv4\fP
+or \fI-6, --ipv6\fP is set to make curl use another IP version.
+
This option can be used many times to add many host names to resolve.
(Added in 7.21.3)
(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
-option name can still be used but will be removed in a future version.
+This option was formerly known as \fI--ftp-ssl-reqd\fP.
.IP "--ssl-allow-beast"
(SSL) This option tells curl to not work around a security flaw in the SSL3
and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer
argument, meaning that you can upload multiple files to a single URL by using
the same URL globbing style supported in the URL, like this:
-curl -T "{file1,file2}" http://www.uploadtothissite.com
+curl -T "{file1,file2}" http://www.example.com
or even
-curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
+curl -T "img[1-1000].png" ftp://ftp.example.com/upload/
.IP "--tcp-nodelay"
Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
details about this option. (Added in 7.11.2)
+.IP "--tcp-fastopen"
+Enable use of TCP Fast Open (RFC7413). (Added in 7.49.0)
.IP "--tftp-blksize <value>"
(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
curl will try to use when transferring data to or from a TFTP server. By
The ultimate filename that curl writes out to. This is only meaningful if curl
is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
option. It's most useful in combination with the \fI--remote-header-name\fP
-option. (Added in 7.25.1)
+option. (Added in 7.26.0)
.TP
.B ftp_entry_path
The initial path curl ended up in when logging on to the remote FTP
The numerical code that was found in the last response (from a proxy) to a
curl CONNECT request. (Added in 7.12.4)
.TP
+.B http_version
+The http version that was effectively used. (Added in 7.50.0)
+.TP
.B local_ip
The IP address of the local end of the most recently done connection - can be
either IPv4 or IPv6 (Added in 7.29.0)