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