~ubuntu-branches/ubuntu/gutsy/curl/gutsy

« back to all changes in this revision

Viewing changes to docs/curl.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-29 15:04:24 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060629150424-pn00qumt9sml8p4m
Tags: 7.15.4-1ubuntu1
Synchronize to Debian. Only change left: Removal of stunnel and
libdb4.2-dev build dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
47
47
<p class="level0">curl - transfer a URL <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
48
48
<p class="level0"><span Class="bold">curl [options]</span> <a class="emphasis" href="#URL">[URL...]</a> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
49
 
<p class="level0"><span Class="bold">curl</span> is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction. 
 
49
<p class="level0"><span Class="bold">curl</span> is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction. 
50
50
<p class="level0">curl offers a busload of useful tricks like proxy support, user authentication, ftp upload, HTTP post, SSL (https:) connections, cookies, file transfer resume and more. As you will see below, the amount of features will make your head spin! 
51
51
<p class="level0">curl is powered by libcurl for all transfer-related features. See <span Class="manpage">libcurl (3)</span> for details. <a name="URL"></a><h2 class="nroffsh">URL</h2>
52
 
<p class="level0">The URL syntax is protocol dependent. You'll find a detailed description in RFC 2396. 
 
52
<p class="level0">The URL syntax is protocol dependent. You'll find a detailed description in RFC 3986. 
53
53
<p class="level0">You can specify multiple URLs or parts of URLs by writing part sets within braces as in: 
54
54
<p class="level0">&nbsp;<a href="http://site">http://site</a>.{one,two,three}.com 
55
55
<p class="level0">or you can get sequences of alphanumeric series by using [] as in: 
60
60
<p class="level0">Since curl 7.15.1 you can also specify step counter for the ranges, so that you can get every Nth number or letter: 
61
61
<p class="level0">&nbsp;<a href="http://www.numericals.com/file">http://www.numericals.com/file</a>[1-100:10].txt &nbsp;<a href="http://www.letters.com/file">http://www.letters.com/file</a>[a-z:2].txt 
62
62
<p class="level0">If you specify URL without protocol:// prefix, curl will attempt to guess what protocol you might want. It will then default to HTTP but try other protocols based on often-used host name prefixes. For example, for host names starting with "ftp." curl will assume you want to speak FTP. 
63
 
<p class="level0">Curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
 
63
<p class="level0">Curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="PROGRESS"></a><h2 class="nroffsh">PROGRESS METER</h2>
 
64
<p class="level0">curl normally displays a progress meter during operations, indicating amount of transfered data, transfer speeds and estimated time left etc. 
 
65
<p class="level0">However, since curl displays data to the terminal by default, if you invoke curl to do an operation and it is about to write data to the terminal, it <span Class="emphasis">disables</span> the progress meter as otherwise it would mess up the output mixing progress meter and response data. 
 
66
<p class="level0">If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redirect (&gt;), -o [file] or similar. 
 
67
<p class="level0">It is not the same case for FTP upload as that operation is not spitting out any response data to the terminal. 
 
