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