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