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