1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" * $Id: curl.1,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
22 .\" **************************************************************************
24 .TH curl 1 "10 July 2008" "Curl 7.19.0" "Curl Manual"
26 curl \- transfer a URL
32 is a tool to transfer data from or to a server, using one of the supported
33 protocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or
34 FILE). The command is designed to work without user interaction.
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
41 curl is powered by libcurl for all transfer-related features. See
45 The URL syntax is protocol dependent. You'll find a detailed description in
48 You can specify multiple URLs or parts of URLs by writing part sets within
51 http://site.{one,two,three}.com
53 or you can get sequences of alphanumeric series by using [] as in:
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
59 No nesting of the sequences is supported at the moment, but you can use
60 several ones next to each other:
62 http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
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.
67 Since curl 7.15.1 you can also specify step counter for the ranges, so that
68 you can get every Nth number or letter:
70 http://www.numericals.com/file[1-100:10].txt
71 http://www.letters.com/file[a-z:2].txt
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.
78 Curl will attempt to re-use connections for multiple file transfers, so that
79 getting many files from the same server will not do multiple connects /
80 handshakes. This improves speed. Of course this is only done on files
81 specified on a single command line and cannot be used between separate curl
84 curl normally displays a progress meter during operations, indicating amount
85 of transferred data, transfer speeds and estimated time left etc.
87 However, since curl displays data to the terminal by default, if you invoke
88 curl to do an operation and it is about to write data to the terminal, it
89 \fIdisables\fP the progress meter as otherwise it would mess up the output
90 mixing progress meter and response data.
92 If you want a progress meter for HTTP POST or PUT requests, you need to
93 redirect the response output to a file, using shell redirect (>), -o [file] or
96 It is not the same case for FTP upload as that operation is not spitting out
97 any response data to the terminal.
99 If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
102 In general, all boolean options are enabled with --option and yet again
103 disabled with --\fBno-\fPoption. That is, you use the exact same option name
104 but prefix it with "no-". However, in this list we mostly only list and show
105 the --option version of them. (This concept with --no options was added in
106 7.19.0. Previously most options were toggled on/off on repeated use of the
107 same command line option.)
109 (FTP/SFTP) When used in an upload, this will tell curl to append to the target
110 file instead of overwriting it. If the file doesn't exist, it will be created.
111 Note that this flag is ignored by some SSH servers (including OpenSSH).
112 .IP "-A/--user-agent <agent string>"
113 (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
114 done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
115 the string, surround the string with single quote marks. This can also be set
116 with the \fI-H/--header\fP option of course.
118 If this option is set more than once, the last one will be the one that's
121 (HTTP) Tells curl to figure out authentication method by itself, and use the
122 most secure one the remote site claims it supports. This is done by first
123 doing a request and checking the response-headers, thus possibly inducing an
124 extra network round-trip. This is used instead of setting a specific
125 authentication method, which you can do with \fI--basic\fP, \fI--digest\fP,
126 \fI--ntlm\fP, and \fI--negotiate\fP.
128 Note that using --anyauth is not recommended if you do uploads from stdin,
129 since it may require data to be sent twice and then the client must be able to
130 rewind. If the need should arise when uploading from stdin, the upload
132 .IP "-b/--cookie <name=data>"
134 Pass the data to the HTTP server as a cookie. It is supposedly the
135 data previously received from the server in a "Set-Cookie:" line.
136 The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
138 If no '=' letter is used in the line, it is treated as a filename to use to
139 read previously stored cookie lines from, which should be used in this session
140 if they match. Using this method also activates the "cookie parser" which will
141 make curl record incoming cookies too, which may be handy if you're using this
142 in combination with the \fI-L/--location\fP option. The file format of the
143 file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
146 \fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as
147 input. No cookies will be stored in the file. To store cookies, use the
148 \fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file
149 using \fI-D/--dump-header\fP!
151 If this option is set more than once, the last one will be the one that's
154 Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
155 enforced by using an URL that ends with ";type=A". This option causes data
156 sent to stdout to be in text mode for win32 systems.
158 (HTTP) Tells curl to use HTTP Basic authentication. This is the default and
159 this option is usually pointless, unless you use it to override a previously
160 set option that sets a different authentication method (such as \fI--ntlm\fP,
161 \fI--digest\fP and \fI--negotiate\fP).
162 .IP "--ciphers <list of ciphers>"
163 (SSL) Specifies which ciphers to use in the connection. The list of ciphers
164 must be using valid ciphers. Read up on SSL cipher list details on this URL:
165 \fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
167 NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of
168 NSS ciphers is in the NSSCipherSuite entry at this URL:
169 \fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
171 If this option is used several times, the last one will override the others.
173 (HTTP) Request a compressed response using one of the algorithms libcurl
174 supports, and return the uncompressed document. If this option is used and
175 the server sends an unsupported encoding, curl will report an error.
176 .IP "--connect-timeout <seconds>"
177 Maximum time in seconds that you allow the connection to the server to take.
178 This only limits the connection phase, once curl has connected this option is
179 of no more use. See also the \fI-m/--max-time\fP option.
181 If this option is used several times, the last one will be used.
182 .IP "-c/--cookie-jar <file name>"
183 Specify to which file you want curl to write all cookies after a completed
184 operation. Curl writes all cookies previously read from a specified file as
185 well as all cookies received from remote server(s). If no cookies are known,
186 no file will be written. The file will be written using the Netscape cookie
187 file format. If you set the file name to a single dash, "-", the cookies will
188 be written to stdout.
191 If the cookie jar can't be created or written to, the whole curl operation
192 won't fail or even report an error clearly. Using -v will get a warning
193 displayed, but that is the only visible feedback you get about this possibly
196 If this option is used several times, the last specified file name will be
198 .IP "-C/--continue-at <offset>"
199 Continue/Resume a previous file transfer at the given offset. The given offset
200 is the exact number of bytes that will be skipped counted from the beginning
201 of the source file before it is transferred to the destination. If used with
202 uploads, the ftp server command SIZE will not be used by curl.
204 Use "-C -" to tell curl to automatically find out where/how to resume the
205 transfer. It then uses the given output/input files to figure that out.
207 If this option is used several times, the last one will be used.
209 When used in conjunction with the -o option, curl will create the necessary
210 local directory hierarchy as needed. This option creates the dirs mentioned
211 with the -o option, nothing else. If the -o file name uses no dir or if the
212 dirs it mentions already exist, no dir will be created.
214 To create remote directories when using FTP or SFTP, try
215 \fI--ftp-create-dirs\fP.
217 (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
218 .IP "-d/--data <data>"
219 (HTTP) Sends the specified data in a POST request to the HTTP server, in the
220 same way that a browser does when a user has filled in an HTML form and
221 presses the submit button. This will cause curl to pass the data to the server
222 using the content-type application/x-www-form-urlencoded. Compare to
225 \fI-d/--data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
226 you should instead use the \fI--data-binary\fP option. To URL encode the value
227 of a form field you may use \fI--data-urlencode\fP.
229 If any of these options is used more than once on the same command line, the
230 data pieces specified will be merged together with a separating
231 &-letter. Thus, using '-d name=daniel -d skill=lousy' would generate a post
232 chunk that looks like \&'name=daniel&skill=lousy'.
234 If you start the data with the letter @, the rest should be a file name to
235 read the data from, or - if you want curl to read the data from stdin. The
236 contents of the file must already be url-encoded. Multiple files can also be
237 specified. Posting data from a file named 'foobar' would thus be done with
238 \fI--data @foobar\fP.
239 .IP "--data-binary <data>"
240 (HTTP) This posts data exactly as specified with no extra processing
243 If you start the data with the letter @, the rest should be a filename. Data
244 is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
245 are preserved and conversions are never done.
247 If this option is used several times, the ones following the first will append
248 data. As described in \fI-d/--data\fP.
249 .IP "--data-urlencode <data>"
250 (HTTP) This posts data, similar to the other --data options with the exception
251 that this performs URL encoding. (Added in 7.18.0)
253 To be CGI compliant, the <data> part should begin with a \fIname\fP followed
254 by a separator and a content specification. The <data> part can be passed to
255 curl using one of the following syntaxes:
258 This will make curl URL encode the content and pass that on. Just be careful
259 so that the content doesn't contain any = or @ letters, as that will then make
260 the syntax match one of the other cases below!
262 This will make curl URL encode the content and pass that on. The preceding =
263 letter is not included in the data.
265 This will make curl URL encode the content part and pass that on. Note that
266 the name part is expected to be URL encoded already.
268 This will make curl load data from the given file (including any newlines),
269 URL encode that data and pass it on in the POST.
271 This will make curl load data from the given file (including any newlines),
272 URL encode that data and pass it on in the POST. The name part gets an equal
273 sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
274 name is expected to be URL encoded already.
277 (HTTP) Enables HTTP Digest authentication. This is a authentication that
278 prevents the password from being sent over the wire in clear text. Use this in
279 combination with the normal \fI-u/--user\fP option to set user name and
280 password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
283 If this option is used several times, the following occurrences make no
286 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
287 active FTP transfers. Curl will normally always first attempt to use EPRT,
288 then LPRT before using PORT, but with this option, it will use PORT right
289 away. EPRT and LPRT are extensions to the original FTP protocol, may not work
290 on all servers but enable more functionality in a better way than the
291 traditional PORT command.
293 Since curl 7.19.0, \fB--eprt\fP can be used to explicitly enable EPRT again
294 and \fB--no-eprt\fP is an alias for \fB--disable-eprt\fP.
296 (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
297 transfers. Curl will normally always first attempt to use EPSV before PASV,
298 but with this option, it will not try using EPSV.
300 Since curl 7.19.0, \fB--epsv\fP can be used to explicitly enable EPRT again
301 and \fB--no-epsv\fP is an alias for \fB--disable-epsv\fP.
302 .IP "-D/--dump-header <file>"
303 Write the protocol headers to the specified file.
305 This option is handy to use when you want to store the headers that a HTTP
306 site sends to you. Cookies from the headers could then be read in a second
307 curl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP
308 option is however a better way to store cookies.
310 When used on FTP, the ftp server response lines are considered being "headers"
311 and thus are saved there.
313 If this option is used several times, the last one will be used.
314 .IP "-e/--referer <URL>"
315 (HTTP) Sends the "Referer Page" information to the HTTP server. This can also
316 be set with the \fI-H/--header\fP flag of course. When used with
317 \fI-L/--location\fP you can append ";auto" to the --referer URL to make curl
318 automatically set the previous URL when it follows a Location: header. The
319 \&";auto" string can be used alone, even if you don't set an initial --referer.
321 If this option is used several times, the last one will be used.
322 .IP "--engine <name>"
323 Select the OpenSSL crypto engine to use for cipher
324 operations. Use \fI--engine list\fP to print a list of build-time supported
325 engines. Note that not all (or none) of the engines may be available at
328 (RISC OS ONLY) Sets a range of environment variables, using the names the -w
329 option supports, to easier allow extraction of useful information after having
331 .IP "--egd-file <file>"
332 (SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
333 is used to seed the random engine for SSL connections. See also the
334 \fI--random-file\fP option.
335 .IP "-E/--cert <certificate[:password]>"
336 (SSL) Tells curl to use the specified certificate file when getting a file
337 with HTTPS or FTPS. The certificate must be in PEM format. If the optional
338 password isn't specified, it will be queried for on the terminal. Note that
339 this option assumes a \&"certificate" file that is the private key and the
340 private certificate concatenated! See \fI--cert\fP and \fI--key\fP to specify
343 If curl is built against the NSS SSL library then this option tells
344 curl the nickname of the certificate to use within the NSS database defined
345 by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
346 NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
349 If this option is used several times, the last one will be used.
350 .IP "--cert-type <type>"
351 (SSL) Tells curl what certificate type the provided certificate is in. PEM,
352 DER and ENG are recognized types. If not specified, PEM is assumed.
354 If this option is used several times, the last one will be used.
355 .IP "--cacert <CA certificate>"
356 (SSL) Tells curl to use the specified certificate file to verify the peer. The
357 file may contain multiple CA certificates. The certificate(s) must be in PEM
358 format. Normally curl is built to use a default file for this, so this option
359 is typically used to alter that default file.
361 curl recognizes the environment variable named 'CURL_CA_BUNDLE' if that is
362 set, and uses the given path as a path to a CA cert bundle. This option
363 overrides that variable.
365 The windows version of curl will automatically look for a CA certs file named
366 \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
367 Current Working Directory, or in any folder along your PATH.
369 If curl is built against the NSS SSL library then this option tells
370 curl the nickname of the CA certificate to use within the NSS database
371 defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb).
372 If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files
375 If this option is used several times, the last one will be used.
376 .IP "--capath <CA certificate directory>"
377 (SSL) Tells curl to use the specified certificate directory to verify the
378 peer. The certificates must be in PEM format, and the directory must have been
379 processed using the c_rehash utility supplied with openssl. Using
380 \fI--capath\fP can allow curl to make SSL-connections much more efficiently
381 than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
384 If this option is used several times, the last one will be used.
386 (HTTP) Fail silently (no output at all) on server errors. This is mostly done
387 like this to better enable scripts etc to better deal with failed attempts. In
388 normal cases when a HTTP server fails to deliver a document, it returns an
389 HTML document stating so (which often also describes why and more). This flag
390 will prevent curl from outputting that and return error 22.
392 This method is not fail-safe and there are occasions where non-successful
393 response codes will slip through, especially when authentication is involved
394 (response codes 401 and 407).
395 .IP "--ftp-account [data]"
396 (FTP) When an FTP server asks for "account data" after user name and password
397 has been provided, this data is sent off using the ACCT command. (Added in
400 If this option is used twice, the second will override the previous use.
401 .IP "--ftp-create-dirs"
402 (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
403 currently exist on the server, the standard behavior of curl is to
404 fail. Using this option, curl will instead attempt to create missing
406 .IP "--ftp-method [method]"
407 (FTP) Control what method curl should use to reach a file on a FTP(S)
408 server. The method argument should be one of the following alternatives:
411 curl does a single CWD operation for each path part in the given URL. For deep
412 hierarchies this means very many commands. This is how RFC1738 says it should
413 be done. This is the default but the slowest behavior.
415 curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
416 path to the server for all these commands. This is the fastest behavior.
418 curl does one CWD with the full target directory and then operates on the file
419 \&"normally" (like in the multicwd case). This is somewhat more standards
420 compliant than 'nocwd' but without the full penalty of 'multicwd'.
423 (FTP) Use PASV when transferring. PASV is the internal default behavior, but
424 using this option can be used to override a previous --ftp-port option. (Added
427 If this option is used several times, the following occurrences make no
428 difference. Undoing an enforced PASV really isn't doable but you must then
429 instead enforce the correct EPRT again.
430 .IP "--ftp-alternative-to-user <command>"
431 (FTP) If authenticating with the USER and PASS commands fails, send this
432 command. When connecting to Tumbleweed's Secure Transport server over FTPS
433 using a client certificate, using "SITE AUTH" will tell the server to retrieve
434 the username from the certificate. (Added in 7.15.5)
435 .IP "--ftp-skip-pasv-ip"
436 (FTP) Tell curl to not use the IP address the server suggests in its response
437 to curl's PASV command when curl connects the data connection. Instead curl
438 will re-use the same IP address it already uses for the control
439 connection. (Added in 7.14.2)
441 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
443 (FTP) Try to use SSL/TLS for the FTP connection. Reverts to a non-secure
444 connection if the server doesn't support SSL/TLS. See also
445 \fI--ftp-ssl-control\fP and \fI--ftp-ssl-reqd\fP for different levels of
446 encryption required. (Added in 7.11.0)
447 .IP "--ftp-ssl-control"
448 (FTP) Require SSL/TLS for the ftp login, clear for transfer. Allows secure
449 authentication, but non-encrypted data transfers for efficiency. Fails the
450 transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
452 (FTP) Require SSL/TLS for the FTP connection.
453 Terminates the connection if the server doesn't support SSL/TLS.
456 (FTP) Use CCC (Clear Command Channel)
457 Shuts down the SSL/TLS layer after authenticating. The rest of the
458 control channel communication will be unencrypted. This allows
459 NAT routers to follow the FTP transaction. The default mode is
460 passive. See --ftp-ssl-ccc-mode for other modes.
462 .IP "--ftp-ssl-ccc-mode [active/passive]"
463 (FTP) Use CCC (Clear Command Channel)
464 Sets the CCC mode. The passive mode will not initiate the shutdown, but
465 instead wait for the server to do it, and will not reply to the
466 shutdown from the server. The active mode initiates the shutdown and
467 waits for a reply from the server.
469 .IP "-F/--form <name=content>"
470 (HTTP) This lets curl emulate a filled in form in which a user has pressed the
471 submit button. This causes curl to POST data using the Content-Type
472 multipart/form-data according to RFC1867. This enables uploading of binary
473 files etc. To force the 'content' part to be a file, prefix the file name
474 with an @ sign. To just get the content part from a file, prefix the file name
475 with the letter <. The difference between @ and < is then that @ makes a file
476 get attached in the post as a file upload, while the < makes a text field and
477 just get the contents for that text field from a file.
479 Example, to send your password file to the server, where
480 \&'password' is the name of the form-field to which /etc/passwd will be the
483 \fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
485 To read the file's content from stdin instead of a file, use - where the file
486 name should've been. This goes for both @ and < constructs.
488 You can also tell curl what Content-Type to use by using 'type=', in a manner
491 \fBcurl\fP -F "web=@index.html;type=text/html" url.com
495 \fBcurl\fP -F "name=daniel;type=text/foo" url.com
497 You can also explicitly change the name field of an file upload part by
498 setting filename=, like this:
500 \fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
502 See further examples and details in the MANUAL.
504 This option can be used multiple times.
505 .IP "--form-string <name=string>"
506 (HTTP) Similar to \fI--form\fP except that the value string for the named
507 parameter is used literally. Leading \&'@' and \&'<' characters, and the
508 \&';type=' string in the value have no special meaning. Use this in preference
509 to \fI--form\fP if there's any possibility that the string value may
510 accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
512 This option switches off the "URL globbing parser". When you set this option,
513 you can specify URLs that contain the letters {}[] without having them being
514 interpreted by curl itself. Note that these letters are not normal legal URL
515 contents but they should be encoded according to the URI standard.
517 When used, this option will make all data specified with \fI-d/--data\fP or
518 \fI--data-binary\fP to be used in a HTTP GET request instead of the POST
519 request that otherwise would be used. The data will be appended to the URL
520 with a '?' separator.
522 If used in combination with -I, the POST data will instead be appended to the
523 URL with a HEAD request.
525 If this option is used several times, the following occurrences make no
526 difference. This is because undoing a GET doesn't make sense, but you should
527 then instead enforce the alternative method you prefer.
530 .IP "-H/--header <header>"
531 (HTTP) Extra header to use when getting a web page. You may specify any number
532 of extra headers. Note that if you should add a custom header that has the
533 same name as one of the internal ones curl would use, your externally set
534 header will be used instead of the internal one. This allows you to make even
535 trickier stuff than curl would normally do. You should not replace internally
536 set headers without knowing perfectly well what you're doing. Remove an
537 internal header by giving a replacement without content on the right side of
538 the colon, as in: -H \&"Host:".
540 curl will make sure that each header you add/replace get sent with the proper
541 end of line marker, you should thus \fBnot\fP add that as a part of the header
542 content: do not add newlines or carriage returns they will only mess things up
545 See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
547 This option can be used multiple times to add/replace/remove multiple headers.
548 .IP "--hostpubmd5 <md5>"
549 Pass a string containing 32 hexadecimal digits. The string should be the 128
550 bit MD5 checksum of the remote host's public key, curl will refuse the
551 connection with the host unless the md5sums match. This option is only for SCP
552 and SFTP transfers. (Added in 7.17.1)
553 .IP "--ignore-content-length"
555 Ignore the Content-Length header. This is particularly useful for servers
556 running Apache 1.x, which will report incorrect Content-Length for files
557 larger than 2 gigabytes.
559 (HTTP) Include the HTTP-header in the output. The HTTP-header includes things
560 like server-name, date of the document, HTTP-version and more...
561 .IP "--interface <name>"
562 Perform an operation using a specified interface. You can enter interface
563 name, IP address or host name. An example could look like:
565 curl --interface eth0:1 http://www.netscape.com/
567 If this option is used several times, the last one will be used.
570 Fetch the HTTP-header only! HTTP-servers feature the command HEAD
571 which this uses to get nothing but the header of a document. When used
572 on a FTP or FILE file, curl displays the file size and last modification
574 .IP "-j/--junk-session-cookies"
575 (HTTP) When curl is told to read cookies from a given file, this option will
576 make it discard all "session cookies". This will basically have the same effect
577 as if a new session is started. Typical browsers always discard session
578 cookies when they're closed down.
580 (SSL) This option explicitly allows curl to perform "insecure" SSL connections
581 and transfers. All SSL connections are attempted to be made secure by using
582 the CA certificate bundle installed by default. This makes all connections
583 considered "insecure" to fail unless \fI-k/--insecure\fP is used.
585 See this online resource for further details:
586 \fBhttp://curl.haxx.se/docs/sslcerts.html\fP
587 .IP "--keepalive-time <seconds>"
588 This option sets the time a connection needs to remain idle before sending
589 keepalive probes and the time between individual keepalive probes. It is
590 currently effective on operating systems offering the TCP_KEEPIDLE and
591 TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
592 option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
594 If this option is used multiple times, the last occurrence sets the amount.
596 (SSL/SSH) Private key file name. Allows you to provide your private key in this
599 If this option is used several times, the last one will be used.
600 .IP "--key-type <type>"
601 (SSL) Private key file type. Specify which type your \fI--key\fP provided
602 private key is. DER, PEM and ENG are supported. If not specified, PEM is
605 If this option is used several times, the last one will be used.
607 (FTP) Enable Kerberos authentication and use. The level must be entered and
608 should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use
609 a level that is not one of these, 'private' will instead be used.
611 This option requires that the library was built with kerberos4 or GSSAPI
612 (GSS-Negotiate) support. This is not very common. Use \fI-V/--version\fP to
613 see if your curl supports it.
615 If this option is used several times, the last one will be used.
616 .IP "-K/--config <config file>"
617 Specify which config file to read curl arguments from. The config file is a
618 text file in which command line arguments can be written which then will be
619 used as if they were written on the actual command line. Options and their
620 parameters must be specified on the same config file line, separated by
621 white space, colon, the equals sign or any combination thereof (however,
622 the preferred separator is the equals sign). If the parameter is to contain
623 white spaces, the parameter must be enclosed within quotes. Within double
624 quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
625 \\r and \\v. A backlash preceding any other letter is ignored. If the
626 first column of a config line is a '#' character, the rest of the line will be
627 treated as a comment. Only write one option per physical line in the config
630 Specify the filename to -K/--config as '-' to make curl read the file from
633 Note that to be able to specify a URL in the config file, you need to specify
634 it using the \fI--url\fP option, and not by simply writing the URL on its own
635 line. So, it could look similar to this:
637 url = "http://curl.haxx.se/docs/"
639 Long option names can optionally be given in the config file without the
640 initial double dashes.
642 When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
643 config file and uses it if found. The default config file is checked for in
644 the following places in this order:
646 1) curl tries to find the "home dir": It first checks for the CURL_HOME and
647 then the HOME environment variables. Failing that, it uses getpwuid() on
648 unix-like systems (which returns the home dir given the current user in your
649 system). On Windows, it then checks for the APPDATA variable, or as a last
650 resort the '%USERPROFILE%\Application Data'.
652 2) On windows, if there is no _curlrc file in the home dir, it checks for one
653 in the same dir the executable curl is placed. On unix-like systems, it will
654 simply try to load .curlrc from the determined home dir.
657 # --- Example file ---
660 output = "curlhere.html"
661 user-agent = "superagent/1.0"
663 # and fetch another URL too
664 url = "curl.haxx.se/docs/manpage.html"
666 referer = "http://nowhereatall.com/"
667 # --- End of example file ---
670 This option can be used multiple times to load multiple config files.
671 .IP "--libcurl <file>"
672 Append this option to any ordinary curl command line, and you will get a
673 libcurl-using source code written to the file that does the equivalent
674 operation of what your command line operation does!
676 NOTE: this does not properly support -F and the sending of multipart
677 formposts, so in those cases the output program will be missing necessary
678 calls to \fIcurl_formadd(3)\fP, and possibly more.
680 If this option is used several times, the last given file name will be
681 used. (Added in 7.16.1)
682 .IP "--limit-rate <speed>"
683 Specify the maximum transfer rate you want curl to use. This feature is useful
684 if you have a limited pipe and you'd like your transfer not use your entire
687 The given speed is measured in bytes/second, unless a suffix is appended.
688 Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
689 megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
691 The given rate is the average speed, counted during the entire transfer. It
692 means that curl might use higher transfer speeds in short bursts, but over
693 time it uses no more than the given rate.
695 If you are also using the \fI-Y/--speed-limit\fP option, that option will take
696 precedence and might cripple the rate-limiting slightly, to help keeping the
697 speed-limit logic working.
699 If this option is used several times, the last one will be used.
702 When listing an FTP directory, this switch forces a name-only view.
703 Especially useful if you want to machine-parse the contents of an FTP
704 directory since the normal directory view doesn't use a standard look
707 This option causes an FTP NLST command to be sent. Some FTP servers
708 list only files in their response to NLST; they do not include
709 subdirectories and symbolic links.
711 .IP "--local-port <num>[-num]"
712 Set a preferred number or range of local port numbers to use for the
713 connection(s). Note that port numbers by nature is a scarce resource that
714 will be busy at times so setting this range to something too narrow might
715 cause unnecessary connection setup failures. (Added in 7.15.2)
717 (HTTP/HTTPS) If the server reports that the requested page has moved to a
718 different location (indicated with a Location: header and a 3XX response code)
719 this option will make curl redo the request on the new place. If used together
720 with \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages
721 will be shown. When authentication is used, curl only sends its credentials to
722 the initial host. If a redirect takes curl to a different host, it won't be
723 able to intercept the user+password. See also \fI--location-trusted\fP on how
724 to change this. You can limit the amount of redirects to follow by using the
725 \fI--max-redirs\fP option.
727 When curl follows a redirect and the request is not a plain GET (for example
728 POST or PUT), it will do the following request with a GET if the HTTP response
729 was 301, 302, or 303. If the response code was any other 3xx code, curl will
730 re-send the following request using the same unmodified method.
731 .IP "--location-trusted"
732 (HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
733 password to all hosts that the site may redirect to. This may or may not
734 introduce a security breach if the site redirects you do a site to which
735 you'll send your authentication info (which is plaintext in the case of HTTP
736 Basic authentication).
738 .IP "--max-filesize <bytes>"
739 Specify the maximum size (in bytes) of a file to download. If the file
740 requested is larger than this value, the transfer will not start and curl will
741 return with exit code 63.
743 NOTE: The file size is not always known prior to download, and for such files
744 this option has no effect even if the file transfer ends up being larger than
745 this given limit. This concerns both FTP and HTTP transfers.
746 .IP "-m/--max-time <seconds>"
747 Maximum time in seconds that you allow the whole operation to take. This is
748 useful for preventing your batch jobs from hanging for hours due to slow
749 networks or links going down. See also the \fI--connect-timeout\fP option.
751 If this option is used several times, the last one will be used.
753 Manual. Display the huge help text.
755 Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
756 home directory for login name and password. This is typically used for ftp on
757 unix. If used with http, curl will enable user authentication. See
761 for details on the file format. Curl will not complain if that file
762 hasn't the right permissions (it should not be world nor group
763 readable). The environment variable "HOME" is used to find the home
766 A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
767 to ftp to the machine host.domain.com with user name \&'myself' and password
768 \&'secret' should look similar to:
770 .B "machine host.domain.com login myself password secret"
771 .IP "--netrc-optional"
772 Very similar to \fI--netrc\fP, but this option makes the .netrc usage
773 \fBoptional\fP and not mandatory as the \fI--netrc\fP does.
775 (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
776 designed by Microsoft and is used in their web applications. It is primarily
777 meant as a support for Kerberos5 authentication but may be also used along
778 with another authentication methods. For more information see IETF draft
779 draft-brezak-spnego-http-04.txt.
781 If you want to enable Negotiate for your proxy authentication, then use
782 \fI--proxy-negotiate\fP.
784 This option requires that the library was built with GSSAPI support. This is
785 not very common. Use \fI-V/--version\fP to see if your version supports
788 When using this option, you must also provide a fake -u/--user option to
789 activate the authentication code properly. Sending a '-u :' is enough as the
790 user name and password from the -u option aren't actually used.
792 If this option is used several times, the following occurrences make no
795 Disables the buffering of the output stream. In normal work situations, curl
796 will use a standard buffered output stream that will have the effect that it
797 will output the data in chunks, not necessarily exactly when the data arrives.
798 Using this option will disable that buffering.
800 Note that this is the negated option name documented. You can thus use
801 \fI--buffer\fP to enforce the buffering.
803 Disables the use of keepalive messages on the TCP connection, as by default
806 Note that this is the negated option name documented. You can thus use
807 \fI--keepalive\fP to enforce keepalive.
809 (SSL) Disable curl's use of SSL session-ID caching. By default all transfers
810 are done using the cache. Note that while nothing ever should get hurt by
811 attempting to reuse SSL session-IDs, there seem to be broken SSL
812 implementations in the wild that may require you to disable this in order for
813 you to succeed. (Added in 7.16.0)
815 Note that this is the negated option name documented. You can thus use
816 \fI--sessionid\fP to enforce session-ID caching.
818 (HTTP) Enables NTLM authentication. The NTLM authentication method was
819 designed by Microsoft and is used by IIS web servers. It is a proprietary
820 protocol, reversed engineered by clever people and implemented in curl based
821 on their efforts. This kind of behavior should not be endorsed, you should
822 encourage everyone who uses NTLM to switch to a public and documented
823 authentication method instead. Such as Digest.
825 If you want to enable NTLM for your proxy authentication, then use
828 This option requires that the library was built with SSL support. Use
829 \fI-V/--version\fP to see if your curl supports NTLM.
831 If this option is used several times, the following occurrences make no
833 .IP "-o/--output <file>"
834 Write output to <file> instead of stdout. If you are using {} or [] to fetch
835 multiple documents, you can use '#' followed by a number in the <file>
836 specifier. That variable will be replaced with the current string for the URL
837 being fetched. Like in:
839 curl http://{one,two}.site.com -o "file_#1.txt"
841 or use several variables like:
843 curl http://{site,host}.host[1-5].com -o "#1_#2"
845 You may use this option as many times as you have number of URLs.
847 See also the \fI--create-dirs\fP option to create the local directories
849 .IP "-O/--remote-name"
850 Write output to a local file named like the remote file we get. (Only the file
851 part of the remote file is used, the path is cut off.)
853 The remote file name to use for saving is extracted from the given URL,
856 You may use this option as many times as you have number of URLs.
857 .IP "--remote-name-all"
858 This option changes the default action for all given URLs to be dealt with as
859 if \fI-O/--remote-name\fP were used for each one. So if you want to disable
860 that for a specific URL after \fI--remote-name-all\fP has been used, you must
861 use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
862 .IP "--pass <phrase>"
863 (SSL/SSH) Pass phrase for the private key
865 If this option is used several times, the last one will be used.
867 Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
868 requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
869 in web browsers, so curl does the conversion by default to maintain
870 consistency. However, a server may requires a POST to remain a POST after such
871 a redirection. This option is meaningful only when using \fI-L/--location\fP
873 .IP "--proxy-anyauth"
874 Tells curl to pick a suitable authentication method when communicating with
875 the given proxy. This might cause an extra request/response round-trip. (Added
878 Tells curl to use HTTP Basic authentication when communicating with the given
879 proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
880 the default authentication method curl uses with proxies.
882 Tells curl to use HTTP Digest authentication when communicating with the given
883 proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
884 .IP "--proxy-negotiate"
885 Tells curl to use HTTP Negotiate authentication when communicating
886 with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
887 with a remote host. (Added in 7.17.1)
889 Tells curl to use HTTP NTLM authentication when communicating with the given
890 proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
891 .IP "-p/--proxytunnel"
892 When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
893 protocols to attempt to tunnel through the proxy instead of merely using it to
894 do HTTP-like operations. The tunnel approach is made with the HTTP proxy
895 CONNECT request and requires that the proxy allows direct connect to the
896 remote port number curl wants to tunnel through to.
898 (SSH) Public key file name. Allows you to provide your public key in this
901 If this option is used several times, the last one will be used.
902 .IP "-P/--ftp-port <address>"
903 (FTP) Reverses the initiator/listener roles when connecting with ftp. This
904 switch makes Curl use the PORT command instead of PASV. In practise, PORT
905 tells the server to connect to the client's specified address and port, while
906 PASV asks the server for an ip address and port to connect to. <address>
910 i.e "eth0" to specify which interface's IP address you want to use (Unix only)
912 i.e "192.168.10.1" to specify exact IP number
914 i.e "my.host.domain" to specify machine
916 make curl pick the same IP address that is already used for the control
920 If this option is used several times, the last one will be used. Disable the
921 use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
922 instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
924 If used as the first parameter on the command line, the \fIcurlrc\fP config
925 file will not be read and used. See the \fI-K/--config\fP for details on the
926 default config file search path.
927 .IP "-Q/--quote <command>"
928 (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
929 commands are sent BEFORE the transfer is taking place (just after the
930 initial PWD command in an FTP transfer, to be exact). To make commands
931 take place after a successful transfer, prefix them with a dash '-'.
932 To make commands get sent after libcurl has changed working directory,
933 just before the transfer command(s), prefix the command with '+' (this
934 is only supported for FTP). You may specify any number of commands. If
935 the server returns failure for one of the commands, the entire operation
936 will be aborted. You must send syntactically correct FTP commands as
937 RFC959 defines to FTP servers, or one of the commands listed below to
938 SFTP servers. This option can be used multiple times.
940 SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
941 commands before sending them to the server. Following is the list of
942 all supported SFTP quote commands:
944 .IP "chgrp group file"
945 The chgrp command sets the group ID of the file named by the file operand to the
946 group ID specified by the group operand. The group operand is a decimal
948 .IP "chmod mode file"
949 The chmod command modifies the file mode bits of the specified file. The
950 mode operand is an octal integer mode number.
951 .IP "chown user file"
952 The chown command sets the owner of the file named by the file operand to the
953 user ID specified by the user operand. The user operand is a decimal
955 .IP "ln source_file target_file"
956 The ln and symlink commands create a symbolic link at the target_file location
957 pointing to the source_file location.
958 .IP "mkdir directory_name"
959 The mkdir command creates the directory named by the directory_name operand.
961 The pwd command returns the absolute pathname of the current working directory.
962 .IP "rename source target"
963 The rename command renames the file or directory named by the source
964 operand to the destination path named by the target operand.
966 The rm command removes the file specified by the file operand.
967 .IP "rmdir directory"
968 The rmdir command removes the directory entry specified by the directory
969 operand, provided it is empty.
970 .IP "symlink source_file target_file"
973 .IP "--random-file <file>"
974 (SSL) Specify the path name to file containing what will be considered as
975 random data. The data is used to seed the random engine for SSL connections.
976 See also the \fI--egd-file\fP option.
977 .IP "-r/--range <range>"
978 (HTTP/FTP/FILE) Retrieve a byte range (i.e a partial document) from a
979 HTTP/1.1, FTP server or a local FILE. Ranges can be specified in a number of
984 specifies the first 500 bytes
987 specifies the second 500 bytes
990 specifies the last 500 bytes
993 specifies the bytes from offset 9500 and forward
996 specifies the first and last byte only(*)(H)
999 specifies 300 bytes from offset 500(H)
1002 specifies two separate 100 bytes ranges(*)(H)
1005 (*) = NOTE that this will cause the server to reply with a multipart
1008 Only digit characters (0-9) are valid in 'start' and 'stop' of range syntax
1009 \&'start-stop'. If a non-digit character is given in the range, the server's
1010 response will be indeterminable, depending on different server's configuration.
1012 You should also be aware that many HTTP/1.1 servers do not have this feature
1013 enabled, so that when you attempt to get a range, you'll instead get the whole
1016 FTP range downloads only support the simple syntax 'start-stop' (optionally
1017 with one of the numbers omitted). It depends on the non-RFC command SIZE.
1019 If this option is used several times, the last one will be used.
1021 When used, it disables all internal HTTP decoding of content or transfer
1022 encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
1023 .IP "-R/--remote-time"
1024 When used, this will make libcurl attempt to figure out the timestamp of the
1025 remote file, and if that is available make the local file get that same
1028 If a transient error is returned when curl tries to perform a transfer, it
1029 will retry this number of times before giving up. Setting the number to 0
1030 makes curl do no retries (which is the default). Transient error means either:
1031 a timeout, an FTP 5xx response code or an HTTP 5xx response code.
1033 When curl is about to retry a transfer, it will first wait one second and then
1034 for all forthcoming retries it will double the waiting time until it reaches
1035 10 minutes which then will be the delay between the rest of the retries. By
1036 using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
1037 also \fI--retry-max-time\fP to limit the total time allowed for
1038 retries. (Added in 7.12.3)
1040 If this option is used multiple times, the last occurrence decide the amount.
1041 .IP "--retry-delay <seconds>"
1042 Make curl sleep this amount of time between each retry when a transfer has
1043 failed with a transient error (it changes the default backoff time algorithm
1044 between retries). This option is only interesting if \fI--retry\fP is also
1045 used. Setting this delay to zero will make curl use the default backoff time.
1048 If this option is used multiple times, the last occurrence decide the amount.
1049 .IP "--retry-max-time <seconds>"
1050 The retry timer is reset before the first transfer attempt. Retries will be
1051 done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
1052 given limit. Notice that if the timer hasn't reached the limit, the request
1053 will be made and while performing, it may take longer than this given time
1054 period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
1055 Set this option to zero to not timeout retries. (Added in 7.12.3)
1057 If this option is used multiple times, the last occurrence decide the amount.
1059 Silent mode. Don't show progress meter or error messages. Makes
1061 .IP "-S/--show-error"
1062 When used with -s it makes curl show error message if it fails.
1063 .IP "--socks4 <host[:port]>"
1064 Use the specified SOCKS4 proxy. If the port number is not specified, it is
1065 assumed at port 1080. (Added in 7.15.2)
1067 This option overrides any previous use of \fI-x/--proxy\fP, as they are
1070 If this option is used several times, the last one will be used.
1071 .IP "--socks4a <host[:port]>"
1072 Use the specified SOCKS4a proxy. If the port number is not specified, it is
1073 assumed at port 1080. (Added in 7.18.0)
1075 This option overrides any previous use of \fI-x/--proxy\fP, as they are
1078 If this option is used several times, the last one will be used.
1079 .IP "--socks5-hostname <host[:port]>"
1080 Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
1081 the port number is not specified, it is assumed at port 1080. (Added in
1084 This option overrides any previous use of \fI-x/--proxy\fP, as they are
1087 If this option is used several times, the last one will be used. (This option
1088 was previously wrongly documented and used as --socks without the number
1090 .IP "--socks5 <host[:port]>"
1091 Use the specified SOCKS5 proxy - but resolve the host name locally. If the
1092 port number is not specified, it is assumed at port 1080.
1094 This option overrides any previous use of \fI-x/--proxy\fP, as they are
1097 If this option is used several times, the last one will be used. (This option
1098 was previously wrongly documented and used as --socks without the number
1100 .IP "--stderr <file>"
1101 Redirect all writes to stderr to the specified file instead. If the file name
1102 is a plain '-', it is instead written to stdout. This option has no point when
1103 you're using a shell with decent redirecting capabilities.
1105 If this option is used several times, the last one will be used.
1107 Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
1108 details about this option. (Added in 7.11.2)
1109 .IP "-t/--telnet-option <OPT=val>"
1110 Pass options to the telnet protocol. Supported options are:
1112 TTYPE=<term> Sets the terminal type.
1114 XDISPLOC=<X display> Sets the X display location.
1116 NEW_ENV=<var,val> Sets an environment variable.
1117 .IP "-T/--upload-file <file>"
1118 This transfers the specified local file to the remote URL. If there is no file
1119 part in the specified URL, Curl will append the local file name. NOTE that you
1120 must use a trailing / on the last directory to really prove to Curl that there
1121 is no file name or curl will think that your last directory name is the remote
1122 file name to use. That will most likely cause the upload operation to fail. If
1123 this is used on a http(s) server, the PUT command will be used.
1125 Use the file name "-" (a single dash) to use stdin instead of a given file.
1127 You can specify one -T for each URL on the command line. Each -T + URL pair
1128 specifies what to upload and to where. curl also supports "globbing" of the -T
1129 argument, meaning that you can upload multiple files to a single URL by using
1130 the same URL globbing style supported in the URL, like this:
1132 curl -T "{file1,file2}" http://www.uploadtothissite.com
1136 curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
1137 .IP "--trace <file>"
1138 Enables a full trace dump of all incoming and outgoing data, including
1139 descriptive information, to the given output file. Use "-" as filename to have
1140 the output sent to stdout.
1142 This option overrides previous uses of \fI-v/--verbose\fP or
1143 \fI--trace-ascii\fP.
1145 If this option is used several times, the last one will be used.
1146 .IP "--trace-ascii <file>"
1147 Enables a full trace dump of all incoming and outgoing data, including
1148 descriptive information, to the given output file. Use "-" as filename to have
1149 the output sent to stdout.
1151 This is very similar to \fI--trace\fP, but leaves out the hex part and only
1152 shows the ASCII part of the dump. It makes smaller output that might be easier
1153 to read for untrained humans.
1155 This option overrides previous uses of \fI-v/--verbose\fP or \fI--trace\fP.
1157 If this option is used several times, the last one will be used.
1159 Prepends a time stamp to each trace or verbose line that curl displays.
1161 .IP "-u/--user <user:password>"
1162 Specify user and password to use for server authentication. Overrides
1163 \fI-n/--netrc\fP and \fI--netrc-optional\fP.
1165 If you just give the user name (without entering a colon) curl will prompt for
1168 If you use an SSPI-enabled curl binary and do NTLM authentication, you can
1169 force curl to pick up the user name and password from your environment by
1170 simply specifying a single colon with this option: "-u :".
1172 If this option is used several times, the last one will be used.
1173 .IP "-U/--proxy-user <user:password>"
1174 Specify user and password to use for proxy authentication.
1176 If you use an SSPI-enabled curl binary and do NTLM authentication, you can
1177 force curl to pick up the user name and password from your environment by
1178 simply specifying a single colon with this option: "-U :".
1180 If this option is used several times, the last one will be used.
1182 Specify a URL to fetch. This option is mostly handy when you want to specify
1183 URL(s) in a config file.
1185 This option may be used any number of times. To control where this URL is
1186 written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
1188 Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines
1189 starting with '>' means "header data" sent by curl, '<' means "header data"
1190 received by curl that is hidden in normal cases and lines starting with '*'
1191 means additional info provided by curl.
1193 Note that if you only want HTTP headers in the output, \fI-i/--include\fP
1194 might be option you're looking for.
1196 If you think this option still doesn't give you enough details, consider using
1197 \fI--trace\fP or \fI--trace-ascii\fP instead.
1199 This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
1201 Displays information about curl and the libcurl version it uses.
1203 The first line includes the full version of curl, libcurl and other 3rd party
1204 libraries linked with the executable.
1206 The second line (starts with "Protocols:") shows all protocols that libcurl
1209 The third line (starts with "Features:") shows specific features libcurl
1210 reports to offer. Available features include:
1213 You can use IPv6 with this.
1215 Krb4 for ftp is supported.
1217 HTTPS and FTPS are supported.
1219 Automatic decompression of compressed files over HTTP is supported.
1221 NTLM authentication is supported.
1223 Negotiate authentication and krb5 for ftp is supported.
1225 This curl uses a libcurl built with Debug. This enables more error-tracking
1226 and memory debugging etc. For curl-developers only!
1228 This curl uses asynchronous name resolves.
1230 SPNEGO Negotiate authentication is supported.
1232 This curl supports transfers of large files, files larger than 2GB.
1234 This curl supports IDN - international domain names.
1236 SSPI is supported. If you use NTLM and set a blank user name, curl will
1237 authenticate with your current user and password.
1239 .IP "-w/--write-out <format>"
1240 Defines what to display on stdout after a completed and successful
1241 operation. The format is a string that may contain plain text mixed with any
1242 number of variables. The string can be specified as "string", to get read from
1243 a particular file you specify it "@filename" and to tell curl to read the
1244 format from stdin you write "@-".
1246 The variables present in the output format will be substituted by the value or
1247 text that curl thinks fit, as described below. All variables are specified
1248 like %{variable_name} and to output a normal % you just write them like
1249 %%. You can output a newline by using \\n, a carriage return with \\r and a tab
1253 The %-letter is a special letter in the win32-environment, where all
1254 occurrences of % must be doubled when using this option.
1256 Available variables are at this point:
1260 The URL that was fetched last. This is mostly meaningful if you've told curl
1261 to follow location: headers.
1264 The numerical response code that was found in the last retrieved HTTP(S) or
1265 FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
1269 The numerical code that was found in the last response (from a proxy) to a
1270 curl CONNECT request. (Added in 7.12.4)
1273 The total time, in seconds, that the full operation lasted. The time will be
1274 displayed with millisecond resolution.
1277 The time, in seconds, it took from the start until the name resolving was
1281 The time, in seconds, it took from the start until the TCP connect to the
1282 remote host (or proxy) was completed.
1285 The time, in seconds, it took from the start until the SSL/SSH/etc
1286 connect/handshake to the remote host was completed. (Added in 7.19.0)
1289 The time, in seconds, it took from the start until the file transfer is just
1290 about to begin. This includes all pre-transfer commands and negotiations that
1291 are specific to the particular protocol(s) involved.
1294 The time, in seconds, it took for all redirection steps include name lookup,
1295 connect, pretransfer and transfer before final transaction was
1296 started. time_redirect shows the complete execution time for multiple
1297 redirections. (Added in 7.12.3)
1299 .B time_starttransfer
1300 The time, in seconds, it took from the start until the first byte is just about
1301 to be transferred. This includes time_pretransfer and also the time the
1302 server needs to calculate the result.
1305 The total amount of bytes that were downloaded.
1308 The total amount of bytes that were uploaded.
1311 The total amount of bytes of the downloaded headers.
1314 The total amount of bytes that were sent in the HTTP request.
1317 The average download speed that curl measured for the complete download.
1320 The average upload speed that curl measured for the complete upload.
1323 The Content-Type of the requested document, if there was any.
1326 Number of new connects made in the recent transfer. (Added in 7.12.3)
1329 Number of redirects that were followed in the request. (Added in 7.12.3)
1332 When a HTTP request was made without -L to follow redirects, this variable
1333 will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
1336 The initial path libcurl ended up in when logging on to the remote FTP
1337 server. (Added in 7.15.4)
1339 .B ssl_verify_result
1340 The result of the SSL peer certificate verification that was requested. 0
1341 means the verification was successful. (Added in 7.19.0)
1344 If this option is used several times, the last one will be used.
1345 .IP "-x/--proxy <proxyhost[:port]>"
1346 Use specified HTTP proxy. If the port number is not specified, it is assumed
1349 This option overrides existing environment variables that sets proxy to
1350 use. If there's an environment variable setting a proxy, you can set proxy to
1351 \&"" to override it.
1353 \fBNote\fP that all operations that are performed over a HTTP proxy will
1354 transparently be converted to HTTP. It means that certain protocol specific
1355 operations might not be available. This is not the case if you can tunnel
1356 through the proxy, as done with the \fI-p/--proxytunnel\fP option.
1358 Starting with 7.14.1, the proxy host can be specified the exact same way as
1359 the proxy environment variables, include protocol prefix (http://) and
1360 embedded user + password.
1362 If this option is used several times, the last one will be used.
1363 .IP "-X/--request <command>"
1364 (HTTP) Specifies a custom request method to use when communicating with the
1365 HTTP server. The specified request will be used instead of the method
1366 otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
1367 details and explanations.
1370 Specifies a custom FTP command to use instead of LIST when doing file lists
1373 If this option is used several times, the last one will be used.
1374 .IP "-y/--speed-time <time>"
1375 If a download is slower than speed-limit bytes per second during a speed-time
1376 period, the download gets aborted. If speed-time is used, the default
1377 speed-limit will be 1 unless set with -y.
1379 This option controls transfers and thus will not affect slow connects etc. If
1380 this is a concern for you, try the \fI--connect-timeout\fP option.
1382 If this option is used several times, the last one will be used.
1383 .IP "-Y/--speed-limit <speed>"
1384 If a download is slower than this given speed, in bytes per second, for
1385 speed-time seconds it gets aborted. speed-time is set with -Y and is 30 if
1388 If this option is used several times, the last one will be used.
1389 .IP "-z/--time-cond <date expression>"
1390 (HTTP/FTP) Request a file that has been modified later than the given time and
1391 date, or one that has been modified before that time. The date expression can
1392 be all sorts of date strings or if it doesn't match any internal ones, it
1393 tries to get the time from a given file name instead! See the
1394 \fIcurl_getdate(3)\fP man pages for date expression details.
1396 Start the date expression with a dash (-) to make it request for a document
1397 that is older than the given date/time, default is a document that is newer
1398 than the specified date/time.
1400 If this option is used several times, the last one will be used.
1401 .IP "--max-redirs <num>"
1402 Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
1403 is used, this option can be used to prevent curl from following redirections
1404 \&"in absurdum". By default, the limit is set to 50 redirections. Set this
1405 option to -1 to make it limitless.
1407 If this option is used several times, the last one will be used.
1409 (HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
1410 internally preferred: HTTP 1.1.
1413 Forces curl to use TSL version 1 when negotiating with a remote TLS server.
1416 Forces curl to use SSL version 2 when negotiating with a remote SSL server.
1419 Forces curl to use SSL version 3 when negotiating with a remote SSL server.
1421 If libcurl is capable of resolving an address to multiple IP versions (which
1422 it is if it is ipv6-capable), this option tells libcurl to resolve names to
1423 IPv4 addresses only.
1425 If libcurl is capable of resolving an address to multiple IP versions (which
1426 it is if it is ipv6-capable), this option tells libcurl to resolve names to
1427 IPv6 addresses only.
1428 .IP "-#/--progress-bar"
1429 Make curl display progress information as a progress bar instead of the
1434 Default config file, see \fI-K/--config\fP for details.
1437 .IP "http_proxy [protocol://]<host>[:port]"
1438 Sets proxy server to use for HTTP.
1439 .IP "HTTPS_PROXY [protocol://]<host>[:port]"
1440 Sets proxy server to use for HTTPS.
1441 .IP "FTP_PROXY [protocol://]<host>[:port]"
1442 Sets proxy server to use for FTP.
1443 .IP "ALL_PROXY [protocol://]<host>[:port]"
1444 Sets proxy server to use if no protocol-specific proxy is set.
1445 .IP "NO_PROXY <comma-separated list of hosts>"
1446 list of host names that shouldn't go through any proxy. If set to a asterisk
1447 \&'*' only, it matches all hosts.
1449 There exists a bunch of different error codes and their corresponding error
1450 messages that may appear during bad conditions. At the time of this writing,
1453 Unsupported protocol. This build of curl has no support for this protocol.
1455 Failed to initialize.
1457 URL malformat. The syntax was not correct.
1459 Couldn't resolve proxy. The given proxy host could not be resolved.
1461 Couldn't resolve host. The given remote host was not resolved.
1463 Failed to connect to host.
1465 FTP weird server reply. The server sent data curl couldn't parse.
1467 FTP access denied. The server denied login or denied access to the particular
1468 resource or directory you wanted to reach. Most often you tried to change to a
1469 directory that doesn't exist on the server.
1471 FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
1473 FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
1475 FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
1477 FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
1479 FTP couldn't set binary. Couldn't change transfer method to binary.
1481 Partial file. Only a part of the file was transferred.
1483 FTP couldn't download/access the given file, the RETR (or similar) command
1486 FTP quote error. A quote command returned error from the server.
1488 HTTP page not retrieved. The requested url was not found or returned another
1489 error with the HTTP error code being 400 or above. This return code only
1490 appears if \fI-f/--fail\fP is used.
1492 Write error. Curl couldn't write data to a local filesystem or similar.
1494 FTP couldn't STOR file. The server denied the STOR operation, used for FTP
1497 Read error. Various reading problems.
1499 Out of memory. A memory allocation request failed.
1501 Operation timeout. The specified time-out period was reached according to the
1504 FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
1505 command, try doing a transfer using PASV instead!
1507 FTP couldn't use REST. The REST command failed. This command is used for
1508 resumed FTP transfers.
1510 HTTP range error. The range "command" didn't work.
1512 HTTP post error. Internal post-request generation error.
1514 SSL connect error. The SSL handshaking failed.
1516 FTP bad download resume. Couldn't continue an earlier aborted download.
1518 FILE couldn't read file. Failed to open the file. Permissions?
1520 LDAP cannot bind. LDAP bind operation failed.
1524 Function not found. A required LDAP function was not found.
1526 Aborted by callback. An application told curl to abort the operation.
1528 Internal error. A function was called with a bad parameter.
1530 Interface error. A specified outgoing interface could not be used.
1532 Too many redirects. When following redirects, curl hit the maximum amount.
1534 Unknown TELNET option specified.
1536 Malformed telnet option.
1538 The peer's SSL certificate or SSH MD5 fingerprint was not ok
1540 The server didn't reply anything, which here is considered an error.
1542 SSL crypto engine not found
1544 Cannot set SSL crypto engine as default
1546 Failed sending network data
1548 Failure in receiving network data
1550 Problem with the local certificate
1552 Couldn't use specified SSL cipher
1554 Peer certificate cannot be authenticated with known CA certificates
1556 Unrecognized transfer encoding
1560 Maximum file size exceeded
1562 Requested FTP SSL level failed
1564 Sending the data requires a rewind that failed
1566 Failed to initialise SSL Engine
1568 User, password or similar was not accepted and curl failed to login
1570 File not found on TFTP server
1572 Permission problem on TFTP server
1574 Out of disk space on TFTP server
1576 Illegal TFTP operation
1578 Unknown TFTP transfer ID
1580 File already exists (TFTP)
1584 Character conversion failed
1586 Character conversion functions required
1588 Problem with reading the SSL CA cert (path? access rights?)
1590 The resource referenced in the URL does not exist
1592 An unspecified error occurred during the SSH session
1594 Failed to shut down the SSL connection
1596 Could not load CRL file, missing or wrong format (added in 7.19.0)
1598 Issuer check failed (added in 7.19.0)
1600 There will appear more error codes here in future releases. The existing ones
1601 are meant to never change.
1602 .SH AUTHORS / CONTRIBUTORS
1603 Daniel Stenberg is the main author, but the whole list of contributors is
1604 found in the separate THANKS file.
1608 ftp://ftp.sunet.se/pub/www/utilities/curl/