Imported Upstream version 7.50.2
[platform/upstream/curl.git] / docs / curl.1
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH curl 1 "30 Nov 2014" "Curl 7.40.0" "Curl Manual"
24 .SH NAME
25 curl \- transfer a URL
26 .SH SYNOPSIS
27 .B curl [options]
28 .I [URL...]
29 .SH DESCRIPTION
30 .B curl
31 is a tool to transfer data from or to a server, using one of the supported
32 protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
33 LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
34 and TFTP). The command is designed to work without user interaction.
35
36 curl offers a busload of useful tricks like proxy support, user
37 authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
38 resume, Metalink, and more. As you will see below, the number of features will
39 make your head spin!
40
41 curl is powered by libcurl for all transfer-related features. See
42 \fIlibcurl(3)\fP for details.
43 .SH URL
44 The URL syntax is protocol-dependent. You'll find a detailed description in
45 RFC 3986.
46
47 You can specify multiple URLs or parts of URLs by writing part sets within
48 braces as in:
49
50   http://site.{one,two,three}.com
51
52 or you can get sequences of alphanumeric series by using [] as in:
53
54   ftp://ftp.example.com/file[1-100].txt
55
56   ftp://ftp.example.com/file[001-100].txt    (with leading zeros)
57
58   ftp://ftp.example.com/file[a-z].txt
59
60 Nested sequences are not supported, but you can use several ones next to each
61 other:
62
63   http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
64
65 You can specify any amount of URLs on the command line. They will be fetched
66 in a sequential manner in the specified order.
67
68 You can specify a step counter for the ranges to get every Nth number or
69 letter:
70
71   http://example.com/file[1-100:10].txt
72
73   http://example.com/file[a-z:2].txt
74
75 When using [] or {} sequences when invoked from a command line prompt, you
76 probably have to put the full URL within double quotes to avoid the shell from
77 interfering with it. This also goes for other characters treated special, like
78 for example '&', '?' and '*'.
79
80 Provide the IPv6 zone index in the URL with an escaped percentage sign and the
81 interface name. Like in
82
83   http://[fe80::3%25eth0]/
84
85 If you specify URL without protocol:// prefix, curl will attempt to guess what
86 protocol you might want. It will then default to HTTP but try other protocols
87 based on often-used host name prefixes. For example, for host names starting
88 with "ftp." curl will assume you want to speak FTP.
89
90 curl will do its best to use what you pass to it as a URL. It is not trying to
91 validate it as a syntactically correct URL by any means but is instead
92 \fBvery\fP liberal with what it accepts.
93
94 curl will attempt to re-use connections for multiple file transfers, so that
95 getting many files from the same server will not do multiple connects /
96 handshakes. This improves speed. Of course this is only done on files
97 specified on a single command line and cannot be used between separate curl
98 invokes.
99 .SH "PROGRESS METER"
100 curl normally displays a progress meter during operations, indicating the
101 amount of transferred data, transfer speeds and estimated time left, etc. The
102 progress meter displays number of bytes and the speeds are in bytes per
103 second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024
104 bytes. 1M is 1048576 bytes.
105
106 curl displays this data to the terminal by default, so if you invoke curl to
107 do an operation and it is about to write data to the terminal, it
108 \fIdisables\fP the progress meter as otherwise it would mess up the output
109 mixing progress meter and response data.
110
111 If you want a progress meter for HTTP POST or PUT requests, you need to
112 redirect the response output to a file, using shell redirect (>), -o [file] or
113 similar.
114
115 It is not the same case for FTP upload as that operation does not spit out
116 any response data to the terminal.
117
118 If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
119 friend.
120 .SH OPTIONS
121 Options start with one or two dashes. Many of the options require an
122 additional value next to them.
123
124 The short "single-dash" form of the options, -d for example, may be used with
125 or without a space between it and its value, although a space is a recommended
126 separator. The long "double-dash" form, --data for example, requires a space
127 between it and its value.
128
129 Short version options that don't need any additional values can be used
130 immediately next to each other, like for example you can specify all the
131 options -O, -L and -v at once as -OLv.
132
133 In general, all boolean options are enabled with --\fBoption\fP and yet again
134 disabled with --\fBno-\fPoption. That is, you use the exact same option name
135 but prefix it with "no-". However, in this list we mostly only list and show
136 the --option version of them. (This concept with --no options was added in
137 7.19.0. Previously most options were toggled on/off on repeated use of the
138 same command line option.)
139 .IP "-#, --progress-bar"
140 Make curl display progress as a simple progress bar instead of the standard,
141 more informational, meter.
142 .IP "-:, --next"
143 Tells curl to use a separate operation for the following URL and associated
144 options. This allows you to send several URL requests, each with their own
145 specific options, for example, such as different user names or custom requests
146 for each. (Added in 7.36.0)
147 .IP "-0, --http1.0"
148 (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally
149 preferred: HTTP 1.1.
150 .IP "--http1.1"
151 (HTTP) Tells curl to use HTTP version 1.1. This is the internal default
152 version. (Added in 7.33.0)
153 .IP "--http2"
154 (HTTP) Tells curl to issue its requests using HTTP 2. This requires that the
155 underlying libcurl was built to support it. (Added in 7.33.0)
156 .IP "--http2-prior-knowledge"
157 (HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without
158 HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2
159 straight away. HTTPS requests will still do HTTP/2 the standard way with
160 negotiated protocol version in the TLS handshake.
161
162 HTTP/2 support in general also requires that the underlying libcurl was built
163 to support it. (Added in 7.49.0)
164 .IP "--no-npn"
165 Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
166 with an SSL library that supports NPN. NPN is used by a libcurl that supports
167 HTTP 2 to negotiate HTTP 2 support with the server during https sessions.
168
169 (Added in 7.36.0)
170 .IP "--no-alpn"
171 Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
172 with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
173 HTTP 2 to negotiate HTTP 2 support with the server during https sessions.
174
175 (Added in 7.36.0)
176 .IP "-1, --tlsv1"
177 (SSL)
178 Forces curl to use TLS version 1.x when negotiating with a remote TLS server.
179 You can use options \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, and \fI--tlsv1.2\fP to
180 control the TLS version more precisely (if the SSL backend in use supports such
181 a level of control).
182 .IP "-2, --sslv2"
183 (SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL
184 server. Sometimes curl is built without SSLv2 support. SSLv2 is widely
185 considered insecure (see RFC 6176).
186 .IP "-3, --sslv3"
187 (SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL
188 server. Sometimes curl is built without SSLv3 support. SSLv3 is widely
189 considered insecure (see RFC 7568).
190 .IP "-4, --ipv4"
191 This option tells curl to resolve names to IPv4 addresses only, and not for
192 example try IPv6.
193 .IP "-6, --ipv6"
194 This option tells curl to resolve names to IPv6 addresses only, and not for
195 example try IPv4.
196 .IP "-a, --append"
197 (FTP/SFTP) When used in an upload, this makes curl append to the target file
198 instead of overwriting it. If the remote file doesn't exist, it will be
199 created.  Note that this flag is ignored by some SFTP servers (including
200 OpenSSH).
201 .IP "-A, --user-agent <agent string>"
202 (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
203 done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
204 the string, surround the string with single quote marks. This can also be set
205 with the \fI-H, --header\fP option of course.
206
207 If this option is used several times, the last one will be used.
208 .IP "--anyauth"
209 (HTTP) Tells curl to figure out authentication method by itself, and use the
210 most secure one the remote site claims to support. This is done by first
211 doing a request and checking the response-headers, thus possibly inducing an
212 extra network round-trip. This is used instead of setting a specific
213 authentication method, which you can do with \fI--basic\fP, \fI--digest\fP,
214 \fI--ntlm\fP, and \fI--negotiate\fP.
215
216 Note that using --anyauth is not recommended if you do uploads from stdin,
217 since it may require data to be sent twice and then the client must be able to
218 rewind. If the need should arise when uploading from stdin, the upload
219 operation will fail.
220 .IP "-b, --cookie <name=data>"
221 (HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data
222 previously received from the server in a "Set-Cookie:" line.  The data should
223 be in the format "NAME1=VALUE1; NAME2=VALUE2".
224
225 If no '=' symbol is used in the line, it is treated as a filename to use to
226 read previously stored cookie lines from, which should be used in this session
227 if they match. Using this method also activates the cookie engine which will
228 make curl record incoming cookies too, which may be handy if you're using this
229 in combination with the \fI-L, --location\fP option. The file format of the
230 file to read cookies from should be plain HTTP headers (Set-Cookie style) or
231 the Netscape/Mozilla cookie file format.
232
233 The file specified with \fI-b, --cookie\fP is only used as input. No cookies
234 will be written to the file. To store cookies, use the \fI-c, --cookie-jar\fP
235 option.
236
237 Exercise caution if you are using this option and multiple transfers may occur.
238 If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie format and
239 don't specify a domain, then the cookie is sent for any domain (even after
240 redirects are followed) and cannot be modified by a server-set cookie. If the
241 cookie engine is enabled and a server sets a cookie of the same name then both
242 will be sent on a future transfer to that server, likely not what you intended.
243 To address these issues set a domain in Set-Cookie (doing that will include
244 sub-domains) or use the Netscape format.
245
246 If this option is used several times, the last one will be used.
247 .IP "-B, --use-ascii"
248 (FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using
249 an URL that ends with ";type=A". This option causes data sent to stdout to be
250 in text mode for win32 systems.
251 .IP "--basic"
252 (HTTP) Tells curl to use HTTP Basic authentication with the remote host. This
253 is the default and this option is usually pointless, unless you use it to
254 override a previously set option that sets a different authentication method
255 (such as \fI--ntlm\fP, \fI--digest\fP, or \fI--negotiate\fP).
256
257 Used together with \fI-u, --user\fP and \fI-x, --proxy\fP.
258
259 See also \fI--proxy-basic\fP.
260 .IP "-c, --cookie-jar <file name>"
261 (HTTP) Specify to which file you want curl to write all cookies after a
262 completed operation. Curl writes all cookies previously read from a specified
263 file as well as all cookies received from remote server(s). If no cookies are
264 known, no data will be written. The file will be written using the Netscape
265 cookie file format. If you set the file name to a single dash, "-", the
266 cookies will be written to stdout.
267
268 This command line option will activate the cookie engine that makes curl
269 record and use cookies. Another way to activate it is to use the \fI-b,
270 --cookie\fP option.
271
272 If the cookie jar can't be created or written to, the whole curl operation
273 won't fail or even report an error clearly. Using -v will get a warning
274 displayed, but that is the only visible feedback you get about this possibly
275 lethal situation.
276
277 Since 7.43.0 cookies that were imported in the Set-Cookie format without a
278 domain name are not exported by this option.
279
280 If this option is used several times, the last specified file name will be
281 used.
282 .IP "-C, --continue-at <offset>"
283 Continue/Resume a previous file transfer at the given offset. The given offset
284 is the exact number of bytes that will be skipped, counting from the beginning
285 of the source file before it is transferred to the destination.  If used with
286 uploads, the FTP server command SIZE will not be used by curl.
287
288 Use "-C -" to tell curl to automatically find out where/how to resume the
289 transfer. It then uses the given output/input files to figure that out.
290
291 If this option is used several times, the last one will be used.
292 .IP "--ciphers <list of ciphers>"
293 (SSL) Specifies which ciphers to use in the connection. The list of ciphers
294 must specify valid ciphers. Read up on SSL cipher list details on this URL:
295 \fIhttps://www.openssl.org/docs/apps/ciphers.html\fP
296
297 NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
298 ciphers is in the NSSCipherSuite entry at this URL:
299 \fIhttps://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
300
301 If this option is used several times, the last one will be used.
302 .IP "--compressed"
303 (HTTP) Request a compressed response using one of the algorithms curl
304 supports, and save the uncompressed document.  If this option is used and the
305 server sends an unsupported encoding, curl will report an error.
306 .IP "--connect-timeout <seconds>"
307 Maximum time in seconds that you allow curl's connection to take.  This only
308 limits the connection phase, so if curl connects within the given period it
309 will continue - if not it will exit.  Since version 7.32.0, this option
310 accepts decimal values.
311
312 See also the \fI-m, --max-time\fP option.
313
314 If this option is used several times, the last one will be used.
315 .IP "--create-dirs"
316 When used in conjunction with the \fI-o\fP option, curl will create the
317 necessary local directory hierarchy as needed. This option creates the dirs
318 mentioned with the \fI-o\fP option, nothing else. If the \fI-o\fP file name
319 uses no dir or if the dirs it mentions already exist, no dir will be created.
320
321 To create remote directories when using FTP or SFTP, try
322 \fI--ftp-create-dirs\fP.
323 .IP "--crlf"
324 Convert LF to CRLF in upload. Useful for MVS (OS/390).
325
326 (SMTP added in 7.40.0)
327 .IP "--crlfile <file>"
328 (HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
329 List that may specify peer certificates that are to be considered revoked.
330
331 If this option is used several times, the last one will be used.
332
333 (Added in 7.19.7)
334 .IP "-d, --data <data>"
335 (HTTP) Sends the specified data in a POST request to the HTTP server, in the
336 same way that a browser does when a user has filled in an HTML form and
337 presses the submit button. This will cause curl to pass the data to the server
338 using the content-type application/x-www-form-urlencoded.  Compare to
339 \fI-F, --form\fP.
340
341 \fI-d, --data\fP is the same as \fI--data-ascii\fP. \fI--data-raw\fP is almost
342 the same but does not have a special interpretation of the @ character. To
343 post data purely binary, you should instead use the \fI--data-binary\fP option.
344 To URL-encode the value of a form field you may use \fI--data-urlencode\fP.
345
346 If any of these options is used more than once on the same command line, the
347 data pieces specified will be merged together with a separating
348 &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
349 chunk that looks like \&'name=daniel&skill=lousy'.
350
351 If you start the data with the letter @, the rest should be a file name to
352 read the data from, or - if you want curl to read the data from
353 stdin. Multiple files can also be specified. Posting data from a file
354 named 'foobar' would thus be done with \fI--data\fP @foobar. When --data is
355 told to read from a file like that, carriage returns and newlines will be
356 stripped out. If you don't want the @ character to have a special
357 interpretation use \fI--data-raw\fP instead.
358 .IP "-D, --dump-header <file>"
359 Write the protocol headers to the specified file.
360
361 This option is handy to use when you want to store the headers that an HTTP
362 site sends to you. Cookies from the headers could then be read in a second
363 curl invocation by using the \fI-b, --cookie\fP option! The
364 \fI-c, --cookie-jar\fP option is a better way to store cookies.
365
366 When used in FTP, the FTP server response lines are considered being "headers"
367 and thus are saved there.
368
369 If this option is used several times, the last one will be used.
370 .IP "--data-ascii <data>"
371 See \fI-d, --data\fP.
372 .IP "--data-binary <data>"
373 (HTTP) This posts data exactly as specified with no extra processing
374 whatsoever.
375
376 If you start the data with the letter @, the rest should be a filename.  Data
377 is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
378 and carriage returns are preserved and conversions are never done.
379
380 If this option is used several times, the ones following the first will append
381 data as described in \fI-d, --data\fP.
382 .IP "--data-raw <data>"
383 (HTTP) This posts data similarly to \fI--data\fP but without the special
384 interpretation of the @ character. See \fI-d, --data\fP.
385 (Added in 7.43.0)
386 .IP "--data-urlencode <data>"
387 (HTTP) This posts data, similar to the other --data options with the exception
388 that this performs URL-encoding. (Added in 7.18.0)
389
390 To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
391 by a separator and a content specification. The <data> part can be passed to
392 curl using one of the following syntaxes:
393 .RS
394 .IP "content"
395 This will make curl URL-encode the content and pass that on. Just be careful
396 so that the content doesn't contain any = or @ symbols, as that will then make
397 the syntax match one of the other cases below!
398 .IP "=content"
399 This will make curl URL-encode the content and pass that on. The preceding =
400 symbol is not included in the data.
401 .IP "name=content"
402 This will make curl URL-encode the content part and pass that on. Note that
403 the name part is expected to be URL-encoded already.
404 .IP "@filename"
405 This will make curl load data from the given file (including any newlines),
406 URL-encode that data and pass it on in the POST.
407 .IP "name@filename"
408 This will make curl load data from the given file (including any newlines),
409 URL-encode that data and pass it on in the POST. The name part gets an equal
410 sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
411 name is expected to be URL-encoded already.
412 .RE
413 .IP "--delegation LEVEL"
414 Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
415 comes to user credentials. Used with GSS/kerberos.
416 .RS
417 .IP "none"
418 Don't allow any delegation.
419 .IP "policy"
420 Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
421 service ticket, which is a matter of realm policy.
422 .IP "always"
423 Unconditionally allow the server to delegate.
424 .RE
425 .IP "--digest"
426 (HTTP) Enables HTTP Digest authentication. This is an authentication scheme
427 that prevents the password from being sent over the wire in clear text. Use
428 this in combination with the normal \fI-u, --user\fP option to set user name
429 and password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
430 related options.
431
432 If this option is used several times, only the first one is used.
433 .IP "--disable-eprt"
434 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
435 active FTP transfers. Curl will normally always first attempt to use EPRT,
436 then LPRT before using PORT, but with this option, it will use PORT right
437 away. EPRT and LPRT are extensions to the original FTP protocol, and may not
438 work on all servers, but they enable more functionality in a better way than
439 the traditional PORT command.
440
441 \fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
442 is an alias for \fB--disable-eprt\fP.
443
444 If the server is an IPv6 host, this option will have no effect as EPRT is
445 necessary then.
446
447 Disabling EPRT only changes the active behavior. If you want to switch to
448 passive mode you need to not use \fI-P, --ftp-port\fP or force it with
449 \fI--ftp-pasv\fP.
450 .IP "--disable-epsv"
451 (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
452 transfers. Curl will normally always first attempt to use EPSV before PASV,
453 but with this option, it will not try using EPSV.
454
455 \fB--epsv\fP can be used to explicitly enable EPSV again and \fB--no-epsv\fP
456 is an alias for \fB--disable-epsv\fP.
457
458 If the server is an IPv6 host, this option will have no effect as EPSV is
459 necessary then.
460
461 Disabling EPSV only changes the passive behavior. If you want to switch to
462 active mode you need to use \fI-P, --ftp-port\fP.
463 .IP "--dns-interface <interface>"
464 Tell curl to send outgoing DNS requests through <interface>. This option
465 is a counterpart to \fI--interface\fP (which does not affect DNS). The
466 supplied string must be an interface name (not an address).
467
468 This option requires that libcurl was built with a resolver backend that
469 supports this operation. The c-ares backend is the only such one. (Added in
470 7.33.0)
471 .IP "--dns-ipv4-addr <ip-address>"
472 Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
473 the DNS requests originate from this address. The argument should be a
474 single IPv4 address.
475
476 This option requires that libcurl was built with a resolver backend that
477 supports this operation. The c-ares backend is the only such one.  (Added in
478 7.33.0)
479 .IP "--dns-ipv6-addr <ip-address>"
480 Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
481 the DNS requests originate from this address. The argument should be a
482 single IPv6 address.
483
484 This option requires that libcurl was built with a resolver backend that
485 supports this operation. The c-ares backend is the only such one.  (Added in
486 7.33.0)
487 .IP "--dns-servers <ip-address,ip-address>"
488 Set the list of DNS servers to be used instead of the system default.
489 The list of IP addresses should be separated with commas. Port numbers
490 may also optionally be given as \fI:<port-number>\fP after each IP
491 address.
492
493 This option requires that libcurl was built with a resolver backend that
494 supports this operation. The c-ares backend is the only such one.  (Added in
495 7.33.0)
496 .IP "-e, --referer <URL>"
497 (HTTP) Sends the "Referrer Page" information to the HTTP server. This can also
498 be set with the \fI-H, --header\fP flag of course.  When used with
499 \fI-L, --location\fP you can append ";auto" to the --referer URL to make curl
500 automatically set the previous URL when it follows a Location: header. The
501 \&";auto" string can be used alone, even if you don't set an initial --referer.
502
503 If this option is used several times, the last one will be used.
504 .IP "-E, --cert <certificate[:password]>"
505 (SSL) Tells curl to use the specified client certificate file when getting a
506 file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
507 in PKCS#12 format if using Secure Transport, or PEM format if using any other
508 engine.  If the optional password isn't specified, it will be queried for on
509 the terminal. Note that this option assumes a \&"certificate" file that is the
510 private key and the client certificate concatenated! See \fI--cert\fP and
511 \fI--key\fP to specify them independently.
512
513 If curl is built against the NSS SSL library then this option can tell
514 curl the nickname of the certificate to use within the NSS database defined
515 by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
516 NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
517 loaded. If you want to use a file from the current directory, please precede
518 it with "./" prefix, in order to avoid confusion with a nickname.  If the
519 nickname contains ":", it needs to be preceded by "\\" so that it is not
520 recognized as password delimiter.  If the nickname contains "\\", it needs to
521 be escaped as "\\\\" so that it is not recognized as an escape character.
522
523 (iOS and macOS only) If curl is built against Secure Transport, then the
524 certificate string can either be the name of a certificate/private key in the
525 system or user keychain, or the path to a PKCS#12-encoded certificate and
526 private key. If you want to use a file from the current directory, please
527 precede it with "./" prefix, in order to avoid confusion with a nickname.
528
529 If this option is used several times, the last one will be used.
530 .IP "--engine <name>"
531 Select the OpenSSL crypto engine to use for cipher
532 operations. Use \fI--engine list\fP to print a list of build-time supported
533 engines. Note that not all (or none) of the engines may be available at
534 run-time.
535 .IP "--environment"
536 (RISC OS ONLY) Sets a range of environment variables, using the names the
537 \fI-w\fP option supports, to allow easier extraction of useful information
538 after having run curl.
539 .IP "--egd-file <file>"
540 (SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
541 is used to seed the random engine for SSL connections. See also the
542 \fI--random-file\fP option.
543 .IP "--expect100-timeout <seconds>"
544 (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue
545 response when curl emits an Expects: 100-continue header in its request. By
546 default curl will wait one second. This option accepts decimal values! When
547 curl stops waiting, it will continue as if the response has been received.
548
549 (Added in 7.47.0)
550 .IP "--cert-type <type>"
551 (SSL) Tells curl what certificate type the provided certificate is in. PEM,
552 DER and ENG are recognized types.  If not specified, PEM is assumed.
553
554 If this option is used several times, the last one will be used.
555 .IP "--cacert <CA certificate>"
556 (SSL) Tells curl to use the specified certificate file to verify the peer. The
557 file may contain multiple CA certificates. The certificate(s) must be in PEM
558 format. Normally curl is built to use a default file for this, so this option
559 is typically used to alter that default file.
560
561 curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
562 set, and uses the given path as a path to a CA cert bundle. This option
563 overrides that variable.
564
565 The windows version of curl will automatically look for a CA certs file named
566 \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
567 Current Working Directory, or in any folder along your PATH.
568
569 If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
570 (libnsspem.so) needs to be available for this option to work properly.
571
572 (iOS and macOS only) If curl is built against Secure Transport, then this
573 option is supported for backward compatibility with other SSL engines, but it
574 should not be set. If the option is not set, then curl will use the
575 certificates in the system and user Keychain to verify the peer, which is the
576 preferred method of verifying the peer's certificate chain.
577
578 If this option is used several times, the last one will be used.
579 .IP "--capath <CA certificate directory>"
580 (SSL) Tells curl to use the specified certificate directory to verify the
581 peer. Multiple paths can be provided by separating them with ":" (e.g.
582 \&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
583 built against OpenSSL, the directory must have been processed using the
584 c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
585 OpenSSL-powered curl to make SSL-connections much more efficiently than using
586 \fI--cacert\fP if the \fI--cacert\fP file contains many CA certificates.
587
588 If this option is set, the default capath value will be ignored, and if it is
589 used several times, the last one will be used.
590 .IP "--pinnedpubkey <pinned public key (hashes)>"
591 (SSL) Tells curl to use the specified public key file (or hashes) to verify the
592 peer. This can be a path to a file which contains a single public key in PEM or
593 DER format, or any number of base64 encoded sha256 hashes preceded by
594 \'sha256//\' and separated by \';\'
595
596 When negotiating a TLS or SSL connection, the server sends a certificate
597 indicating its identity. A public key is extracted from this certificate and
598 if it does not exactly match the public key provided to this option, curl will
599 abort the connection before sending or receiving any data.
600
601 PEM/DER support:
602   7.39.0: OpenSSL, GnuTLS and GSKit
603   7.43.0: NSS and wolfSSL/CyaSSL
604   7.47.0: mbedtls
605   7.49.0: PolarSSL
606 sha256 support:
607   7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL.
608   7.47.0: mbedtls
609   7.49.0: PolarSSL
610 Other SSL backends not supported.
611
612 If this option is used several times, the last one will be used.
613 .IP "--cert-status"
614 (SSL) Tells curl to verify the status of the server certificate by using the
615 Certificate Status Request (aka. OCSP stapling) TLS extension.
616
617 If this option is enabled and the server sends an invalid (e.g. expired)
618 response, if the response suggests that the server certificate has been revoked,
619 or no response at all is received, the verification fails.
620
621 This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
622 (Added in 7.41.0)
623 .IP "--false-start"
624
625 (SSL) Tells curl to use false start during the TLS handshake. False start is a
626 mode where a TLS client will start sending application data before verifying
627 the server's Finished message, thus saving a round trip when performing a full
628 handshake.
629
630 This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
631 or later, or OS X 10.9 or later) backends.
632 (Added in 7.42.0)
633 .IP "-f, --fail"
634 (HTTP) Fail silently (no output at all) on server errors. This is mostly done
635 to better enable scripts etc to better deal with failed attempts. In normal
636 cases when an HTTP server fails to deliver a document, it returns an HTML
637 document stating so (which often also describes why and more). This flag will
638 prevent curl from outputting that and return error 22.
639
640 This method is not fail-safe and there are occasions where non-successful
641 response codes will slip through, especially when authentication is involved
642 (response codes 401 and 407).
643 .IP "-F, --form <name=content>"
644 (HTTP) This lets curl emulate a filled-in form in which a user has pressed the
645 submit button. This causes curl to POST data using the Content-Type
646 multipart/form-data according to RFC 2388. This enables uploading of binary
647 files etc. To force the 'content' part to be a file, prefix the file name with
648 an @ sign. To just get the content part from a file, prefix the file name with
649 the symbol <. The difference between @ and < is then that @ makes a file get
650 attached in the post as a file upload, while the < makes a text field and just
651 get the contents for that text field from a file.
652
653 Example: to send an image to a server, where \&'profile' is the name of the
654 form-field to which portrait.jpg will be the input:
655
656 \fBcurl\fP -F profile=@portrait.jpg https://example.com/upload.cgi
657
658 To read content from stdin instead of a file, use - as the filename. This goes
659 for both @ and < constructs. Unfortunately it does not support reading the
660 file from a named pipe or similar, as it needs the full size before the
661 transfer starts.
662
663 You can also tell curl what Content-Type to use by using 'type=', in a manner
664 similar to:
665
666 \fBcurl\fP -F "web=@index.html;type=text/html" example.com
667
668 or
669
670 \fBcurl\fP -F "name=daniel;type=text/foo" example.com
671
672 You can also explicitly change the name field of a file upload part by setting
673 filename=, like this:
674
675 \fBcurl\fP -F "file=@localfile;filename=nameinpost" example.com
676
677 If filename/path contains ',' or ';', it must be quoted by double-quotes like:
678
679 \fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" example.com
680
681 or
682
683 \fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' example.com
684
685 Note that if a filename/path is quoted by double-quotes, any double-quote
686 or backslash within the filename must be escaped by backslash.
687
688 See further examples and details in the MANUAL.
689
690 This option can be used multiple times.
691 .IP "--ftp-account [data]"
692 (FTP) When an FTP server asks for "account data" after user name and password
693 has been provided, this data is sent off using the ACCT command. (Added in
694 7.13.0)
695
696 If this option is used several times, the last one will be used.
697 .IP "--ftp-alternative-to-user <command>"
698 (FTP) If authenticating with the USER and PASS commands fails, send this
699 command.  When connecting to Tumbleweed's Secure Transport server over FTPS
700 using a client certificate, using "SITE AUTH" will tell the server to retrieve
701 the username from the certificate. (Added in 7.15.5)
702 .IP "--ftp-create-dirs"
703 (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
704 currently exist on the server, the standard behavior of curl is to
705 fail. Using this option, curl will instead attempt to create missing
706 directories.
707 .IP "--ftp-method [method]"
708 (FTP) Control what method curl should use to reach a file on an FTP(S)
709 server. The method argument should be one of the following alternatives:
710 .RS
711 .IP multicwd
712 curl does a single CWD operation for each path part in the given URL. For deep
713 hierarchies this means very many commands. This is how RFC 1738 says it should
714 be done. This is the default but the slowest behavior.
715 .IP nocwd
716 curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
717 path to the server for all these commands. This is the fastest behavior.
718 .IP singlecwd
719 curl does one CWD with the full target directory and then operates on the file
720 \&"normally" (like in the multicwd case). This is somewhat more standards
721 compliant than 'nocwd' but without the full penalty of 'multicwd'.
722 .RE
723 .IP
724 (Added in 7.15.1)
725 .IP "--ftp-pasv"
726 (FTP) Use passive mode for the data connection. Passive is the internal default
727 behavior, but using this option can be used to override a previous
728 \fI-P/-ftp-port\fP option. (Added in 7.11.0)
729
730 If this option is used several times, only the first one is used. Undoing an
731 enforced passive really isn't doable but you must then instead enforce the
732 correct \fI-P, --ftp-port\fP again.
733
734 Passive mode means that curl will try the EPSV command first and then PASV,
735 unless \fI--disable-epsv\fP is used.
736 .IP "--ftp-skip-pasv-ip"
737 (FTP) Tell curl to not use the IP address the server suggests in its response
738 to curl's PASV command when curl connects the data connection. Instead curl
739 will re-use the same IP address it already uses for the control
740 connection. (Added in 7.14.2)
741
742 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
743 .IP "--ftp-pret"
744 (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain
745 FTP servers, mainly drftpd, require this non-standard command for
746 directory listings as well as up and downloads in PASV mode.
747 (Added in 7.20.x)
748 .IP "--ftp-ssl-ccc"
749 (FTP) Use CCC (Clear Command Channel)
750 Shuts down the SSL/TLS layer after authenticating. The rest of the
751 control channel communication will be unencrypted. This allows
752 NAT routers to follow the FTP transaction. The default mode is
753 passive. See \fI--ftp-ssl-ccc-mode\fP for other modes.
754 (Added in 7.16.1)
755 .IP "--ftp-ssl-ccc-mode [active/passive]"
756 (FTP) Use CCC (Clear Command Channel)
757 Sets the CCC mode. The passive mode will not initiate the shutdown, but
758 instead wait for the server to do it, and will not reply to the
759 shutdown from the server. The active mode initiates the shutdown and
760 waits for a reply from the server.
761 (Added in 7.16.2)
762 .IP "--ftp-ssl-control"
763 (FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure
764 authentication, but non-encrypted data transfers for efficiency.  Fails the
765 transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0)
766 that can still be used but will be removed in a future version.
767 .IP "--ftp-ssl"
768 (FTP) This deprecated option is now known as \fI--ssl\fP.
769 .IP "--ftp-ssl-reqd"
770 (FTP) This deprecated option is now known as \fI--ssl-reqd\fP.
771 .IP "--form-string <name=string>"
772 (HTTP) Similar to \fI--form\fP except that the value string for the named
773 parameter is used literally. Leading \&'@' and \&'<' characters, and the
774 \&';type=' string in the value have no special meaning. Use this in preference
775 to \fI--form\fP if there's any possibility that the string value may
776 accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
777 .IP "-g, --globoff"
778 This option switches off the "URL globbing parser". When you set this option,
779 you can specify URLs that contain the letters {}[] without having them being
780 interpreted by curl itself. Note that these letters are not normal legal URL
781 contents but they should be encoded according to the URI standard.
782 .IP "-G, --get"
783 When used, this option will make all data specified with \fI-d, --data\fP,
784 \fI--data-binary\fP or \fI--data-urlencode\fP to be used in an HTTP GET
785 request instead of the POST request that otherwise would be used. The data
786 will be appended to the URL with a '?' separator.
787
788 If used in combination with -I, the POST data will instead be appended to the
789 URL with a HEAD request.
790
791 If this option is used several times, only the first one is used. This is
792 because undoing a GET doesn't make sense, but you should then instead enforce
793 the alternative method you prefer.
794 .IP "-H, --header <header>"
795 (HTTP) Extra header to include in the request when sending HTTP to a
796 server. You may specify any number of extra headers. Note that if you should
797 add a custom header that has the same name as one of the internal ones curl
798 would use, your externally set header will be used instead of the internal
799 one. This allows you to make even trickier stuff than curl would normally
800 do. You should not replace internally set headers without knowing perfectly
801 well what you're doing. Remove an internal header by giving a replacement
802 without content on the right side of the colon, as in: -H \&"Host:". If you
803 send the custom header with no-value then its header must be terminated with a
804 semicolon, such as \-H \&"X-Custom-Header;" to send "X-Custom-Header:".
805
806 curl will make sure that each header you add/replace is sent with the proper
807 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
808 content: do not add newlines or carriage returns, they will only mess things up
809 for you.
810
811 See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
812
813 Starting in 7.37.0, you need \fI--proxy-header\fP to send custom headers
814 intended for a proxy.
815
816 Example:
817
818 \&# curl -H "X-First-Name: Joe" http://example.com/
819
820 \fBWARNING\fP: headers set with this option will be set in all requests - even
821 after redirects are followed, like when told with \fB-L, --location\fP. This
822 can lead to the header being sent to other hosts than the original host, so
823 sensitive headers should be used with caution combined with following
824 redirects.
825
826 This option can be used multiple times to add/replace/remove multiple headers.
827 .IP "--hostpubmd5 <md5>"
828 (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
829 be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
830 the connection with the host unless the md5sums match. (Added in 7.17.1)
831 .IP "--ignore-content-length"
832 For HTTP, Ignore the Content-Length header. This is particularly useful for
833 servers running Apache 1.x, which will report incorrect Content-Length for
834 files larger than 2 gigabytes.
835
836 For FTP (since 7.46.0), skip the RETR command to figure out the size before
837 downloading a file.
838 .IP "-i, --include"
839 (HTTP) Include the HTTP-header in the output. The HTTP-header includes things
840 like server-name, date of the document, HTTP-version and more...
841 .IP "-I, --head"
842 (HTTP/FTP/FILE)
843 Fetch the HTTP-header only! HTTP-servers feature the command HEAD
844 which this uses to get nothing but the header of a document. When used
845 on an FTP or FILE file, curl displays the file size and last modification
846 time only.
847 .IP "--interface <name>"
848 Perform an operation using a specified interface. You can enter interface
849 name, IP address or host name. An example could look like:
850
851  curl --interface eth0:1 https://www.example.com/
852
853 If this option is used several times, the last one will be used.
854 .IP "-j, --junk-session-cookies"
855 (HTTP) When curl is told to read cookies from a given file, this option will
856 make it discard all "session cookies". This will basically have the same effect
857 as if a new session is started. Typical browsers always discard session
858 cookies when they're closed down.
859 .IP "-J, --remote-header-name"
860 (HTTP) This option tells the \fI-O, --remote-name\fP option to use the
861 server-specified Content-Disposition filename instead of extracting a filename
862 from the URL.
863
864 If the server specifies a file name and a file with that name already exists
865 in the current working directory it will not be overwritten and an error will
866 occur. If the server doesn't specify a file name then this option has no
867 effect.
868
869 There's no attempt to decode %-sequences (yet) in the provided file name, so
870 this option may provide you with rather unexpected file names.
871
872 \fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A
873 rogue server could send you the name of a DLL or other file that could possibly
874 be loaded automatically by Windows or some third party software.
875 .IP "-k, --insecure"
876 (SSL) This option explicitly allows curl to perform "insecure" SSL connections
877 and transfers. All SSL connections are attempted to be made secure by using
878 the CA certificate bundle installed by default. This makes all connections
879 considered "insecure" fail unless \fI-k, --insecure\fP is used.
880
881 See this online resource for further details:
882 \fBhttps://curl.haxx.se/docs/sslcerts.html\fP
883 .IP "-K, --config <config file>"
884 Specify which config file to read curl arguments from. The config file is a
885 text file in which command line arguments can be written which then will be
886 used as if they were written on the actual command line.
887
888 Options and their parameters must be specified on the same config file line,
889 separated by whitespace, colon, or the equals sign. Long option names can
890 optionally be given in the config file without the initial double dashes and
891 if so, the colon or equals characters can be used as separators. If the option
892 is specified with one or two dashes, there can be no colon or equals character
893 between the option and its parameter.
894
895 If the parameter is to contain whitespace, the parameter must be enclosed
896 within quotes. Within double quotes, the following escape sequences are
897 available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash preceding any other
898 letter is ignored. If the first column of a config line is a '#' character,
899 the rest of the line will be treated as a comment. Only write one option per
900 physical line in the config file.
901
902 Specify the filename to -K, --config as '-' to make curl read the file from
903 stdin.
904
905 Note that to be able to specify a URL in the config file, you need to specify
906 it using the \fI--url\fP option, and not by simply writing the URL on its own
907 line. So, it could look similar to this:
908
909 url = "https://curl.haxx.se/docs/"
910
911 When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
912 config file and uses it if found. The default config file is checked for in
913 the following places in this order:
914
915 1) curl tries to find the "home dir": It first checks for the CURL_HOME and
916 then the HOME environment variables. Failing that, it uses getpwuid() on
917 Unix-like systems (which returns the home dir given the current user in your
918 system). On Windows, it then checks for the APPDATA variable, or as a last
919 resort the '%USERPROFILE%\\Application Data'.
920
921 2) On windows, if there is no _curlrc file in the home dir, it checks for one
922 in the same dir the curl executable is placed. On Unix-like systems, it will
923 simply try to load .curlrc from the determined home dir.
924
925 .nf
926 # --- Example file ---
927 # this is a comment
928 url = "example.com"
929 output = "curlhere.html"
930 user-agent = "superagent/1.0"
931
932 # and fetch another URL too
933 url = "example.com/docs/manpage.html"
934 -O
935 referer = "http://nowhereatall.example.com/"
936 # --- End of example file ---
937 .fi
938
939 This option can be used multiple times to load multiple config files.
940 .IP "--keepalive-time <seconds>"
941 This option sets the time a connection needs to remain idle before sending
942 keepalive probes and the time between individual keepalive probes. It is
943 currently effective on operating systems offering the TCP_KEEPIDLE and
944 TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
945 option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
946
947 If this option is used several times, the last one will be used. If
948 unspecified, the option defaults to 60 seconds.
949 .IP "--key <key>"
950 (SSL/SSH) Private key file name. Allows you to provide your private key in this
951 separate file. For SSH, if not specified, curl tries the following candidates
952 in order: '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
953
954 If this option is used several times, the last one will be used.
955 .IP "--key-type <type>"
956 (SSL) Private key file type. Specify which type your \fI--key\fP provided
957 private key is. DER, PEM, and ENG are supported. If not specified, PEM is
958 assumed.
959
960 If this option is used several times, the last one will be used.
961 .IP "--krb <level>"
962 (FTP) Enable Kerberos authentication and use. The level must be entered and
963 should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
964 a level that is not one of these, 'private' will instead be used.
965
966 This option requires a library built with kerberos4 support. This is not
967 very common. Use \fI-V, --version\fP to see if your curl supports it.
968
969 If this option is used several times, the last one will be used.
970 .IP "--krb4 <level>"
971 (FTP) This is the former name for \fI--krb\fP. Do not use.
972 .IP "-l, --list-only"
973 (FTP)
974 When listing an FTP directory, this switch forces a name-only view. This is
975 especially useful if the user wants to machine-parse the contents of an FTP
976 directory since the normal directory view doesn't use a standard look or
977 format. When used like this, the option causes a NLST command to be sent to
978 the server instead of LIST.
979
980 Note: Some FTP servers list only files in their response to NLST; they do not
981 include sub-directories and symbolic links.
982
983 (POP3)
984 When retrieving a specific email from POP3, this switch forces a LIST command
985 to be performed instead of RETR. This is particularly useful if the user wants
986 to see if a specific message id exists on the server and what size it is.
987
988 Note: When combined with \fI-X, --request <command>\fP, this option can be used
989 to send an UIDL command instead, so the user may use the email's unique
990 identifier rather than it's message id to make the request. (Added in 7.21.5)
991 .IP "-L, --location"
992 (HTTP/HTTPS) If the server reports that the requested page has moved to a
993 different location (indicated with a Location: header and a 3XX response code),
994 this option will make curl redo the request on the new place. If used together
995 with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
996 will be shown. When authentication is used, curl only sends its credentials to
997 the initial host. If a redirect takes curl to a different host, it won't be
998 able to intercept the user+password. See also \fI--location-trusted\fP on how
999 to change this. You can limit the amount of redirects to follow by using the
1000 \fI--max-redirs\fP option.
1001
1002 When curl follows a redirect and the request is not a plain GET (for example
1003 POST or PUT), it will do the following request with a GET if the HTTP response
1004 was 301, 302, or 303. If the response code was any other 3xx code, curl will
1005 re-send the following request using the same unmodified method.
1006
1007 You can tell curl to not change the non-GET request method to GET after a 30x
1008 response by using the dedicated options for that: \fI--post301\fP,
1009 \fI--post302\fP and \fI--post303\fP.
1010 .IP "--libcurl <file>"
1011 Append this option to any ordinary curl command line, and you will get a
1012 libcurl-using C source code written to the file that does the equivalent
1013 of what your command-line operation does!
1014
1015 If this option is used several times, the last given file name will be
1016 used. (Added in 7.16.1)
1017 .IP "--limit-rate <speed>"
1018 Specify the maximum transfer rate you want curl to use - for both downloads
1019 and uploads. This feature is useful if you have a limited pipe and you'd like
1020 your transfer not to use your entire bandwidth. To make it slower than it
1021 otherwise would be.
1022
1023 The given speed is measured in bytes/second, unless a suffix is appended.
1024 Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
1025 megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
1026
1027 If you also use the \fI-Y, --speed-limit\fP option, that option will take
1028 precedence and might cripple the rate-limiting slightly, to help keeping the
1029 speed-limit logic working.
1030
1031 If this option is used several times, the last one will be used.
1032 .IP "--local-port <num>[-num]"
1033 Set a preferred number or range of local port numbers to use for the
1034 connection(s).  Note that port numbers by nature are a scarce resource that
1035 will be busy at times so setting this range to something too narrow might
1036 cause unnecessary connection setup failures. (Added in 7.15.2)
1037 .IP "--location-trusted"
1038 (HTTP/HTTPS) Like \fI-L, --location\fP, but will allow sending the name +
1039 password to all hosts that the site may redirect to. This may or may not
1040 introduce a security breach if the site redirects you to a site to which
1041 you'll send your authentication info (which is plaintext in the case of HTTP
1042 Basic authentication).
1043 .IP "-m, --max-time <seconds>"
1044 Maximum time in seconds that you allow the whole operation to take.  This is
1045 useful for preventing your batch jobs from hanging for hours due to slow
1046 networks or links going down.  Since 7.32.0, this option accepts decimal
1047 values, but the actual timeout will decrease in accuracy as the specified
1048 timeout increases in decimal precision.  See also the \fI--connect-timeout\fP
1049 option.
1050
1051 If this option is used several times, the last one will be used.
1052 .IP "--login-options <options>"
1053 Specify the login options to use during server authentication.
1054
1055 You can use the login options to specify protocol specific options that may
1056 be used during authentication. At present only IMAP, POP3 and SMTP support
1057 login options. For more information about the login options please see
1058 RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in
1059 7.34.0).
1060
1061 If this option is used several times, the last one will be used.
1062 .IP "--mail-auth <address>"
1063 (SMTP) Specify a single address. This will be used to specify the
1064 authentication address (identity) of a submitted message that is being relayed
1065 to another server.
1066
1067 (Added in 7.25.0)
1068 .IP "--mail-from <address>"
1069 (SMTP) Specify a single address that the given mail should get sent from.
1070
1071 (Added in 7.20.0)
1072 .IP "--max-filesize <bytes>"
1073 Specify the maximum size (in bytes) of a file to download. If the file
1074 requested is larger than this value, the transfer will not start and curl will
1075 return with exit code 63.
1076
1077 \fBNOTE:\fP The file size is not always known prior to download, and for such
1078 files this option has no effect even if the file transfer ends up being larger
1079 than this given limit. This concerns both FTP and HTTP transfers.
1080 .IP "--mail-rcpt <address>"
1081 (SMTP) Specify a single address, user name or mailing list name. Repeat this
1082 option several times to send to multiple recipients.
1083
1084 When performing a mail transfer, the recipient should specify a valid email
1085 address to send the mail to. (Added in 7.20.0)
1086
1087 When performing an address verification (VRFY command), the recipient should be
1088 specified as the user name or user name and domain (as per Section 3.5 of
1089 RFC5321). (Added in 7.34.0)
1090
1091 When performing a mailing list expand (EXPN command), the recipient should be
1092 specified using the mailing list name, such as "Friends" or "London-Office".
1093 (Added in 7.34.0)
1094 .IP "--max-redirs <num>"
1095 Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
1096 is used, this option can be used to prevent curl from following redirections
1097 \&"in absurdum". By default, the limit is set to 50 redirections. Set this
1098 option to -1 to make it limitless.
1099
1100 If this option is used several times, the last one will be used.
1101 .IP "--metalink"
1102 This option can tell curl to parse and process a given URI as Metalink file
1103 (both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
1104 listed within for failover if there are errors (such as the file or server not
1105 being available). It will also verify the hash of the file after the download
1106 completes. The Metalink file itself is downloaded and processed in memory and
1107 not stored in the local file system.
1108
1109 Example to use a remote Metalink file:
1110
1111 \fBcurl\fP --metalink http://www.example.com/example.metalink
1112
1113 To use a Metalink file in the local file system, use FILE protocol
1114 (file://):
1115
1116 \fBcurl\fP --metalink file://example.metalink
1117
1118 Please note that if FILE protocol is disabled, there is no way to use
1119 a local Metalink file at the time of this writing. Also note that if
1120 \fI--metalink\fP and \fI--include\fP are used together, \fI--include\fP will be
1121 ignored. This is because including headers in the response will break
1122 Metalink parser and if the headers are included in the file described
1123 in Metalink file, hash check will fail.
1124
1125 (Added in 7.27.0, if built against the libmetalink library.)
1126 .IP "-n, --netrc"
1127 Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
1128 home directory for login name and password. This is typically used for FTP on
1129 Unix. If used with HTTP, curl will enable user authentication. See
1130 \fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
1131 complain if that file doesn't have the right permissions (it should not be
1132 either world- or group-readable). The environment variable "HOME" is used to
1133 find the home directory.
1134
1135 A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
1136 to FTP to the machine host.domain.com with user name \&'myself' and password
1137 \&'secret' should look similar to:
1138
1139 .B "machine host.domain.com login myself password secret"
1140 .IP "-N, --no-buffer"
1141 Disables the buffering of the output stream. In normal work situations, curl
1142 will use a standard buffered output stream that will have the effect that it
1143 will output the data in chunks, not necessarily exactly when the data arrives.
1144 Using this option will disable that buffering.
1145
1146 Note that this is the negated option name documented. You can thus use
1147 \fI--buffer\fP to enforce the buffering.
1148 .IP "--netrc-file"
1149 This option is similar to \fI--netrc\fP, except that you provide the path
1150 (absolute or relative) to the netrc file that Curl should use.
1151 You can only specify one netrc file per invocation. If several
1152 \fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
1153 (Added in 7.21.5)
1154
1155 This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
1156 It will also abide by \fI--netrc-optional\fP if specified.
1157
1158 .IP "--netrc-optional"
1159 Very similar to \fI--netrc\fP, but this option makes the .netrc usage
1160 \fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
1161
1162 .IP "--negotiate"
1163 (HTTP) Enables Negotiate (SPNEGO) authentication.
1164
1165 If you want to enable Negotiate (SPNEGO) for proxy authentication, then use
1166 \fI--proxy-negotiate\fP.
1167
1168 This option requires a library built with GSS-API or SSPI support. Use \fI-V,
1169 --version\fP to see if your curl supports GSS-API/SSPI and SPNEGO.
1170
1171 When using this option, you must also provide a fake \fI-u, --user\fP option to
1172 activate the authentication code properly. Sending a '-u :' is enough as the
1173 user name and password from the \fI-u\fP option aren't actually used.
1174
1175 If this option is used several times, only the first one is used.
1176 .IP "--no-keepalive"
1177 Disables the use of keepalive messages on the TCP connection, as by default
1178 curl enables them.
1179
1180 Note that this is the negated option name documented. You can thus use
1181 \fI--keepalive\fP to enforce keepalive.
1182 .IP "--no-sessionid"
1183 (SSL) Disable curl's use of SSL session-ID caching.  By default all transfers
1184 are done using the cache. Note that while nothing should ever get hurt by
1185 attempting to reuse SSL session-IDs, there seem to be broken SSL
1186 implementations in the wild that may require you to disable this in order for
1187 you to succeed. (Added in 7.16.0)
1188
1189 Note that this is the negated option name documented. You can thus use
1190 \fI--sessionid\fP to enforce session-ID caching.
1191 .IP "--noproxy <no-proxy-list>"
1192 Comma-separated list of hosts which do not use a proxy, if one is specified.
1193 The only wildcard is a single * character, which matches all hosts, and
1194 effectively disables the proxy. Each name in this list is matched as either
1195 a domain which contains the hostname, or the hostname itself. For example,
1196 local.com would match local.com, local.com:80, and www.local.com, but not
1197 www.notlocal.com.  (Added in 7.19.4).
1198 .IP "--connect-to <host:port:connect-to-host:connect-to-port>"
1199 For a request to the given "host:port" pair, connect to
1200 "connect-to-host:connect-to-port" instead.
1201 This is suitable to direct the request at a specific server, e.g. at a specific
1202 cluster node in a cluster of servers.
1203 This option is only used to establish the network connection. It does NOT
1204 affect the hostname/port that is used for TLS/SSL (e.g. SNI, certificate
1205 verification) or for the application protocols.
1206 "host" and "port" may be the empty string, meaning "any host/port".
1207 "connect-to-host" and "connect-to-port" may also be the empty string,
1208 meaning "use the request's original host/port".
1209 This option can be used many times to add many connect rules.
1210 (Added in 7.49.0).
1211 .IP "--ntlm"
1212 (HTTP) Enables NTLM authentication. The NTLM authentication method was
1213 designed by Microsoft and is used by IIS web servers. It is a proprietary
1214 protocol, reverse-engineered by clever people and implemented in curl based
1215 on their efforts. This kind of behavior should not be endorsed, you should
1216 encourage everyone who uses NTLM to switch to a public and documented
1217 authentication method instead, such as Digest.
1218
1219 If you want to enable NTLM for your proxy authentication, then use
1220 \fI--proxy-ntlm\fP.
1221
1222 This option requires a library built with SSL support. Use
1223 \fI-V, --version\fP to see if your curl supports NTLM.
1224
1225 If this option is used several times, only the first one is used.
1226 .IP "--ntlm-wb"
1227 (HTTP) Enables NTLM much in the style \fI--ntlm\fP does, but hand over the
1228 authentication to the separate binary ntlmauth application that is executed
1229 when needed.
1230 .IP "-o, --output <file>"
1231 Write output to <file> instead of stdout. If you are using {} or [] to fetch
1232 multiple documents, you can use '#' followed by a number in the <file>
1233 specifier. That variable will be replaced with the current string for the URL
1234 being fetched. Like in:
1235
1236   curl http://{one,two}.example.com -o "file_#1.txt"
1237
1238 or use several variables like:
1239
1240   curl http://{site,host}.host[1-5].com -o "#1_#2"
1241
1242 You may use this option as many times as the number of URLs you have.
1243
1244 See also the \fI--create-dirs\fP option to create the local directories
1245 dynamically. Specifying the output as '-' (a single dash) will force the
1246 output to be done to stdout.
1247 .IP "-O, --remote-name"
1248 Write output to a local file named like the remote file we get. (Only the file
1249 part of the remote file is used, the path is cut off.)
1250
1251 The file will be saved in the current working directory. If you want the file
1252 saved in a different directory, make sure you change the current working
1253 directory before invoking curl with this option.
1254
1255 The remote file name to use for saving is extracted from the given URL, nothing
1256 else, and if it already exists it will be overwritten. If you want the server
1257 to be able to choose the file name refer to \fI-J, --remote-header-name\fP
1258 which can be used in addition to this option. If the server chooses a file name
1259 and that name already exists it will not be overwritten.
1260
1261 There is no URL decoding done on the file name. If it has %20 or other URL
1262 encoded parts of the name, they will end up as-is as file name.
1263
1264 You may use this option as many times as the number of URLs you have.
1265 .IP "--oauth2-bearer"
1266 (IMAP, POP3, SMTP)
1267 Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
1268 is used in conjunction with the user name which can be specified as part of the
1269 \fI--url\fP or \fI-u, --user\fP options.
1270
1271 The Bearer Token and user name are formatted according to RFC 6750.
1272
1273 If this option is used several times, the last one will be used.
1274 .IP "--proxy-header <header>"
1275 (HTTP) Extra header to include in the request when sending HTTP to a
1276 proxy. You may specify any number of extra headers. This is the equivalent
1277 option to \fI-H, --header\fP but is for proxy communication only like in
1278 CONNECT requests when you want a separate header sent to the proxy to what is
1279 sent to the actual remote host.
1280
1281 curl will make sure that each header you add/replace is sent with the proper
1282 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
1283 content: do not add newlines or carriage returns, they will only mess things
1284 up for you.
1285
1286 Headers specified with this option will not be included in requests that curl
1287 knows will not be sent to a proxy.
1288
1289 This option can be used multiple times to add/replace/remove multiple headers.
1290
1291 (Added in 7.37.0)
1292 .IP "-p, --proxytunnel"
1293 When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
1294 protocols to attempt to tunnel through the proxy instead of merely using it to
1295 do HTTP-like operations. The tunnel approach is made with the HTTP proxy
1296 CONNECT request and requires that the proxy allows direct connect to the
1297 remote port number curl wants to tunnel through to.
1298 .IP "-P, --ftp-port <address>"
1299 (FTP) Reverses the default initiator/listener roles when connecting with
1300 FTP. This switch makes curl use active mode. In practice, curl then tells the
1301 server to connect back to the client's specified address and port, while
1302 passive mode asks the server to setup an IP address and port for it to connect
1303 to. <address> should be one of:
1304 .RS
1305 .IP interface
1306 i.e "eth0" to specify which interface's IP address you want to use (Unix only)
1307 .IP "IP address"
1308 i.e "192.168.10.1" to specify the exact IP address
1309 .IP "host name"
1310 i.e "my.host.domain" to specify the machine
1311 .IP "-"
1312 make curl pick the same IP address that is already used for the control
1313 connection
1314 .RE
1315 .IP
1316 If this option is used several times, the last one will be used. Disable the
1317 use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
1318 instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
1319
1320 Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
1321 address, to tell curl what TCP port range to use. That means you specify a
1322 port range, from a lower to a higher number. A single number works as well,
1323 but do note that it increases the risk of failure since the port may not be
1324 available.
1325 .IP "--pass <phrase>"
1326 (SSL/SSH) Passphrase for the private key
1327
1328 If this option is used several times, the last one will be used.
1329 .IP "--path-as-is"
1330 Tell curl to not handle sequences of /../ or /./ in the given URL
1331 path. Normally curl will squash or merge them according to standards but with
1332 this option set you tell it not to do that.
1333
1334 (Added in 7.42.0)
1335 .IP "--post301"
1336 (HTTP) Tells curl to respect RFC 7230/6.4.2 and not convert POST requests
1337 into GET requests when following a 301 redirection. The non-RFC behaviour is
1338 ubiquitous in web browsers, so curl does the conversion by default to maintain
1339 consistency. However, a server may require a POST to remain a POST after such
1340 a redirection. This option is meaningful only when using \fI-L, --location\fP
1341 (Added in 7.17.1)
1342 .IP "--post302"
1343 (HTTP) Tells curl to respect RFC 7230/6.4.3 and not convert POST requests
1344 into GET requests when following a 302 redirection. The non-RFC behaviour is
1345 ubiquitous in web browsers, so curl does the conversion by default to maintain
1346 consistency. However, a server may require a POST to remain a POST after such
1347 a redirection. This option is meaningful only when using \fI-L, --location\fP
1348 (Added in 7.19.1)
1349 .IP "--post303"
1350 (HTTP) Tells curl to respect RFC 7230/6.4.4 and not convert POST requests
1351 into GET requests when following a 303 redirection. The non-RFC behaviour is
1352 ubiquitous in web browsers, so curl does the conversion by default to maintain
1353 consistency. However, a server may require a POST to remain a POST after such
1354 a redirection. This option is meaningful only when using \fI-L, --location\fP
1355 (Added in 7.26.0)
1356 .IP "--proto <protocols>"
1357 Tells curl to use the listed protocols for its initial retrieval. Protocols
1358 are evaluated left to right, are comma separated, and are each a protocol
1359 name or 'all', optionally prefixed by zero or more modifiers. Available
1360 modifiers are:
1361 .RS
1362 .TP 3
1363 .B +
1364 Permit this protocol in addition to protocols already permitted (this is
1365 the default if no modifier is used).
1366 .TP
1367 .B -
1368 Deny this protocol, removing it from the list of protocols already permitted.
1369 .TP
1370 .B =
1371 Permit only this protocol (ignoring the list already permitted), though
1372 subject to later modification by subsequent entries in the comma separated
1373 list.
1374 .RE
1375 .IP
1376 For example:
1377 .RS
1378 .TP 15
1379 .B --proto -ftps
1380 uses the default protocols, but disables ftps
1381 .TP
1382 .B  --proto -all,https,+http
1383 only enables http and https
1384 .TP
1385 .B --proto =http,https
1386 also only enables http and https
1387 .RE
1388 .IP
1389 Unknown protocols produce a warning. This allows scripts to safely rely on
1390 being able to disable potentially dangerous protocols, without relying upon
1391 support for that protocol being built into curl to avoid an error.
1392
1393 This option can be used multiple times, in which case the effect is the same
1394 as concatenating the protocols into one instance of the option.
1395
1396 (Added in 7.20.2)
1397 .IP "--proto-default <protocol>"
1398 Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
1399
1400 Example:
1401
1402 .RS
1403 .IP "--proto-default https ftp.mozilla.org"
1404 https://ftp.mozilla.org
1405 .RE
1406
1407 An unknown or unsupported protocol causes error
1408 \fICURLE_UNSUPPORTED_PROTOCOL\fP.
1409
1410 This option does not change the default proxy protocol (http).
1411
1412 Without this option curl would make a guess based on the host, see \fI--url\fP
1413 for details.
1414
1415 (Added in 7.45.0)
1416 .IP "--proto-redir <protocols>"
1417 Tells curl to use the listed protocols on redirect. See --proto for how
1418 protocols are represented.
1419
1420 Example:
1421
1422 .RS
1423 .IP "--proto-redir -all,http,https"
1424 Allow only HTTP and HTTPS on redirect.
1425 .RE
1426
1427 By default curl will allow all protocols on redirect except several disabled
1428 for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0
1429 SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP enables all
1430 protocols on redirect, including those disabled for security.
1431
1432 (Added in 7.20.2)
1433 .IP "--proxy-anyauth"
1434 Tells curl to pick a suitable authentication method when communicating with
1435 the given proxy. This might cause an extra request/response round-trip. (Added
1436 in 7.13.2)
1437 .IP "--proxy-basic"
1438 Tells curl to use HTTP Basic authentication when communicating with the given
1439 proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
1440 the default authentication method curl uses with proxies.
1441 .IP "--proxy-digest"
1442 Tells curl to use HTTP Digest authentication when communicating with the given
1443 proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
1444 .IP "--proxy-negotiate"
1445 Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
1446 with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO)
1447 with a remote host. (Added in 7.17.1)
1448 .IP "--proxy-ntlm"
1449 Tells curl to use HTTP NTLM authentication when communicating with the given
1450 proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
1451 .IP "--proxy-service-name <servicename>"
1452 This option allows you to change the service name for proxy negotiation.
1453
1454 Examples: --proxy-negotiate proxy-name \fI--proxy-service-name\fP sockd would use
1455 sockd/proxy-name.  (Added in 7.43.0).
1456 .IP "--proxy1.0 <proxyhost[:port]>"
1457 Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
1458 assumed at port 1080.
1459
1460 The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
1461 is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
1462 protocol instead of the default HTTP 1.1.
1463 .IP "--pubkey <key>"
1464 (SSH) Public key file name. Allows you to provide your public key in this
1465 separate file.
1466
1467 If this option is used several times, the last one will be used.
1468
1469 (As of 7.39.0, curl attempts to automatically extract the public key from the
1470 private key file, so passing this option is generally not required. Note that
1471 this public key extraction requires libcurl to be linked against a copy of
1472 libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
1473 .IP "-q, --disable"
1474 If used as the first parameter on the command line, the \fIcurlrc\fP config
1475 file will not be read and used. See the \fI-K, --config\fP for details on the
1476 default config file search path.
1477 .IP "-Q, --quote <command>"
1478 (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
1479 commands are sent BEFORE the transfer takes place (just after the initial PWD
1480 command in an FTP transfer, to be exact). To make commands take place after a
1481 successful transfer, prefix them with a dash '-'.  To make commands be sent
1482 after curl has changed the working directory, just before the transfer
1483 command(s), prefix the command with a '+' (this is only supported for
1484 FTP). You may specify any number of commands. If the server returns failure
1485 for one of the commands, the entire operation will be aborted. You must send
1486 syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
1487 of the commands listed below to SFTP servers.  This option can be used
1488 multiple times. When speaking to an FTP server, prefix the command with an
1489 asterisk (*) to make curl continue even if the command fails as by default
1490 curl will stop at first failure.
1491
1492 SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
1493 itself before sending them to the server.  File names may be quoted
1494 shell-style to embed spaces or special characters.  Following is the list of
1495 all supported SFTP quote commands:
1496 .RS
1497 .IP "chgrp group file"
1498 The chgrp command sets the group ID of the file named by the file operand to
1499 the group ID specified by the group operand. The group operand is a decimal
1500 integer group ID.
1501 .IP "chmod mode file"
1502 The chmod command modifies the file mode bits of the specified file. The
1503 mode operand is an octal integer mode number.
1504 .IP "chown user file"
1505 The chown command sets the owner of the file named by the file operand to the
1506 user ID specified by the user operand. The user operand is a decimal
1507 integer user ID.
1508 .IP "ln source_file target_file"
1509 The ln and symlink commands create a symbolic link at the target_file location
1510 pointing to the source_file location.
1511 .IP "mkdir directory_name"
1512 The mkdir command creates the directory named by the directory_name operand.
1513 .IP "pwd"
1514 The pwd command returns the absolute pathname of the current working directory.
1515 .IP "rename source target"
1516 The rename command renames the file or directory named by the source
1517 operand to the destination path named by the target operand.
1518 .IP "rm file"
1519 The rm command removes the file specified by the file operand.
1520 .IP "rmdir directory"
1521 The rmdir command removes the directory entry specified by the directory
1522 operand, provided it is empty.
1523 .IP "symlink source_file target_file"
1524 See ln.
1525 .RE
1526 .IP "-r, --range <range>"
1527 (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
1528 HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
1529 in a number of ways.
1530 .RS
1531 .TP 10
1532 .B 0-499
1533 specifies the first 500 bytes
1534 .TP
1535 .B 500-999
1536 specifies the second 500 bytes
1537 .TP
1538 .B -500
1539 specifies the last 500 bytes
1540 .TP
1541 .B 9500-
1542 specifies the bytes from offset 9500 and forward
1543 .TP
1544 .B 0-0,-1
1545 specifies the first and last byte only(*)(HTTP)
1546 .TP
1547 .B 100-199,500-599
1548 specifies two separate 100-byte ranges(*) (HTTP)
1549 .RE
1550 .IP
1551 (*) = NOTE that this will cause the server to reply with a multipart
1552 response!
1553
1554 Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
1555 \&'start-stop' range syntax. If a non-digit character is given in the range,
1556 the server's response will be unspecified, depending on the server's
1557 configuration.
1558
1559 You should also be aware that many HTTP/1.1 servers do not have this feature
1560 enabled, so that when you attempt to get a range, you'll instead get the whole
1561 document.
1562
1563 FTP and SFTP range downloads only support the simple 'start-stop' syntax
1564 (optionally with one of the numbers omitted). FTP use depends on the extended
1565 FTP command SIZE.
1566
1567 If this option is used several times, the last one will be used.
1568 .IP "-R, --remote-time"
1569 When used, this will make curl attempt to figure out the timestamp of the
1570 remote file, and if that is available make the local file get that same
1571 timestamp.
1572 .IP "--random-file <file>"
1573 (SSL) Specify the path name to file containing what will be considered as
1574 random data. The data is used to seed the random engine for SSL connections.
1575 See also the \fI--egd-file\fP option.
1576 .IP "--raw"
1577 (HTTP) When used, it disables all internal HTTP decoding of content or transfer
1578 encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
1579 .IP "--remote-name-all"
1580 This option changes the default action for all given URLs to be dealt with as
1581 if \fI-O, --remote-name\fP were used for each one. So if you want to disable
1582 that for a specific URL after \fI--remote-name-all\fP has been used, you must
1583 use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
1584 .IP "--resolve <host:port:address>"
1585 Provide a custom address for a specific host and port pair. Using this, you
1586 can make the curl requests(s) use a specified address and prevent the
1587 otherwise normally resolved address to be used. Consider it a sort of
1588 /etc/hosts alternative provided on the command line. The port number should be
1589 the number used for the specific protocol the host will be used for. It means
1590 you need several entries if you want to provide address for the same host but
1591 different ports.
1592
1593 The provided address set by this option will be used even if \fI-4, --ipv4\fP
1594 or \fI-6, --ipv6\fP is set to make curl use another IP version.
1595
1596 This option can be used many times to add many host names to resolve.
1597
1598 (Added in 7.21.3)
1599 .IP "--retry <num>"
1600 If a transient error is returned when curl tries to perform a transfer, it
1601 will retry this number of times before giving up. Setting the number to 0
1602 makes curl do no retries (which is the default). Transient error means either:
1603 a timeout, an FTP 4xx response code or an HTTP 5xx response code.
1604
1605 When curl is about to retry a transfer, it will first wait one second and then
1606 for all forthcoming retries it will double the waiting time until it reaches
1607 10 minutes which then will be the delay between the rest of the retries.  By
1608 using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
1609 also \fI--retry-max-time\fP to limit the total time allowed for
1610 retries. (Added in 7.12.3)
1611
1612 If this option is used several times, the last one will be used.
1613 .IP "--retry-delay <seconds>"
1614 Make curl sleep this amount of time before each retry when a transfer has
1615 failed with a transient error (it changes the default backoff time algorithm
1616 between retries). This option is only interesting if \fI--retry\fP is also
1617 used. Setting this delay to zero will make curl use the default backoff time.
1618 (Added in 7.12.3)
1619
1620 If this option is used several times, the last one will be used.
1621 .IP "--retry-max-time <seconds>"
1622 The retry timer is reset before the first transfer attempt. Retries will be
1623 done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
1624 given limit. Notice that if the timer hasn't reached the limit, the request
1625 will be made and while performing, it may take longer than this given time
1626 period. To limit a single request\'s maximum time, use \fI-m, --max-time\fP.
1627 Set this option to zero to not timeout retries. (Added in 7.12.3)
1628
1629 If this option is used several times, the last one will be used.
1630 .IP "-s, --silent"
1631 Silent or quiet mode. Don't show progress meter or error messages.  Makes Curl
1632 mute. It will still output the data you ask for, potentially even to the
1633 terminal/stdout unless you redirect it.
1634 .IP "--sasl-ir"
1635 Enable initial response in SASL authentication.
1636 (Added in 7.31.0)
1637 .IP "--service-name <servicename>"
1638 This option allows you to change the service name for SPNEGO.
1639
1640 Examples: --negotiate \fI--service-name\fP sockd would use
1641 sockd/server-name.  (Added in 7.43.0).
1642 .IP "-S, --show-error"
1643 When used with \fI-s\fP it makes curl show an error message if it fails.
1644 .IP "--ssl"
1645 (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a
1646 non-secure connection if the server doesn't support SSL/TLS.  See also
1647 \fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
1648 encryption required. (Added in 7.20.0)
1649
1650 This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
1651 option name can still be used but will be removed in a future version.
1652 .IP "--ssl-reqd"
1653 (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the
1654 connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
1655
1656 This option was formerly known as \fI--ftp-ssl-reqd\fP.
1657 .IP "--ssl-allow-beast"
1658 (SSL) This option tells curl to not work around a security flaw in the SSL3
1659 and TLS1.0 protocols known as BEAST.  If this option isn't used, the SSL layer
1660 may use workarounds known to cause interoperability problems with some older
1661 SSL implementations. WARNING: this option loosens the SSL security, and by
1662 using this flag you ask for exactly that.  (Added in 7.25.0)
1663 .IP "--ssl-no-revoke"
1664 (WinSSL) This option tells curl to disable certificate revocation checks.
1665 WARNING: this option loosens the SSL security, and by using this flag you ask
1666 for exactly that.  (Added in 7.44.0)
1667 .IP "--socks4 <host[:port]>"
1668 Use the specified SOCKS4 proxy. If the port number is not specified, it is
1669 assumed at port 1080. (Added in 7.15.2)
1670
1671 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1672 mutually exclusive.
1673
1674 Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
1675 with \fI-x, --proxy\fP using a socks4:// protocol prefix.
1676
1677 If this option is used several times, the last one will be used.
1678 .IP "--socks4a <host[:port]>"
1679 Use the specified SOCKS4a proxy. If the port number is not specified, it is
1680 assumed at port 1080. (Added in 7.18.0)
1681
1682 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1683 mutually exclusive.
1684
1685 Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
1686 with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
1687
1688 If this option is used several times, the last one will be used.
1689 .IP "--socks5-hostname <host[:port]>"
1690 Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
1691 the port number is not specified, it is assumed at port 1080. (Added in
1692 7.18.0)
1693
1694 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1695 mutually exclusive.
1696
1697 Since 7.21.7, this option is superfluous since you can specify a socks5
1698 hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
1699
1700 If this option is used several times, the last one will be used. (This option
1701 was previously wrongly documented and used as --socks without the number
1702 appended.)
1703 .IP "--socks5 <host[:port]>"
1704 Use the specified SOCKS5 proxy - but resolve the host name locally. If the
1705 port number is not specified, it is assumed at port 1080.
1706
1707 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1708 mutually exclusive.
1709
1710 Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
1711 with \fI-x, --proxy\fP using a socks5:// protocol prefix.
1712
1713 If this option is used several times, the last one will be used. (This option
1714 was previously wrongly documented and used as --socks without the number
1715 appended.)
1716
1717 This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
1718 .IP "--socks5-gssapi-service <servicename>"
1719 The default service name for a socks server is rcmd/server-fqdn. This option
1720 allows you to change it.
1721
1722 Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
1723 sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
1724 sockd/real-name would use sockd/real-name for cases where the proxy-name does
1725 not match the principal name.  (Added in 7.19.4).
1726 .IP "--socks5-gssapi-nec"
1727 As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
1728 says in section 4.3/4.4 it should be protected, but the NEC reference
1729 implementation does not.  The option \fI--socks5-gssapi-nec\fP allows the
1730 unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
1731 .IP "--stderr <file>"
1732 Redirect all writes to stderr to the specified file instead. If the file name
1733 is a plain '-', it is instead written to stdout.
1734
1735 If this option is used several times, the last one will be used.
1736 .IP "-t, --telnet-option <OPT=val>"
1737 Pass options to the telnet protocol. Supported options are:
1738
1739 TTYPE=<term> Sets the terminal type.
1740
1741 XDISPLOC=<X display> Sets the X display location.
1742
1743 NEW_ENV=<var,val> Sets an environment variable.
1744 .IP "-T, --upload-file <file>"
1745 This transfers the specified local file to the remote URL. If there is no file
1746 part in the specified URL, Curl will append the local file name. NOTE that you
1747 must use a trailing / on the last directory to really prove to Curl that there
1748 is no file name or curl will think that your last directory name is the remote
1749 file name to use. That will most likely cause the upload operation to fail. If
1750 this is used on an HTTP(S) server, the PUT command will be used.
1751
1752 Use the file name "-" (a single dash) to use stdin instead of a given file.
1753 Alternately, the file name "." (a single period) may be specified instead
1754 of "-" to use stdin in non-blocking mode to allow reading server output
1755 while stdin is being uploaded.
1756
1757 You can specify one -T for each URL on the command line. Each -T + URL pair
1758 specifies what to upload and to where. curl also supports "globbing" of the -T
1759 argument, meaning that you can upload multiple files to a single URL by using
1760 the same URL globbing style supported in the URL, like this:
1761
1762 curl -T "{file1,file2}" http://www.example.com
1763
1764 or even
1765
1766 curl -T "img[1-1000].png" ftp://ftp.example.com/upload/
1767 .IP "--tcp-nodelay"
1768 Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
1769 details about this option. (Added in 7.11.2)
1770 .IP "--tcp-fastopen"
1771 Enable use of TCP Fast Open (RFC7413). (Added in 7.49.0)
1772 .IP "--tftp-blksize <value>"
1773 (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
1774 curl will try to use when transferring data to or from a TFTP server. By
1775 default 512 bytes will be used.
1776
1777 If this option is used several times, the last one will be used.
1778
1779 (Added in 7.20.0)
1780 .IP "--tftp-no-options"
1781 (TFTP) Tells curl not to send TFTP options requests.
1782
1783 This option improves interop with some legacy servers that do not acknowledge
1784 or properly implement TFTP options. When this option is used
1785 \fI--tftp-blksize\fP is ignored.
1786
1787 (Added in 7.48.0)
1788 .IP "--tlsauthtype <authtype>"
1789 Set TLS authentication type. Currently, the only supported option is "SRP",
1790 for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
1791 specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
1792 (Added in 7.21.4)
1793 .IP "--tlspassword <password>"
1794 Set password for use with the TLS authentication method specified with
1795 \fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set.  (Added in
1796 7.21.4)
1797 .IP "--tlsuser <user>"
1798 Set username for use with the TLS authentication method specified with
1799 \fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set.  (Added in
1800 7.21.4)
1801 .IP "--tlsv1.0"
1802 (SSL)
1803 Forces curl to use TLS version 1.0 when negotiating with a remote TLS server.
1804 (Added in 7.34.0)
1805 .IP "--tlsv1.1"
1806 (SSL)
1807 Forces curl to use TLS version 1.1 when negotiating with a remote TLS server.
1808 (Added in 7.34.0)
1809 .IP "--tlsv1.2"
1810 (SSL)
1811 Forces curl to use TLS version 1.2 when negotiating with a remote TLS server.
1812 (Added in 7.34.0)
1813 .IP "--tr-encoding"
1814 (HTTP) Request a compressed Transfer-Encoding response using one of the
1815 algorithms curl supports, and uncompress the data while receiving it.
1816
1817 (Added in 7.21.6)
1818 .IP "--trace <file>"
1819 Enables a full trace dump of all incoming and outgoing data, including
1820 descriptive information, to the given output file. Use "-" as filename to have
1821 the output sent to stdout.
1822
1823 This option overrides previous uses of \fI-v, --verbose\fP or
1824 \fI--trace-ascii\fP.
1825
1826 If this option is used several times, the last one will be used.
1827 .IP "--trace-ascii <file>"
1828 Enables a full trace dump of all incoming and outgoing data, including
1829 descriptive information, to the given output file. Use "-" as filename to have
1830 the output sent to stdout.
1831
1832 This is very similar to \fI--trace\fP, but leaves out the hex part and only
1833 shows the ASCII part of the dump. It makes smaller output that might be easier
1834 to read for untrained humans.
1835
1836 This option overrides previous uses of \fI-v, --verbose\fP or \fI--trace\fP.
1837
1838 If this option is used several times, the last one will be used.
1839 .IP "--trace-time"
1840 Prepends a time stamp to each trace or verbose line that curl displays.
1841 (Added in 7.14.0)
1842 .IP "--unix-socket <path>"
1843 (HTTP) Connect through this Unix domain socket, instead of using the
1844 network. (Added in 7.40.0)
1845 .IP "-u, --user <user:password>"
1846 Specify the user name and password to use for server authentication. Overrides
1847 \fI-n, --netrc\fP and \fI--netrc-optional\fP.
1848
1849 If you simply specify the user name, curl will prompt for a password.
1850
1851 The user name and passwords are split up on the first colon, which makes it
1852 impossible to use a colon in the user name with this option. The password can,
1853 still.
1854
1855 When using Kerberos V5 with a Windows based server you should include the
1856 Windows domain name in the user name, in order for the server to successfully
1857 obtain a Kerberos Ticket. If you don't then the initial authentication
1858 handshake may fail.
1859
1860 When using NTLM, the user name can be specified simply as the user name,
1861 without the domain, if there is a single domain and forest in your setup
1862 for example.
1863
1864 To specify the domain name use either Down-Level Logon Name or UPN (User
1865 Principal Name) formats. For example, EXAMPLE\\user and user@example.com
1866 respectively.
1867
1868 If you use a Windows SSPI-enabled curl binary and perform Kerberos V5,
1869 Negotiate, NTLM or Digest authentication then you can tell curl to select
1870 the user name and password from your environment by specifying a single colon
1871 with this option: "-u :".
1872
1873 If this option is used several times, the last one will be used.
1874 .IP "-U, --proxy-user <user:password>"
1875 Specify the user name and password to use for proxy authentication.
1876
1877 If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM
1878 authentication then you can tell curl to select the user name and password
1879 from your environment by specifying a single colon with this option: "-U :".
1880
1881 If this option is used several times, the last one will be used.
1882 .IP "--url <URL>"
1883 Specify a URL to fetch. This option is mostly handy when you want to specify
1884 URL(s) in a config file.
1885
1886 If the given URL is missing a scheme name (such as "http://" or "ftp://" etc)
1887 then curl will make a guess based on the host. If the outermost sub-domain name
1888 matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol will be used,
1889 otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by setting a
1890 default protocol, see \fI--proto-default\fP for details.
1891
1892 This option may be used any number of times. To control where this URL is
1893 written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
1894 .IP "-v, --verbose"
1895 Be more verbose/talkative during the operation. Useful for debugging and
1896 seeing what's going on "under the hood". A line starting with '>' means
1897 "header data" sent by curl, '<' means "header data" received by curl that is
1898 hidden in normal cases, and a line starting with '*' means additional info
1899 provided by curl.
1900
1901 Note that if you only want HTTP headers in the output, \fI-i, --include\fP
1902 might be the option you're looking for.
1903
1904 If you think this option still doesn't give you enough details, consider using
1905 \fI--trace\fP or \fI--trace-ascii\fP instead.
1906
1907 This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
1908
1909 Use \fI-s, --silent\fP to make curl quiet.
1910 .IP "-w, --write-out <format>"
1911 Make curl display information on stdout after a completed transfer. The format
1912 is a string that may contain plain text mixed with any number of
1913 variables. The format can be specified as a literal "string", or you can have
1914 curl read the format from a file with "@filename" and to tell curl to read the
1915 format from stdin you write "@-".
1916
1917 The variables present in the output format will be substituted by the value or
1918 text that curl thinks fit, as described below. All variables are specified
1919 as %{variable_name} and to output a normal % you just write them as
1920 %%. You can output a newline by using \\n, a carriage return with \\r and a tab
1921 space with \\t.
1922
1923 .B NOTE:
1924 The %-symbol is a special symbol in the win32-environment, where all
1925 occurrences of % must be doubled when using this option.
1926
1927 The variables available are:
1928 .RS
1929 .TP 15
1930 .B content_type
1931 The Content-Type of the requested document, if there was any.
1932 .TP
1933 .B filename_effective
1934 The ultimate filename that curl writes out to. This is only meaningful if curl
1935 is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
1936 option. It's most useful in combination with the \fI--remote-header-name\fP
1937 option. (Added in 7.26.0)
1938 .TP
1939 .B ftp_entry_path
1940 The initial path curl ended up in when logging on to the remote FTP
1941 server. (Added in 7.15.4)
1942 .TP
1943 .B http_code
1944 The numerical response code that was found in the last retrieved HTTP(S) or
1945 FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
1946 same info.
1947 .TP
1948 .B http_connect
1949 The numerical code that was found in the last response (from a proxy) to a
1950 curl CONNECT request. (Added in 7.12.4)
1951 .TP
1952 .B http_version
1953 The http version that was effectively used. (Added in 7.50.0)
1954 .TP
1955 .B local_ip
1956 The IP address of the local end of the most recently done connection - can be
1957 either IPv4 or IPv6 (Added in 7.29.0)
1958 .TP
1959 .B local_port
1960 The local port number of the most recently done connection (Added in 7.29.0)
1961 .TP
1962 .B num_connects
1963 Number of new connects made in the recent transfer. (Added in 7.12.3)
1964 .TP
1965 .B num_redirects
1966 Number of redirects that were followed in the request. (Added in 7.12.3)
1967 .TP
1968 .B redirect_url
1969 When an HTTP request was made without -L to follow redirects, this variable
1970 will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
1971 .TP
1972 .B remote_ip
1973 The remote IP address of the most recently done connection - can be either
1974 IPv4 or IPv6 (Added in 7.29.0)
1975 .TP
1976 .B remote_port
1977 The remote port number of the most recently done connection (Added in 7.29.0)
1978 .TP
1979 .B size_download
1980 The total amount of bytes that were downloaded.
1981 .TP
1982 .B size_header
1983 The total amount of bytes of the downloaded headers.
1984 .TP
1985 .B size_request
1986 The total amount of bytes that were sent in the HTTP request.
1987 .TP
1988 .B size_upload
1989 The total amount of bytes that were uploaded.
1990 .TP
1991 .B speed_download
1992 The average download speed that curl measured for the complete download. Bytes
1993 per second.
1994 .TP
1995 .B speed_upload
1996 The average upload speed that curl measured for the complete upload. Bytes per
1997 second.
1998 .TP
1999 .B ssl_verify_result
2000 The result of the SSL peer certificate verification that was requested. 0
2001 means the verification was successful. (Added in 7.19.0)
2002 .TP
2003 .B time_appconnect
2004 The time, in seconds, it took from the start until the SSL/SSH/etc
2005 connect/handshake to the remote host was completed. (Added in 7.19.0)
2006 .TP
2007 .B time_connect
2008 The time, in seconds, it took from the start until the TCP connect to the
2009 remote host (or proxy) was completed.
2010 .TP
2011 .B time_namelookup
2012 The time, in seconds, it took from the start until the name resolving was
2013 completed.
2014 .TP
2015 .B time_pretransfer
2016 The time, in seconds, it took from the start until the file transfer was just
2017 about to begin. This includes all pre-transfer commands and negotiations that
2018 are specific to the particular protocol(s) involved.
2019 .TP
2020 .B time_redirect
2021 The time, in seconds, it took for all redirection steps include name lookup,
2022 connect, pretransfer and transfer before the final transaction was
2023 started. time_redirect shows the complete execution time for multiple
2024 redirections. (Added in 7.12.3)
2025 .TP
2026 .B time_starttransfer
2027 The time, in seconds, it took from the start until the first byte was just
2028 about to be transferred. This includes time_pretransfer and also the time the
2029 server needed to calculate the result.
2030 .TP
2031 .B time_total
2032 The total time, in seconds, that the full operation lasted. The time will be
2033 displayed with millisecond resolution.
2034 .TP
2035 .B url_effective
2036 The URL that was fetched last. This is most meaningful if you've told curl
2037 to follow location: headers.
2038 .RE
2039 .IP
2040 If this option is used several times, the last one will be used.
2041 .IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
2042 Use the specified proxy.
2043
2044 The proxy string can be specified with a protocol:// prefix to specify
2045 alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
2046 socks5h:// to request the specific SOCKS version to be used. No protocol
2047 specified, http:// and all others will be treated as HTTP proxies. (The
2048 protocol support was added in curl 7.21.7)
2049
2050 If the port number is not specified in the proxy string, it is assumed to be
2051 1080.
2052
2053 This option overrides existing environment variables that set the proxy to
2054 use. If there's an environment variable setting a proxy, you can set proxy to
2055 \&"" to override it.
2056
2057 All operations that are performed over an HTTP proxy will transparently be
2058 converted to HTTP. It means that certain protocol specific operations might
2059 not be available. This is not the case if you can tunnel through the proxy, as
2060 one with the \fI-p, --proxytunnel\fP option.
2061
2062 User and password that might be provided in the proxy string are URL decoded
2063 by curl. This allows you to pass in special characters such as @ by using %40
2064 or pass in a colon with %3a.
2065
2066 The proxy host can be specified the exact same way as the proxy environment
2067 variables, including the protocol prefix (http://) and the embedded user +
2068 password.
2069
2070 If this option is used several times, the last one will be used.
2071 .IP "-X, --request <command>"
2072 (HTTP) Specifies a custom request method to use when communicating with the
2073 HTTP server.  The specified request method will be used instead of the method
2074 otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
2075 details and explanations. Common additional HTTP requests include PUT and
2076 DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
2077 more.
2078
2079 Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
2080 requests are rather invoked by using dedicated command line options.
2081
2082 This option only changes the actual word used in the HTTP request, it does not
2083 alter the way curl behaves. So for example if you want to make a proper HEAD
2084 request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
2085 option.
2086
2087 The method string you set with -X will be used for all requests, which if you
2088 for example use \fB-L, --location\fP may cause unintended side-effects when
2089 curl doesn't change request method according to the HTTP 30x response codes -
2090 and similar.
2091
2092 (FTP)
2093 Specifies a custom FTP command to use instead of LIST when doing file lists
2094 with FTP.
2095
2096 (POP3)
2097 Specifies a custom POP3 command to use instead of LIST or RETR. (Added in
2098 7.26.0)
2099
2100 (IMAP)
2101 Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
2102
2103 (SMTP)
2104 Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
2105
2106 If this option is used several times, the last one will be used.
2107 .IP "--xattr"
2108 When saving output to a file, this option tells curl to store certain file
2109 metadata in extended file attributes. Currently, the URL is stored in the
2110 xdg.origin.url attribute and, for HTTP, the content type is stored in
2111 the mime_type attribute. If the file system does not support extended
2112 attributes, a warning is issued.
2113
2114 .IP "-y, --speed-time <time>"
2115 If a download is slower than speed-limit bytes per second during a speed-time
2116 period, the download gets aborted. If speed-time is used, the default
2117 speed-limit will be 1 unless set with \fI-Y\fP.
2118
2119 This option controls transfers and thus will not affect slow connects etc. If
2120 this is a concern for you, try the \fI--connect-timeout\fP option.
2121
2122 If this option is used several times, the last one will be used.
2123 .IP "-Y, --speed-limit <speed>"
2124 If a download is slower than this given speed (in bytes per second) for
2125 speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
2126 if not set.
2127
2128 If this option is used several times, the last one will be used.
2129 .IP "-z, --time-cond <date expression>|<file>"
2130 (HTTP/FTP) Request a file that has been modified later than the given time and
2131 date, or one that has been modified before that time. The <date expression>
2132 can be all sorts of date strings or if it doesn't match any internal ones, it
2133 is taken as a filename and tries to get the modification date (mtime) from
2134 <file> instead. See the \fIcurl_getdate(3)\fP man pages for date expression
2135 details.
2136
2137 Start the date expression with a dash (-) to make it request for a document
2138 that is older than the given date/time, default is a document that is newer
2139 than the specified date/time.
2140
2141 If this option is used several times, the last one will be used.
2142 .IP "-h, --help"
2143 Usage help. This lists all current command line options with a short
2144 description.
2145 .IP "-M, --manual"
2146 Manual. Display the huge help text.
2147 .IP "-V, --version"
2148 Displays information about curl and the libcurl version it uses.
2149
2150 The first line includes the full version of curl, libcurl and other 3rd party
2151 libraries linked with the executable.
2152
2153 The second line (starts with "Protocols:") shows all protocols that libcurl
2154 reports to support.
2155
2156 The third line (starts with "Features:") shows specific features libcurl
2157 reports to offer. Available features include:
2158 .RS
2159 .IP "IPv6"
2160 You can use IPv6 with this.
2161 .IP "krb4"
2162 Krb4 for FTP is supported.
2163 .IP "SSL"
2164 SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S
2165 and so on.
2166 .IP "libz"
2167 Automatic decompression of compressed files over HTTP is supported.
2168 .IP "NTLM"
2169 NTLM authentication is supported.
2170 .IP "Debug"
2171 This curl uses a libcurl built with Debug. This enables more error-tracking
2172 and memory debugging etc. For curl-developers only!
2173 .IP "AsynchDNS"
2174 This curl uses asynchronous name resolves. Asynchronous name resolves can be
2175 done using either the c-ares or the threaded resolver backends.
2176 .IP "SPNEGO"
2177 SPNEGO authentication is supported.
2178 .IP "Largefile"
2179 This curl supports transfers of large files, files larger than 2GB.
2180 .IP "IDN"
2181 This curl supports IDN - international domain names.
2182 .IP "GSS-API"
2183 GSS-API is supported.
2184 .IP "SSPI"
2185 SSPI is supported.
2186 .IP "TLS-SRP"
2187 SRP (Secure Remote Password) authentication is supported for TLS.
2188 .IP "HTTP2"
2189 HTTP/2 support has been built-in.
2190 .IP "Metalink"
2191 This curl supports Metalink (both version 3 and 4 (RFC 5854)), which
2192 describes mirrors and hashes.  curl will use mirrors for failover if
2193 there are errors (such as the file or server not being available).
2194 .RE
2195 .SH FILES
2196 .I ~/.curlrc
2197 .RS
2198 Default config file, see \fI-K, --config\fP for details.
2199 .SH ENVIRONMENT
2200 The environment variables can be specified in lower case or upper case. The
2201 lower case version has precedence. http_proxy is an exception as it is only
2202 available in lower case.
2203
2204 Using an environment variable to set the proxy has the same effect as using
2205 the \fI--proxy\fP option.
2206
2207 .IP "http_proxy [protocol://]<host>[:port]"
2208 Sets the proxy server to use for HTTP.
2209 .IP "HTTPS_PROXY [protocol://]<host>[:port]"
2210 Sets the proxy server to use for HTTPS.
2211 .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
2212 Sets the proxy server to use for [url-protocol], where the protocol is a
2213 protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
2214 SMTP, LDAP etc.
2215 .IP "ALL_PROXY [protocol://]<host>[:port]"
2216 Sets the proxy server to use if no protocol-specific proxy is set.
2217 .IP "NO_PROXY <comma-separated list of hosts>"
2218 list of host names that shouldn't go through any proxy. If set to a asterisk
2219 \&'*' only, it matches all hosts.
2220 .SH "PROXY PROTOCOL PREFIXES"
2221 Since curl version 7.21.7, the proxy string may be specified with a
2222 protocol:// prefix to specify alternative proxy protocols.
2223
2224 If no protocol is specified in the proxy string or if the string doesn't match
2225 a supported one, the proxy will be treated as an HTTP proxy.
2226
2227 The supported proxy protocol prefixes are as follows:
2228 .IP "socks4://"
2229 Makes it the equivalent of \fI--socks4\fP
2230 .IP "socks4a://"
2231 Makes it the equivalent of \fI--socks4a\fP
2232 .IP "socks5://"
2233 Makes it the equivalent of \fI--socks5\fP
2234 .IP "socks5h://"
2235 Makes it the equivalent of \fI--socks5-hostname\fP
2236 .SH EXIT CODES
2237 There are a bunch of different error codes and their corresponding error
2238 messages that may appear during bad conditions. At the time of this writing,
2239 the exit codes are:
2240 .IP 1
2241 Unsupported protocol. This build of curl has no support for this protocol.
2242 .IP 2
2243 Failed to initialize.
2244 .IP 3
2245 URL malformed. The syntax was not correct.
2246 .IP 4
2247 A feature or option that was needed to perform the desired request was not
2248 enabled or was explicitly disabled at build-time. To make curl able to do
2249 this, you probably need another build of libcurl!
2250 .IP 5
2251 Couldn't resolve proxy. The given proxy host could not be resolved.
2252 .IP 6
2253 Couldn't resolve host. The given remote host was not resolved.
2254 .IP 7
2255 Failed to connect to host.
2256 .IP 8
2257 FTP weird server reply. The server sent data curl couldn't parse.
2258 .IP 9
2259 FTP access denied. The server denied login or denied access to the particular
2260 resource or directory you wanted to reach. Most often you tried to change to a
2261 directory that doesn't exist on the server.
2262 .IP 11
2263 FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
2264 .IP 13
2265 FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
2266 .IP 14
2267 FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
2268 .IP 15
2269 FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
2270 .IP 17
2271 FTP couldn't set binary. Couldn't change transfer method to binary.
2272 .IP 18
2273 Partial file. Only a part of the file was transferred.
2274 .IP 19
2275 FTP couldn't download/access the given file, the RETR (or similar) command
2276 failed.
2277 .IP 21
2278 FTP quote error. A quote command returned error from the server.
2279 .IP 22
2280 HTTP page not retrieved. The requested url was not found or returned another
2281 error with the HTTP error code being 400 or above. This return code only
2282 appears if \fI-f, --fail\fP is used.
2283 .IP 23
2284 Write error. Curl couldn't write data to a local filesystem or similar.
2285 .IP 25
2286 FTP couldn't STOR file. The server denied the STOR operation, used for FTP
2287 uploading.
2288 .IP 26
2289 Read error. Various reading problems.
2290 .IP 27
2291 Out of memory. A memory allocation request failed.
2292 .IP 28
2293 Operation timeout. The specified time-out period was reached according to the
2294 conditions.
2295 .IP 30
2296 FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
2297 command, try doing a transfer using PASV instead!
2298 .IP 31
2299 FTP couldn't use REST. The REST command failed. This command is used for
2300 resumed FTP transfers.
2301 .IP 33
2302 HTTP range error. The range "command" didn't work.
2303 .IP 34
2304 HTTP post error. Internal post-request generation error.
2305 .IP 35
2306 SSL connect error. The SSL handshaking failed.
2307 .IP 36
2308 FTP bad download resume. Couldn't continue an earlier aborted download.
2309 .IP 37
2310 FILE couldn't read file. Failed to open the file. Permissions?
2311 .IP 38
2312 LDAP cannot bind. LDAP bind operation failed.
2313 .IP 39
2314 LDAP search failed.
2315 .IP 41
2316 Function not found. A required LDAP function was not found.
2317 .IP 42
2318 Aborted by callback. An application told curl to abort the operation.
2319 .IP 43
2320 Internal error. A function was called with a bad parameter.
2321 .IP 45
2322 Interface error. A specified outgoing interface could not be used.
2323 .IP 47
2324 Too many redirects. When following redirects, curl hit the maximum amount.
2325 .IP 48
2326 Unknown option specified to libcurl. This indicates that you passed a weird
2327 option to curl that was passed on to libcurl and rejected. Read up in the
2328 manual!
2329 .IP 49
2330 Malformed telnet option.
2331 .IP 51
2332 The peer's SSL certificate or SSH MD5 fingerprint was not OK.
2333 .IP 52
2334 The server didn't reply anything, which here is considered an error.
2335 .IP 53
2336 SSL crypto engine not found.
2337 .IP 54
2338 Cannot set SSL crypto engine as default.
2339 .IP 55
2340 Failed sending network data.
2341 .IP 56
2342 Failure in receiving network data.
2343 .IP 58
2344 Problem with the local certificate.
2345 .IP 59
2346 Couldn't use specified SSL cipher.
2347 .IP 60
2348 Peer certificate cannot be authenticated with known CA certificates.
2349 .IP 61
2350 Unrecognized transfer encoding.
2351 .IP 62
2352 Invalid LDAP URL.
2353 .IP 63
2354 Maximum file size exceeded.
2355 .IP 64
2356 Requested FTP SSL level failed.
2357 .IP 65
2358 Sending the data requires a rewind that failed.
2359 .IP 66
2360 Failed to initialise SSL Engine.
2361 .IP 67
2362 The user name, password, or similar was not accepted and curl failed to log in.
2363 .IP 68
2364 File not found on TFTP server.
2365 .IP 69
2366 Permission problem on TFTP server.
2367 .IP 70
2368 Out of disk space on TFTP server.
2369 .IP 71
2370 Illegal TFTP operation.
2371 .IP 72
2372 Unknown TFTP transfer ID.
2373 .IP 73
2374 File already exists (TFTP).
2375 .IP 74
2376 No such user (TFTP).
2377 .IP 75
2378 Character conversion failed.
2379 .IP 76
2380 Character conversion functions required.
2381 .IP 77
2382 Problem with reading the SSL CA cert (path? access rights?).
2383 .IP 78
2384 The resource referenced in the URL does not exist.
2385 .IP 79
2386 An unspecified error occurred during the SSH session.
2387 .IP 80
2388 Failed to shut down the SSL connection.
2389 .IP 82
2390 Could not load CRL file, missing or wrong format (added in 7.19.0).
2391 .IP 83
2392 Issuer check failed (added in 7.19.0).
2393 .IP 84
2394 The FTP PRET command failed
2395 .IP 85
2396 RTSP: mismatch of CSeq numbers
2397 .IP 86
2398 RTSP: mismatch of Session Identifiers
2399 .IP 87
2400 unable to parse FTP file list
2401 .IP 88
2402 FTP chunk callback reported error
2403 .IP 89
2404 No connection available, the session will be queued
2405 .IP 90
2406 SSL public key does not matched pinned public key
2407 .IP XX
2408 More error codes will appear here in future releases. The existing ones
2409 are meant to never change.
2410 .SH AUTHORS / CONTRIBUTORS
2411 Daniel Stenberg is the main author, but the whole list of contributors is
2412 found in the separate THANKS file.
2413 .SH WWW
2414 https://curl.haxx.se
2415 .SH FTP
2416 ftp://ftp.sunet.se/pub/www/utilities/curl/
2417 .SH "SEE ALSO"
2418 .BR ftp (1),
2419 .BR wget (1)