68
<p class="level0">If you prefer a progress "bar" instead of the regular meter, <a class="emphasis" href="#-">-#</a> is your friend. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
64
69
<p class="level0">
65
70
<p class="level0"><a name="-a--append"></a><span class="nroffip">-a/--append</span> 
66
71
<p class="level1">(FTP) When used in an FTP upload, this will tell curl to append to the target file instead of overwriting it. If the file doesn't exist, it will be created. 
69
74
<p class="level1">(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if its not set to "Mozilla/4.0".  To encode blanks in the string, surround the string with single quote marks.  This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> option of course. 
70
75
<p class="level1">If this option is set more than once, the last one will be the one that's used. 
71
76
<p class="level0"><a name="--anyauth"></a><span class="nroffip">--anyauth</span> 
72
 
<p class="level1">(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims it supports. This is done by first doing a request and checking the response-headers, thus inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with <a class="emphasis" href="#--basic">--basic</a>, <a class="emphasis" href="#--digest">--digest</a>, <a class="emphasis" href="#--ntlm">--ntlm</a>, and <a class="emphasis" href="#--negotiate">--negotiate</a>. (Added in 7.10.6) 
 
77
<p class="level1">(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims it supports. This is done by first doing a request and checking the response-headers, thus inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with <a class="emphasis" href="#--basic">--basic</a>, <a class="emphasis" href="#--digest">--digest</a>, <a class="emphasis" href="#--ntlm">--ntlm</a>, and <a class="emphasis" href="#--negotiate">--negotiate</a>. 
73
78
<p class="level1">Note that using --anyauth is not recommended if you do uploads from stdin, since it may require data to be sent twice and then the client must be able to rewind. If the need should arise when uploading from stdin, the upload operation will fail. 
74
79
<p class="level1">If this option is used several times, the following occurrences make no difference. 
75
80
<p class="level0"><a name="-b--cookie"></a><span class="nroffip">-b/--cookie &lt;name=data&gt;</span> 
81
86
<p class="level1">Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be enforced by using an URL that ends with ";type=A". This option causes data sent to stdout to be in text mode for win32 systems. 
82
87
<p class="level1">If this option is used twice, the second one will disable ASCII usage. 
83
88
<p class="level0"><a name="--basic"></a><span class="nroffip">--basic</span> 
84
 
<p class="level1">(HTTP) Tells curl to use HTTP Basic authentication. This is the default and this option is usually pointless, unless you use it to override a previously set option that sets a different authentication method (such as <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--digest">--digest</a> and <a class="emphasis" href="#--negotiate">--negotiate</a>). (Added in 7.10.6) 
 
89
<p class="level1">(HTTP) Tells curl to use HTTP Basic authentication. This is the default and this option is usually pointless, unless you use it to override a previously set option that sets a different authentication method (such as <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--digest">--digest</a> and <a class="emphasis" href="#--negotiate">--negotiate</a>). 
85
90
<p class="level1">If this option is used several times, the following occurrences make no difference. 
86
91
<p class="level0"><a name="--ciphers"></a><span class="nroffip">--ciphers &lt;list of ciphers&gt;</span> 
87
92
<p class="level1">(SSL) Specifies which ciphers to use in the connection. The list of ciphers must be using valid ciphers. Read up on SSL cipher list details on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span> 
105
110
<p class="level1">To create remote directories when using FTP, try <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>. 
106
111
<p class="level0"><a name="--crlf"></a><span class="nroffip">--crlf</span> 
107
112
<p class="level1">(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). 
108
 
<p class="level1">If this option is used twice, the second will again disable crlf converting. 
 
113
<p class="level1">If this option is used several times, the following occurrences make no difference. 
109
114
<p class="level0"><a name="-d--data"></a><span class="nroffip">-d/--data &lt;data&gt;</span> 
110
115
<p class="level1">(HTTP) Sends the specified data in a POST request to the HTTP server, in a way that can emulate as if a user has filled in a HTML form and pressed the submit button. Note that the data is sent exactly as specified with no extra processing (with all newlines cut off).  The data is expected to be "url-encoded". This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to <a class="emphasis" href="#-F--form">-F/--form</a>. If this option is used more than once on the same command line, the data pieces specified will be merged together with a separating &-letter. Thus, using '-d name=daniel -d skill=lousy' would generate a post chunk that looks like 'name=daniel&skill=lousy'. 
111
116
<p class="level1">If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin.  The contents of the file must already be url-encoded. Multiple files can also be specified. Posting data from a file named 'foobar' would thus be done with <span Class="emphasis">--data</span> @foobar". 
119
124
<p class="level1">(HTTP) This posts data in a similar manner as <a class="emphasis" href="#--data-ascii">--data-ascii</a> does, although when using this option the entire context of the posted data is kept as-is. If you want to post a binary file without the strip-newlines feature of the <a class="emphasis" href="#--data-ascii">--data-ascii</a> option, this is for you. 
120
125
<p class="level1">If this option is used several times, the ones following the first will append data. 
121
126
<p class="level0"><a name="--digest"></a><span class="nroffip">--digest</span> 
122
 
<p class="level1">(HTTP) Enables HTTP Digest authentication. This is a authentication that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u--user">-u/--user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options. (Added in curl 7.10.6) 
 
127
<p class="level1">(HTTP) Enables HTTP Digest authentication. This is a authentication that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u--user">-u/--user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options. 
123
128
<p class="level1">If this option is used several times, the following occurrences make no difference. 
124
129
<p class="level0"><a name="--disable-eprt"></a><span class="nroffip">--disable-eprt</span> 
125
 
<p class="level1">(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original FTP protocol, may not work on all servers but enable more functionality in a better way than the traditional PORT command. (Added in 7.10.5) 
 
130
<p class="level1">(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original FTP protocol, may not work on all servers but enable more functionality in a better way than the traditional PORT command. 
126
131
<p class="level1">If this option is used several times, each occurrence will toggle this on/off. 
127
132
<p class="level0"><a name="--disable-epsv"></a><span class="nroffip">--disable-epsv</span> 
128
133
<p class="level1">(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV, but with this option, it will not try using EPSV. 
133
138
<p class="level1">When used on FTP, the ftp server response lines are considered being "headers" and thus are saved there. 
134
139
<p class="level1">If this option is used several times, the last one will be used. 
135
140
<p class="level0"><a name="-e--referer"></a><span class="nroffip">-e/--referer &lt;URL&gt;</span> 
136
 
<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> flag of course.  When used with <a class="emphasis" href="#-L--location">-L/--location</a> you can append ";auto" to the referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial referer. 
 
141
<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> flag of course.  When used with <a class="emphasis" href="#-L--location">-L/--location</a> you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer. 
137
142
<p class="level1">If this option is used several times, the last one will be used. 
138
143
<p class="level0"><a name="--engine"></a><span class="nroffip">--engine &lt;name&gt;</span> 
139
144
<p class="level1">Select the OpenSSL crypto engine to use for cipher operations. Use <a class="emphasis" href="#--engine">--engine list</a> to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time. 
157
162
<p class="level1">(HTTPS) Tells curl to use the specified certificate directory to verify the peer. The certificates must be in PEM format, and the directory must have been processed using the c_rehash utility supplied with openssl. Using <a class="emphasis" href="#--capath">--capath</a> can allow curl to make https connections much more efficiently than using <a class="emphasis" href="#--cacert">--cacert</a> if the <a class="emphasis" href="#--cacert">--cacert</a> file contains many CA certificates. 
158
163
<p class="level1">If this option is used several times, the last one will be used. 
159
164
<p class="level0"><a name="-f--fail"></a><span class="nroffip">-f/--fail</span> 
160
 
<p class="level1">(HTTP) Fail silently (no output at all) on server errors. This is mostly done like this to better enable scripts etc to better deal with failed attempts. In normal cases when a HTTP server fails to deliver a document, it returns a HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and fail silently instead. 
 
165
<p class="level1">(HTTP) Fail silently (no output at all) on server errors. This is mostly done like this to better enable scripts etc to better deal with failed attempts. In normal cases when a HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22. 
161
166
<p class="level1">If this option is used twice, the second will again disable silent failure. 
162
167
<p class="level0"><a name="--ftp-account"></a><span class="nroffip">--ftp-account [data]</span> 
163
168
<p class="level1">(FTP) When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0) 
164
169
<p class="level1">If this option is used twice, the second will override the previous use. 
165
170
<p class="level0"><a name="--ftp-create-dirs"></a><span class="nroffip">--ftp-create-dirs</span> 
166
 
<p class="level1">(FTP) When an FTP URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories. (Added in 7.10.7) 
167
 
<p class="level1">If this option is used twice, the second will again disable silent failure. 
 
171
<p class="level1">(FTP) When an FTP URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories. 
 
172
<p class="level1">If this option is used twice, the second will again disable directory creation. 
 
173
<p class="level0"><a name="--ftp-method"></a><span class="nroffip">--ftp-method [method]</span> 
 
174
<p class="level1">(FTP) Control what method curl should use to reach a file on a FTP(S) server. The method argument should be one of the following alternatives: 
 
175
<p class="level2">
 
176
<p class="level1"><a name="multicwd"></a><span class="nroffip">multicwd</span> 
 
177
<p class="level2">curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior. 
 
178
<p class="level1"><a name="nocwd"></a><span class="nroffip">nocwd</span> 
 
179
<p class="level2">curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior. 
 
180
<p class="level1"><a name="singlecwd"></a><span class="nroffip">singlecwd</span> 
 
181
<p class="level2">curl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'. 
 
182
<p class="level1">
168
183
<p class="level0"><a name="--ftp-pasv"></a><span class="nroffip">--ftp-pasv</span> 
169
184
<p class="level1">(FTP) Use PASV when transferring. PASV is the internal default behavior, but using this option can be used to override a previous --ftp-port option. (Added in 7.11.0) 
170
 
<p class="level1">If this option is used twice, the second will again disable silent failure. 
 
185
<p class="level1">If this option is used several times, the following occurrences make no difference. 
 
186
<p class="level1">
171
187
<p class="level0"><a name="--ftp-skip-pasv-ip"></a><span class="nroffip">--ftp-skip-pasv-ip</span> 
172
188
<p class="level1">(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead curl will re-use the same IP address it already uses for the control connection. (Added in 7.14.2) 
173
189
<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV. 
174
 
<p class="level1">If this option is used twice, the second will again disable silent failure. 
 
190
<p class="level1">If this option is used twice, the second will again use the server's suggested address. 
175
191
<p class="level0"><a name="--ftp-ssl"></a><span class="nroffip">--ftp-ssl</span> 
176
192
<p class="level1">(FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0) 
177
193
<p class="level1">If this option is used twice, the second will again disable this. 
195
211
<p class="level0"><a name="-G--get"></a><span class="nroffip">-G/--get</span> 
196
212
<p class="level1">When used, this option will make all data specified with <a class="emphasis" href="#-d--data">-d/--data</a> or <a class="emphasis" href="#--data-binary">--data-binary</a> to be used in a HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?'  separator. 
197
213
<p class="level1">If used in combination with -I, the POST data will instead be appended to the URL with a HEAD request. 
198
 
<p class="level1">If used multiple times, nothing special happens. 
 
214
<p class="level1">If this option is used several times, the following occurrences make no difference. 
199
215
<p class="level0"><a name="-h--help"></a><span class="nroffip">-h/--help</span> 
200
216
<p class="level1">Usage help. 
201
217
<p class="level0"><a name="-H--header"></a><span class="nroffip">-H/--header &lt;header&gt;</span> 
216
232
<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on a FTP or FILE file, curl displays the file size and last modification time only. 
217
233
<p class="level1">If this option is used twice, the second will again disable header only. 
218
234
<p class="level0"><a name="-j--junk-session-cookies"></a><span class="nroffip">-j/--junk-session-cookies</span> 
219
 
<p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down. (Added in 7.9.7) 
 
235
<p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down. 
220
236
<p class="level1">If this option is used several times, each occurrence will toggle this on/off. 
221
237
<p class="level0"><a name="-k--insecure"></a><span class="nroffip">-k/--insecure</span> 
222
 
<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. Starting with curl 7.10, all SSL connections will be attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" to fail unless <a class="emphasis" href="#-k--insecure">-k/--insecure</a> is used. 
 
238
<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" to fail unless <a class="emphasis" href="#-k--insecure">-k/--insecure</a> is used. 
223
239
<p class="level1">If this option is used twice, the second time will again disable it. 
224
240
<p class="level0"><a name="--key"></a><span class="nroffip">--key &lt;key&gt;</span> 
225
241
<p class="level1">(SSL) Private key file name. Allows you to provide your private key in this separate file. 
232
248
<p class="level1">This option requires that the library was built with kerberos4 support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports it. 
233
249
<p class="level1">If this option is used several times, the last one will be used. 
234
250
<p class="level0"><a name="-K--config"></a><span class="nroffip">-K/--config &lt;config file&gt;</span> 
235
 
<p class="level1">Specify which config file to read curl arguments from. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. Options and their parameters must be specified on the same config file line. If the parameter is to contain white spaces, the parameter must be inclosed within quotes.  If the first column of a config line is a '#' character, the rest of the line will be treated as a comment. 
 
251
<p class="level1">Specify which config file to read curl arguments from. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. Options and their parameters must be specified on the same config file line. If the parameter is to contain white spaces, the parameter must be enclosed within quotes.  If the first column of a config line is a '#' character, the rest of the line will be treated as a comment. 
236
252
<p class="level1">Specify the filename as '-' to make curl read the file from stdin. 
237
253
<p class="level1">Note that to be able to specify a URL in the config file, you need to specify it using the <a class="emphasis" href="#--url">--url</a> option, and not by simply writing the URL on its own line. So, it could look similar to this: 
238
254
<p class="level1">url = "<a href="http://curl.haxx.se/docs/">http://curl.haxx.se/docs/</a>" 
244
260
<p class="level1">Specify the maximum transfer rate you want curl to use. This feature is useful if you have a limited pipe and you'd like your transfer not use your entire bandwidth. 
245
261
<p class="level1">The given speed is measured in bytes/second, unless a suffix is appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. 
246
262
<p class="level1">If you are also using the <a class="emphasis" href="#-Y--speed-limit">-Y/--speed-limit</a> option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit logic working. 
247
 
<p class="level1">This option was introduced in curl 7.10. 
248
263
<p class="level1">If this option is used several times, the last one will be used. 
249
264
<p class="level0"><a name="-l--list-only"></a><span class="nroffip">-l/--list-only</span> 
250
265
<p class="level1">(FTP) When listing an FTP directory, this switch forces a name-only view. Especially useful if you want to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format. 
251
266
<p class="level1">This option causes an FTP NLST command to be sent.  Some FTP servers list only files in their response to NLST; they do not include subdirectories and symbolic links. 
252
267
<p class="level1">If this option is used twice, the second will again disable list only. 
 
268
<p class="level0"><a name="--local-port"></a><span class="nroffip">--local-port &lt;num&gt;[-num]</span> 
 
269
<p class="level1">Set a prefered number or range of local port numbers to use for the connection(s).  Note that port numbers by nature is a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures. (Added in 7.15.2) 
253
270
<p class="level0"><a name="-L--location"></a><span class="nroffip">-L/--location</span> 
254
 
<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has a different location (indicated with the header line Location:) this flag will let curl attempt to reattempt the get on the new place. If used together with <a class="emphasis" href="#-i--include">-i/--include</a> or <a class="emphasis" href="#-I--head">-I/--head</a>, headers from all requested pages will be shown. If authentication is used, curl will only send its credentials to the initial host, so if a redirect takes curl to a different host, it won't intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. 
 
271
<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code) this option will make curl redo the request on the new place. If used together with <a class="emphasis" href="#-i--include">-i/--include</a> or <a class="emphasis" href="#-I--head">-I/--head</a>, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. You can limit the amount of redirects to follow by using the <a class="emphasis" href="#--max-redirs">--max-redirs</a> option. 
255
272
<p class="level1">If this option is used twice, the second will again disable location following. 
256
273
<p class="level0"><a name="--location-trusted"></a><span class="nroffip">--location-trusted</span> 
257
274
<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L--location">-L/--location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you do a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication). 
272
289
<p class="level0"><a name="--netrc-optional"></a><span class="nroffip">--netrc-optional</span> 
273
290
<p class="level1">Very similar to <span Class="emphasis">--netrc</span>, but this option makes the .netrc usage <span Class="bold">optional</span> and not mandatory as the <span Class="emphasis">--netrc</span> does. 
274
291
<p class="level0"><a name="--negotiate"></a><span class="nroffip">--negotiate</span> 
275
 
<p class="level1">(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may be also used along with another authentication methods. For more information see IETF draft draft-brezak-spnego-http-04.txt. (Added in 7.10.6) 
 
292
<p class="level1">(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may be also used along with another authentication methods. For more information see IETF draft draft-brezak-spnego-http-04.txt. 
276
293
<p class="level1">This option requires that the library was built with GSSAPI support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your version supports GSS-Negotiate. 
277
294
<p class="level1">When using this option, you must also provide a fake -u/--user option to activate the authentication code properly. Sending a '-u :' is enough as the user name and password from the -u option aren't actually used. 
278
295
<p class="level1">If this option is used several times, the following occurrences make no difference. 
280
297
<p class="level1">Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering. 
281
298
<p class="level1">If this option is used twice, the second will again switch on buffering. 
282
299
<p class="level0"><a name="--ntlm"></a><span class="nroffip">--ntlm</span> 
283
 
<p class="level1">(HTTP) Enables NTLM authentication. The NTLM authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol, reversed engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and documented authentication method instead. Such as Digest. (Added in 7.10.6) 
 
300
<p class="level1">(HTTP) Enables NTLM authentication. The NTLM authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol, reversed engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and documented authentication method instead. Such as Digest. 
284
301
<p class="level1">If you want to enable NTLM for your proxy authentication, then use <a class="emphasis" href="#--proxy-ntlm">--proxy-ntlm</a>. 
285
302
<p class="level1">This option requires that the library was built with SSL support. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports NTLM. 
286
303
<p class="level1">If this option is used several times, the following occurrences make no difference. 
293
310
<p class="level1">See also the <a class="emphasis" href="#--create-dirs">--create-dirs</a> option to create the local directories dynamically. 
294
311
<p class="level0"><a name="-O--remote-name"></a><span class="nroffip">-O/--remote-name</span> 
295
312
<p class="level1">Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.) 
296
 
<p class="level1">The remote file name to use for saving is extracted from the given URL. Nothing else 
 
313
<p class="level1">The remote file name to use for saving is extracted from the given URL, nothing else. 
297
314
<p class="level1">You may use this option as many times as you have number of URLs. 
298
315
<p class="level0"><a name="--pass"></a><span class="nroffip">--pass &lt;phrase&gt;</span> 
299
316
<p class="level1">(SSL) Pass phrase for the private key 
300
317
<p class="level1">If this option is used several times, the last one will be used. 
301
318
<p class="level0"><a name="--proxy-anyauth"></a><span class="nroffip">--proxy-anyauth</span> 
302
 
<p class="level1">Tells curl to pick a suitable authentication method when communicating with the given proxy. This will cause an extra request/response round-trip. Added in curl 7.13.2. 
 
319
<p class="level1">Tells curl to pick a suitable authentication method when communicating with the given proxy. This will cause an extra request/response round-trip. (Added in 7.13.2) 
303
320
<p class="level1">If this option is used twice, the second will again disable the proxy use-any authentication. 
304
321
<p class="level0"><a name="--proxy-basic"></a><span class="nroffip">--proxy-basic</span> 
305
322
<p class="level1">Tells curl to use HTTP Basic authentication when communicating with the given proxy. Use <a class="emphasis" href="#--basic">--basic</a> for enabling HTTP Basic with a remote host. Basic is the default authentication method curl uses with proxies. 
323
340
<p class="level1"><a name="host"></a><span class="nroffip">host name</span> 
324
341
<p class="level2">i.e "my.host.domain" to specify machine 
325
342
<p class="level1"><a name="-"></a><span class="nroffip">-</span> 
326
 
<p class="level2">(any single-letter string) to make it pick the machine's default 
 
343
<p class="level2">make curl pick the same IP address that is already used for the control connection 
327
344
<p class="level1">
328
345
<p class="level1">If this option is used several times, the last one will be used. Disable the use of PORT with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. Disable the attempt to use the EPRT command instead of PORT by using <a class="emphasis" href="#--disable-eprt">--disable-eprt</a>. EPRT is really PORT++. 
329
346
<p class="level0"><a name="-q"></a><span class="nroffip">-q</span> 
353
370
<p class="level1">If this option is used twice, the second time disables this again. 
354
371
<p class="level0"><a name="--retry"></a><span class="nroffip">--retry &lt;num&gt;</span> 
355
372
<p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 5xx response code or an HTTP 5xx response code. 
356
 
<p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries.  By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Option added in 7.12.3) 
 
373
<p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries.  By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3) 
357
374
<p class="level1">If this option is used multiple times, the last occurrence decide the amount. 
358
375
<p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay &lt;seconds&gt;</span> 
359
 
<p class="level1">Make curl sleep this amount of time between each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Option added in 7.12.3) 
 
376
<p class="level1">Make curl sleep this amount of time between each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Added in 7.12.3) 
360
377
<p class="level1">If this option is used multiple times, the last occurrence decide the amount. 
361
378
<p class="level0"><a name="--retry-max-time"></a><span class="nroffip">--retry-max-time &lt;seconds&gt;</span> 
362
 
<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request&acute;s maximum time, use <a class="emphasis" href="#-m--max-time">-m/--max-time</a>. Set this option to zero to not timeout retries. (Option added in 7.12.3) 
 
379
<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request&acute;s maximum time, use <a class="emphasis" href="#-m--max-time">-m/--max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3) 
363
380
<p class="level1">If this option is used multiple times, the last occurrence decide the amount. 
364
381
<p class="level0"><a name="-s--silent"></a><span class="nroffip">-s/--silent</span> 
365
382
<p class="level1">Silent mode. Don't show progress meter or error messages.  Makes Curl mute. 
366
 
<p class="level1">If this option is used twice, the second will again disable mute. 
 
383
<p class="level1">If this option is used twice, the second will again disable silent mode. 
367
384
<p class="level0"><a name="-S--show-error"></a><span class="nroffip">-S/--show-error</span> 
368
385
<p class="level1">When used with -s it makes curl show error message if it fails. 
369
386
<p class="level1">If this option is used twice, the second will again disable show error. 
370
 
<p class="level0"><a name="--socks"></a><span class="nroffip">--socks &lt;host[:port]&gt;</span> 
371
 
<p class="level1">Use the specified SOCKS5 proxy. If the port number is not specified, it is assumed at port 1080. (Option added in 7.11.1) 
 
387
<p class="level0"><a name="--socks4"></a><span class="nroffip">--socks4 &lt;host[:port]&gt;</span> 
 
388
<p class="level1">Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2) 
372
389
<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
373
390
<p class="level1">If this option is used several times, the last one will be used. 
 
391
<p class="level0"><a name="--socks5"></a><span class="nroffip">--socks5 &lt;host[:port]&gt;</span> 
 
392
<p class="level1">Use the specified SOCKS5 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.11.1) 
 
393
<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
 
394
<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.) 
374
395
<p class="level0"><a name="--stderr"></a><span class="nroffip">--stderr &lt;file&gt;</span> 
375
396
<p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout. This option has no point when you're using a shell with decent redirecting capabilities. 
376
397
<p class="level1">If this option is used several times, the last one will be used. 
385
406
<p class="level0"><a name="-T--upload-file"></a><span class="nroffip">-T/--upload-file &lt;file&gt;</span> 
386
407
<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a http(s) server, the PUT command will be used. 
387
408
<p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. 
388
 
