David Shaw finally removed all traces of Gopher and we are now officially
[platform/upstream/curl.git] / docs / curl.1
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2005, 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 .\" * $Id$
22 .\" **************************************************************************
23 .\"
24 .TH curl 1 "24 Nov 2005" "Curl 7.15.1" "Curl Manual"
25 .SH NAME
26 curl \- transfer a URL
27 .SH SYNOPSIS
28 .B curl [options]
29 .I [URL...]
30 .SH DESCRIPTION
31 .B curl
32 is a tool to transfer data from or to a server, using one of the supported
33 protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE).
34 The 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 (https:) connections, cookies, file
38 transfer resume and more. As you will see below, the amount of features will
39 make your head spin!
40
41 curl is powered by libcurl for all transfer-related features. See
42 .BR libcurl (3)
43 for details.
44 .SH URL
45 The URL syntax is protocol dependent. You'll find a detailed description in
46 RFC 2396.
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 No nesting of the sequences is supported at the moment, but you can use
60 several ones next to each 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 Since curl 7.15.1 you can also specify step counter for the ranges, so that
68 you can get every Nth number or letter:
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 attempt to re-use connections for multiple file transfers, so that
79 getting many files from the same server will not do multiple connects /
80 handshakes. This improves speed. Of course this is only done on files
81 specified on a single command line and cannot be used between separate curl
82 invokes.
83 .SH OPTIONS
84 .IP "-a/--append"
85 (FTP) When used in an FTP upload, this will tell curl to append to the target
86 file instead of overwriting it. If the file doesn't exist, it will be created.
87
88 If this option is used twice, the second one will disable append mode again.
89 .IP "-A/--user-agent <agent string>"
90 (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
91 done CGIs fail if its not set to "Mozilla/4.0".  To encode blanks in the
92 string, surround the string with single quote marks.  This can also be set
93 with the \fI-H/--header\fP option of course.
94
95 If this option is set more than once, the last one will be the one that's
96 used.
97 .IP "--anyauth"
98 (HTTP) Tells curl to figure out authentication method by itself, and use the
99 most secure one the remote site claims it supports. This is done by first
100 doing a request and checking the response-headers, thus inducing an extra
101 network round-trip. This is used instead of setting a specific authentication
102 method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and
103 \fI--negotiate\fP. (Added in 7.10.6)
104
105 Note that using --anyauth is not recommended if you do uploads from stdin,
106 since it may require data to be sent twice and then the client must be able to
107 rewind. If the need should arise when uploading from stdin, the upload
108 operation will fail.
109
110 If this option is used several times, the following occurrences make no
111 difference.
112 .IP "-b/--cookie <name=data>"
113 (HTTP)
114 Pass the data to the HTTP server as a cookie. It is supposedly the
115 data previously received from the server in a "Set-Cookie:" line.
116 The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
117
118 If no '=' letter is used in the line, it is treated as a filename to use to
119 read previously stored cookie lines from, which should be used in this session
120 if they match. Using this method also activates the "cookie parser" which will
121 make curl record incoming cookies too, which may be handy if you're using this
122 in combination with the \fI-L/--location\fP option. The file format of the
123 file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
124 cookie file format.
125
126 \fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as
127 input. No cookies will be stored in the file. To store cookies, use the
128 \fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file
129 using \fI-D/--dump-header\fP!
130
131 If this option is set more than once, the last one will be the one that's
132 used.
133 .IP "-B/--use-ascii"
134 Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
135 enforced by using an URL that ends with ";type=A". This option causes data
136 sent to stdout to be in text mode for win32 systems.
137
138 If this option is used twice, the second one will disable ASCII usage.
139 .IP "--basic"
140 (HTTP) Tells curl to use HTTP Basic authentication. This is the default and
141 this option is usually pointless, unless you use it to override a previously
142 set option that sets a different authentication method (such as \fI--ntlm\fP,
143 \fI--digest\fP and \fI--negotiate\fP). (Added in 7.10.6)
144
145 If this option is used several times, the following occurrences make no
146 difference.
147 .IP "--ciphers <list of ciphers>"
148 (SSL) Specifies which ciphers to use in the connection. The list of ciphers
149 must be using valid ciphers. Read up on SSL cipher list details on this URL:
150 \fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
151
152 If this option is used several times, the last one will override the others.
153 .IP "--compressed"
154 (HTTP) Request a compressed response using one of the algorithms libcurl
155 supports, and return the uncompressed document.  If this option is used and
156 the server sends an unsupported encoding, Curl will report an error.
157
158 If this option is used several times, each occurrence will toggle it on/off.
159 .IP "--connect-timeout <seconds>"
160 Maximum time in seconds that you allow the connection to the server to take.
161 This only limits the connection phase, once curl has connected this option is
162 of no more use. See also the \fI-m/--max-time\fP option.
163
164 If this option is used several times, the last one will be used.
165 .IP "-c/--cookie-jar <file name>"
166 Specify to which file you want curl to write all cookies after a completed
167 operation. Curl writes all cookies previously read from a specified file as
168 well as all cookies received from remote server(s). If no cookies are known,
169 no file will be written. The file will be written using the Netscape cookie
170 file format. If you set the file name to a single dash, "-", the cookies will
171 be written to stdout.
172
173 .B NOTE
174 If the cookie jar can't be created or written to, the whole curl operation
175 won't fail or even report an error clearly. Using -v will get a warning
176 displayed, but that is the only visible feedback you get about this possibly
177 lethal situation.
178
179 If this option is used several times, the last specified file name will be
180 used.
181 .IP "-C/--continue-at <offset>"
182 Continue/Resume a previous file transfer at the given offset. The given offset
183 is the exact number of bytes that will be skipped counted from the beginning
184 of the source file before it is transferred to the destination.  If used with
185 uploads, the ftp server command SIZE will not be used by curl.
186
187 Use "-C -" to tell curl to automatically find out where/how to resume the
188 transfer. It then uses the given output/input files to figure that out.
189
190 If this option is used several times, the last one will be used.
191 .IP "--create-dirs"
192 When used in conjunction with the -o option, curl will create the necessary
193 local directory hierarchy as needed. This option creates the dirs mentioned
194 with the -o option, nothing else. If the -o file name uses no dir or if the
195 dirs it mentions already exist, no dir will be created.
196
197 To create remote directories when using FTP, try \fI--ftp-create-dirs\fP.
198 .IP "--crlf"
199 (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
200
201 If this option is used twice, the second will again disable crlf converting.
202 .IP "-d/--data <data>"
203 (HTTP) Sends the specified data in a POST request to the HTTP server, in a way
204 that can emulate as if a user has filled in a HTML form and pressed the submit
205 button. Note that the data is sent exactly as specified with no extra
206 processing (with all newlines cut off).  The data is expected to be
207 \&"url-encoded". This will cause curl to pass the data to the server using the
208 content-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. If
209 this option is used more than once on the same command line, the data pieces
210 specified will be merged together with a separating &-letter. Thus, using '-d
211 name=daniel -d skill=lousy' would generate a post chunk that looks like
212 \&'name=daniel&skill=lousy'.
213
214 If you start the data with the letter @, the rest should be a file name to
215 read the data from, or - if you want curl to read the data from stdin.  The
216 contents of the file must already be url-encoded. Multiple files can also be
217 specified. Posting data from a file named 'foobar' would thus be done with
218 \fI--data\fP @foobar".
219
220 To post data purely binary, you should instead use the \fI--data-binary\fP
221 option.
222
223 \fI-d/--data\fP is the same as \fI--data-ascii\fP.
224
225 If this option is used several times, the ones following the first will
226 append data.
227 .IP "--data-ascii <data>"
228 (HTTP) This is an alias for the \fI-d/--data\fP option.
229
230 If this option is used several times, the ones following the first will
231 append data.
232 .IP "--data-binary <data>"
233 (HTTP) This posts data in a similar manner as \fI--data-ascii\fP does,
234 although when using this option the entire context of the posted data is kept
235 as-is. If you want to post a binary file without the strip-newlines feature of
236 the \fI--data-ascii\fP option, this is for you.
237
238 If this option is used several times, the ones following the first will
239 append data.
240 .IP "--digest"
241 (HTTP) Enables HTTP Digest authentication. This is a authentication that
242 prevents the password from being sent over the wire in clear text. Use this in
243 combination with the normal \fI-u/--user\fP option to set user name and
244 password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
245 related options. (Added in curl 7.10.6)
246
247 If this option is used several times, the following occurrences make no
248 difference.
249 .IP "--disable-eprt"
250 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
251 active FTP transfers. Curl will normally always first attempt to use EPRT,
252 then LPRT before using PORT, but with this option, it will use PORT right
253 away. EPRT and LPRT are extensions to the original FTP protocol, may not work
254 on all servers but enable more functionality in a better way than the
255 traditional PORT command. (Added in 7.10.5)
256
257 If this option is used several times, each occurrence will toggle this on/off.
258 .IP "--disable-epsv"
259 (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
260 transfers. Curl will normally always first attempt to use EPSV before PASV,
261 but with this option, it will not try using EPSV.
262
263 If this option is used several times, each occurrence will toggle this on/off.
264 .IP "-D/--dump-header <file>"
265 Write the protocol headers to the specified file.
266
267 This option is handy to use when you want to store the headers that a HTTP
268 site sends to you. Cookies from the headers could then be read in a second
269 curl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP
270 option is however a better way to store cookies.
271
272 When used on FTP, the ftp server response lines are considered being "headers"
273 and thus are saved there.
274
275 If this option is used several times, the last one will be used.
276 .IP "-e/--referer <URL>"
277 (HTTP) Sends the "Referer Page" information to the HTTP server. This can also
278 be set with the \fI-H/--header\fP flag of course.  When used with
279 \fI-L/--location\fP you can append ";auto" to the referer URL to make curl
280 automatically set the previous URL when it follows a Location: header. The
281 \&";auto" string can be used alone, even if you don't set an initial referer.
282
283 If this option is used several times, the last one will be used.
284 .IP "--engine <name>"
285 Select the OpenSSL crypto engine to use for cipher
286 operations. Use \fI--engine list\fP to print a list of build-time supported
287 engines. Note that not all (or none) of the engines may be available at
288 run-time.
289 .IP "--environment"
290 (RISC OS ONLY) Sets a range of environment variables, using the names the -w
291 option supports, to easier allow extraction of useful information after having
292 run curl.
293
294 If this option is used several times, each occurrence will toggle this on/off.
295 .IP "--egd-file <file>"
296 (HTTPS) Specify the path name to the Entropy Gathering Daemon socket. The
297 socket is used to seed the random engine for SSL connections. See also the
298 \fI--random-file\fP option.
299 .IP "-E/--cert <certificate[:password]>"
300 (HTTPS)
301 Tells curl to use the specified certificate file when getting a file
302 with HTTPS. The certificate must be in PEM format.
303 If the optional password isn't specified, it will be queried for on
304 the terminal. Note that this certificate is the private key and the private
305 certificate concatenated!
306
307 If this option is used several times, the last one will be used.
308 .IP "--cert-type <type>"
309 (SSL) Tells curl what certificate type the provided certificate is in. PEM,
310 DER and ENG are recognized types.
311
312 If this option is used several times, the last one will be used.
313 .IP "--cacert <CA certificate>"
314 (HTTPS) Tells curl to use the specified certificate file to verify the
315 peer. The file may contain multiple CA certificates. The certificate(s) must
316 be in PEM format.
317
318 curl recognizes the environment variable named 'CURL_CA_BUNDLE' if that is
319 set, and uses the given path as a path to a CA cert bundle. This option
320 overrides that variable.
321
322 The windows version of curl will automatically look for a CA certs file named
323 \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
324 Current Working Directory, or in any folder along your PATH.
325
326 If this option is used several times, the last one will be used.
327 .IP "--capath <CA certificate directory>"
328 (HTTPS) Tells curl to use the specified certificate directory to verify the
329 peer. The certificates must be in PEM format, and the directory must have been
330 processed using the c_rehash utility supplied with openssl. Using
331 \fI--capath\fP can allow curl to make https connections much more efficiently
332 than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
333 certificates.
334
335 If this option is used several times, the last one will be used.
336 .IP "-f/--fail"
337 (HTTP) Fail silently (no output at all) on server errors. This is mostly done
338 like this to better enable scripts etc to better deal with failed attempts. In
339 normal cases when a HTTP server fails to deliver a document, it returns a HTML
340 document stating so (which often also describes why and more). This flag will
341 prevent curl from outputting that and fail silently instead.
342
343 If this option is used twice, the second will again disable silent failure.
344 .IP "--ftp-account [data]"
345 (FTP) When an FTP server asks for "account data" after user name and password
346 has been provided, this data is sent off using the ACCT command. (Added in
347 7.13.0)
348
349 If this option is used twice, the second will override the previous use.
350 .IP "--ftp-create-dirs"
351 (FTP) When an FTP URL/operation uses a path that doesn't currently exist on
352 the server, the standard behavior of curl is to fail. Using this option, curl
353 will instead attempt to create missing directories. (Added in 7.10.7)
354
355 If this option is used twice, the second will again disable silent failure.
356 .IP "--ftp-pasv"
357 (FTP) Use PASV when transferring. PASV is the internal default behavior, but
358 using this option can be used to override a previous --ftp-port option. (Added
359 in 7.11.0)
360
361 If this option is used twice, the second will again disable silent failure.
362 .IP "--ftp-skip-pasv-ip"
363 (FTP) Tell curl to not use the IP address the server suggests in its response
364 to curl's PASV command when curl connects the data connection. Instead curl
365 will re-use the same IP address it already uses for the control
366 connection. (Added in 7.14.2)
367
368 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
369
370 If this option is used twice, the second will again disable silent failure.
371 .IP "--ftp-ssl"
372 (FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0)
373
374 If this option is used twice, the second will again disable this.
375 .IP "-F/--form <name=content>"
376 (HTTP) This lets curl emulate a filled in form in which a user has pressed the
377 submit button. This causes curl to POST data using the Content-Type
378 multipart/form-data according to RFC1867. This enables uploading of binary
379 files etc. To force the 'content' part to be a file, prefix the file name
380 with an @ sign. To just get the content part from a file, prefix the file name
381 with the letter <. The difference between @ and < is then that @ makes a file
382 get attached in the post as a file upload, while the < makes a text field and
383 just get the contents for that text field from a file.
384
385 Example, to send your password file to the server, where
386 \&'password' is the name of the form-field to which /etc/passwd will be the
387 input:
388
389 \fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
390
391 To read the file's content from stdin instead of a file, use - where the file
392 name should've been. This goes for both @ and < constructs.
393
394 You can also tell curl what Content-Type to use by using 'type=', in a manner
395 similar to:
396
397 \fBcurl\fP -F "web=@index.html;type=text/html" url.com
398
399 or
400
401 \fBcurl\fP -F "name=daniel;type=text/foo" url.com
402
403 You can also explicitly change the name field of an file upload part by
404 setting filename=, like this:
405
406 \fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
407
408 See further examples and details in the MANUAL.
409
410 This option can be used multiple times.
411 .IP "--form-string <name=string>"
412 (HTTP) Similar to \fI--form\fP except that the value string for the named
413 parameter is used literally. Leading \&'@' and \&'<' characters, and the
414 \&';type=' string in the value have no special meaning. Use this in preference
415 to \fI--form\fP if there's any possibility that the string value may
416 accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
417 .IP "-g/--globoff"
418 This option switches off the "URL globbing parser". When you set this option,
419 you can specify URLs that contain the letters {}[] without having them being
420 interpreted by curl itself. Note that these letters are not normal legal URL
421 contents but they should be encoded according to the URI standard.
422 .IP "-G/--get"
423 When used, this option will make all data specified with \fI-d/--data\fP or
424 \fI--data-binary\fP to be used in a HTTP GET request instead of the POST
425 request that otherwise would be used. The data will be appended to the URL
426 with a '?'  separator.
427
428 If used in combination with -I, the POST data will instead be appended to the
429 URL with a HEAD request.
430
431 If used multiple times, nothing special happens.
432 .IP "-h/--help"
433 Usage help.
434 .IP "-H/--header <header>"
435 (HTTP) Extra header to use when getting a web page. You may specify any number
436 of extra headers. Note that if you should add a custom header that has the
437 same name as one of the internal ones curl would use, your externally set
438 header will be used instead of the internal one. This allows you to make even
439 trickier stuff than curl would normally do. You should not replace internally
440 set headers without knowing perfectly well what you're doing. Replacing an
441 internal header with one without content on the right side of the colon will
442 prevent that header from appearing.
443
444 curl will make sure that each header you add/replace get sent with the proper
445 end of line marker, you should thus \fBnot\fP add that as a part of the header
446 content: do not add newlines or carriage returns they will only mess things up
447 for you.
448
449 See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
450
451 This option can be used multiple times to add/replace/remove multiple headers.
452 .IP "--ignore-content-length"
453 (HTTP)
454 Ignore the Content-Length header. This is particularly useful for servers
455 running Apache 1.x, which will report incorrect Content-Length for files
456 larger than 2 gigabytes.
457 .IP "-i/--include"
458 (HTTP)
459 Include the HTTP-header in the output. The HTTP-header includes things
460 like server-name, date of the document, HTTP-version and more...
461
462 If this option is used twice, the second will again disable header include.
463 .IP "--interface <name>"
464 Perform an operation using a specified interface. You can enter interface
465 name, IP address or host name. An example could look like:
466
467  curl --interface eth0:1 http://www.netscape.com/
468
469 If this option is used several times, the last one will be used.
470 .IP "-I/--head"
471 (HTTP/FTP/FILE)
472 Fetch the HTTP-header only! HTTP-servers feature the command HEAD
473 which this uses to get nothing but the header of a document. When used
474 on a FTP or FILE file, curl displays the file size and last modification
475 time only.
476
477 If this option is used twice, the second will again disable header only.
478 .IP "-j/--junk-session-cookies"
479 (HTTP) When curl is told to read cookies from a given file, this option will
480 make it discard all "session cookies". This will basically have the same effect
481 as if a new session is started. Typical browsers always discard session
482 cookies when they're closed down. (Added in 7.9.7)
483
484 If this option is used several times, each occurrence will toggle this on/off.
485 .IP "-k/--insecure"
486 (SSL) This option explicitly allows curl to perform "insecure" SSL connections
487 and transfers. Starting with curl 7.10, all SSL connections will be attempted
488 to be made secure by using the CA certificate bundle installed by
489 default. This makes all connections considered "insecure" to fail unless
490 \fI-k/--insecure\fP is used.
491
492 If this option is used twice, the second time will again disable it.
493 .IP "--key <key>"
494 (SSL) Private key file name. Allows you to provide your private key in this
495 separate file.
496
497 If this option is used several times, the last one will be used.
498 .IP "--key-type <type>"
499 (SSL) Private key file type. Specify which type your \fI--key\fP provided
500 private key is. DER, PEM and ENG are supported.
501
502 If this option is used several times, the last one will be used.
503 .IP "--krb4 <level>"
504 (FTP) Enable kerberos4 authentication and use. The level must be entered and
505 should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use
506 a level that is not one of these, 'private' will instead be used.
507
508 This option requires that the library was built with kerberos4 support. This
509 is not very common. Use \fI-V/--version\fP to see if your curl supports it.
510
511 If this option is used several times, the last one will be used.
512 .IP "-K/--config <config file>"
513 Specify which config file to read curl arguments from. The config file is a
514 text file in which command line arguments can be written which then will be
515 used as if they were written on the actual command line. Options and their
516 parameters must be specified on the same config file line. If the parameter is
517 to contain white spaces, the parameter must be inclosed within quotes.  If the
518 first column of a config line is a '#' character, the rest of the line will be
519 treated as a comment.
520
521 Specify the filename as '-' to make curl read the file from stdin.
522
523 Note that to be able to specify a URL in the config file, you need to specify
524 it using the \fI--url\fP option, and not by simply writing the URL on its own
525 line. So, it could look similar to this:
526
527 url = "http://curl.haxx.se/docs/"
528
529 This option can be used multiple times.
530
531 When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
532 config file and uses it if found. The default config file is checked for in
533 the following places in this order:
534
535 1) curl tries to find the "home dir": It first checks for the CURL_HOME and
536 then the HOME environment variables. Failing that, it uses getpwuid() on
537 unix-like systems (which returns the home dir given the current user in your
538 system). On Windows, it then checks for the APPDATA variable, or as a last
539 resort the '%USERPROFILE%\Application Data'.
540
541 2) On windows, if there is no _curlrc file in the home dir, it checks for one
542 in the same dir the executable curl is placed. On unix-like systems, it will
543 simply try to load .curlrc from the determined home dir.
544 .IP "--limit-rate <speed>"
545 Specify the maximum transfer rate you want curl to use. This feature is useful
546 if you have a limited pipe and you'd like your transfer not use your entire
547 bandwidth.
548
549 The given speed is measured in bytes/second, unless a suffix is appended.
550 Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
551 megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
552
553 If you are also using the \fI-Y/--speed-limit\fP option, that option will take
554 precedence and might cripple the rate-limiting slightly, to help keeping the
555 speed-limit logic working.
556
557 This option was introduced in curl 7.10.
558
559 If this option is used several times, the last one will be used.
560 .IP "-l/--list-only"
561 (FTP)
562 When listing an FTP directory, this switch forces a name-only view.
563 Especially useful if you want to machine-parse the contents of an FTP
564 directory since the normal directory view doesn't use a standard look
565 or format.
566
567 This option causes an FTP NLST command to be sent.  Some FTP servers
568 list only files in their response to NLST; they do not include
569 subdirectories and symbolic links.
570
571 If this option is used twice, the second will again disable list only.
572 .IP "-L/--location"
573 (HTTP/HTTPS) If the server reports that the requested page has moved to a
574 different location (indicated with a Location: header and a 3XX response code)
575 this option will make curl redo the request on the new place. If used together
576 with \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages
577 will be shown. When authentication is used, curl only sends its credentials to
578 the initial host. If a redirect takes curl to a different host, it won't be
579 able to intercept the user+password. See also \fI--location-trusted\fP on how
580 to change this. You can limit the amount of redirects to follow by using the
581 \fI--max-redirs\fP option.
582
583 If this option is used twice, the second will again disable location following.
584 .IP "--location-trusted"
585 (HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
586 password to all hosts that the site may redirect to. This may or may not
587 introduce a security breach if the site redirects you do a site to which
588 you'll send your authentication info (which is plaintext in the case of HTTP
589 Basic authentication).
590
591 If this option is used twice, the second will again disable location following.
592 .IP "--max-filesize <bytes>"
593 Specify the maximum size (in bytes) of a file to download. If the file
594 requested is larger than this value, the transfer will not start and curl will
595 return with exit code 63.
596
597 NOTE: The file size is not always known prior to download, and for such files
598 this option has no effect even if the file transfer ends up being larger than
599 this given limit. This concerns both FTP and HTTP transfers.
600 .IP "-m/--max-time <seconds>"
601 Maximum time in seconds that you allow the whole operation to take.  This is
602 useful for preventing your batch jobs from hanging for hours due to slow
603 networks or links going down.  See also the \fI--connect-timeout\fP option.
604
605 If this option is used several times, the last one will be used.
606 .IP "-M/--manual"
607 Manual. Display the huge help text.
608 .IP "-n/--netrc"
609 Makes curl scan the \fI.netrc\fP file in the user's home directory for login
610 name and password. This is typically used for ftp on unix. If used with http,
611 curl will enable user authentication. See
612 .BR netrc(4)
613 or
614 .BR ftp(1)
615 for details on the file format. Curl will not complain if that file
616 hasn't the right permissions (it should not be world nor group
617 readable). The environment variable "HOME" is used to find the home
618 directory.
619
620 A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
621 to ftp to the machine host.domain.com with user name \&'myself' and password
622 \&'secret' should look similar to:
623
624 .B "machine host.domain.com login myself password secret"
625
626 If this option is used twice, the second will again disable netrc usage.
627 .IP "--netrc-optional"
628 Very similar to \fI--netrc\fP, but this option makes the .netrc usage
629 \fBoptional\fP and not mandatory as the \fI--netrc\fP does.
630 .IP "--negotiate"
631 (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
632 designed by Microsoft and is used in their web applications. It is primarily
633 meant as a support for Kerberos5 authentication but may be also used along
634 with another authentication methods. For more information see IETF draft
635 draft-brezak-spnego-http-04.txt. (Added in 7.10.6)
636
637 This option requires that the library was built with GSSAPI support. This is
638 not very common. Use \fI-V/--version\fP to see if your version supports
639 GSS-Negotiate.
640
641 When using this option, you must also provide a fake -u/--user option to
642 activate the authentication code properly. Sending a '-u :' is enough as the
643 user name and password from the -u option aren't actually used.
644
645 If this option is used several times, the following occurrences make no
646 difference.
647 .IP "-N/--no-buffer"
648 Disables the buffering of the output stream. In normal work situations, curl
649 will use a standard buffered output stream that will have the effect that it
650 will output the data in chunks, not necessarily exactly when the data arrives.
651 Using this option will disable that buffering.
652
653 If this option is used twice, the second will again switch on buffering.
654 .IP "--ntlm"
655 (HTTP) Enables NTLM authentication. The NTLM authentication method was
656 designed by Microsoft and is used by IIS web servers. It is a proprietary
657 protocol, reversed engineered by clever people and implemented in curl based
658 on their efforts. This kind of behavior should not be endorsed, you should
659 encourage everyone who uses NTLM to switch to a public and documented
660 authentication method instead. Such as Digest. (Added in 7.10.6)
661
662 If you want to enable NTLM for your proxy authentication, then use
663 \fI--proxy-ntlm\fP.
664
665 This option requires that the library was built with SSL support. Use
666 \fI-V/--version\fP to see if your curl supports NTLM.
667
668 If this option is used several times, the following occurrences make no
669 difference.
670 .IP "-o/--output <file>"
671 Write output to <file> instead of stdout. If you are using {} or [] to fetch
672 multiple documents, you can use '#' followed by a number in the <file>
673 specifier. That variable will be replaced with the current string for the URL
674 being fetched. Like in:
675
676   curl http://{one,two}.site.com -o "file_#1.txt"
677
678 or use several variables like:
679
680   curl http://{site,host}.host[1-5].com -o "#1_#2"
681
682 You may use this option as many times as you have number of URLs.
683
684 See also the \fI--create-dirs\fP option to create the local directories
685 dynamically.
686 .IP "-O/--remote-name"
687 Write output to a local file named like the remote file we get. (Only the file
688 part of the remote file is used, the path is cut off.)
689
690 The remote file name to use for saving is extracted from the given URL,
691 nothing else.
692
693 You may use this option as many times as you have number of URLs.
694 .IP "--pass <phrase>"
695 (SSL) Pass phrase for the private key
696
697 If this option is used several times, the last one will be used.
698 .IP "--proxy-anyauth"
699 Tells curl to pick a suitable authentication method when communicating with
700 the given proxy. This will cause an extra request/response round-trip. Added
701 in curl 7.13.2.
702
703 If this option is used twice, the second will again disable the proxy use-any
704 authentication.
705 .IP "--proxy-basic"
706 Tells curl to use HTTP Basic authentication when communicating with the given
707 proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
708 the default authentication method curl uses with proxies.
709
710 If this option is used twice, the second will again disable proxy HTTP Basic
711 authentication.
712 .IP "--proxy-digest"
713 Tells curl to use HTTP Digest authentication when communicating with the given
714 proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
715
716 If this option is used twice, the second will again disable proxy HTTP Digest.
717 .IP "--proxy-ntlm"
718 Tells curl to use HTTP NTLM authentication when communicating with the given
719 proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
720
721 If this option is used twice, the second will again disable proxy HTTP NTLM.
722 .IP "-p/--proxytunnel"
723 When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
724 protocols to attempt to tunnel through the proxy instead of merely using it to
725 do HTTP-like operations. The tunnel approach is made with the HTTP proxy
726 CONNECT request and requires that the proxy allows direct connect to the
727 remote port number curl wants to tunnel through to.
728
729 If this option is used twice, the second will again disable proxy tunnel.
730 .IP "-P/--ftp-port <address>"
731 (FTP) Reverses the initiator/listener roles when connecting with ftp. This
732 switch makes Curl use the PORT command instead of PASV. In practice, PORT
733 tells the server to connect to the client's specified address and port, while
734 PASV asks the server for an ip address and port to connect to. <address>
735 should be one of:
736 .RS
737 .IP interface
738 i.e "eth0" to specify which interface's IP address you want to use  (Unix only)
739 .IP "IP address"
740 i.e "192.168.10.1" to specify exact IP number
741 .IP "host name"
742 i.e "my.host.domain" to specify machine
743 .IP "-"
744 (any single-letter string) to make it pick the machine's default
745 .RE
746
747 If this option is used several times, the last one will be used. Disable the
748 use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
749 instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
750 .IP "-q"
751 If used as the first parameter on the command line, the \fIcurlrc\fP config
752 file will not be read and used. See the \fI-K/--config\fP for details on the
753 default config file search path.
754 .IP "-Q/--quote <command>"
755 (FTP) Send an arbitrary command to the remote FTP server. Quote commands are
756 sent BEFORE the transfer is taking place (just after the initial PWD command
757 to be exact). To make commands take place after a successful transfer, prefix
758 them with a dash '-'. To make commands get sent after libcurl has changed
759 working directory, just before the transfer command(s), prefix the command
760 with '+'. You may specify any amount of commands. If the server returns
761 failure for one of the commands, the entire operation will be aborted. You
762 must send syntactically correct FTP commands as RFC959 defines.
763
764 This option can be used multiple times.
765 .IP "--random-file <file>"
766 (HTTPS) Specify the path name to file containing what will be considered as
767 random data. The data is used to seed the random engine for SSL connections.
768 See also the \fI--egd-file\fP option.
769 .IP "-r/--range <range>"
770 (HTTP/FTP)
771 Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP
772 server. Ranges can be specified in a number of ways.
773 .RS
774 .TP 10
775 .B 0-499
776 specifies the first 500 bytes
777 .TP
778 .B 500-999
779 specifies the second 500 bytes
780 .TP
781 .B -500
782 specifies the last 500 bytes
783 .TP
784 .B 9500-
785 specifies the bytes from offset 9500 and forward
786 .TP
787 .B 0-0,-1
788 specifies the first and last byte only(*)(H)
789 .TP
790 .B 500-700,600-799
791 specifies 300 bytes from offset 500(H)
792 .TP
793 .B 100-199,500-599
794 specifies two separate 100 bytes ranges(*)(H)
795 .RE
796
797 (*) = NOTE that this will cause the server to reply with a multipart
798 response!
799
800 You should also be aware that many HTTP/1.1 servers do not have this feature
801 enabled, so that when you attempt to get a range, you'll instead get the whole
802 document.
803
804 FTP range downloads only support the simple syntax 'start-stop' (optionally
805 with one of the numbers omitted). It depends on the non-RFC command SIZE.
806
807 If this option is used several times, the last one will be used.
808 .IP "-R/--remote-time"
809 When used, this will make libcurl attempt to figure out the timestamp of the
810 remote file, and if that is available make the local file get that same
811 timestamp.
812
813 If this option is used twice, the second time disables this again.
814 .IP "--retry <num>"
815 If a transient error is returned when curl tries to perform a transfer, it
816 will retry this number of times before giving up. Setting the number to 0
817 makes curl do no retries (which is the default). Transient error means either:
818 a timeout, an FTP 5xx response code or an HTTP 5xx response code.
819
820 When curl is about to retry a transfer, it will first wait one second and then
821 for all forthcoming retries it will double the waiting time until it reaches
822 10 minutes which then will be the delay between the rest of the retries.  By
823 using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
824 also \fI--retry-max-time\fP to limit the total time allowed for
825 retries. (Option added in 7.12.3)
826
827 If this option is used multiple times, the last occurrence decide the amount.
828 .IP "--retry-delay <seconds>"
829 Make curl sleep this amount of time between each retry when a transfer has
830 failed with a transient error (it changes the default backoff time algorithm
831 between retries). This option is only interesting if \fI--retry\fP is also
832 used. Setting this delay to zero will make curl use the default backoff time.
833 (Option added in 7.12.3)
834
835 If this option is used multiple times, the last occurrence decide the amount.
836 .IP "--retry-max-time <seconds>"
837 The retry timer is reset before the first transfer attempt. Retries will be
838 done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
839 given limit. Notice that if the timer hasn't reached the limit, the request
840 will be made and while performing, it may take longer than this given time
841 period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
842 Set this option to zero to not timeout retries. (Option added in 7.12.3)
843
844 If this option is used multiple times, the last occurrence decide the amount.
845 .IP "-s/--silent"
846 Silent mode. Don't show progress meter or error messages.  Makes
847 Curl mute.
848
849 If this option is used twice, the second will again disable mute.
850 .IP "-S/--show-error"
851 When used with -s it makes curl show error message if it fails.
852
853 If this option is used twice, the second will again disable show error.
854 .IP "--socks <host[:port]>"
855 Use the specified SOCKS5 proxy. If the port number is not specified, it is
856 assumed at port 1080. (Option added in 7.11.1)
857
858 This option overrides any previous use of \fI-x/--proxy\fP, as they are
859 mutually exclusive.
860
861 If this option is used several times, the last one will be used.
862 .IP "--stderr <file>"
863 Redirect all writes to stderr to the specified file instead. If the file name
864 is a plain '-', it is instead written to stdout. This option has no point when
865 you're using a shell with decent redirecting capabilities.
866
867 If this option is used several times, the last one will be used.
868 .IP "--tcp-nodelay"
869 Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
870 details about this option. (Added in 7.11.2)
871
872 If this option is used several times, each occurrence toggles this on/off.
873 .IP "-t/--telnet-option <OPT=val>"
874 Pass options to the telnet protocol. Supported options are:
875
876 TTYPE=<term> Sets the terminal type.
877
878 XDISPLOC=<X display> Sets the X display location.
879
880 NEW_ENV=<var,val> Sets an environment variable.
881 .IP "-T/--upload-file <file>"
882 This transfers the specified local file to the remote URL. If there is no file
883 part in the specified URL, Curl will append the local file name. NOTE that you
884 must use a trailing / on the last directory to really prove to Curl that there
885 is no file name or curl will think that your last directory name is the remote
886 file name to use. That will most likely cause the upload operation to fail. If
887 this is used on a http(s) server, the PUT command will be used.
888
889 Use the file name "-" (a single dash) to use stdin instead of a given file.
890
891 Before 7.10.8, when this option was used several times, the last one was used.
892
893 In curl 7.10.8 and later, you can specify one -T for each URL on the command
894 line. Each -T + URL pair specifies what to upload and to where. curl also
895 supports "globbing" of the -T argument, meaning that you can upload multiple
896 files to a single URL by using the same URL globbing style supported in the
897 URL, like this:
898
899 curl -T "{file1,file2}" http://www.uploadtothissite.com
900
901 or even
902
903 curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
904 .IP "--trace <file>"
905 Enables a full trace dump of all incoming and outgoing data, including
906 descriptive information, to the given output file. Use "-" as filename to have
907 the output sent to stdout.
908
909 If this option is used several times, the last one will be used. (Added in
910 7.9.7)
911 .IP "--trace-ascii <file>"
912 Enables a full trace dump of all incoming and outgoing data, including
913 descriptive information, to the given output file. Use "-" as filename to have
914 the output sent to stdout.
915
916 This is very similar to \fI--trace\fP, but leaves out the hex part and only
917 shows the ASCII part of the dump. It makes smaller output that might be easier
918 to read for untrained humans.
919
920 If this option is used several times, the last one will be used. (Added in
921 7.9.7)
922 .IP "--trace-time"
923 Prepends a time stamp to each trace or verbose line that curl displays.
924
925 If this option is used several times, each occurrence will toggle it on/off.
926 (Added in 7.14.0        )
927 .IP "-u/--user <user:password>"
928 Specify user and password to use for server authentication. Overrides
929 \fI-n/--netrc\fP and \fI--netrc-optional\fP.
930
931 If you use an SSPI-enabled curl binary and do NTLM autentication, you can
932 force curl to pick up the user name and password from your environment by
933 simply specifying a single colon with this option: "-u :".
934
935 If this option is used several times, the last one will be used.
936 .IP "-U/--proxy-user <user:password>"
937 Specify user and password to use for proxy authentication.
938
939 If you use an SSPI-enabled curl binary and do NTLM autentication, you can
940 force curl to pick up the user name and password from your environment by
941 simply specifying a single colon with this option: "-U :".
942
943 If this option is used several times, the last one will be used.
944 .IP "--url <URL>"
945 Specify a URL to fetch. This option is mostly handy when you want to specify
946 URL(s) in a config file.
947
948 This option may be used any number of times. To control where this URL is
949 written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
950 .IP "-v/--verbose"
951 Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines
952 starting with '>' means "header data" sent by curl, '<' means "header data"
953 received by curl that is hidden in normal cases and lines starting with '*'
954 means additional info provided by curl.
955
956 Note that if you only want HTTP headers in the output, \fI-i/--include\fP
957 might be option you're looking for.
958
959 If you think this option still doesn't give you enough details, consider using
960 \fI--trace\fP or \fI--trace-ascii\fP instead.
961
962 If this option is used twice, the second will again disable verbose.
963 .IP "-V/--version"
964 Displays information about curl and the libcurl version it uses.
965
966 The first line includes the full version of curl, libcurl and other 3rd party
967 libraries linked with the executable.
968
969 The second line (starts with "Protocols:") shows all protocols that libcurl
970 reports to support.
971
972 The third line (starts with "Features:") shows specific features libcurl
973 reports to offer. Available features include:
974 .RS
975 .IP "IPv6"
976 You can use IPv6 with this.
977 .IP "krb4"
978 Krb4 for ftp is supported.
979 .IP "SSL"
980 HTTPS and FTPS are supported.
981 .IP "libz"
982 Automatic decompression of compressed files over HTTP is supported.
983 .IP "NTLM"
984 NTLM authentication is supported.
985 .IP "GSS-Negotiate"
986 Negotiate authentication is supported.
987 .IP "Debug"
988 This curl uses a libcurl built with Debug. This enables more error-tracking
989 and memory debugging etc. For curl-developers only!
990 .IP "AsynchDNS"
991 This curl uses asynchronous name resolves.
992 .IP "SPNEGO"
993 SPNEGO Negotiate authentication is supported.
994 .IP "Largefile"
995 This curl supports transfers of large files, files larger than 2GB.
996 .IP "IDN"
997 This curl supports IDN - international domain names.
998 .IP "SSPI"
999 SSPI is supported. If you use NTLM and set a blank user name, curl will
1000 authenticate with your current user and password.
1001 .RE
1002 .IP "-w/--write-out <format>"
1003 Defines what to display on stdout after a completed and successful
1004 operation. The format is a string that may contain plain text mixed with any
1005 number of variables. The string can be specified as "string", to get read from
1006 a particular file you specify it "@filename" and to tell curl to read the
1007 format from stdin you write "@-".
1008
1009 The variables present in the output format will be substituted by the value or
1010 text that curl thinks fit, as described below. All variables are specified
1011 like %{variable_name} and to output a normal % you just write them like
1012 %%. You can output a newline by using \\n, a carriage return with \\r and a tab
1013 space with \\t.
1014
1015 .B NOTE:
1016 The %-letter is a special letter in the win32-environment, where all
1017 occurrences of % must be doubled when using this option.
1018
1019 Available variables are at this point:
1020 .RS
1021 .TP 15
1022 .B url_effective
1023 The URL that was fetched last. This is mostly meaningful if you've told curl
1024 to follow location: headers.
1025 .TP
1026 .B http_code
1027 The numerical code that was found in the last retrieved HTTP(S) page.
1028 .TP
1029 .B http_connect
1030 The numerical code that was found in the last response (from a proxy) to a
1031 curl CONNECT request. (Added in 7.12.4)
1032 .TP
1033 .B time_total
1034 The total time, in seconds, that the full operation lasted. The time will be
1035 displayed with millisecond resolution.
1036 .TP
1037 .B time_namelookup
1038 The time, in seconds, it took from the start until the name resolving was
1039 completed.
1040 .TP
1041 .B time_connect
1042 The time, in seconds, it took from the start until the connect to the remote
1043 host (or proxy) was completed.
1044 .TP
1045 .B time_pretransfer
1046 The time, in seconds, it took from the start until the file transfer is just
1047 about to begin. This includes all pre-transfer commands and negotiations that
1048 are specific to the particular protocol(s) involved.
1049 .TP
1050 .B time_redirect
1051 The time, in seconds, it took for all redirection steps include name lookup,
1052 connect, pretransfer and transfer before final transaction was
1053 started. time_redirect shows the complete execution time for multiple
1054 redirections. (Added in 7.12.3)
1055 .TP
1056 .B time_starttransfer
1057 The time, in seconds, it took from the start until the first byte is just about
1058 to be transferred. This includes time_pretransfer and also the time the
1059 server needs to calculate the result.
1060 .TP
1061 .B size_download
1062 The total amount of bytes that were downloaded.
1063 .TP
1064 .B size_upload
1065 The total amount of bytes that were uploaded.
1066 .TP
1067 .B size_header
1068 The total amount of bytes of the downloaded headers.
1069 .TP
1070 .B size_request
1071 The total amount of bytes that were sent in the HTTP request.
1072 .TP
1073 .B speed_download
1074 The average download speed that curl measured for the complete download.
1075 .TP
1076 .B speed_upload
1077 The average upload speed that curl measured for the complete upload.
1078 .TP
1079 .B content_type
1080 The Content-Type of the requested document, if there was any. (Added in 7.9.5)
1081 .TP
1082 .B num_connects
1083 Number of new connects made in the recent transfer. (Added in 7.12.3)
1084 .TP
1085 .B num_redirects
1086 Number of redirects that were followed in the request. (Added in 7.12.3)
1087 .RE
1088
1089 If this option is used several times, the last one will be used.
1090 .IP "-x/--proxy <proxyhost[:port]>"
1091 Use specified HTTP proxy. If the port number is not specified, it is assumed
1092 at port 1080.
1093
1094 This option overrides existing environment variables that sets proxy to
1095 use. If there's an environment variable setting a proxy, you can set proxy to
1096 \&"" to override it.
1097
1098 \fBNote\fP that all operations that are performed over a HTTP proxy will
1099 transparently be converted to HTTP. It means that certain protocol specific
1100 operations might not be available. This is not the case if you can tunnel
1101 through the proxy, as done with the \fI-p/--proxytunnel\fP option.
1102
1103 Starting with 7.14.1, the proxy host can be specified the exact same way as
1104 the proxy environment variables, include protocol prefix (http://) and
1105 embedded user + password.
1106
1107 If this option is used several times, the last one will be used.
1108 .IP "-X/--request <command>"
1109 (HTTP) Specifies a custom request method to use when communicating with the
1110 HTTP server.  The specified request will be used instead of the method
1111 otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
1112 details and explanations.
1113
1114 (FTP)
1115 Specifies a custom FTP command to use instead of LIST when doing file lists
1116 with ftp.
1117
1118 If this option is used several times, the last one will be used.
1119 .IP "-y/--speed-time <time>"
1120 If a download is slower than speed-limit bytes per second during a speed-time
1121 period, the download gets aborted. If speed-time is used, the default
1122 speed-limit will be 1 unless set with -y.
1123
1124 This option controls transfers and thus will not affect slow connects etc. If
1125 this is a concern for you, try the \fI--connect-timeout\fP option.
1126
1127 If this option is used several times, the last one will be used.
1128 .IP "-Y/--speed-limit <speed>"
1129 If a download is slower than this given speed, in bytes per second, for
1130 speed-time seconds it gets aborted. speed-time is set with -Y and is 30 if
1131 not set.
1132
1133 If this option is used several times, the last one will be used.
1134 .IP "-z/--time-cond <date expression>"
1135 (HTTP) Request a file that has been modified later than the given time and
1136 date, or one that has been modified before that time. The date expression can
1137 be all sorts of date strings or if it doesn't match any internal ones, it
1138 tries to get the time from a given file name instead! See the
1139 \fIcurl_getdate(3)\fP man pages for date expression details.
1140
1141 Start the date expression with a dash (-) to make it request for a document
1142 that is older than the given date/time, default is a document that is newer
1143 than the specified date/time.
1144
1145 If this option is used several times, the last one will be used.
1146 .IP "--max-redirs <num>"
1147 Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
1148 is used, this option can be used to prevent curl from following redirections
1149 \&"in absurdum". By default, the limit is set to 50 redirections. Set this
1150 option to -1 to make it limitless.
1151
1152 If this option is used several times, the last one will be used.
1153 .IP "-0/--http1.0"
1154 (HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
1155 internally preferred: HTTP 1.1.
1156 .IP "-1/--tlsv1"
1157 (HTTPS)
1158 Forces curl to use TSL version 1 when negotiating with a remote TLS server.
1159 .IP "-2/--sslv2"
1160 (HTTPS)
1161 Forces curl to use SSL version 2 when negotiating with a remote SSL server.
1162 .IP "-3/--sslv3"
1163 (HTTPS)
1164 Forces curl to use SSL version 3 when negotiating with a remote SSL server.
1165 .IP "--3p-quote"
1166 (FTP) Specify arbitrary commands to send to the source server. See the
1167 \fI-Q/--quote\fP option for details. (Added in 7.13.0)
1168 .IP "--3p-url"
1169 (FTP) Activates a FTP 3rd party transfer. Specifies the source URL to get a
1170 file from, while the "normal" URL will be used as target URL, the file that
1171 will be written/created.
1172
1173 Note that not all FTP server allow 3rd party transfers. (Added in 7.13.0)
1174 .IP "--3p-user"
1175 (FTP) Specify user:password for the source URL transfer. (Added in 7.13.0)
1176 .IP "-4/--ipv4"
1177 If libcurl is capable of resolving an address to multiple IP versions (which
1178 it is if it is ipv6-capable), this option tells libcurl to resolve names to
1179 IPv4 addresses only. (Added in 7.10.8)
1180 .IP "-6/--ipv6"
1181 If libcurl is capable of resolving an address to multiple IP versions (which
1182 it is if it is ipv6-capable), this option tells libcurl to resolve names to
1183 IPv6 addresses only. (Added in 7.10.8)
1184 .IP "-#/--progress-bar"
1185 Make curl display progress information as a progress bar instead of the
1186 default statistics.
1187
1188 If this option is used twice, the second will again disable the progress bar.
1189 .SH FILES
1190 .I ~/.curlrc
1191 .RS
1192 Default config file.
1193
1194 .SH ENVIRONMENT
1195 .IP "http_proxy [protocol://]<host>[:port]"
1196 Sets proxy server to use for HTTP.
1197 .IP "HTTPS_PROXY [protocol://]<host>[:port]"
1198 Sets proxy server to use for HTTPS.
1199 .IP "FTP_PROXY [protocol://]<host>[:port]"
1200 Sets proxy server to use for FTP.
1201 .IP "ALL_PROXY [protocol://]<host>[:port]"
1202 Sets proxy server to use if no protocol-specific proxy is set.
1203 .IP "NO_PROXY <comma-separated list of hosts>"
1204 list of host names that shouldn't go through any proxy. If set to a asterisk
1205 \&'*' only, it matches all hosts.
1206 .SH EXIT CODES
1207 There exists a bunch of different error codes and their corresponding error
1208 messages that may appear during bad conditions. At the time of this writing,
1209 the exit codes are:
1210 .IP 1
1211 Unsupported protocol. This build of curl has no support for this protocol.
1212 .IP 2
1213 Failed to initialize.
1214 .IP 3
1215 URL malformat. The syntax was not correct.
1216 .IP 4
1217 URL user malformatted. The user-part of the URL syntax was not correct.
1218 .IP 5
1219 Couldn't resolve proxy. The given proxy host could not be resolved.
1220 .IP 6
1221 Couldn't resolve host. The given remote host was not resolved.
1222 .IP 7
1223 Failed to connect to host.
1224 .IP 8
1225 FTP weird server reply. The server sent data curl couldn't parse.
1226 .IP 9
1227 FTP access denied. The server denied login or denied access to the particular
1228 resource or directory you wanted to reach. Most often you tried to change to a
1229 directory that doesn't exist on the server.
1230 .IP 10
1231 FTP user/password incorrect. Either one or both were not accepted by the
1232 server.
1233 .IP 11
1234 FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
1235 .IP 12
1236 FTP weird USER reply. Curl couldn't parse the reply sent to the USER request.
1237 .IP 13
1238 FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
1239 .IP 14
1240 FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
1241 .IP 15
1242 FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
1243 .IP 16
1244 FTP can't reconnect. Couldn't connect to the host we got in the 227-line.
1245 .IP 17
1246 FTP couldn't set binary. Couldn't change transfer method to binary.
1247 .IP 18
1248 Partial file. Only a part of the file was transferred.
1249 .IP 19
1250 FTP couldn't download/access the given file, the RETR (or similar) command
1251 failed.
1252 .IP 20
1253 FTP write error. The transfer was reported bad by the server.
1254 .IP 21
1255 FTP quote error. A quote command returned error from the server.
1256 .IP 22
1257 HTTP page not retrieved. The requested url was not found or returned another
1258 error with the HTTP error code being 400 or above. This return code only
1259 appears if \fI-f/--fail\fP is used.
1260 .IP 23
1261 Write error. Curl couldn't write data to a local filesystem or similar.
1262 .IP 24
1263 Malformed user. User name badly specified.
1264 .IP 25
1265 FTP couldn't STOR file. The server denied the STOR operation, used for FTP
1266 uploading.
1267 .IP 26
1268 Read error. Various reading problems.
1269 .IP 27
1270 Out of memory. A memory allocation request failed.
1271 .IP 28
1272 Operation timeout. The specified time-out period was reached according to the
1273 conditions.
1274 .IP 29
1275 FTP couldn't set ASCII. The server returned an unknown reply.
1276 .IP 30
1277 FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
1278 command, try doing a transfer using PASV instead!
1279 .IP 31
1280 FTP couldn't use REST. The REST command failed. This command is used for
1281 resumed FTP transfers.
1282 .IP 32
1283 FTP couldn't use SIZE. The SIZE command failed. The command is an extension
1284 to the original FTP spec RFC 959.
1285 .IP 33
1286 HTTP range error. The range "command" didn't work.
1287 .IP 34
1288 HTTP post error. Internal post-request generation error.
1289 .IP 35
1290 SSL connect error. The SSL handshaking failed.
1291 .IP 36
1292 FTP bad download resume. Couldn't continue an earlier aborted download.
1293 .IP 37
1294 FILE couldn't read file. Failed to open the file. Permissions?
1295 .IP 38
1296 LDAP cannot bind. LDAP bind operation failed.
1297 .IP 39
1298 LDAP search failed.
1299 .IP 40
1300 Library not found. The LDAP library was not found.
1301 .IP 41
1302 Function not found. A required LDAP function was not found.
1303 .IP 42
1304 Aborted by callback. An application told curl to abort the operation.
1305 .IP 43
1306 Internal error. A function was called with a bad parameter.
1307 .IP 44
1308 Internal error. A function was called in a bad order.
1309 .IP 45
1310 Interface error. A specified outgoing interface could not be used.
1311 .IP 46
1312 Bad password entered. An error was signaled when the password was entered.
1313 .IP 47
1314 Too many redirects. When following redirects, curl hit the maximum amount.
1315 .IP 48
1316 Unknown TELNET option specified.
1317 .IP 49
1318 Malformed telnet option.
1319 .IP 51
1320 The remote peer's SSL certificate wasn't ok
1321 .IP 52
1322 The server didn't reply anything, which here is considered an error.
1323 .IP 53
1324 SSL crypto engine not found
1325 .IP 54
1326 Cannot set SSL crypto engine as default
1327 .IP 55
1328 Failed sending network data
1329 .IP 56
1330 Failure in receiving network data
1331 .IP 57
1332 Share is in use (internal error)
1333 .IP 58
1334 Problem with the local certificate
1335 .IP 59
1336 Couldn't use specified SSL cipher
1337 .IP 60
1338 Problem with the CA cert (path? permission?)
1339 .IP 61
1340 Unrecognized transfer encoding
1341 .IP 62
1342 Invalid LDAP URL
1343 .IP 63
1344 Maximum file size exceeded
1345 .IP XX
1346 There will appear more error codes here in future releases. The existing ones
1347 are meant to never change.
1348 .SH AUTHORS / CONTRIBUTORS
1349 Daniel Stenberg is the main author, but the whole list of contributors is
1350 found in the separate THANKS file.
1351 .SH WWW
1352 http://curl.haxx.se
1353 .SH FTP
1354 ftp://ftp.sunet.se/pub/www/utilities/curl/
1355 .SH "SEE ALSO"
1356 .BR ftp (1),
1357 .BR wget (1)
1358