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