<p class="level1">Before 7.10.8, when this option was used several times, the last one was used. 
389
 
<p class="level1">In curl 7.10.8 and later, you can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this: 
 
409
<p class="level1">You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this: 
390
410
<p class="level1">curl -T "{file1,file2}" <a href="http://www.uploadtothissite.com">http://www.uploadtothissite.com</a> 
391
411
<p class="level1">or even 
392
412
<p class="level1">curl -T "img[1-1000].png" <a href="ftp://ftp.picturemania.com/upload/">ftp://ftp.picturemania.com/upload/</a> 
393
413
<p class="level0"><a name="--trace"></a><span class="nroffip">--trace &lt;file&gt;</span> 
394
414
<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout. 
395
 
<p class="level1">If this option is used several times, the last one will be used. (Added in 7.9.7) 
 
415
<p class="level1">If this option is used several times, the last one will be used. 
396
416
<p class="level0"><a name="--trace-ascii"></a><span class="nroffip">--trace-ascii &lt;file&gt;</span> 
397
417
<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout. 
398
418
<p class="level1">This is very similar to <a class="emphasis" href="#--trace">--trace</a>, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for untrained humans. 
399
 
<p class="level1">If this option is used several times, the last one will be used. (Added in 7.9.7) 
 
419
<p class="level1">If this option is used several times, the last one will be used. 
400
420
<p class="level0"><a name="--trace-time"></a><span class="nroffip">--trace-time</span> 
401
 
