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