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