<p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. 
402
 
<p class="level1">If this option is used several times, each occurrence will toggle it on/off. (Added in 7.14.0        ) 
 
421
<p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0) 
 
422
<p class="level1">If this option is used several times, each occurrence will toggle it on/off. 
403
423
<p class="level0"><a name="-u--user"></a><span class="nroffip">-u/--user &lt;user:password&gt;</span> 
404
424
<p class="level1">Specify user and password to use for server authentication. Overrides <a class="emphasis" href="#-n--netrc">-n/--netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>. 
405
425
<p class="level1">If you use an SSPI-enabled curl binary and do NTLM autentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-u :". 
468
488
<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request. 
469
489
<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. 
470
490
<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. 
471
 
<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any. (Added in 7.9.5) 
 
491
<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any. 
472
492
<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3) 
473
493
<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3) 
 
494
<p class="level2"><span Class="bold">ftp_entry_path</span> The initial path libcurl ended up in when logging on to the remote FTP server. (Added in 7.15.4) 
474
495
<p class="level1">
475
496
<p class="level1">If this option is used several times, the last one will be used. 
476
497
<p class="level0"><a name="-x--proxy"></a><span class="nroffip">-x/--proxy &lt;proxyhost[:port]&gt;</span> 
513
534
<p class="level0"><a name="--3p-user"></a><span class="nroffip">--3p-user</span> 
514
535
<p class="level1">(FTP) Specify user:password for the source URL transfer. (Added in 7.13.0) 
515
536
<p class="level0"><a name="-4--ipv4"></a><span class="nroffip">-4/--ipv4</span> 
516
 
<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is ipv6-capable), this option tells libcurl to resolve names to IPv4 addresses only. (Added in 7.10.8) 
 
537
<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is ipv6-capable), this option tells libcurl to resolve names to IPv4 addresses only. 
517
538
<p class="level0"><a name="-6--ipv6"></a><span class="nroffip">-6/--ipv6</span> 
518
 
<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is ipv6-capable), this option tells libcurl to resolve names to IPv6 addresses only. (Added in 7.10.8) 
 
539
<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is ipv6-capable), this option tells libcurl to resolve names to IPv6 addresses only. 
519
540
<p class="level0"><a name="---progress-bar"></a><span class="nroffip">-#/--progress-bar</span> 
520
541
<p class="level1">Make curl display progress information as a progress bar instead of the default statistics. 
521
542
<p class="level1">If this option is used twice, the second will again disable the progress bar. <a name="FILES"></a><h2 class="nroffsh">FILES</h2>
529
550
<p class="level1">Sets proxy server to use for HTTPS. 
530
551
<p class="level0"><a name="FTPPROXY"></a><span class="nroffip">FTP_PROXY [protocol://]&lt;host&gt;[:port]</span> 
531
552
<p class="level1">Sets proxy server to use for FTP. 
532
 
<p class="level0"><a name="GOPHERPROXY"></a><span class="nroffip">GOPHER_PROXY [protocol://]&lt;host&gt;[:port]</span> 
533
 
<p class="level1">Sets proxy server to use for GOPHER. 
534
553
<p class="level0"><a name="ALLPROXY"></a><span class="nroffip">ALL_PROXY [protocol://]&lt;host&gt;[:port]</span> 
535
554
<p class="level1">Sets proxy server to use if no protocol-specific proxy is set. 
536
555
<p class="level0"><a name="NOPROXY"></a><span class="nroffip">NO_PROXY &lt;comma-separated list of hosts&gt;</span> 
660
679
<p class="level1">Invalid LDAP URL 
661
680
<p class="level0"><a name="63"></a><span class="nroffip">63</span> 
662
681
<p class="level1">Maximum file size exceeded 
 
682
<p class="level0"><a name="64"></a><span class="nroffip">64</span> 
 
683
<p class="level1">Requested FTP SSL level failed 
 
684
<p class="level0"><a name="65"></a><span class="nroffip">65</span> 
 
685
<p class="level1">Sending the data requires a rewind that failed 
 
686
<p class="level0"><a name="66"></a><span class="nroffip">66</span> 
 
687
<p class="level1">Failed to initialise SSL Engine 
 
688
<p class="level0"><a name="67"></a><span class="nroffip">67</span> 
 
689
<p class="level1">User, password or similar was not accepted and curl failed to login 
 
690
<p class="level0"><a name="68"></a><span class="nroffip">68</span> 
 
691
<p class="level1">File not found on TFTP server 
 
692
<p class="level0"><a name="69"></a><span class="nroffip">69</span> 
 
693
<p class="level1">Permission problem on TFTP server 
 
694
<p class="level0"><a name="70"></a><span class="nroffip">70</span> 
 
695
<p class="level1">Out of disk space on TFTP server 
 
696
<p class="level0"><a name="71"></a><span class="nroffip">71</span> 
 
697
<p class="level1">Illegal TFTP operation 
 
698
<p class="level0"><a name="72"></a><span class="nroffip">72</span> 
 
699
<p class="level1">Unknown TFTP transfer ID 
 
700
<p class="level0"><a name="73"></a><span class="nroffip">73</span> 
 
701
<p class="level1">File already exists (TFTP) 
 
702
<p class="level0"><a name="74"></a><span class="nroffip">74</span> 
 
703
<p class="level1">No such user (TFTP) 
 
704
<p class="level0"><a name="75"></a><span class="nroffip">75</span> 
 
705
<p class="level1">Character conversion failed 
 
706
<p class="level0"><a name="76"></a><span class="nroffip">76</span> 
 
707
<p class="level1">Character conversion functions required 
663
708
<p class="level0"><a name="XX"></a><span class="nroffip">XX</span> 
664
709
<p class="level1">There will appear more error codes here in future releases. The existing ones are meant to never change. <a name="AUTHORS"></a><h2 class="nroffsh">AUTHORS / CONTRIBUTORS</h2>
665
710
<p class="level0">Daniel Stenberg is the main author, but the whole list of contributors is found in the separate THANKS file. <a name="WWW"></a><h2 class="nroffsh">WWW</h2>