lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | .\" ************************************************************************** |
| 2 | .\" * _ _ ____ _ |
| 3 | .\" * Project ___| | | | _ \| | |
| 4 | .\" * / __| | | | |_) | | |
| 5 | .\" * | (__| |_| | _ <| |___ |
| 6 | .\" * \___|\___/|_| \_\_____| |
| 7 | .\" * |
| 8 | .\" * Copyright (C) 1998 - 2017, 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 https://curl.haxx.se/docs/copyright.html. |
| 13 | .\" * |
| 14 | .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 15 | .\" * copies of the Software, and permit persons to whom the Software is |
| 16 | .\" * furnished to do so, under the terms of the COPYING file. |
| 17 | .\" * |
| 18 | .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 19 | .\" * KIND, either express or implied. |
| 20 | .\" * |
| 21 | .\" ************************************************************************** |
| 22 | .\" |
| 23 | .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator. |
| 24 | .\" |
| 25 | .TH curl 1 "November 16, 2016" "Curl 7.54.1" "Curl Manual" |
| 26 | |
| 27 | .SH NAME |
| 28 | curl \- transfer a URL |
| 29 | .SH SYNOPSIS |
| 30 | .B curl [options] |
| 31 | .I [URL...] |
| 32 | .SH DESCRIPTION |
| 33 | .B curl |
| 34 | is a tool to transfer data from or to a server, using one of the supported |
| 35 | protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, |
| 36 | LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET |
| 37 | and TFTP). The command is designed to work without user interaction. |
| 38 | |
| 39 | curl offers a busload of useful tricks like proxy support, user |
| 40 | authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer |
| 41 | resume, Metalink, and more. As you will see below, the number of features will |
| 42 | make your head spin! |
| 43 | |
| 44 | curl is powered by libcurl for all transfer-related features. See |
| 45 | \fIlibcurl(3)\fP for details. |
| 46 | .SH URL |
| 47 | The URL syntax is protocol-dependent. You'll find a detailed description in |
| 48 | RFC 3986. |
| 49 | |
| 50 | You can specify multiple URLs or parts of URLs by writing part sets within |
| 51 | braces as in: |
| 52 | |
| 53 | http://site.{one,two,three}.com |
| 54 | |
| 55 | or you can get sequences of alphanumeric series by using [] as in: |
| 56 | |
| 57 | ftp://ftp.example.com/file[1-100].txt |
| 58 | |
| 59 | ftp://ftp.example.com/file[001-100].txt (with leading zeros) |
| 60 | |
| 61 | ftp://ftp.example.com/file[a-z].txt |
| 62 | |
| 63 | Nested sequences are not supported, but you can use several ones next to each |
| 64 | other: |
| 65 | |
| 66 | http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html |
| 67 | |
| 68 | You can specify any amount of URLs on the command line. They will be fetched |
| 69 | in a sequential manner in the specified order. |
| 70 | |
| 71 | You can specify a step counter for the ranges to get every Nth number or |
| 72 | letter: |
| 73 | |
| 74 | http://example.com/file[1-100:10].txt |
| 75 | |
| 76 | http://example.com/file[a-z:2].txt |
| 77 | |
| 78 | When using [] or {} sequences when invoked from a command line prompt, you |
| 79 | probably have to put the full URL within double quotes to avoid the shell from |
| 80 | interfering with it. This also goes for other characters treated special, like |
| 81 | for example '&', '?' and '*'. |
| 82 | |
| 83 | Provide the IPv6 zone index in the URL with an escaped percentage sign and the |
| 84 | interface name. Like in |
| 85 | |
| 86 | http://[fe80::3%25eth0]/ |
| 87 | |
| 88 | If you specify URL without protocol:// prefix, curl will attempt to guess what |
| 89 | protocol you might want. It will then default to HTTP but try other protocols |
| 90 | based on often-used host name prefixes. For example, for host names starting |
| 91 | with "ftp." curl will assume you want to speak FTP. |
| 92 | |
| 93 | curl will do its best to use what you pass to it as a URL. It is not trying to |
| 94 | validate it as a syntactically correct URL by any means but is instead |
| 95 | \fBvery\fP liberal with what it accepts. |
| 96 | |
| 97 | curl will attempt to re-use connections for multiple file transfers, so that |
| 98 | getting many files from the same server will not do multiple connects / |
| 99 | handshakes. This improves speed. Of course this is only done on files |
| 100 | specified on a single command line and cannot be used between separate curl |
| 101 | invokes. |
| 102 | .SH "PROGRESS METER" |
| 103 | curl normally displays a progress meter during operations, indicating the |
| 104 | amount of transferred data, transfer speeds and estimated time left, etc. The |
| 105 | progress meter displays number of bytes and the speeds are in bytes per |
| 106 | second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024 |
| 107 | bytes. 1M is 1048576 bytes. |
| 108 | |
| 109 | curl displays this data to the terminal by default, so if you invoke curl to |
| 110 | do an operation and it is about to write data to the terminal, it |
| 111 | \fIdisables\fP the progress meter as otherwise it would mess up the output |
| 112 | mixing progress meter and response data. |
| 113 | |
| 114 | If you want a progress meter for HTTP POST or PUT requests, you need to |
| 115 | redirect the response output to a file, using shell redirect (>), \fI-o, --output\fP or |
| 116 | similar. |
| 117 | |
| 118 | It is not the same case for FTP upload as that operation does not spit out |
| 119 | any response data to the terminal. |
| 120 | |
| 121 | If you prefer a progress "bar" instead of the regular meter, \fI-#, --progress-bar\fP is |
| 122 | your friend. You can also disable the progress meter completely with the |
| 123 | \fI-s, --silent\fP option. |
| 124 | .SH OPTIONS |
| 125 | Options start with one or two dashes. Many of the options require an |
| 126 | additional value next to them. |
| 127 | |
| 128 | The short "single-dash" form of the options, -d for example, may be used with |
| 129 | or without a space between it and its value, although a space is a recommended |
| 130 | separator. The long "double-dash" form, \fI-d, --data\fP for example, requires a space |
| 131 | between it and its value. |
| 132 | |
| 133 | Short version options that don't need any additional values can be used |
| 134 | immediately next to each other, like for example you can specify all the |
| 135 | options -O, -L and -v at once as -OLv. |
| 136 | |
| 137 | In general, all boolean options are enabled with --\fBoption\fP and yet again |
| 138 | disabled with --\fBno-\fPoption. That is, you use the exact same option name |
| 139 | but prefix it with "no-". However, in this list we mostly only list and show |
| 140 | the --option version of them. (This concept with --no options was added in |
| 141 | 7.19.0. Previously most options were toggled on/off on repeated use of the |
| 142 | same command line option.) |
| 143 | .IP "--abstract-unix-socket <path>" |
| 144 | (HTTP) Connect through an abstract Unix domain socket, instead of using the network. |
| 145 | Note: netstat shows the path of an abstract socket prefixed with '@', however |
| 146 | the <path> argument should not have this leading character. |
| 147 | |
| 148 | Added in 7.53.0. |
| 149 | .IP "--anyauth" |
| 150 | (HTTP) Tells curl to figure out authentication method by itself, and use the most |
| 151 | secure one the remote site claims to support. This is done by first doing a |
| 152 | request and checking the response-headers, thus possibly inducing an extra |
| 153 | network round-trip. This is used instead of setting a specific authentication |
| 154 | method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and \fI--negotiate\fP. |
| 155 | |
| 156 | Using \fI--anyauth\fP is not recommended if you do uploads from stdin, since it may |
| 157 | require data to be sent twice and then the client must be able to rewind. If |
| 158 | the need should arise when uploading from stdin, the upload operation will |
| 159 | fail. |
| 160 | |
| 161 | Used together with \fI-u, --user\fP. |
| 162 | |
| 163 | See also \fI--proxy-anyauth\fP and \fI--basic\fP and \fI--digest\fP. |
| 164 | .IP "-a, --append" |
| 165 | (FTP SFTP) When used in an upload, this makes curl append to the target file instead of |
| 166 | overwriting it. If the remote file doesn't exist, it will be created. Note |
| 167 | that this flag is ignored by some SFTP servers (including OpenSSH). |
| 168 | .IP "--basic" |
| 169 | (HTTP) Tells curl to use HTTP Basic authentication with the remote host. This is the |
| 170 | default and this option is usually pointless, unless you use it to override a |
| 171 | previously set option that sets a different authentication method (such as |
| 172 | \fI--ntlm\fP, \fI--digest\fP, or \fI--negotiate\fP). |
| 173 | |
| 174 | Used together with \fI-u, --user\fP. |
| 175 | |
| 176 | See also \fI--proxy-basic\fP. |
| 177 | .IP "--cacert <CA certificate>" |
| 178 | (TLS) Tells curl to use the specified certificate file to verify the peer. The file |
| 179 | may contain multiple CA certificates. The certificate(s) must be in PEM |
| 180 | format. Normally curl is built to use a default file for this, so this option |
| 181 | is typically used to alter that default file. |
| 182 | |
| 183 | curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is |
| 184 | set, and uses the given path as a path to a CA cert bundle. This option |
| 185 | overrides that variable. |
| 186 | |
| 187 | The windows version of curl will automatically look for a CA certs file named |
| 188 | \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the |
| 189 | Current Working Directory, or in any folder along your PATH. |
| 190 | |
| 191 | If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module |
| 192 | (libnsspem.so) needs to be available for this option to work properly. |
| 193 | |
| 194 | (iOS and macOS only) If curl is built against Secure Transport, then this |
| 195 | option is supported for backward compatibility with other SSL engines, but it |
| 196 | should not be set. If the option is not set, then curl will use the |
| 197 | certificates in the system and user Keychain to verify the peer, which is the |
| 198 | preferred method of verifying the peer's certificate chain. |
| 199 | |
| 200 | If this option is used several times, the last one will be used. |
| 201 | .IP "--capath <dir>" |
| 202 | (TLS) Tells curl to use the specified certificate directory to verify the |
| 203 | peer. Multiple paths can be provided by separating them with ":" (e.g. |
| 204 | \&"path1:path2:path3"). The certificates must be in PEM format, and if curl is |
| 205 | built against OpenSSL, the directory must have been processed using the |
| 206 | c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow |
| 207 | OpenSSL-powered curl to make SSL-connections much more efficiently than using |
| 208 | \fI--cacert\fP if the --cacert file contains many CA certificates. |
| 209 | |
| 210 | If this option is set, the default capath value will be ignored, and if it is |
| 211 | used several times, the last one will be used. |
| 212 | .IP "--cert-status" |
| 213 | (TLS) Tells curl to verify the status of the server certificate by using the |
| 214 | Certificate Status Request (aka. OCSP stapling) TLS extension. |
| 215 | |
| 216 | If this option is enabled and the server sends an invalid (e.g. expired) |
| 217 | response, if the response suggests that the server certificate has been revoked, |
| 218 | or no response at all is received, the verification fails. |
| 219 | |
| 220 | This is currently only implemented in the OpenSSL, GnuTLS and NSS backends. |
| 221 | |
| 222 | Added in 7.41.0. |
| 223 | .IP "--cert-type <type>" |
| 224 | (TLS) Tells curl what certificate type the provided certificate is in. PEM, DER and |
| 225 | ENG are recognized types. If not specified, PEM is assumed. |
| 226 | |
| 227 | If this option is used several times, the last one will be used. |
| 228 | |
| 229 | See also \fI-E, --cert\fP and \fI--key\fP and \fI--key-type\fP. |
| 230 | .IP "-E, --cert <certificate[:password]>" |
| 231 | (TLS) Tells curl to use the specified client certificate file when getting a file |
| 232 | with HTTPS, FTPS or another SSL-based protocol. The certificate must be in |
| 233 | PKCS#12 format if using Secure Transport, or PEM format if using any other |
| 234 | engine. If the optional password isn't specified, it will be queried for on |
| 235 | the terminal. Note that this option assumes a \&"certificate" file that is the |
| 236 | private key and the client certificate concatenated! See \fI-E, --cert\fP and \fI--key\fP to |
| 237 | specify them independently. |
| 238 | |
| 239 | If curl is built against the NSS SSL library then this option can tell |
| 240 | curl the nickname of the certificate to use within the NSS database defined |
| 241 | by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the |
| 242 | NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be |
| 243 | loaded. If you want to use a file from the current directory, please precede |
| 244 | it with "./" prefix, in order to avoid confusion with a nickname. If the |
| 245 | nickname contains ":", it needs to be preceded by "\\" so that it is not |
| 246 | recognized as password delimiter. If the nickname contains "\\", it needs to |
| 247 | be escaped as "\\\\" so that it is not recognized as an escape character. |
| 248 | |
| 249 | (iOS and macOS only) If curl is built against Secure Transport, then the |
| 250 | certificate string can either be the name of a certificate/private key in the |
| 251 | system or user keychain, or the path to a PKCS#12-encoded certificate and |
| 252 | private key. If you want to use a file from the current directory, please |
| 253 | precede it with "./" prefix, in order to avoid confusion with a nickname. |
| 254 | |
| 255 | If this option is used several times, the last one will be used. |
| 256 | |
| 257 | See also \fI--cert-type\fP and \fI--key\fP and \fI--key-type\fP. |
| 258 | .IP "--ciphers <list of ciphers>" |
| 259 | (TLS) Specifies which ciphers to use in the connection. The list of ciphers must |
| 260 | specify valid ciphers. Read up on SSL cipher list details on this URL: |
| 261 | |
| 262 | https://curl.haxx.se/docs/ssl-ciphers.html |
| 263 | |
| 264 | If this option is used several times, the last one will be used. |
| 265 | .IP "--compressed" |
| 266 | (HTTP) Request a compressed response using one of the algorithms curl supports, and |
| 267 | save the uncompressed document. If this option is used and the server sends |
| 268 | an unsupported encoding, curl will report an error. |
| 269 | .IP "-K, --config <file>" |
| 270 | |
| 271 | Specify a text file to read curl arguments from. The command line arguments |
| 272 | found in the text file will be used as if they were provided on the command |
| 273 | line. |
| 274 | |
| 275 | Options and their parameters must be specified on the same line in the file, |
| 276 | separated by whitespace, colon, or the equals sign. Long option names can |
| 277 | optionally be given in the config file without the initial double dashes and |
| 278 | if so, the colon or equals characters can be used as separators. If the option |
| 279 | is specified with one or two dashes, there can be no colon or equals character |
| 280 | between the option and its parameter. |
| 281 | |
| 282 | If the parameter is to contain whitespace, the parameter must be enclosed |
| 283 | within quotes. Within double quotes, the following escape sequences are |
| 284 | available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash preceding any other |
| 285 | letter is ignored. If the first column of a config line is a '#' character, |
| 286 | the rest of the line will be treated as a comment. Only write one option per |
| 287 | physical line in the config file. |
| 288 | |
| 289 | Specify the filename to \fI-K, --config\fP as '-' to make curl read the file from stdin. |
| 290 | |
| 291 | Note that to be able to specify a URL in the config file, you need to specify |
| 292 | it using the \fI--url\fP option, and not by simply writing the URL on its own |
| 293 | line. So, it could look similar to this: |
| 294 | |
| 295 | url = "https://curl.haxx.se/docs/" |
| 296 | |
| 297 | When curl is invoked, it (unless \fI-q, --disable\fP is used) checks for a default |
| 298 | config file and uses it if found. The default config file is checked for in |
| 299 | the following places in this order: |
| 300 | |
| 301 | 1) curl tries to find the "home dir": It first checks for the CURL_HOME and |
| 302 | then the HOME environment variables. Failing that, it uses getpwuid() on |
| 303 | Unix-like systems (which returns the home dir given the current user in your |
| 304 | system). On Windows, it then checks for the APPDATA variable, or as a last |
| 305 | resort the '%USERPROFILE%\\Application Data'. |
| 306 | |
| 307 | 2) On windows, if there is no _curlrc file in the home dir, it checks for one |
| 308 | in the same dir the curl executable is placed. On Unix-like systems, it will |
| 309 | simply try to load .curlrc from the determined home dir. |
| 310 | |
| 311 | .nf |
| 312 | # --- Example file --- |
| 313 | # this is a comment |
| 314 | url = "example.com" |
| 315 | output = "curlhere.html" |
| 316 | user-agent = "superagent/1.0" |
| 317 | |
| 318 | # and fetch another URL too |
| 319 | url = "example.com/docs/manpage.html" |
| 320 | -O |
| 321 | referer = "http://nowhereatall.example.com/" |
| 322 | # --- End of example file --- |
| 323 | .fi |
| 324 | |
| 325 | This option can be used multiple times to load multiple config files. |
| 326 | .IP "--connect-timeout <seconds>" |
| 327 | Maximum time in seconds that you allow curl's connection to take. This only |
| 328 | limits the connection phase, so if curl connects within the given period it |
| 329 | will continue - if not it will exit. Since version 7.32.0, this option |
| 330 | accepts decimal values. |
| 331 | |
| 332 | If this option is used several times, the last one will be used. |
| 333 | |
| 334 | See also \fI-m, --max-time\fP. |
| 335 | .IP "--connect-to <HOST1:PORT1:HOST2:PORT2>" |
| 336 | |
| 337 | For a request to the given HOST:PORT pair, connect to |
| 338 | CONNECT-TO-HOST:CONNECT-TO-PORT instead. This option is suitable to direct |
| 339 | requests at a specific server, e.g. at a specific cluster node in a cluster of |
| 340 | servers. This option is only used to establish the network connection. It |
| 341 | does NOT affect the hostname/port that is used for TLS/SSL (e.g. SNI, |
| 342 | certificate verification) or for the application protocols. "host" and "port" |
| 343 | may be the empty string, meaning "any host/port". "connect-to-host" and |
| 344 | "connect-to-port" may also be the empty string, meaning "use the request's |
| 345 | original host/port". |
| 346 | |
| 347 | This option can be used many times to add many connect rules. |
| 348 | |
| 349 | See also \fI--resolve\fP and \fI-H, --header\fP. Added in 7.49.0. |
| 350 | .IP "-C, --continue-at <offset>" |
| 351 | Continue/Resume a previous file transfer at the given offset. The given offset |
| 352 | is the exact number of bytes that will be skipped, counting from the beginning |
| 353 | of the source file before it is transferred to the destination. If used with |
| 354 | uploads, the FTP server command SIZE will not be used by curl. |
| 355 | |
| 356 | Use "-C -" to tell curl to automatically find out where/how to resume the |
| 357 | transfer. It then uses the given output/input files to figure that out. |
| 358 | |
| 359 | If this option is used several times, the last one will be used. |
| 360 | |
| 361 | See also \fI-r, --range\fP. |
| 362 | .IP "-c, --cookie-jar <filename>" |
| 363 | (HTTP) Specify to which file you want curl to write all cookies after a completed |
| 364 | operation. Curl writes all cookies from its in-memory cookie storage to the |
| 365 | given file at the end of operations. If no cookies are known, no data will be |
| 366 | written. The file will be written using the Netscape cookie file format. If |
| 367 | you set the file name to a single dash, "-", the cookies will be written to |
| 368 | stdout. |
| 369 | |
| 370 | This command line option will activate the cookie engine that makes curl |
| 371 | record and use cookies. Another way to activate it is to use the \fI-b, --cookie\fP |
| 372 | option. |
| 373 | |
| 374 | If the cookie jar can't be created or written to, the whole curl operation |
| 375 | won't fail or even report an error clearly. Using \fI-v, --verbose\fP will get a warning |
| 376 | displayed, but that is the only visible feedback you get about this possibly |
| 377 | lethal situation. |
| 378 | |
| 379 | If this option is used several times, the last specified file name will be |
| 380 | used. |
| 381 | .IP "-b, --cookie <data>" |
| 382 | (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly |
| 383 | the data previously received from the server in a "Set-Cookie:" line. The |
| 384 | data should be in the format "NAME1=VALUE1; NAME2=VALUE2". |
| 385 | |
| 386 | If no '=' symbol is used in the argument, it is instead treated as a filename |
| 387 | to read previously stored cookie from. This option also activates the cookie |
| 388 | engine which will make curl record incoming cookies, which may be handy if |
| 389 | you're using this in combination with the \fI-L, --location\fP option or do multiple URL |
| 390 | transfers on the same invoke. |
| 391 | |
| 392 | The file format of the file to read cookies from should be plain HTTP headers |
| 393 | (Set-Cookie style) or the Netscape/Mozilla cookie file format. |
| 394 | |
| 395 | The file specified with \fI-b, --cookie\fP is only used as input. No cookies will be |
| 396 | written to the file. To store cookies, use the \fI-c, --cookie-jar\fP option. |
| 397 | |
| 398 | Exercise caution if you are using this option and multiple transfers may |
| 399 | occur. If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie |
| 400 | format and don't specify a domain, then the cookie is sent for any domain |
| 401 | (even after redirects are followed) and cannot be modified by a server-set |
| 402 | cookie. If the cookie engine is enabled and a server sets a cookie of the same |
| 403 | name then both will be sent on a future transfer to that server, likely not |
| 404 | what you intended. To address these issues set a domain in Set-Cookie (doing |
| 405 | that will include sub domains) or use the Netscape format. |
| 406 | |
| 407 | If this option is used several times, the last one will be used. |
| 408 | |
| 409 | Users very often want to both read cookies from a file and write updated |
| 410 | cookies back to a file, so using both \fI-b, --cookie\fP and \fI-c, --cookie-jar\fP in the same |
| 411 | command line is common. |
| 412 | .IP "--create-dirs" |
| 413 | When used in conjunction with the \fI-o, --output\fP option, curl will create the |
| 414 | necessary local directory hierarchy as needed. This option creates the dirs |
| 415 | mentioned with the \fI-o, --output\fP option, nothing else. If the --output file name |
| 416 | uses no dir or if the dirs it mentions already exist, no dir will be created. |
| 417 | |
| 418 | To create remote directories when using FTP or SFTP, try \fI--ftp-create-dirs\fP. |
| 419 | .IP "--crlf" |
| 420 | (FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). |
| 421 | |
| 422 | (SMTP added in 7.40.0) |
| 423 | .IP "--crlfile <file>" |
| 424 | (TLS) Provide a file using PEM format with a Certificate Revocation List that may |
| 425 | specify peer certificates that are to be considered revoked. |
| 426 | |
| 427 | If this option is used several times, the last one will be used. |
| 428 | |
| 429 | Added in 7.19.7. |
| 430 | .IP "--data-ascii <data>" |
| 431 | (HTTP) This is just an alias for \fI-d, --data\fP. |
| 432 | .IP "--data-binary <data>" |
| 433 | (HTTP) This posts data exactly as specified with no extra processing whatsoever. |
| 434 | |
| 435 | If you start the data with the letter @, the rest should be a filename. Data |
| 436 | is posted in a similar manner as \fI-d, --data\fP does, except that newlines and |
| 437 | carriage returns are preserved and conversions are never done. |
| 438 | |
| 439 | If this option is used several times, the ones following the first will append |
| 440 | data as described in \fI-d, --data\fP. |
| 441 | .IP "--data-raw <data>" |
| 442 | (HTTP) This posts data similarly to \fI-d, --data\fP but without the special |
| 443 | interpretation of the @ character. |
| 444 | |
| 445 | See also \fI-d, --data\fP. Added in 7.43.0. |
| 446 | .IP "--data-urlencode <data>" |
| 447 | (HTTP) This posts data, similar to the other \fI-d, --data\fP options with the exception |
| 448 | that this performs URL-encoding. |
| 449 | |
| 450 | To be CGI-compliant, the <data> part should begin with a \fIname\fP followed |
| 451 | by a separator and a content specification. The <data> part can be passed to |
| 452 | curl using one of the following syntaxes: |
| 453 | .RS |
| 454 | .IP "content" |
| 455 | This will make curl URL-encode the content and pass that on. Just be careful |
| 456 | so that the content doesn't contain any = or @ symbols, as that will then make |
| 457 | the syntax match one of the other cases below! |
| 458 | .IP "=content" |
| 459 | This will make curl URL-encode the content and pass that on. The preceding = |
| 460 | symbol is not included in the data. |
| 461 | .IP "name=content" |
| 462 | This will make curl URL-encode the content part and pass that on. Note that |
| 463 | the name part is expected to be URL-encoded already. |
| 464 | .IP "@filename" |
| 465 | This will make curl load data from the given file (including any newlines), |
| 466 | URL-encode that data and pass it on in the POST. |
| 467 | .IP "name@filename" |
| 468 | This will make curl load data from the given file (including any newlines), |
| 469 | URL-encode that data and pass it on in the POST. The name part gets an equal |
| 470 | sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the |
| 471 | name is expected to be URL-encoded already. |
| 472 | .RE |
| 473 | |
| 474 | See also \fI-d, --data\fP and \fI--data-raw\fP. Added in 7.18.0. |
| 475 | .IP "-d, --data <data>" |
| 476 | (HTTP) Sends the specified data in a POST request to the HTTP server, in the same way |
| 477 | that a browser does when a user has filled in an HTML form and presses the |
| 478 | submit button. This will cause curl to pass the data to the server using the |
| 479 | content-type application/x-www-form-urlencoded. Compare to \fI-F, --form\fP. |
| 480 | |
| 481 | \fI--data-raw\fP is almost the same but does not have a special interpretation of |
| 482 | the @ character. To post data purely binary, you should instead use the |
| 483 | \fI--data-binary\fP option. To URL-encode the value of a form field you may use |
| 484 | \fI--data-urlencode\fP. |
| 485 | |
| 486 | If any of these options is used more than once on the same command line, the |
| 487 | data pieces specified will be merged together with a separating |
| 488 | &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post |
| 489 | chunk that looks like \&'name=daniel&skill=lousy'. |
| 490 | |
| 491 | If you start the data with the letter @, the rest should be a file name to |
| 492 | read the data from, or - if you want curl to read the data from |
| 493 | stdin. Multiple files can also be specified. Posting data from a file named |
| 494 | 'foobar' would thus be done with \fI-d, --data\fP @foobar. When --data is told to read |
| 495 | from a file like that, carriage returns and newlines will be stripped out. If |
| 496 | you don't want the @ character to have a special interpretation use \fI--data-raw\fP |
| 497 | instead. |
| 498 | |
| 499 | See also \fI--data-binary\fP and \fI--data-urlencode\fP and \fI--data-raw\fP. This option overrides \fI-F, --form\fP and \fI-I, --head\fP and \fI--upload\fP. |
| 500 | .IP "--delegation <LEVEL>" |
| 501 | (GSS/kerberos) Set LEVEL to tell the server what it is allowed to delegate when it |
| 502 | comes to user credentials. |
| 503 | .RS |
| 504 | .IP "none" |
| 505 | Don't allow any delegation. |
| 506 | .IP "policy" |
| 507 | Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos |
| 508 | service ticket, which is a matter of realm policy. |
| 509 | .IP "always" |
| 510 | Unconditionally allow the server to delegate. |
| 511 | .RE |
| 512 | .IP "--digest" |
| 513 | (HTTP) Enables HTTP Digest authentication. This is an authentication scheme that |
| 514 | prevents the password from being sent over the wire in clear text. Use this in |
| 515 | combination with the normal \fI-u, --user\fP option to set user name and password. |
| 516 | |
| 517 | If this option is used several times, only the first one is used. |
| 518 | |
| 519 | See also \fI-u, --user\fP and \fI--proxy-digest\fP and \fI--anyauth\fP. This option overrides \fI--basic\fP and \fI--ntlm\fP and \fI--negotiate\fP. |
| 520 | .IP "--disable-eprt" |
| 521 | (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active |
| 522 | FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT |
| 523 | before using PORT, but with this option, it will use PORT right away. EPRT and |
| 524 | LPRT are extensions to the original FTP protocol, and may not work on all |
| 525 | servers, but they enable more functionality in a better way than the |
| 526 | traditional PORT command. |
| 527 | |
| 528 | --eprt can be used to explicitly enable EPRT again and --no-eprt is an alias |
| 529 | for \fI--disable-eprt\fP. |
| 530 | |
| 531 | If the server is accessed using IPv6, this option will have no effect as EPRT |
| 532 | is necessary then. |
| 533 | |
| 534 | Disabling EPRT only changes the active behavior. If you want to switch to |
| 535 | passive mode you need to not use \fI-P, --ftp-port\fP or force it with \fI--ftp-pasv\fP. |
| 536 | .IP "--disable-epsv" |
| 537 | (FTP) (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP |
| 538 | transfers. Curl will normally always first attempt to use EPSV before PASV, |
| 539 | but with this option, it will not try using EPSV. |
| 540 | |
| 541 | --epsv can be used to explicitly enable EPSV again and --no-epsv is an alias |
| 542 | for \fI--disable-epsv\fP. |
| 543 | |
| 544 | If the server is an IPv6 host, this option will have no effect as EPSV is |
| 545 | necessary then. |
| 546 | |
| 547 | Disabling EPSV only changes the passive behavior. If you want to switch to |
| 548 | active mode you need to use \fI-P, --ftp-port\fP. |
| 549 | .IP "-q, --disable" |
| 550 | If used as the first parameter on the command line, the \fIcurlrc\fP config |
| 551 | file will not be read and used. See the \fI-K, --config\fP for details on the default |
| 552 | config file search path. |
| 553 | .IP "--dns-interface <interface>" |
| 554 | (DNS) Tell curl to send outgoing DNS requests through <interface>. This option is a |
| 555 | counterpart to \fI--interface\fP (which does not affect DNS). The supplied string |
| 556 | must be an interface name (not an address). |
| 557 | |
| 558 | See also \fI--dns-ipv4-addr\fP and \fI--dns-ipv6-addr\fP. \fI--dns-interface\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0. |
| 559 | .IP "--dns-ipv4-addr <address>" |
| 560 | (DNS) Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that |
| 561 | the DNS requests originate from this address. The argument should be a |
| 562 | single IPv4 address. |
| 563 | |
| 564 | See also \fI--dns-interface\fP and \fI--dns-ipv6-addr\fP. \fI--dns-ipv4-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0. |
| 565 | .IP "--dns-ipv6-addr <address>" |
| 566 | (DNS) Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that |
| 567 | the DNS requests originate from this address. The argument should be a |
| 568 | single IPv6 address. |
| 569 | |
| 570 | See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-ipv6-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0. |
| 571 | .IP "--dns-servers <addresses>" |
| 572 | Set the list of DNS servers to be used instead of the system default. |
| 573 | The list of IP addresses should be separated with commas. Port numbers |
| 574 | may also optionally be given as \fI:<port-number>\fP after each IP |
| 575 | address. |
| 576 | |
| 577 | \fI--dns-servers\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0. |
| 578 | .IP "-D, --dump-header <filename>" |
| 579 | (HTTP FTP) Write the received protocol headers to the specified file. |
| 580 | |
| 581 | This option is handy to use when you want to store the headers that an HTTP |
| 582 | site sends to you. Cookies from the headers could then be read in a second |
| 583 | curl invocation by using the \fI-b, --cookie\fP option! The \fI-c, --cookie-jar\fP option is a |
| 584 | better way to store cookies. |
| 585 | |
| 586 | When used in FTP, the FTP server response lines are considered being "headers" |
| 587 | and thus are saved there. |
| 588 | |
| 589 | If this option is used several times, the last one will be used. |
| 590 | |
| 591 | See also \fI-o, --output\fP. |
| 592 | .IP "--egd-file <file>" |
| 593 | (TLS) Specify the path name to the Entropy Gathering Daemon socket. The socket is |
| 594 | used to seed the random engine for SSL connections. |
| 595 | |
| 596 | See also \fI--random-file\fP. |
| 597 | .IP "--engine <name>" |
| 598 | (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI--engine\fP |
| 599 | list to print a list of build-time supported engines. Note that not all (or |
| 600 | none) of the engines may be available at run-time. |
| 601 | .IP "--expect100-timeout <seconds>" |
| 602 | (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue |
| 603 | response when curl emits an Expects: 100-continue header in its request. By |
| 604 | default curl will wait one second. This option accepts decimal values! When |
| 605 | curl stops waiting, it will continue as if the response has been received. |
| 606 | |
| 607 | See also \fI--connect-timeout\fP. Added in 7.47.0. |
| 608 | .IP "--fail-early" |
| 609 | Fail and exit on the first detected transfer error. |
| 610 | |
| 611 | When curl is used to do multiple transfers on the command line, it will |
| 612 | attempt to operate on each given URL, one by one. By default, it will ignore |
| 613 | errors if there are more URLs given and the last URL's success will determine |
| 614 | the error code curl returns. So early failures will be "hidden" by subsequent |
| 615 | successful transfers. |
| 616 | |
| 617 | Using this option, curl will instead return an error on the first transfer |
| 618 | that fails, independent of the amount of URLs that are given on the command |
| 619 | line. This way, no transfer failures go undetected by scripts and similar. |
| 620 | |
| 621 | This option is global and does not need to be specified for each use of \fI-:, --next\fP. |
| 622 | |
| 623 | This option does not imply \fI-f, --fail\fP, which causes transfers to fail due to the |
| 624 | server's HTTP status code. You can combine the two options, however note \fI-f, --fail\fP |
| 625 | is not global and is therefore contained by \fI-:, --next\fP. |
| 626 | |
| 627 | Added in 7.52.0. |
| 628 | .IP "-f, --fail" |
| 629 | (HTTP) Fail silently (no output at all) on server errors. This is mostly done to |
| 630 | better enable scripts etc to better deal with failed attempts. In normal cases |
| 631 | when an HTTP server fails to deliver a document, it returns an HTML document |
| 632 | stating so (which often also describes why and more). This flag will prevent |
| 633 | curl from outputting that and return error 22. |
| 634 | |
| 635 | This method is not fail-safe and there are occasions where non-successful |
| 636 | response codes will slip through, especially when authentication is involved |
| 637 | (response codes 401 and 407). |
| 638 | .IP "--false-start" |
| 639 | (TLS) Tells curl to use false start during the TLS handshake. False start is a mode |
| 640 | where a TLS client will start sending application data before verifying the |
| 641 | server's Finished message, thus saving a round trip when performing a full |
| 642 | handshake. |
| 643 | |
| 644 | This is currently only implemented in the NSS and Secure Transport (on iOS 7.0 |
| 645 | or later, or OS X 10.9 or later) backends. |
| 646 | |
| 647 | Added in 7.42.0. |
| 648 | .IP "--form-string <name=string>" |
| 649 | (HTTP) Similar to \fI-F, --form\fP except that the value string for the named parameter is used |
| 650 | literally. Leading \&'@' and \&'<' characters, and the \&';type=' string in |
| 651 | the value have no special meaning. Use this in preference to \fI-F, --form\fP if |
| 652 | there's any possibility that the string value may accidentally trigger the |
| 653 | \&'@' or \&'<' features of \fI-F, --form\fP. |
| 654 | |
| 655 | See also \fI-F, --form\fP. |
| 656 | .IP "-F, --form <name=content>" |
| 657 | (HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit |
| 658 | button. This causes curl to POST data using the Content-Type |
| 659 | multipart/form-data according to RFC 2388. This enables uploading of binary |
| 660 | files etc. To force the 'content' part to be a file, prefix the file name with |
| 661 | an @ sign. To just get the content part from a file, prefix the file name with |
| 662 | the symbol <. The difference between @ and < is then that @ makes a file get |
| 663 | attached in the post as a file upload, while the < makes a text field and just |
| 664 | get the contents for that text field from a file. |
| 665 | |
| 666 | Example: to send an image to a server, where \&'profile' is the name of the |
| 667 | form-field to which portrait.jpg will be the input: |
| 668 | |
| 669 | curl -F profile=@portrait.jpg https://example.com/upload.cgi |
| 670 | |
| 671 | To read content from stdin instead of a file, use - as the filename. This goes |
| 672 | for both @ and < constructs. Unfortunately it does not support reading the |
| 673 | file from a named pipe or similar, as it needs the full size before the |
| 674 | transfer starts. |
| 675 | |
| 676 | You can also tell curl what Content-Type to use by using 'type=', in a manner |
| 677 | similar to: |
| 678 | |
| 679 | curl -F "web=@index.html;type=text/html" example.com |
| 680 | |
| 681 | or |
| 682 | |
| 683 | curl -F "name=daniel;type=text/foo" example.com |
| 684 | |
| 685 | You can also explicitly change the name field of a file upload part by setting |
| 686 | filename=, like this: |
| 687 | |
| 688 | curl -F "file=@localfile;filename=nameinpost" example.com |
| 689 | |
| 690 | If filename/path contains ',' or ';', it must be quoted by double-quotes like: |
| 691 | |
| 692 | curl -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" example.com |
| 693 | |
| 694 | or |
| 695 | |
| 696 | curl -F 'file=@"localfile";filename="nameinpost"' example.com |
| 697 | |
| 698 | Note that if a filename/path is quoted by double-quotes, any double-quote |
| 699 | or backslash within the filename must be escaped by backslash. |
| 700 | |
| 701 | See further examples and details in the MANUAL. |
| 702 | |
| 703 | This option can be used multiple times. |
| 704 | |
| 705 | This option overrides \fI-d, --data\fP and \fI-I, --head\fP and \fI--upload\fP. |
| 706 | .IP "--ftp-account <data>" |
| 707 | (FTP) When an FTP server asks for "account data" after user name and password has |
| 708 | been provided, this data is sent off using the ACCT command. |
| 709 | |
| 710 | If this option is used several times, the last one will be used. |
| 711 | |
| 712 | Added in 7.13.0. |
| 713 | .IP "--ftp-alternative-to-user <command>" |
| 714 | (FTP) If authenticating with the USER and PASS commands fails, send this command. |
| 715 | When connecting to Tumbleweed's Secure Transport server over FTPS using a |
| 716 | client certificate, using "SITE AUTH" will tell the server to retrieve the |
| 717 | username from the certificate. |
| 718 | |
| 719 | Added in 7.15.5. |
| 720 | .IP "--ftp-create-dirs" |
| 721 | (FTP SFTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on |
| 722 | the server, the standard behavior of curl is to fail. Using this option, curl |
| 723 | will instead attempt to create missing directories. |
| 724 | |
| 725 | See also \fI--create-dirs\fP. |
| 726 | .IP "--ftp-method <method>" |
| 727 | (FTP) Control what method curl should use to reach a file on an FTP(S) |
| 728 | server. The method argument should be one of the following alternatives: |
| 729 | .RS |
| 730 | .IP multicwd |
| 731 | curl does a single CWD operation for each path part in the given URL. For deep |
| 732 | hierarchies this means very many commands. This is how RFC 1738 says it should |
| 733 | be done. This is the default but the slowest behavior. |
| 734 | .IP nocwd |
| 735 | curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full |
| 736 | path to the server for all these commands. This is the fastest behavior. |
| 737 | .IP singlecwd |
| 738 | curl does one CWD with the full target directory and then operates on the file |
| 739 | \&"normally" (like in the multicwd case). This is somewhat more standards |
| 740 | compliant than 'nocwd' but without the full penalty of 'multicwd'. |
| 741 | .RE |
| 742 | |
| 743 | Added in 7.15.1. |
| 744 | .IP "--ftp-pasv" |
| 745 | (FTP) Use passive mode for the data connection. Passive is the internal default |
| 746 | behavior, but using this option can be used to override a previous \fI-P, --ftp-port\fP |
| 747 | option. |
| 748 | |
| 749 | If this option is used several times, only the first one is used. Undoing an |
| 750 | enforced passive really isn't doable but you must then instead enforce the |
| 751 | correct \fI-P, --ftp-port\fP again. |
| 752 | |
| 753 | Passive mode means that curl will try the EPSV command first and then PASV, |
| 754 | unless \fI--disable-epsv\fP is used. |
| 755 | |
| 756 | See also \fI--disable-epsv\fP. Added in 7.11.0. |
| 757 | .IP "-P, --ftp-port <address>" |
| 758 | (FTP) Reverses the default initiator/listener roles when connecting with FTP. This |
| 759 | option makes curl use active mode. curl then tells the server to connect back |
| 760 | to the client's specified address and port, while passive mode asks the server |
| 761 | to setup an IP address and port for it to connect to. <address> should be one |
| 762 | of: |
| 763 | .RS |
| 764 | .IP interface |
| 765 | i.e "eth0" to specify which interface's IP address you want to use (Unix only) |
| 766 | .IP "IP address" |
| 767 | i.e "192.168.10.1" to specify the exact IP address |
| 768 | .IP "host name" |
| 769 | i.e "my.host.domain" to specify the machine |
| 770 | .IP "-" |
| 771 | make curl pick the same IP address that is already used for the control |
| 772 | connection |
| 773 | .RE |
| 774 | |
| 775 | If this option is used several times, the last one will be used. Disable the |
| 776 | use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command |
| 777 | instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++. |
| 778 | |
| 779 | Since 7.19.5, you can append \&":[start]-[end]\&" to the right of the address, |
| 780 | to tell curl what TCP port range to use. That means you specify a port range, |
| 781 | from a lower to a higher number. A single number works as well, but do note |
| 782 | that it increases the risk of failure since the port may not be available. |
| 783 | |
| 784 | See also \fI--ftp-pasv\fP and \fI--disable-eprt\fP. |
| 785 | .IP "--ftp-pret" |
| 786 | (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, |
| 787 | mainly drftpd, require this non-standard command for directory listings as |
| 788 | well as up and downloads in PASV mode. |
| 789 | |
| 790 | Added in 7.20.0. |
| 791 | .IP "--ftp-skip-pasv-ip" |
| 792 | (FTP) Tell curl to not use the IP address the server suggests in its response |
| 793 | to curl's PASV command when curl connects the data connection. Instead curl |
| 794 | will re-use the same IP address it already uses for the control |
| 795 | connection. |
| 796 | |
| 797 | This option has no effect if PORT, EPRT or EPSV is used instead of PASV. |
| 798 | |
| 799 | See also \fI--ftp-pasv\fP. Added in 7.14.2. |
| 800 | .IP "--ftp-ssl-ccc-mode <active/passive>" |
| 801 | (FTP) Sets the CCC mode. The passive mode will not initiate the shutdown, but |
| 802 | instead wait for the server to do it, and will not reply to the shutdown from |
| 803 | the server. The active mode initiates the shutdown and waits for a reply from |
| 804 | the server. |
| 805 | |
| 806 | See also \fI--ftp-ssl-ccc\fP. Added in 7.16.2. |
| 807 | .IP "--ftp-ssl-ccc" |
| 808 | (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after |
| 809 | authenticating. The rest of the control channel communication will be |
| 810 | unencrypted. This allows NAT routers to follow the FTP transaction. The |
| 811 | default mode is passive. |
| 812 | |
| 813 | See also \fI--ssl\fP and \fI--ftp-ssl-ccc-mode\fP. Added in 7.16.1. |
| 814 | .IP "--ftp-ssl-control" |
| 815 | (FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure |
| 816 | authentication, but non-encrypted data transfers for efficiency. Fails the |
| 817 | transfer if the server doesn't support SSL/TLS. |
| 818 | |
| 819 | Added in 7.16.0. |
| 820 | .IP "-G, --get" |
| 821 | When used, this option will make all data specified with \fI-d, --data\fP, \fI--data-binary\fP |
| 822 | or \fI--data-urlencode\fP to be used in an HTTP GET request instead of the POST |
| 823 | request that otherwise would be used. The data will be appended to the URL |
| 824 | with a '?' separator. |
| 825 | |
| 826 | If used in combination with \fI-I, --head\fP, the POST data will instead be appended to |
| 827 | the URL with a HEAD request. |
| 828 | |
| 829 | If this option is used several times, only the first one is used. This is |
| 830 | because undoing a GET doesn't make sense, but you should then instead enforce |
| 831 | the alternative method you prefer. |
| 832 | .IP "-g, --globoff" |
| 833 | This option switches off the "URL globbing parser". When you set this option, |
| 834 | you can specify URLs that contain the letters {}[] without having them being |
| 835 | interpreted by curl itself. Note that these letters are not normal legal URL |
| 836 | contents but they should be encoded according to the URI standard. |
| 837 | .IP "-I, --head" |
| 838 | (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses |
| 839 | to get nothing but the header of a document. When used on an FTP or FILE file, |
| 840 | curl displays the file size and last modification time only. |
| 841 | .IP "-H, --header <header>" |
| 842 | (HTTP) |
| 843 | Extra header to include in the request when sending HTTP to a server. You may |
| 844 | specify any number of extra headers. Note that if you should add a custom |
| 845 | header that has the same name as one of the internal ones curl would use, your |
| 846 | externally set header will be used instead of the internal one. This allows |
| 847 | you to make even trickier stuff than curl would normally do. You should not |
| 848 | replace internally set headers without knowing perfectly well what you're |
| 849 | doing. Remove an internal header by giving a replacement without content on |
| 850 | the right side of the colon, as in: -H \&"Host:". If you send the custom |
| 851 | header with no-value then its header must be terminated with a semicolon, such |
| 852 | as \-H \&"X-Custom-Header;" to send "X-Custom-Header:". |
| 853 | |
| 854 | curl will make sure that each header you add/replace is sent with the proper |
| 855 | end-of-line marker, you should thus \fBnot\fP add that as a part of the header |
| 856 | content: do not add newlines or carriage returns, they will only mess things up |
| 857 | for you. |
| 858 | |
| 859 | See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options. |
| 860 | |
| 861 | Starting in 7.37.0, you need \fI--proxy-header\fP to send custom headers intended |
| 862 | for a proxy. |
| 863 | |
| 864 | Example: |
| 865 | |
| 866 | curl -H "X-First-Name: Joe" http://example.com/ |
| 867 | |
| 868 | \fBWARNING\fP: headers set with this option will be set in all requests - even |
| 869 | after redirects are followed, like when told with \fI-L, --location\fP. This can lead to |
| 870 | the header being sent to other hosts than the original host, so sensitive |
| 871 | headers should be used with caution combined with following redirects. |
| 872 | |
| 873 | This option can be used multiple times to add/replace/remove multiple headers. |
| 874 | .IP "-h, --help" |
| 875 | Usage help. This lists all current command line options with a short |
| 876 | description. |
| 877 | .IP "--hostpubmd5 <md5>" |
| 878 | (SFTP SCP) Pass a string containing 32 hexadecimal digits. The string should |
| 879 | be the 128 bit MD5 checksum of the remote host's public key, curl will refuse |
| 880 | the connection with the host unless the md5sums match. |
| 881 | |
| 882 | Added in 7.17.1. |
| 883 | .IP "-0, --http1.0" |
| 884 | (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred |
| 885 | HTTP version. |
| 886 | |
| 887 | This option overrides \fI--http1.1\fP and \fI--http2\fP. |
| 888 | .IP "--http1.1" |
| 889 | (HTTP) Tells curl to use HTTP version 1.1. |
| 890 | |
| 891 | This option overrides \fI-0, --http1.0\fP and \fI--http2\fP. Added in 7.33.0. |
| 892 | .IP "--http2-prior-knowledge" |
| 893 | (HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1 |
| 894 | Upgrade. It requires prior knowledge that the server supports HTTP/2 straight |
| 895 | away. HTTPS requests will still do HTTP/2 the standard way with negotiated |
| 896 | protocol version in the TLS handshake. |
| 897 | |
| 898 | \fI--http2-prior-knowledge\fP requires that the underlying libcurl was built to support HTTP/2. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2\fP. Added in 7.49.0. |
| 899 | .IP "--http2" |
| 900 | (HTTP) Tells curl to use HTTP version 2. |
| 901 | |
| 902 | See also \fI--no-alpn\fP. \fI--http2\fP requires that the underlying libcurl was built to support HTTP/2. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2-prior-knowledge\fP. Added in 7.33.0. |
| 903 | .IP "--ignore-content-length" |
| 904 | (FTP HTTP) For HTTP, Ignore the Content-Length header. This is particularly useful for |
| 905 | servers running Apache 1.x, which will report incorrect Content-Length for |
| 906 | files larger than 2 gigabytes. |
| 907 | |
| 908 | For FTP (since 7.46.0), skip the RETR command to figure out the size before |
| 909 | downloading a file. |
| 910 | .IP "-i, --include" |
| 911 | Include the HTTP-header in the output. The HTTP-header includes things like |
| 912 | server-name, date of the document, HTTP-version and more... |
| 913 | |
| 914 | See also \fI-v, --verbose\fP. |
| 915 | .IP "-k, --insecure" |
| 916 | (TLS) |
| 917 | By default, every SSL connection curl makes is verified to be secure. This |
| 918 | option allows curl to proceed and operate even for server connections |
| 919 | otherwise considered insecure. |
| 920 | |
| 921 | The server connection is verified by making sure the server's certificate |
| 922 | contains the right name and verifies successfully using the cert store. |
| 923 | |
| 924 | See this online resource for further details: |
| 925 | https://curl.haxx.se/docs/sslcerts.html |
| 926 | |
| 927 | See also \fI--proxy-insecure\fP and \fI--cacert\fP. |
| 928 | .IP "--interface <name>" |
| 929 | |
| 930 | Perform an operation using a specified interface. You can enter interface |
| 931 | name, IP address or host name. An example could look like: |
| 932 | |
| 933 | curl --interface eth0:1 https://www.example.com/ |
| 934 | |
| 935 | If this option is used several times, the last one will be used. |
| 936 | |
| 937 | See also \fI--dns-interface\fP. |
| 938 | .IP "-4, --ipv4" |
| 939 | This option tells curl to resolve names to IPv4 addresses only, and not for |
| 940 | example try IPv6. |
| 941 | |
| 942 | See also \fI--http1.1\fP and \fI--http2\fP. This option overrides \fI-6, --ipv6\fP. |
| 943 | .IP "-6, --ipv6" |
| 944 | This option tells curl to resolve names to IPv6 addresses only, and not for |
| 945 | example try IPv4. |
| 946 | |
| 947 | See also \fI--http1.1\fP and \fI--http2\fP. This option overrides \fI-6, --ipv6\fP. |
| 948 | .IP "-j, --junk-session-cookies" |
| 949 | (HTTP) When curl is told to read cookies from a given file, this option will make it |
| 950 | discard all "session cookies". This will basically have the same effect as if |
| 951 | a new session is started. Typical browsers always discard session cookies when |
| 952 | they're closed down. |
| 953 | |
| 954 | See also \fI-b, --cookie\fP and \fI-c, --cookie-jar\fP. |
| 955 | .IP "--keepalive-time <seconds>" |
| 956 | This option sets the time a connection needs to remain idle before sending |
| 957 | keepalive probes and the time between individual keepalive probes. It is |
| 958 | currently effective on operating systems offering the TCP_KEEPIDLE and |
| 959 | TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This |
| 960 | option has no effect if \fI--no-keepalive\fP is used. |
| 961 | |
| 962 | If this option is used several times, the last one will be used. If |
| 963 | unspecified, the option defaults to 60 seconds. |
| 964 | |
| 965 | Added in 7.18.0. |
| 966 | .IP "--key-type <type>" |
| 967 | (TLS) Private key file type. Specify which type your \fI--key\fP provided private key |
| 968 | is. DER, PEM, and ENG are supported. If not specified, PEM is assumed. |
| 969 | |
| 970 | If this option is used several times, the last one will be used. |
| 971 | .IP "--key <key>" |
| 972 | (TLS SSH) Private key file name. Allows you to provide your private key in this separate |
| 973 | file. For SSH, if not specified, curl tries the following candidates in order: |
| 974 | '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. |
| 975 | |
| 976 | If this option is used several times, the last one will be used. |
| 977 | .IP "--krb <level>" |
| 978 | (FTP) Enable Kerberos authentication and use. The level must be entered and should |
| 979 | be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a |
| 980 | level that is not one of these, 'private' will instead be used. |
| 981 | |
| 982 | If this option is used several times, the last one will be used. |
| 983 | |
| 984 | \fI--krb\fP requires that the underlying libcurl was built to support Kerberos. |
| 985 | .IP "--libcurl <file>" |
| 986 | Append this option to any ordinary curl command line, and you will get a |
| 987 | libcurl-using C source code written to the file that does the equivalent |
| 988 | of what your command-line operation does! |
| 989 | |
| 990 | If this option is used several times, the last given file name will be |
| 991 | used. |
| 992 | |
| 993 | Added in 7.16.1. |
| 994 | .IP "--limit-rate <speed>" |
| 995 | Specify the maximum transfer rate you want curl to use - for both downloads |
| 996 | and uploads. This feature is useful if you have a limited pipe and you'd like |
| 997 | your transfer not to use your entire bandwidth. To make it slower than it |
| 998 | otherwise would be. |
| 999 | |
| 1000 | The given speed is measured in bytes/second, unless a suffix is appended. |
| 1001 | Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it |
| 1002 | megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. |
| 1003 | |
| 1004 | If you also use the \fI-Y, --speed-limit\fP option, that option will take precedence and |
| 1005 | might cripple the rate-limiting slightly, to help keeping the speed-limit |
| 1006 | logic working. |
| 1007 | |
| 1008 | If this option is used several times, the last one will be used. |
| 1009 | .IP "-l, --list-only" |
| 1010 | (FTP POP3) (FTP) |
| 1011 | When listing an FTP directory, this switch forces a name-only view. This is |
| 1012 | especially useful if the user wants to machine-parse the contents of an FTP |
| 1013 | directory since the normal directory view doesn't use a standard look or |
| 1014 | format. When used like this, the option causes a NLST command to be sent to |
| 1015 | the server instead of LIST. |
| 1016 | |
| 1017 | Note: Some FTP servers list only files in their response to NLST; they do not |
| 1018 | include sub-directories and symbolic links. |
| 1019 | |
| 1020 | (POP3) |
| 1021 | When retrieving a specific email from POP3, this switch forces a LIST command |
| 1022 | to be performed instead of RETR. This is particularly useful if the user wants |
| 1023 | to see if a specific message id exists on the server and what size it is. |
| 1024 | |
| 1025 | Note: When combined with \fI-X, --request\fP, this option can be used to send an UIDL |
| 1026 | command instead, so the user may use the email's unique identifier rather than |
| 1027 | it's message id to make the request. |
| 1028 | |
| 1029 | Added in 7.21.5. |
| 1030 | .IP "--local-port <num/range>" |
| 1031 | Set a preferred single number or range (FROM-TO) of local port numbers to use |
| 1032 | for the connection(s). Note that port numbers by nature are a scarce resource |
| 1033 | that will be busy at times so setting this range to something too narrow might |
| 1034 | cause unnecessary connection setup failures. |
| 1035 | |
| 1036 | Added in 7.15.2. |
| 1037 | .IP "--location-trusted" |
| 1038 | (HTTP) Like \fI-L, --location\fP, but will allow sending the name + password to all hosts that |
| 1039 | the site may redirect to. This may or may not introduce a security breach if |
| 1040 | the site redirects you to a site to which you'll send your authentication info |
| 1041 | (which is plaintext in the case of HTTP Basic authentication). |
| 1042 | |
| 1043 | See also \fI-u, --user\fP. |
| 1044 | .IP "-L, --location" |
| 1045 | (HTTP) If the server reports that the requested page has moved to a different |
| 1046 | location (indicated with a Location: header and a 3XX response code), this |
| 1047 | option will make curl redo the request on the new place. If used together with |
| 1048 | \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages will be shown. When |
| 1049 | authentication is used, curl only sends its credentials to the initial |
| 1050 | host. If a redirect takes curl to a different host, it won't be able to |
| 1051 | intercept the user+password. See also \fI--location-trusted\fP on how to change |
| 1052 | this. You can limit the amount of redirects to follow by using the |
| 1053 | \fI--max-redirs\fP option. |
| 1054 | |
| 1055 | When curl follows a redirect and the request is not a plain GET (for example |
| 1056 | POST or PUT), it will do the following request with a GET if the HTTP response |
| 1057 | was 301, 302, or 303. If the response code was any other 3xx code, curl will |
| 1058 | re-send the following request using the same unmodified method. |
| 1059 | |
| 1060 | You can tell curl to not change the non-GET request method to GET after a 30x |
| 1061 | response by using the dedicated options for that: \fI--post301\fP, \fI--post302\fP and |
| 1062 | \fI--post303\fP. |
| 1063 | .IP "--login-options <options>" |
| 1064 | (IMAP POP3 SMTP) Specify the login options to use during server authentication. |
| 1065 | |
| 1066 | You can use the login options to specify protocol specific options that may |
| 1067 | be used during authentication. At present only IMAP, POP3 and SMTP support |
| 1068 | login options. For more information about the login options please see |
| 1069 | RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt |
| 1070 | |
| 1071 | If this option is used several times, the last one will be used. |
| 1072 | |
| 1073 | Added in 7.34.0. |
| 1074 | .IP "--mail-auth <address>" |
| 1075 | (SMTP) Specify a single address. This will be used to specify the authentication |
| 1076 | address (identity) of a submitted message that is being relayed to another |
| 1077 | server. |
| 1078 | |
| 1079 | See also \fI--mail-rcpt\fP and \fI--mail-from\fP. Added in 7.25.0. |
| 1080 | .IP "--mail-from <address>" |
| 1081 | (SMTP) Specify a single address that the given mail should get sent from. |
| 1082 | |
| 1083 | See also \fI--mail-rcpt\fP and \fI--mail-auth\fP. Added in 7.20.0. |
| 1084 | .IP "--mail-rcpt <address>" |
| 1085 | (SMTP) Specify a single address, user name or mailing list name. Repeat this |
| 1086 | option several times to send to multiple recipients. |
| 1087 | |
| 1088 | When performing a mail transfer, the recipient should specify a valid email |
| 1089 | address to send the mail to. |
| 1090 | |
| 1091 | When performing an address verification (VRFY command), the recipient should be |
| 1092 | specified as the user name or user name and domain (as per Section 3.5 of |
| 1093 | RFC5321). (Added in 7.34.0) |
| 1094 | |
| 1095 | When performing a mailing list expand (EXPN command), the recipient should be |
| 1096 | specified using the mailing list name, such as "Friends" or "London-Office". |
| 1097 | (Added in 7.34.0) |
| 1098 | |
| 1099 | Added in 7.20.0. |
| 1100 | .IP "-M, --manual" |
| 1101 | Manual. Display the huge help text. |
| 1102 | .IP "--max-filesize <bytes>" |
| 1103 | Specify the maximum size (in bytes) of a file to download. If the file |
| 1104 | requested is larger than this value, the transfer will not start and curl will |
| 1105 | return with exit code 63. |
| 1106 | |
| 1107 | \fBNOTE:\fP The file size is not always known prior to download, and for such |
| 1108 | files this option has no effect even if the file transfer ends up being larger |
| 1109 | than this given limit. This concerns both FTP and HTTP transfers. |
| 1110 | |
| 1111 | See also \fI--limit-rate\fP. |
| 1112 | .IP "--max-redirs <num>" |
| 1113 | (HTTP) Set maximum number of redirection-followings allowed. When \fI-L, --location\fP is used, |
| 1114 | is used to prevent curl from following redirections \&"in absurdum". By |
| 1115 | default, the limit is set to 50 redirections. Set this option to -1 to make it |
| 1116 | unlimited. |
| 1117 | |
| 1118 | If this option is used several times, the last one will be used. |
| 1119 | .IP "-m, --max-time <time>" |
| 1120 | Maximum time in seconds that you allow the whole operation to take. This is |
| 1121 | useful for preventing your batch jobs from hanging for hours due to slow |
| 1122 | networks or links going down. Since 7.32.0, this option accepts decimal |
| 1123 | values, but the actual timeout will decrease in accuracy as the specified |
| 1124 | timeout increases in decimal precision. |
| 1125 | |
| 1126 | If this option is used several times, the last one will be used. |
| 1127 | |
| 1128 | See also \fI--connect-timeout\fP. |
| 1129 | .IP "--metalink" |
| 1130 | This option can tell curl to parse and process a given URI as Metalink file |
| 1131 | (both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors |
| 1132 | listed within for failover if there are errors (such as the file or server not |
| 1133 | being available). It will also verify the hash of the file after the download |
| 1134 | completes. The Metalink file itself is downloaded and processed in memory and |
| 1135 | not stored in the local file system. |
| 1136 | |
| 1137 | Example to use a remote Metalink file: |
| 1138 | |
| 1139 | curl --metalink http://www.example.com/example.metalink |
| 1140 | |
| 1141 | To use a Metalink file in the local file system, use FILE protocol (file://): |
| 1142 | |
| 1143 | curl --metalink file://example.metalink |
| 1144 | |
| 1145 | Please note that if FILE protocol is disabled, there is no way to use a local |
| 1146 | Metalink file at the time of this writing. Also note that if \fI--metalink\fP and |
| 1147 | \fI-i, --include\fP are used together, --include will be ignored. This is because |
| 1148 | including headers in the response will break Metalink parser and if the |
| 1149 | headers are included in the file described in Metalink file, hash check will |
| 1150 | fail. |
| 1151 | |
| 1152 | |
| 1153 | \fI--metalink\fP requires that the underlying libcurl was built to support metalink. Added in 7.27.0. |
| 1154 | .IP "--negotiate" |
| 1155 | (HTTP) Enables Negotiate (SPNEGO) authentication. |
| 1156 | |
| 1157 | This option requires a library built with GSS-API or SSPI support. Use |
| 1158 | \fI-V, --version\fP to see if your curl supports GSS-API/SSPI or SPNEGO. |
| 1159 | |
| 1160 | When using this option, you must also provide a fake \fI-u, --user\fP option to activate |
| 1161 | the authentication code properly. Sending a '-u :' is enough as the user name |
| 1162 | and password from the \fI-u, --user\fP option aren't actually used. |
| 1163 | |
| 1164 | If this option is used several times, only the first one is used. |
| 1165 | |
| 1166 | See also \fI--basic\fP and \fI--ntlm\fP and \fI--anyauth\fP and \fI--proxy-negotiate\fP. |
| 1167 | .IP "--netrc-file <filename>" |
| 1168 | This option is similar to \fI-n, --netrc\fP, except that you provide the path (absolute |
| 1169 | or relative) to the netrc file that Curl should use. You can only specify one |
| 1170 | netrc file per invocation. If several \fI--netrc-file\fP options are provided, |
| 1171 | the last one will be used. |
| 1172 | |
| 1173 | It will abide by \fI--netrc-optional\fP if specified. |
| 1174 | |
| 1175 | This option overrides \fI-n, --netrc\fP. Added in 7.21.5. |
| 1176 | .IP "--netrc-optional" |
| 1177 | Very similar to \fI-n, --netrc\fP, but this option makes the .netrc usage \fBoptional\fP |
| 1178 | and not mandatory as the \fI-n, --netrc\fP option does. |
| 1179 | |
| 1180 | See also \fI--netrc-file\fP. This option overrides \fI-n, --netrc\fP. |
| 1181 | .IP "-n, --netrc" |
| 1182 | Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's |
| 1183 | home directory for login name and password. This is typically used for FTP on |
| 1184 | Unix. If used with HTTP, curl will enable user authentication. See |
| 1185 | \fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not |
| 1186 | complain if that file doesn't have the right permissions (it should not be |
| 1187 | either world- or group-readable). The environment variable "HOME" is used to |
| 1188 | find the home directory. |
| 1189 | |
| 1190 | A quick and very simple example of how to setup a \fI.netrc\fP to allow curl |
| 1191 | to FTP to the machine host.domain.com with user name \&'myself' and password |
| 1192 | \&'secret' should look similar to: |
| 1193 | |
| 1194 | .B "machine host.domain.com login myself password secret" |
| 1195 | .IP "-:, --next" |
| 1196 | Tells curl to use a separate operation for the following URL and associated |
| 1197 | options. This allows you to send several URL requests, each with their own |
| 1198 | specific options, for example, such as different user names or custom requests |
| 1199 | for each. |
| 1200 | |
| 1201 | \fI-:, --next\fP will reset all local options and only global ones will have their |
| 1202 | values survive over to the operation following the \fI-:, --next\fP instruction. Global |
| 1203 | options include \fI-v, --verbose\fP, \fI--trace\fP, \fI--trace-ascii\fP and \fI--fail-early\fP. |
| 1204 | |
| 1205 | For example, you can do both a GET and a POST in a single command line: |
| 1206 | |
| 1207 | curl www1.example.com --next -d postthis www2.example.com |
| 1208 | |
| 1209 | Added in 7.36.0. |
| 1210 | .IP "--no-alpn" |
| 1211 | (HTTPS) Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built |
| 1212 | with an SSL library that supports ALPN. ALPN is used by a libcurl that supports |
| 1213 | HTTP/2 to negotiate HTTP/2 support with the server during https sessions. |
| 1214 | |
| 1215 | See also \fI--no-npn\fP and \fI--http2\fP. \fI--no-alpn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0. |
| 1216 | .IP "-N, --no-buffer" |
| 1217 | Disables the buffering of the output stream. In normal work situations, curl |
| 1218 | will use a standard buffered output stream that will have the effect that it |
| 1219 | will output the data in chunks, not necessarily exactly when the data arrives. |
| 1220 | Using this option will disable that buffering. |
| 1221 | |
| 1222 | Note that this is the negated option name documented. You can thus use |
| 1223 | --buffer to enforce the buffering. |
| 1224 | .IP "--no-keepalive" |
| 1225 | Disables the use of keepalive messages on the TCP connection. curl otherwise |
| 1226 | enables them by default. |
| 1227 | |
| 1228 | Note that this is the negated option name documented. You can thus use |
| 1229 | --keepalive to enforce keepalive. |
| 1230 | .IP "--no-npn" |
| 1231 | (HTTPS) Disable the NPN TLS extension. NPN is enabled by default if libcurl was built |
| 1232 | with an SSL library that supports NPN. NPN is used by a libcurl that supports |
| 1233 | HTTP/2 to negotiate HTTP/2 support with the server during https sessions. |
| 1234 | |
| 1235 | See also \fI--no-alpn\fP and \fI--http2\fP. \fI--no-npn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0. |
| 1236 | .IP "--no-sessionid" |
| 1237 | (TLS) Disable curl's use of SSL session-ID caching. By default all transfers are |
| 1238 | done using the cache. Note that while nothing should ever get hurt by |
| 1239 | attempting to reuse SSL session-IDs, there seem to be broken SSL |
| 1240 | implementations in the wild that may require you to disable this in order for |
| 1241 | you to succeed. |
| 1242 | |
| 1243 | Note that this is the negated option name documented. You can thus use |
| 1244 | --sessionid to enforce session-ID caching. |
| 1245 | |
| 1246 | Added in 7.16.0. |
| 1247 | .IP "--noproxy <no-proxy-list>" |
| 1248 | Comma-separated list of hosts which do not use a proxy, if one is specified. |
| 1249 | The only wildcard is a single * character, which matches all hosts, and |
| 1250 | effectively disables the proxy. Each name in this list is matched as either |
| 1251 | a domain which contains the hostname, or the hostname itself. For example, |
| 1252 | local.com would match local.com, local.com:80, and www.local.com, but not |
| 1253 | www.notlocal.com. |
| 1254 | |
| 1255 | Since 7.53.0, This option overrides the environment variables that disable the |
| 1256 | proxy. If there's an environment variable disabling a proxy, you can set |
| 1257 | noproxy list to \&"" to override it. |
| 1258 | |
| 1259 | Added in 7.19.4. |
| 1260 | .IP "--ntlm-wb" |
| 1261 | (HTTP) Enables NTLM much in the style \fI--ntlm\fP does, but hand over the authentication |
| 1262 | to the separate binary ntlmauth application that is executed when needed. |
| 1263 | |
| 1264 | See also \fI--ntlm\fP and \fI--proxy-ntlm\fP. |
| 1265 | .IP "--ntlm" |
| 1266 | (HTTP) Enables NTLM authentication. The NTLM authentication method was designed by |
| 1267 | Microsoft and is used by IIS web servers. It is a proprietary protocol, |
| 1268 | reverse-engineered by clever people and implemented in curl based on their |
| 1269 | efforts. This kind of behavior should not be endorsed, you should encourage |
| 1270 | everyone who uses NTLM to switch to a public and documented authentication |
| 1271 | method instead, such as Digest. |
| 1272 | |
| 1273 | If you want to enable NTLM for your proxy authentication, then use |
| 1274 | \fI--proxy-ntlm\fP. |
| 1275 | |
| 1276 | If this option is used several times, only the first one is used. |
| 1277 | |
| 1278 | See also \fI--proxy-ntlm\fP. \fI--ntlm\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI--basic\fP and \fI--negotiated\fP and \fI--digest\fP and \fI--anyauth\fP. |
| 1279 | .IP "--oauth2-bearer <token>" |
| 1280 | (IMAP POP3 SMTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token |
| 1281 | is used in conjunction with the user name which can be specified as part of |
| 1282 | the \fI--url\fP or \fI-u, --user\fP options. |
| 1283 | |
| 1284 | The Bearer Token and user name are formatted according to RFC 6750. |
| 1285 | |
| 1286 | If this option is used several times, the last one will be used. |
| 1287 | .IP "-o, --output <file>" |
| 1288 | Write output to <file> instead of stdout. If you are using {} or [] to fetch |
| 1289 | multiple documents, you can use '#' followed by a number in the <file> |
| 1290 | specifier. That variable will be replaced with the current string for the URL |
| 1291 | being fetched. Like in: |
| 1292 | |
| 1293 | curl http://{one,two}.example.com -o "file_#1.txt" |
| 1294 | |
| 1295 | or use several variables like: |
| 1296 | |
| 1297 | curl http://{site,host}.host[1-5].com -o "#1_#2" |
| 1298 | |
| 1299 | You may use this option as many times as the number of URLs you have. For |
| 1300 | example, if you specify two URLs on the same command line, you can use it like |
| 1301 | this: |
| 1302 | |
| 1303 | curl -o aa example.com -o bb example.net |
| 1304 | |
| 1305 | and the order of the -o options and the URLs doesn't matter, just that the |
| 1306 | first -o is for the first URL and so on, so the above command line can also be |
| 1307 | written as |
| 1308 | |
| 1309 | curl example.com example.net -o aa -o bb |
| 1310 | |
| 1311 | See also the \fI--create-dirs\fP option to create the local directories |
| 1312 | dynamically. Specifying the output as '-' (a single dash) will force the |
| 1313 | output to be done to stdout. |
| 1314 | |
| 1315 | See also \fI-O, --remote-name\fP and \fI--remote-name-all\fP and \fI-J, --remote-header-name\fP. |
| 1316 | .IP "--pass <phrase>" |
| 1317 | (SSH TLS) Passphrase for the private key |
| 1318 | |
| 1319 | If this option is used several times, the last one will be used. |
| 1320 | .IP "--path-as-is" |
| 1321 | Tell curl to not handle sequences of /../ or /./ in the given URL |
| 1322 | path. Normally curl will squash or merge them according to standards but with |
| 1323 | this option set you tell it not to do that. |
| 1324 | |
| 1325 | Added in 7.42.0. |
| 1326 | .IP "--pinnedpubkey <hashes>" |
| 1327 | (TLS) Tells curl to use the specified public key file (or hashes) to verify the |
| 1328 | peer. This can be a path to a file which contains a single public key in PEM |
| 1329 | or DER format, or any number of base64 encoded sha256 hashes preceded by |
| 1330 | \'sha256//\' and separated by \';\' |
| 1331 | |
| 1332 | When negotiating a TLS or SSL connection, the server sends a certificate |
| 1333 | indicating its identity. A public key is extracted from this certificate and |
| 1334 | if it does not exactly match the public key provided to this option, curl will |
| 1335 | abort the connection before sending or receiving any data. |
| 1336 | |
| 1337 | PEM/DER support: |
| 1338 | 7.39.0: OpenSSL, GnuTLS and GSKit |
| 1339 | 7.43.0: NSS and wolfSSL/CyaSSL |
| 1340 | 7.47.0: mbedtls |
| 1341 | 7.49.0: PolarSSL |
| 1342 | sha256 support: |
| 1343 | 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL. |
| 1344 | 7.47.0: mbedtls |
| 1345 | 7.49.0: PolarSSL |
| 1346 | Other SSL backends not supported. |
| 1347 | |
| 1348 | If this option is used several times, the last one will be used. |
| 1349 | .IP "--post301" |
| 1350 | (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET |
| 1351 | requests when following a 301 redirection. The non-RFC behaviour is ubiquitous |
| 1352 | in web browsers, so curl does the conversion by default to maintain |
| 1353 | consistency. However, a server may require a POST to remain a POST after such |
| 1354 | a redirection. This option is meaningful only when using \fI-L, --location\fP. |
| 1355 | |
| 1356 | See also \fI--post302\fP and \fI--post303\fP and \fI-L, --location\fP. Added in 7.17.1. |
| 1357 | .IP "--post302" |
| 1358 | (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET |
| 1359 | requests when following a 302 redirection. The non-RFC behaviour is ubiquitous |
| 1360 | in web browsers, so curl does the conversion by default to maintain |
| 1361 | consistency. However, a server may require a POST to remain a POST after such |
| 1362 | a redirection. This option is meaningful only when using \fI-L, --location\fP. |
| 1363 | |
| 1364 | See also \fI--post301\fP and \fI--post303\fP and \fI-L, --location\fP. Added in 7.19.1. |
| 1365 | .IP "--post303" |
| 1366 | (HTTP) Tells curl to respect RFC 7231/6.4.4 and not convert POST requests into GET |
| 1367 | requests when following a 303 redirection. The non-RFC behaviour is ubiquitous |
| 1368 | in web browsers, so curl does the conversion by default to maintain |
| 1369 | consistency. However, a server may require a POST to remain a POST after such |
| 1370 | a redirection. This option is meaningful only when using \fI-L, --location\fP. |
| 1371 | |
| 1372 | See also \fI--post302\fP and \fI--post301\fP and \fI-L, --location\fP. Added in 7.26.0. |
| 1373 | .IP "--preproxy [protocol://]host[:port]" |
| 1374 | Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI-x, --proxy\fP. In |
| 1375 | such a case curl first connects to the SOCKS proxy and then connects (through |
| 1376 | SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy. |
| 1377 | |
| 1378 | The pre proxy string should be specified with a protocol:// prefix to specify |
| 1379 | alternative proxy protocols. Use socks4://, socks4a://, socks5:// or |
| 1380 | socks5h:// to request the specific SOCKS version to be used. No protocol |
| 1381 | specified will make curl default to SOCKS4. |
| 1382 | |
| 1383 | If the port number is not specified in the proxy string, it is assumed to be |
| 1384 | 1080. |
| 1385 | |
| 1386 | User and password that might be provided in the proxy string are URL decoded |
| 1387 | by curl. This allows you to pass in special characters such as @ by using %40 |
| 1388 | or pass in a colon with %3a. |
| 1389 | |
| 1390 | If this option is used several times, the last one will be used. |
| 1391 | |
| 1392 | Added in 7.52.0. |
| 1393 | .IP "-#, --progress-bar" |
| 1394 | Make curl display transfer progress as a simple progress bar instead of the |
| 1395 | standard, more informational, meter. |
| 1396 | |
| 1397 | This progress bar draws a single line of '#' characters across the screen and |
| 1398 | shows a percentage if the transfer size is known. For transfers without a |
| 1399 | known size, it will instead output one '#' character for every 1024 bytes |
| 1400 | transferred. |
| 1401 | .IP "--proto-default <protocol>" |
| 1402 | Tells curl to use \fIprotocol\fP for any URL missing a scheme name. |
| 1403 | |
| 1404 | Example: |
| 1405 | |
| 1406 | curl --proto-default https ftp.mozilla.org |
| 1407 | |
| 1408 | An unknown or unsupported protocol causes error |
| 1409 | \fICURLE_UNSUPPORTED_PROTOCOL\fP (1). |
| 1410 | |
| 1411 | This option does not change the default proxy protocol (http). |
| 1412 | |
| 1413 | Without this option curl would make a guess based on the host, see \fI--url\fP for |
| 1414 | details. |
| 1415 | |
| 1416 | Added in 7.45.0. |
| 1417 | .IP "--proto-redir <protocols>" |
| 1418 | Tells curl to limit what protocols it may use on redirect. Protocols denied by |
| 1419 | \fI--proto\fP are not overridden by this option. See --proto for how protocols are |
| 1420 | represented. |
| 1421 | |
| 1422 | Example, allow only HTTP and HTTPS on redirect: |
| 1423 | |
| 1424 | curl --proto-redir -all,http,https http://example.com |
| 1425 | |
| 1426 | By default curl will allow all protocols on redirect except several disabled |
| 1427 | for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 |
| 1428 | SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP enables all |
| 1429 | protocols on redirect, including those disabled for security. |
| 1430 | |
| 1431 | Added in 7.20.2. |
| 1432 | .IP "--proto <protocols>" |
| 1433 | Tells curl to limit what protocols it may use in the transfer. Protocols are |
| 1434 | evaluated left to right, are comma separated, and are each a protocol name or |
| 1435 | 'all', optionally prefixed by zero or more modifiers. Available modifiers are: |
| 1436 | .RS |
| 1437 | .TP 3 |
| 1438 | .B + |
| 1439 | Permit this protocol in addition to protocols already permitted (this is |
| 1440 | the default if no modifier is used). |
| 1441 | .TP |
| 1442 | .B - |
| 1443 | Deny this protocol, removing it from the list of protocols already permitted. |
| 1444 | .TP |
| 1445 | .B = |
| 1446 | Permit only this protocol (ignoring the list already permitted), though |
| 1447 | subject to later modification by subsequent entries in the comma separated |
| 1448 | list. |
| 1449 | .RE |
| 1450 | .IP |
| 1451 | For example: |
| 1452 | .RS |
| 1453 | .TP 15 |
| 1454 | .B \fI--proto\fP -ftps |
| 1455 | uses the default protocols, but disables ftps |
| 1456 | .TP |
| 1457 | .B \fI--proto\fP -all,https,+http |
| 1458 | only enables http and https |
| 1459 | .TP |
| 1460 | .B \fI--proto\fP =http,https |
| 1461 | also only enables http and https |
| 1462 | .RE |
| 1463 | |
| 1464 | Unknown protocols produce a warning. This allows scripts to safely rely on |
| 1465 | being able to disable potentially dangerous protocols, without relying upon |
| 1466 | support for that protocol being built into curl to avoid an error. |
| 1467 | |
| 1468 | This option can be used multiple times, in which case the effect is the same |
| 1469 | as concatenating the protocols into one instance of the option. |
| 1470 | |
| 1471 | See also \fI--proto-redir\fP and \fI--proto-default\fP. Added in 7.20.2. |
| 1472 | .IP "--proxy-anyauth" |
| 1473 | Tells curl to pick a suitable authentication method when communicating with |
| 1474 | the given HTTP proxy. This might cause an extra request/response round-trip. |
| 1475 | |
| 1476 | See also \fI-x, --proxy\fP and \fI--proxy-basic\fP and \fI--proxy-digest\fP. Added in 7.13.2. |
| 1477 | .IP "--proxy-basic" |
| 1478 | Tells curl to use HTTP Basic authentication when communicating with the given |
| 1479 | proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is the |
| 1480 | default authentication method curl uses with proxies. |
| 1481 | |
| 1482 | See also \fI-x, --proxy\fP and \fI--proxy-anyauth\fP and \fI--proxy-digest\fP. |
| 1483 | .IP "--proxy-cacert <file>" |
| 1484 | Same as \fI--cacert\fP but used in HTTPS proxy context. |
| 1485 | |
| 1486 | See also \fI--proxy-capath\fP and \fI--cacert\fP and \fI--capath\fP and \fI-x, --proxy\fP. Added in 7.52.0. |
| 1487 | .IP "--proxy-capath <dir>" |
| 1488 | Same as \fI--capath\fP but used in HTTPS proxy context. |
| 1489 | |
| 1490 | See also \fI--proxy-cacert\fP and \fI-x, --proxy\fP and \fI--capath\fP. Added in 7.52.0. |
| 1491 | .IP "--proxy-cert-type <type>" |
| 1492 | Same as \fI--cert-type\fP but used in HTTPS proxy context. |
| 1493 | |
| 1494 | Added in 7.52.0. |
| 1495 | .IP "--proxy-cert <cert[:passwd]>" |
| 1496 | Same as \fI-E, --cert\fP but used in HTTPS proxy context. |
| 1497 | |
| 1498 | Added in 7.52.0. |
| 1499 | .IP "--proxy-ciphers <list>" |
| 1500 | Same as \fI--ciphers\fP but used in HTTPS proxy context. |
| 1501 | |
| 1502 | Added in 7.52.0. |
| 1503 | .IP "--proxy-crlfile <file>" |
| 1504 | Same as \fI--crlfile\fP but used in HTTPS proxy context. |
| 1505 | |
| 1506 | Added in 7.52.0. |
| 1507 | .IP "--proxy-digest" |
| 1508 | Tells curl to use HTTP Digest authentication when communicating with the given |
| 1509 | proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host. |
| 1510 | |
| 1511 | See also \fI-x, --proxy\fP and \fI--proxy-anyauth\fP and \fI--proxy-basic\fP. |
| 1512 | .IP "--proxy-header <header>" |
| 1513 | (HTTP) Extra header to include in the request when sending HTTP to a proxy. You may |
| 1514 | specify any number of extra headers. This is the equivalent option to \fI-H, --header\fP |
| 1515 | but is for proxy communication only like in CONNECT requests when you want a |
| 1516 | separate header sent to the proxy to what is sent to the actual remote host. |
| 1517 | |
| 1518 | curl will make sure that each header you add/replace is sent with the proper |
| 1519 | end-of-line marker, you should thus \fBnot\fP add that as a part of the header |
| 1520 | content: do not add newlines or carriage returns, they will only mess things |
| 1521 | up for you. |
| 1522 | |
| 1523 | Headers specified with this option will not be included in requests that curl |
| 1524 | knows will not be sent to a proxy. |
| 1525 | |
| 1526 | This option can be used multiple times to add/replace/remove multiple headers. |
| 1527 | |
| 1528 | Added in 7.37.0. |
| 1529 | .IP "--proxy-insecure" |
| 1530 | Same as \fI-k, --insecure\fP but used in HTTPS proxy context. |
| 1531 | |
| 1532 | Added in 7.52.0. |
| 1533 | .IP "--proxy-key-type <type>" |
| 1534 | Same as \fI--key-type\fP but used in HTTPS proxy context. |
| 1535 | |
| 1536 | Added in 7.52.0. |
| 1537 | .IP "--proxy-key <key>" |
| 1538 | Same as \fI--key\fP but used in HTTPS proxy context. |
| 1539 | .IP "--proxy-negotiate" |
| 1540 | Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating |
| 1541 | with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO) |
| 1542 | with a remote host. |
| 1543 | |
| 1544 | See also \fI--proxy-anyauth\fP and \fI--proxy-basic\fP. Added in 7.17.1. |
| 1545 | .IP "--proxy-ntlm" |
| 1546 | Tells curl to use HTTP NTLM authentication when communicating with the given |
| 1547 | proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host. |
| 1548 | |
| 1549 | See also \fI--proxy-negotiate\fP and \fI--proxy-anyauth\fP. |
| 1550 | .IP "--proxy-pass <phrase>" |
| 1551 | Same as \fI--pass\fP but used in HTTPS proxy context. |
| 1552 | |
| 1553 | Added in 7.52.0. |
| 1554 | .IP "--proxy-service-name <name>" |
| 1555 | This option allows you to change the service name for proxy negotiation. |
| 1556 | |
| 1557 | Added in 7.43.0. |
| 1558 | .IP "--proxy-ssl-allow-beast" |
| 1559 | Same as \fI--ssl-allow-beast\fP but used in HTTPS proxy context. |
| 1560 | |
| 1561 | Added in 7.52.0. |
| 1562 | .IP "--proxy-tlsauthtype <type>" |
| 1563 | Same as \fI--tlsauthtype\fP but used in HTTPS proxy context. |
| 1564 | |
| 1565 | Added in 7.52.0. |
| 1566 | .IP "--proxy-tlspassword <string>" |
| 1567 | Same as \fI--tlspassword\fP but used in HTTPS proxy context. |
| 1568 | |
| 1569 | Added in 7.52.0. |
| 1570 | .IP "--proxy-tlsuser <name>" |
| 1571 | Same as \fI--tlsuser\fP but used in HTTPS proxy context. |
| 1572 | |
| 1573 | Added in 7.52.0. |
| 1574 | .IP "--proxy-tlsv1" |
| 1575 | Same as \fI-1, --tlsv1\fP but used in HTTPS proxy context. |
| 1576 | |
| 1577 | Added in 7.52.0. |
| 1578 | .IP "-U, --proxy-user <user:password>" |
| 1579 | Specify the user name and password to use for proxy authentication. |
| 1580 | |
| 1581 | If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM |
| 1582 | authentication then you can tell curl to select the user name and password |
| 1583 | from your environment by specifying a single colon with this option: "-U :". |
| 1584 | |
| 1585 | If this option is used several times, the last one will be used. |
| 1586 | .IP "-x, --proxy [protocol://]host[:port]" |
| 1587 | Use the specified proxy. |
| 1588 | |
| 1589 | The proxy string can be specified with a protocol:// prefix. No protocol |
| 1590 | specified or http:// will be treated as HTTP proxy. Use socks4://, socks4a://, |
| 1591 | socks5:// or socks5h:// to request a specific SOCKS version to be used. |
| 1592 | (The protocol support was added in curl 7.21.7) |
| 1593 | |
| 1594 | HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for |
| 1595 | OpenSSL, GnuTLS and NSS. |
| 1596 | |
| 1597 | Unrecognized and unsupported proxy protocols cause an error since 7.52.0. |
| 1598 | Prior versions may ignore the protocol and use http:// instead. |
| 1599 | |
| 1600 | If the port number is not specified in the proxy string, it is assumed to be |
| 1601 | 1080. |
| 1602 | |
| 1603 | This option overrides existing environment variables that set the proxy to |
| 1604 | use. If there's an environment variable setting a proxy, you can set proxy to |
| 1605 | \&"" to override it. |
| 1606 | |
| 1607 | All operations that are performed over an HTTP proxy will transparently be |
| 1608 | converted to HTTP. It means that certain protocol specific operations might |
| 1609 | not be available. This is not the case if you can tunnel through the proxy, as |
| 1610 | one with the \fI-p, --proxytunnel\fP option. |
| 1611 | |
| 1612 | User and password that might be provided in the proxy string are URL decoded |
| 1613 | by curl. This allows you to pass in special characters such as @ by using %40 |
| 1614 | or pass in a colon with %3a. |
| 1615 | |
| 1616 | The proxy host can be specified the exact same way as the proxy environment |
| 1617 | variables, including the protocol prefix (http://) and the embedded user + |
| 1618 | password. |
| 1619 | |
| 1620 | If this option is used several times, the last one will be used. |
| 1621 | .IP "--proxy1.0 <host[:port]>" |
| 1622 | Use the specified HTTP 1.0 proxy. If the port number is not specified, it is |
| 1623 | assumed at port 1080. |
| 1624 | |
| 1625 | The only difference between this and the HTTP proxy option \fI-x, --proxy\fP, is that |
| 1626 | attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol |
| 1627 | instead of the default HTTP 1.1. |
| 1628 | .IP "-p, --proxytunnel" |
| 1629 | When an HTTP proxy is used \fI-x, --proxy\fP, this option will cause non-HTTP protocols |
| 1630 | to attempt to tunnel through the proxy instead of merely using it to do |
| 1631 | HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT |
| 1632 | request and requires that the proxy allows direct connect to the remote port |
| 1633 | number curl wants to tunnel through to. |
| 1634 | |
| 1635 | To suppress proxy CONNECT response headers when curl is set to output headers |
| 1636 | use \fI--suppress-connect-headers\fP. |
| 1637 | |
| 1638 | See also \fI-x, --proxy\fP. |
| 1639 | .IP "--pubkey <key>" |
| 1640 | (SFTP SCP) Public key file name. Allows you to provide your public key in this separate |
| 1641 | file. |
| 1642 | |
| 1643 | If this option is used several times, the last one will be used. |
| 1644 | |
| 1645 | (As of 7.39.0, curl attempts to automatically extract the public key from the |
| 1646 | private key file, so passing this option is generally not required. Note that |
| 1647 | this public key extraction requires libcurl to be linked against a copy of |
| 1648 | libssh2 1.2.8 or higher that is itself linked against OpenSSL.) |
| 1649 | .IP "-Q, --quote" |
| 1650 | (FTP SFTP) |
| 1651 | Send an arbitrary command to the remote FTP or SFTP server. Quote commands are |
| 1652 | sent BEFORE the transfer takes place (just after the initial PWD command in an |
| 1653 | FTP transfer, to be exact). To make commands take place after a successful |
| 1654 | transfer, prefix them with a dash '-'. To make commands be sent after curl |
| 1655 | has changed the working directory, just before the transfer command(s), prefix |
| 1656 | the command with a '+' (this is only supported for FTP). You may specify any |
| 1657 | number of commands. |
| 1658 | |
| 1659 | If the server returns failure for one of the commands, the entire operation |
| 1660 | will be aborted. You must send syntactically correct FTP commands as RFC 959 |
| 1661 | defines to FTP servers, or one of the commands listed below to SFTP servers. |
| 1662 | |
| 1663 | This option can be used multiple times. When speaking to an FTP server, prefix |
| 1664 | the command with an asterisk (*) to make curl continue even if the command |
| 1665 | fails as by default curl will stop at first failure. |
| 1666 | |
| 1667 | SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands |
| 1668 | itself before sending them to the server. File names may be quoted |
| 1669 | shell-style to embed spaces or special characters. Following is the list of |
| 1670 | all supported SFTP quote commands: |
| 1671 | .RS |
| 1672 | .IP "chgrp group file" |
| 1673 | The chgrp command sets the group ID of the file named by the file operand to |
| 1674 | the group ID specified by the group operand. The group operand is a decimal |
| 1675 | integer group ID. |
| 1676 | .IP "chmod mode file" |
| 1677 | The chmod command modifies the file mode bits of the specified file. The |
| 1678 | mode operand is an octal integer mode number. |
| 1679 | .IP "chown user file" |
| 1680 | The chown command sets the owner of the file named by the file operand to the |
| 1681 | user ID specified by the user operand. The user operand is a decimal |
| 1682 | integer user ID. |
| 1683 | .IP "ln source_file target_file" |
| 1684 | The ln and symlink commands create a symbolic link at the target_file location |
| 1685 | pointing to the source_file location. |
| 1686 | .IP "mkdir directory_name" |
| 1687 | The mkdir command creates the directory named by the directory_name operand. |
| 1688 | .IP "pwd" |
| 1689 | The pwd command returns the absolute pathname of the current working directory. |
| 1690 | .IP "rename source target" |
| 1691 | The rename command renames the file or directory named by the source |
| 1692 | operand to the destination path named by the target operand. |
| 1693 | .IP "rm file" |
| 1694 | The rm command removes the file specified by the file operand. |
| 1695 | .IP "rmdir directory" |
| 1696 | The rmdir command removes the directory entry specified by the directory |
| 1697 | operand, provided it is empty. |
| 1698 | .IP "symlink source_file target_file" |
| 1699 | See ln. |
| 1700 | .RE |
| 1701 | .IP "--random-file <file>" |
| 1702 | Specify the path name to file containing what will be considered as random |
| 1703 | data. The data may be used to seed the random engine for SSL connections. See |
| 1704 | also the \fI--egd-file\fP option. |
| 1705 | .IP "-r, --range <range>" |
| 1706 | (HTTP FTP SFTP FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP |
| 1707 | server or a local FILE. Ranges can be specified in a number of ways. |
| 1708 | .RS |
| 1709 | .TP 10 |
| 1710 | .B 0-499 |
| 1711 | specifies the first 500 bytes |
| 1712 | .TP |
| 1713 | .B 500-999 |
| 1714 | specifies the second 500 bytes |
| 1715 | .TP |
| 1716 | .B -500 |
| 1717 | specifies the last 500 bytes |
| 1718 | .TP |
| 1719 | .B 9500- |
| 1720 | specifies the bytes from offset 9500 and forward |
| 1721 | .TP |
| 1722 | .B 0-0,-1 |
| 1723 | specifies the first and last byte only(*)(HTTP) |
| 1724 | .TP |
| 1725 | .B 100-199,500-599 |
| 1726 | specifies two separate 100-byte ranges(*) (HTTP) |
| 1727 | .RE |
| 1728 | .IP |
| 1729 | (*) = NOTE that this will cause the server to reply with a multipart |
| 1730 | response! |
| 1731 | |
| 1732 | Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the |
| 1733 | \&'start-stop' range syntax. If a non-digit character is given in the range, |
| 1734 | the server's response will be unspecified, depending on the server's |
| 1735 | configuration. |
| 1736 | |
| 1737 | You should also be aware that many HTTP/1.1 servers do not have this feature |
| 1738 | enabled, so that when you attempt to get a range, you'll instead get the whole |
| 1739 | document. |
| 1740 | |
| 1741 | FTP and SFTP range downloads only support the simple 'start-stop' syntax |
| 1742 | (optionally with one of the numbers omitted). FTP use depends on the extended |
| 1743 | FTP command SIZE. |
| 1744 | |
| 1745 | If this option is used several times, the last one will be used. |
| 1746 | .IP "--raw" |
| 1747 | (HTTP) When used, it disables all internal HTTP decoding of content or transfer |
| 1748 | encodings and instead makes them passed on unaltered, raw. |
| 1749 | |
| 1750 | Added in 7.16.2. |
| 1751 | .IP "-e, --referer <URL>" |
| 1752 | (HTTP) Sends the "Referrer Page" information to the HTTP server. This can also be set |
| 1753 | with the \fI-H, --header\fP flag of course. When used with \fI-L, --location\fP you can append |
| 1754 | ";auto" to the \fI-e, --referer\fP URL to make curl automatically set the previous URL |
| 1755 | when it follows a Location: header. The \&";auto" string can be used alone, |
| 1756 | even if you don't set an initial \fI-e, --referer\fP. |
| 1757 | |
| 1758 | If this option is used several times, the last one will be used. |
| 1759 | |
| 1760 | See also \fI-A, --user-agent\fP and \fI-H, --header\fP. |
| 1761 | .IP "-J, --remote-header-name" |
| 1762 | (HTTP) This option tells the \fI-O, --remote-name\fP option to use the server-specified |
| 1763 | Content-Disposition filename instead of extracting a filename from the URL. |
| 1764 | |
| 1765 | If the server specifies a file name and a file with that name already exists |
| 1766 | in the current working directory it will not be overwritten and an error will |
| 1767 | occur. If the server doesn't specify a file name then this option has no |
| 1768 | effect. |
| 1769 | |
| 1770 | There's no attempt to decode %-sequences (yet) in the provided file name, so |
| 1771 | this option may provide you with rather unexpected file names. |
| 1772 | |
| 1773 | \fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A |
| 1774 | rogue server could send you the name of a DLL or other file that could possibly |
| 1775 | be loaded automatically by Windows or some third party software. |
| 1776 | .IP "--remote-name-all" |
| 1777 | This option changes the default action for all given URLs to be dealt with as |
| 1778 | if \fI-O, --remote-name\fP were used for each one. So if you want to disable that for a |
| 1779 | specific URL after \fI--remote-name-all\fP has been used, you must use "-o -" or |
| 1780 | --no-remote-name. |
| 1781 | |
| 1782 | Added in 7.19.0. |
| 1783 | .IP "-O, --remote-name" |
| 1784 | Write output to a local file named like the remote file we get. (Only the file |
| 1785 | part of the remote file is used, the path is cut off.) |
| 1786 | |
| 1787 | The file will be saved in the current working directory. If you want the file |
| 1788 | saved in a different directory, make sure you change the current working |
| 1789 | directory before invoking curl with this option. |
| 1790 | |
| 1791 | The remote file name to use for saving is extracted from the given URL, |
| 1792 | nothing else, and if it already exists it will be overwritten. If you want the |
| 1793 | server to be able to choose the file name refer to \fI-J, --remote-header-name\fP which |
| 1794 | can be used in addition to this option. If the server chooses a file name and |
| 1795 | that name already exists it will not be overwritten. |
| 1796 | |
| 1797 | There is no URL decoding done on the file name. If it has %20 or other URL |
| 1798 | encoded parts of the name, they will end up as-is as file name. |
| 1799 | |
| 1800 | You may use this option as many times as the number of URLs you have. |
| 1801 | .IP "-R, --remote-time" |
| 1802 | When used, this will make curl attempt to figure out the timestamp of the |
| 1803 | remote file, and if that is available make the local file get that same |
| 1804 | timestamp. |
| 1805 | .IP "-X, --request <command>" |
| 1806 | (HTTP) Specifies a custom request method to use when communicating with the |
| 1807 | HTTP server. The specified request method will be used instead of the method |
| 1808 | otherwise used (which defaults to GET). Read the HTTP 1.1 specification for |
| 1809 | details and explanations. Common additional HTTP requests include PUT and |
| 1810 | DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and |
| 1811 | more. |
| 1812 | |
| 1813 | Normally you don't need this option. All sorts of GET, HEAD, POST and PUT |
| 1814 | requests are rather invoked by using dedicated command line options. |
| 1815 | |
| 1816 | This option only changes the actual word used in the HTTP request, it does not |
| 1817 | alter the way curl behaves. So for example if you want to make a proper HEAD |
| 1818 | request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP option. |
| 1819 | |
| 1820 | The method string you set with \fI-X, --request\fP will be used for all requests, which |
| 1821 | if you for example use \fI-L, --location\fP may cause unintended side-effects when curl |
| 1822 | doesn't change request method according to the HTTP 30x response codes - and |
| 1823 | similar. |
| 1824 | |
| 1825 | (FTP) |
| 1826 | Specifies a custom FTP command to use instead of LIST when doing file lists |
| 1827 | with FTP. |
| 1828 | |
| 1829 | (POP3) |
| 1830 | Specifies a custom POP3 command to use instead of LIST or RETR. (Added in |
| 1831 | 7.26.0) |
| 1832 | |
| 1833 | (IMAP) |
| 1834 | Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0) |
| 1835 | |
| 1836 | (SMTP) |
| 1837 | Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0) |
| 1838 | |
| 1839 | If this option is used several times, the last one will be used. |
| 1840 | .IP "--resolve <host:port:address>" |
| 1841 | Provide a custom address for a specific host and port pair. Using this, you |
| 1842 | can make the curl requests(s) use a specified address and prevent the |
| 1843 | otherwise normally resolved address to be used. Consider it a sort of |
| 1844 | /etc/hosts alternative provided on the command line. The port number should be |
| 1845 | the number used for the specific protocol the host will be used for. It means |
| 1846 | you need several entries if you want to provide address for the same host but |
| 1847 | different ports. |
| 1848 | |
| 1849 | The provided address set by this option will be used even if \fI-4, --ipv4\fP or \fI-6, --ipv6\fP |
| 1850 | is set to make curl use another IP version. |
| 1851 | |
| 1852 | This option can be used many times to add many host names to resolve. |
| 1853 | |
| 1854 | Added in 7.21.3. |
| 1855 | .IP "--retry-connrefused" |
| 1856 | In addition to the other conditions, consider ECONNREFUSED as a transient |
| 1857 | error too for \fI--retry\fP. This option is used together with --retry. |
| 1858 | |
| 1859 | Added in 7.52.0. |
| 1860 | .IP "--retry-delay <seconds>" |
| 1861 | Make curl sleep this amount of time before each retry when a transfer has |
| 1862 | failed with a transient error (it changes the default backoff time algorithm |
| 1863 | between retries). This option is only interesting if \fI--retry\fP is also |
| 1864 | used. Setting this delay to zero will make curl use the default backoff time. |
| 1865 | |
| 1866 | If this option is used several times, the last one will be used. |
| 1867 | |
| 1868 | Added in 7.12.3. |
| 1869 | .IP "--retry-max-time <seconds>" |
| 1870 | The retry timer is reset before the first transfer attempt. Retries will be |
| 1871 | done as usual (see \fI--retry\fP) as long as the timer hasn't reached this given |
| 1872 | limit. Notice that if the timer hasn't reached the limit, the request will be |
| 1873 | made and while performing, it may take longer than this given time period. To |
| 1874 | limit a single request\'s maximum time, use \fI-m, --max-time\fP. Set this option to |
| 1875 | zero to not timeout retries. |
| 1876 | |
| 1877 | If this option is used several times, the last one will be used. |
| 1878 | |
| 1879 | Added in 7.12.3. |
| 1880 | .IP "--retry <num>" |
| 1881 | If a transient error is returned when curl tries to perform a transfer, it |
| 1882 | will retry this number of times before giving up. Setting the number to 0 |
| 1883 | makes curl do no retries (which is the default). Transient error means either: |
| 1884 | a timeout, an FTP 4xx response code or an HTTP 5xx response code. |
| 1885 | |
| 1886 | When curl is about to retry a transfer, it will first wait one second and then |
| 1887 | for all forthcoming retries it will double the waiting time until it reaches |
| 1888 | 10 minutes which then will be the delay between the rest of the retries. By |
| 1889 | using \fI--retry-delay\fP you disable this exponential backoff algorithm. See also |
| 1890 | \fI--retry-max-time\fP to limit the total time allowed for retries. |
| 1891 | |
| 1892 | If this option is used several times, the last one will be used. |
| 1893 | |
| 1894 | Added in 7.12.3. |
| 1895 | .IP "--sasl-ir" |
| 1896 | Enable initial response in SASL authentication. |
| 1897 | |
| 1898 | Added in 7.31.0. |
| 1899 | .IP "--service-name <name>" |
| 1900 | This option allows you to change the service name for SPNEGO. |
| 1901 | |
| 1902 | Examples: \fI--negotiate\fP \fI--service-name\fP sockd would use sockd/server-name. |
| 1903 | |
| 1904 | Added in 7.43.0. |
| 1905 | .IP "-S, --show-error" |
| 1906 | When used with \fI-s, --silent\fP, it makes curl show an error message if it fails. |
| 1907 | .IP "-s, --silent" |
| 1908 | Silent or quiet mode. Don't show progress meter or error messages. Makes Curl |
| 1909 | mute. It will still output the data you ask for, potentially even to the |
| 1910 | terminal/stdout unless you redirect it. |
| 1911 | |
| 1912 | Use \fI-S, --show-error\fP in addition to this option to disable progress meter but |
| 1913 | still show error messages. |
| 1914 | |
| 1915 | See also \fI-v, --verbose\fP and \fI--stderr\fP. |
| 1916 | .IP "--socks4 <host[:port]>" |
| 1917 | Use the specified SOCKS4 proxy. If the port number is not specified, it is |
| 1918 | assumed at port 1080. |
| 1919 | |
| 1920 | This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually |
| 1921 | exclusive. |
| 1922 | |
| 1923 | Since 7.21.7, this option is superfluous since you can specify a socks4 proxy |
| 1924 | with \fI-x, --proxy\fP using a socks4:// protocol prefix. |
| 1925 | |
| 1926 | Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time |
| 1927 | \fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to |
| 1928 | the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. |
| 1929 | |
| 1930 | If this option is used several times, the last one will be used. |
| 1931 | |
| 1932 | Added in 7.15.2. |
| 1933 | .IP "--socks4a <host[:port]>" |
| 1934 | Use the specified SOCKS4a proxy. If the port number is not specified, it is |
| 1935 | assumed at port 1080. |
| 1936 | |
| 1937 | This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually |
| 1938 | exclusive. |
| 1939 | |
| 1940 | Since 7.21.7, this option is superfluous since you can specify a socks4a proxy |
| 1941 | with \fI-x, --proxy\fP using a socks4a:// protocol prefix. |
| 1942 | |
| 1943 | Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time |
| 1944 | \fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to |
| 1945 | the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. |
| 1946 | |
| 1947 | If this option is used several times, the last one will be used. |
| 1948 | |
| 1949 | Added in 7.18.0. |
| 1950 | .IP "--socks5-gssapi-nec" |
| 1951 | As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961 |
| 1952 | says in section 4.3/4.4 it should be protected, but the NEC reference |
| 1953 | implementation does not. The option \fI--socks5-gssapi-nec\fP allows the |
| 1954 | unprotected exchange of the protection mode negotiation. |
| 1955 | |
| 1956 | Added in 7.19.4. |
| 1957 | .IP "--socks5-gssapi-service <name>" |
| 1958 | The default service name for a socks server is rcmd/server-fqdn. This option |
| 1959 | allows you to change it. |
| 1960 | |
| 1961 | Examples: \fI--socks5\fP proxy-name \fI--socks5-gssapi-service\fP sockd would use |
| 1962 | sockd/proxy-name \fI--socks5\fP proxy-name \fI--socks5-gssapi-service\fP sockd/real-name |
| 1963 | would use sockd/real-name for cases where the proxy-name does not match the |
| 1964 | principal name. |
| 1965 | |
| 1966 | Added in 7.19.4. |
| 1967 | .IP "--socks5-hostname <host[:port]>" |
| 1968 | Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If |
| 1969 | the port number is not specified, it is assumed at port 1080. |
| 1970 | |
| 1971 | This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually |
| 1972 | exclusive. |
| 1973 | |
| 1974 | Since 7.21.7, this option is superfluous since you can specify a socks5 |
| 1975 | hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix. |
| 1976 | |
| 1977 | Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time |
| 1978 | \fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to |
| 1979 | the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. |
| 1980 | |
| 1981 | If this option is used several times, the last one will be used. |
| 1982 | |
| 1983 | Added in 7.18.0. |
| 1984 | .IP "--socks5 <host[:port]>" |
| 1985 | Use the specified SOCKS5 proxy - but resolve the host name locally. If the |
| 1986 | port number is not specified, it is assumed at port 1080. |
| 1987 | |
| 1988 | This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually |
| 1989 | exclusive. |
| 1990 | |
| 1991 | Since 7.21.7, this option is superfluous since you can specify a socks5 proxy |
| 1992 | with \fI-x, --proxy\fP using a socks5:// protocol prefix. |
| 1993 | |
| 1994 | Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time |
| 1995 | \fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to |
| 1996 | the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. |
| 1997 | |
| 1998 | If this option is used several times, the last one will be used. |
| 1999 | |
| 2000 | This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP. |
| 2001 | |
| 2002 | Added in 7.18.0. |
| 2003 | .IP "-Y, --speed-limit <speed>" |
| 2004 | If a download is slower than this given speed (in bytes per second) for |
| 2005 | speed-time seconds it gets aborted. speed-time is set with \fI-y, --speed-time\fP and is |
| 2006 | 30 if not set. |
| 2007 | |
| 2008 | If this option is used several times, the last one will be used. |
| 2009 | .IP "-y, --speed-time <seconds>" |
| 2010 | If a download is slower than speed-limit bytes per second during a speed-time |
| 2011 | period, the download gets aborted. If speed-time is used, the default |
| 2012 | speed-limit will be 1 unless set with \fI-Y, --speed-limit\fP. |
| 2013 | |
| 2014 | This option controls transfers and thus will not affect slow connects etc. If |
| 2015 | this is a concern for you, try the \fI--connect-timeout\fP option. |
| 2016 | |
| 2017 | If this option is used several times, the last one will be used. |
| 2018 | .IP "--ssl-allow-beast" |
| 2019 | This option tells curl to not work around a security flaw in the SSL3 and |
| 2020 | TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer may |
| 2021 | use workarounds known to cause interoperability problems with some older SSL |
| 2022 | implementations. WARNING: this option loosens the SSL security, and by using |
| 2023 | this flag you ask for exactly that. |
| 2024 | |
| 2025 | Added in 7.25.0. |
| 2026 | .IP "--ssl-no-revoke" |
| 2027 | (WinSSL) This option tells curl to disable certificate revocation checks. |
| 2028 | WARNING: this option loosens the SSL security, and by using this flag you ask |
| 2029 | for exactly that. |
| 2030 | |
| 2031 | Added in 7.44.0. |
| 2032 | .IP "--ssl-reqd" |
| 2033 | (FTP IMAP POP3 SMTP) Require SSL/TLS for the connection. Terminates the connection if the server |
| 2034 | doesn't support SSL/TLS. |
| 2035 | |
| 2036 | This option was formerly known as --ftp-ssl-reqd. |
| 2037 | |
| 2038 | Added in 7.20.0. |
| 2039 | .IP "--ssl" |
| 2040 | (FTP IMAP POP3 SMTP) |
| 2041 | Try to use SSL/TLS for the connection. Reverts to a non-secure connection if |
| 2042 | the server doesn't support SSL/TLS. See also \fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP |
| 2043 | for different levels of encryption required. |
| 2044 | |
| 2045 | This option was formerly known as --ftp-ssl (Added in 7.11.0). That option |
| 2046 | name can still be used but will be removed in a future version. |
| 2047 | |
| 2048 | Added in 7.20.0. |
| 2049 | .IP "-2, --sslv2" |
| 2050 | (SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL |
| 2051 | server. Sometimes curl is built without SSLv2 support. SSLv2 is widely |
| 2052 | considered insecure (see RFC 6176). |
| 2053 | |
| 2054 | See also \fI--http1.1\fP and \fI--http2\fP. \fI-2, --sslv2\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI-3, --sslv3\fP and \fI-1, --tlsv1\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP. |
| 2055 | .IP "-3, --sslv3" |
| 2056 | (SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL |
| 2057 | server. Sometimes curl is built without SSLv3 support. SSLv3 is widely |
| 2058 | considered insecure (see RFC 7568). |
| 2059 | |
| 2060 | See also \fI--http1.1\fP and \fI--http2\fP. \fI-3, --sslv3\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI-2, --sslv2\fP and \fI-1, --tlsv1\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP. |
| 2061 | .IP "--stderr" |
| 2062 | Redirect all writes to stderr to the specified file instead. If the file name |
| 2063 | is a plain '-', it is instead written to stdout. |
| 2064 | |
| 2065 | If this option is used several times, the last one will be used. |
| 2066 | |
| 2067 | See also \fI-v, --verbose\fP and \fI-s, --silent\fP. |
| 2068 | .IP "--suppress-connect-headers" |
| 2069 | When \fI-p, --proxytunnel\fP is used and a CONNECT request is made don't output proxy |
| 2070 | CONNECT response headers. This option is meant to be used with \fI-D, --dump-header\fP or |
| 2071 | \fI-i, --include\fP which are used to show protocol headers in the output. It has no |
| 2072 | effect on debug options such as \fI-v, --verbose\fP or \fI--trace\fP, or any statistics. |
| 2073 | |
| 2074 | See also \fI-D, --dump-header\fP and \fI-i, --include\fP and \fI-p, --proxytunnel\fP. |
| 2075 | .IP "--tcp-fastopen" |
| 2076 | Enable use of TCP Fast Open (RFC7413). |
| 2077 | |
| 2078 | Added in 7.49.0. |
| 2079 | .IP "--tcp-nodelay" |
| 2080 | Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for |
| 2081 | details about this option. |
| 2082 | |
| 2083 | Since 7.50.2, curl sets this option by default and you need to explicitly |
| 2084 | switch it off if you don't want it on. |
| 2085 | |
| 2086 | Added in 7.11.2. |
| 2087 | .IP "-t, --telnet-option <opt=val>" |
| 2088 | Pass options to the telnet protocol. Supported options are: |
| 2089 | |
| 2090 | TTYPE=<term> Sets the terminal type. |
| 2091 | |
| 2092 | XDISPLOC=<X display> Sets the X display location. |
| 2093 | |
| 2094 | NEW_ENV=<var,val> Sets an environment variable. |
| 2095 | .IP "--tftp-blksize <value>" |
| 2096 | (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that curl will |
| 2097 | try to use when transferring data to or from a TFTP server. By default 512 |
| 2098 | bytes will be used. |
| 2099 | |
| 2100 | If this option is used several times, the last one will be used. |
| 2101 | |
| 2102 | Added in 7.20.0. |
| 2103 | .IP "--tftp-no-options" |
| 2104 | (TFTP) Tells curl not to send TFTP options requests. |
| 2105 | |
| 2106 | This option improves interop with some legacy servers that do not acknowledge |
| 2107 | or properly implement TFTP options. When this option is used \fI--tftp-blksize\fP is |
| 2108 | ignored. |
| 2109 | |
| 2110 | Added in 7.48.0. |
| 2111 | .IP "-z, --time-cond <time>" |
| 2112 | (HTTP FTP) Request a file that has been modified later than the given time and date, or |
| 2113 | one that has been modified before that time. The <date expression> can be all |
| 2114 | sorts of date strings or if it doesn't match any internal ones, it is taken as |
| 2115 | a filename and tries to get the modification date (mtime) from <file> |
| 2116 | instead. See the \fIcurl_getdate(3)\fP man pages for date expression details. |
| 2117 | |
| 2118 | Start the date expression with a dash (-) to make it request for a document |
| 2119 | that is older than the given date/time, default is a document that is newer |
| 2120 | than the specified date/time. |
| 2121 | |
| 2122 | If this option is used several times, the last one will be used. |
| 2123 | .IP "--tls-max <VERSION>" |
| 2124 | (SSL) VERSION defines maximum supported TLS version. A minimum is defined |
| 2125 | by arguments tlsv1.0 or tlsv1.1 or tlsv1.2. |
| 2126 | |
| 2127 | .RS |
| 2128 | .IP "default" |
| 2129 | Use up to recommended TLS version. |
| 2130 | .IP "1.0" |
| 2131 | Use up to TLSv1.0. |
| 2132 | .IP "1.1" |
| 2133 | Use up to TLSv1.1. |
| 2134 | .IP "1.2" |
| 2135 | Use up to TLSv1.2. |
| 2136 | .IP "1.3" |
| 2137 | Use up to TLSv1.3. |
| 2138 | .RE |
| 2139 | |
| 2140 | See also \fI--tlsv1.0\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP. \fI--tls-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0. |
| 2141 | .IP "--tlsauthtype <type>" |
| 2142 | Set TLS authentication type. Currently, the only supported option is "SRP", |
| 2143 | for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are specified but |
| 2144 | \fI--tlsauthtype\fP is not, then this option defaults to "SRP". |
| 2145 | |
| 2146 | Added in 7.21.4. |
| 2147 | .IP "--tlspassword" |
| 2148 | Set password for use with the TLS authentication method specified with |
| 2149 | \fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. |
| 2150 | |
| 2151 | Added in 7.21.4. |
| 2152 | .IP "--tlsuser <name>" |
| 2153 | Set username for use with the TLS authentication method specified with |
| 2154 | \fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also is set. |
| 2155 | |
| 2156 | Added in 7.21.4. |
| 2157 | .IP "--tlsv1.0" |
| 2158 | (TLS) Forces curl to use TLS version 1.0 when connecting to a remote TLS server. |
| 2159 | |
| 2160 | Added in 7.34.0. |
| 2161 | .IP "--tlsv1.1" |
| 2162 | (TLS) Forces curl to use TLS version 1.1 when connecting to a remote TLS server. |
| 2163 | |
| 2164 | Added in 7.34.0. |
| 2165 | .IP "--tlsv1.2" |
| 2166 | (TLS) Forces curl to use TLS version 1.2 when connecting to a remote TLS server. |
| 2167 | |
| 2168 | Added in 7.34.0. |
| 2169 | .IP "--tlsv1.3" |
| 2170 | (TLS) Forces curl to use TLS version 1.3 when connecting to a remote TLS server. |
| 2171 | |
| 2172 | Note that TLS 1.3 is only supported by a subset of TLS backends. At the time |
| 2173 | of writing this, those are BoringSSL and NSS only. |
| 2174 | |
| 2175 | Added in 7.52.0. |
| 2176 | .IP "-1, --tlsv1" |
| 2177 | (SSL) Tells curl to use TLS version 1.x when negotiating with a remote TLS |
| 2178 | server. That means TLS version 1.0, 1.1 or 1.2. |
| 2179 | |
| 2180 | See also \fI--http1.1\fP and \fI--http2\fP. \fI-1, --tlsv1\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI--tlsv1.1\fP and \fI--tlsv1.2\fP and \fI--tlsv1.3\fP. |
| 2181 | .IP "--tr-encoding" |
| 2182 | (HTTP) Request a compressed Transfer-Encoding response using one of the algorithms |
| 2183 | curl supports, and uncompress the data while receiving it. |
| 2184 | |
| 2185 | Added in 7.21.6. |
| 2186 | .IP "--trace-ascii <file>" |
| 2187 | Enables a full trace dump of all incoming and outgoing data, including |
| 2188 | descriptive information, to the given output file. Use "-" as filename to have |
| 2189 | the output sent to stdout. |
| 2190 | |
| 2191 | This is very similar to \fI--trace\fP, but leaves out the hex part and only shows |
| 2192 | the ASCII part of the dump. It makes smaller output that might be easier to |
| 2193 | read for untrained humans. |
| 2194 | |
| 2195 | If this option is used several times, the last one will be used. |
| 2196 | |
| 2197 | This option overrides \fI--trace\fP and \fI-v, --verbose\fP. |
| 2198 | .IP "--trace-time" |
| 2199 | Prepends a time stamp to each trace or verbose line that curl displays. |
| 2200 | |
| 2201 | Added in 7.14.0. |
| 2202 | .IP "--trace <file>" |
| 2203 | Enables a full trace dump of all incoming and outgoing data, including |
| 2204 | descriptive information, to the given output file. Use "-" as filename to have |
| 2205 | the output sent to stdout. Use "%" as filename to have the output sent to |
| 2206 | stderr. |
| 2207 | |
| 2208 | If this option is used several times, the last one will be used. |
| 2209 | |
| 2210 | This option overrides \fI-v, --verbose\fP and \fI--trace-ascii\fP. |
| 2211 | .IP "--unix-socket <path>" |
| 2212 | (HTTP) Connect through this Unix domain socket, instead of using the network. |
| 2213 | |
| 2214 | Added in 7.40.0. |
| 2215 | .IP "-T, --upload-file <file>" |
| 2216 | This transfers the specified local file to the remote URL. If there is no file |
| 2217 | part in the specified URL, curl will append the local file name. NOTE that you |
| 2218 | must use a trailing / on the last directory to really prove to Curl that there |
| 2219 | is no file name or curl will think that your last directory name is the remote |
| 2220 | file name to use. That will most likely cause the upload operation to fail. If |
| 2221 | this is used on an HTTP(S) server, the PUT command will be used. |
| 2222 | |
| 2223 | Use the file name "-" (a single dash) to use stdin instead of a given file. |
| 2224 | Alternately, the file name "." (a single period) may be specified instead |
| 2225 | of "-" to use stdin in non-blocking mode to allow reading server output |
| 2226 | while stdin is being uploaded. |
| 2227 | |
| 2228 | You can specify one \fI-T, --upload-file\fP for each URL on the command line. Each |
| 2229 | \fI-T, --upload-file\fP + URL pair specifies what to upload and to where. curl also |
| 2230 | supports "globbing" of the \fI-T, --upload-file\fP argument, meaning that you can upload |
| 2231 | multiple files to a single URL by using the same URL globbing style supported |
| 2232 | in the URL, like this: |
| 2233 | |
| 2234 | curl --upload-file "{file1,file2}" http://www.example.com |
| 2235 | |
| 2236 | or even |
| 2237 | |
| 2238 | curl -T "img[1-1000].png" ftp://ftp.example.com/upload/ |
| 2239 | |
| 2240 | When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322 |
| 2241 | formatted. It has to feature the necessary set of headers and mail body |
| 2242 | formatted correctly by the user as curl will not transcode nor encode it |
| 2243 | further in any way. |
| 2244 | .IP "--url <url>" |
| 2245 | Specify a URL to fetch. This option is mostly handy when you want to specify |
| 2246 | URL(s) in a config file. |
| 2247 | |
| 2248 | If the given URL is missing a scheme name (such as "http://" or "ftp://" etc) |
| 2249 | then curl will make a guess based on the host. If the outermost sub-domain |
| 2250 | name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol will be |
| 2251 | used, otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by |
| 2252 | setting a default protocol, see \fI--proto-default\fP for details. |
| 2253 | |
| 2254 | This option may be used any number of times. To control where this URL is |
| 2255 | written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options. |
| 2256 | .IP "-B, --use-ascii" |
| 2257 | (FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that |
| 2258 | ends with ";type=A". This option causes data sent to stdout to be in text mode |
| 2259 | for win32 systems. |
| 2260 | .IP "-A, --user-agent <name>" |
| 2261 | (HTTP) |
| 2262 | Specify the User-Agent string to send to the HTTP server. To encode blanks in |
| 2263 | the string, surround the string with single quote marks. This can also be set |
| 2264 | with the \fI-H, --header\fP option of course. |
| 2265 | |
| 2266 | If this option is used several times, the last one will be used. |
| 2267 | .IP "-u, --user <user:password>" |
| 2268 | Specify the user name and password to use for server authentication. Overrides |
| 2269 | \fI-n, --netrc\fP and \fI--netrc-optional\fP. |
| 2270 | |
| 2271 | If you simply specify the user name, curl will prompt for a password. |
| 2272 | |
| 2273 | The user name and passwords are split up on the first colon, which makes it |
| 2274 | impossible to use a colon in the user name with this option. The password can, |
| 2275 | still. |
| 2276 | |
| 2277 | When using Kerberos V5 with a Windows based server you should include the |
| 2278 | Windows domain name in the user name, in order for the server to successfully |
| 2279 | obtain a Kerberos Ticket. If you don't then the initial authentication |
| 2280 | handshake may fail. |
| 2281 | |
| 2282 | When using NTLM, the user name can be specified simply as the user name, |
| 2283 | without the domain, if there is a single domain and forest in your setup |
| 2284 | for example. |
| 2285 | |
| 2286 | To specify the domain name use either Down-Level Logon Name or UPN (User |
| 2287 | Principal Name) formats. For example, EXAMPLE\\user and user@example.com |
| 2288 | respectively. |
| 2289 | |
| 2290 | If you use a Windows SSPI-enabled curl binary and perform Kerberos V5, |
| 2291 | Negotiate, NTLM or Digest authentication then you can tell curl to select |
| 2292 | the user name and password from your environment by specifying a single colon |
| 2293 | with this option: "-u :". |
| 2294 | |
| 2295 | If this option is used several times, the last one will be used. |
| 2296 | .IP "-v, --verbose" |
| 2297 | Makes curl verbose during the operation. Useful for debugging and seeing |
| 2298 | what's going on "under the hood". A line starting with '>' means "header data" |
| 2299 | sent by curl, '<' means "header data" received by curl that is hidden in |
| 2300 | normal cases, and a line starting with '*' means additional info provided by |
| 2301 | curl. |
| 2302 | |
| 2303 | If you only want HTTP headers in the output, \fI-i, --include\fP might be the option |
| 2304 | you're looking for. |
| 2305 | |
| 2306 | If you think this option still doesn't give you enough details, consider using |
| 2307 | \fI--trace\fP or \fI--trace-ascii\fP instead. |
| 2308 | |
| 2309 | Use \fI-s, --silent\fP to make curl really quiet. |
| 2310 | |
| 2311 | See also \fI-i, --include\fP. This option overrides \fI--trace\fP and \fI--trace-ascii\fP. |
| 2312 | .IP "-V, --version" |
| 2313 | Displays information about curl and the libcurl version it uses. |
| 2314 | |
| 2315 | The first line includes the full version of curl, libcurl and other 3rd party |
| 2316 | libraries linked with the executable. |
| 2317 | |
| 2318 | The second line (starts with "Protocols:") shows all protocols that libcurl |
| 2319 | reports to support. |
| 2320 | |
| 2321 | The third line (starts with "Features:") shows specific features libcurl |
| 2322 | reports to offer. Available features include: |
| 2323 | .RS |
| 2324 | .IP "IPv6" |
| 2325 | You can use IPv6 with this. |
| 2326 | .IP "krb4" |
| 2327 | Krb4 for FTP is supported. |
| 2328 | .IP "SSL" |
| 2329 | SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S |
| 2330 | and so on. |
| 2331 | .IP "libz" |
| 2332 | Automatic decompression of compressed files over HTTP is supported. |
| 2333 | .IP "NTLM" |
| 2334 | NTLM authentication is supported. |
| 2335 | .IP "Debug" |
| 2336 | This curl uses a libcurl built with Debug. This enables more error-tracking |
| 2337 | and memory debugging etc. For curl-developers only! |
| 2338 | .IP "AsynchDNS" |
| 2339 | This curl uses asynchronous name resolves. Asynchronous name resolves can be |
| 2340 | done using either the c-ares or the threaded resolver backends. |
| 2341 | .IP "SPNEGO" |
| 2342 | SPNEGO authentication is supported. |
| 2343 | .IP "Largefile" |
| 2344 | This curl supports transfers of large files, files larger than 2GB. |
| 2345 | .IP "IDN" |
| 2346 | This curl supports IDN - international domain names. |
| 2347 | .IP "GSS-API" |
| 2348 | GSS-API is supported. |
| 2349 | .IP "SSPI" |
| 2350 | SSPI is supported. |
| 2351 | .IP "TLS-SRP" |
| 2352 | SRP (Secure Remote Password) authentication is supported for TLS. |
| 2353 | .IP "HTTP2" |
| 2354 | HTTP/2 support has been built-in. |
| 2355 | .IP "UnixSockets" |
| 2356 | Unix sockets support is provided. |
| 2357 | .IP "HTTPS-proxy" |
| 2358 | This curl is built to support HTTPS proxy. |
| 2359 | .IP "Metalink" |
| 2360 | This curl supports Metalink (both version 3 and 4 (RFC 5854)), which |
| 2361 | describes mirrors and hashes. curl will use mirrors for failover if |
| 2362 | there are errors (such as the file or server not being available). |
| 2363 | .IP "PSL" |
| 2364 | PSL is short for Public Suffix List and means that this curl has been built |
| 2365 | with knowledge about "public suffixes". |
| 2366 | .RE |
| 2367 | .IP "-w, --write-out <format>" |
| 2368 | Make curl display information on stdout after a completed transfer. The format |
| 2369 | is a string that may contain plain text mixed with any number of |
| 2370 | variables. The format can be specified as a literal "string", or you can have |
| 2371 | curl read the format from a file with "@filename" and to tell curl to read the |
| 2372 | format from stdin you write "@-". |
| 2373 | |
| 2374 | The variables present in the output format will be substituted by the value or |
| 2375 | text that curl thinks fit, as described below. All variables are specified as |
| 2376 | %{variable_name} and to output a normal % you just write them as %%. You can |
| 2377 | output a newline by using \\n, a carriage return with \\r and a tab space with |
| 2378 | \\t. |
| 2379 | |
| 2380 | .B NOTE: |
| 2381 | The %-symbol is a special symbol in the win32-environment, where all |
| 2382 | occurrences of % must be doubled when using this option. |
| 2383 | |
| 2384 | The variables available are: |
| 2385 | .RS |
| 2386 | .TP 15 |
| 2387 | .B content_type |
| 2388 | The Content-Type of the requested document, if there was any. |
| 2389 | .TP |
| 2390 | .B filename_effective |
| 2391 | The ultimate filename that curl writes out to. This is only meaningful if curl |
| 2392 | is told to write to a file with the \fI-O, --remote-name\fP or \fI-o, --output\fP |
| 2393 | option. It's most useful in combination with the \fI-J, --remote-header-name\fP |
| 2394 | option. (Added in 7.26.0) |
| 2395 | .TP |
| 2396 | .B ftp_entry_path |
| 2397 | The initial path curl ended up in when logging on to the remote FTP |
| 2398 | server. (Added in 7.15.4) |
| 2399 | .TP |
| 2400 | .B http_code |
| 2401 | The numerical response code that was found in the last retrieved HTTP(S) or |
| 2402 | FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the |
| 2403 | same info. |
| 2404 | .TP |
| 2405 | .B http_connect |
| 2406 | The numerical code that was found in the last response (from a proxy) to a |
| 2407 | curl CONNECT request. (Added in 7.12.4) |
| 2408 | .TP |
| 2409 | .B http_version |
| 2410 | The http version that was effectively used. (Added in 7.50.0) |
| 2411 | .TP |
| 2412 | .B local_ip |
| 2413 | The IP address of the local end of the most recently done connection - can be |
| 2414 | either IPv4 or IPv6 (Added in 7.29.0) |
| 2415 | .TP |
| 2416 | .B local_port |
| 2417 | The local port number of the most recently done connection (Added in 7.29.0) |
| 2418 | .TP |
| 2419 | .B num_connects |
| 2420 | Number of new connects made in the recent transfer. (Added in 7.12.3) |
| 2421 | .TP |
| 2422 | .B num_redirects |
| 2423 | Number of redirects that were followed in the request. (Added in 7.12.3) |
| 2424 | .TP |
| 2425 | .B proxy_ssl_verify_result |
| 2426 | The result of the HTTPS proxy's SSL peer certificate verification that was |
| 2427 | requested. 0 means the verification was successful. (Added in 7.52.0) |
| 2428 | .TP |
| 2429 | .B redirect_url |
| 2430 | When an HTTP request was made without \fI-L, --location\fP to follow redirects (or when |
| 2431 | --max-redir is met), this variable will show the actual URL a redirect |
| 2432 | \fIwould\fP have gone to. (Added in 7.18.2) |
| 2433 | .TP |
| 2434 | .B remote_ip |
| 2435 | The remote IP address of the most recently done connection - can be either |
| 2436 | IPv4 or IPv6 (Added in 7.29.0) |
| 2437 | .TP |
| 2438 | .B remote_port |
| 2439 | The remote port number of the most recently done connection (Added in 7.29.0) |
| 2440 | .TP |
| 2441 | .B scheme |
| 2442 | The URL scheme (sometimes called protocol) that was effectively used (Added in 7.52.0) |
| 2443 | .TP |
| 2444 | .B size_download |
| 2445 | The total amount of bytes that were downloaded. |
| 2446 | .TP |
| 2447 | .B size_header |
| 2448 | The total amount of bytes of the downloaded headers. |
| 2449 | .TP |
| 2450 | .B size_request |
| 2451 | The total amount of bytes that were sent in the HTTP request. |
| 2452 | .TP |
| 2453 | .B size_upload |
| 2454 | The total amount of bytes that were uploaded. |
| 2455 | .TP |
| 2456 | .B speed_download |
| 2457 | The average download speed that curl measured for the complete download. Bytes |
| 2458 | per second. |
| 2459 | .TP |
| 2460 | .B speed_upload |
| 2461 | The average upload speed that curl measured for the complete upload. Bytes per |
| 2462 | second. |
| 2463 | .TP |
| 2464 | .B ssl_verify_result |
| 2465 | The result of the SSL peer certificate verification that was requested. 0 |
| 2466 | means the verification was successful. (Added in 7.19.0) |
| 2467 | .TP |
| 2468 | .B time_appconnect |
| 2469 | The time, in seconds, it took from the start until the SSL/SSH/etc |
| 2470 | connect/handshake to the remote host was completed. (Added in 7.19.0) |
| 2471 | .TP |
| 2472 | .B time_connect |
| 2473 | The time, in seconds, it took from the start until the TCP connect to the |
| 2474 | remote host (or proxy) was completed. |
| 2475 | .TP |
| 2476 | .B time_namelookup |
| 2477 | The time, in seconds, it took from the start until the name resolving was |
| 2478 | completed. |
| 2479 | .TP |
| 2480 | .B time_pretransfer |
| 2481 | The time, in seconds, it took from the start until the file transfer was just |
| 2482 | about to begin. This includes all pre-transfer commands and negotiations that |
| 2483 | are specific to the particular protocol(s) involved. |
| 2484 | .TP |
| 2485 | .B time_redirect |
| 2486 | The time, in seconds, it took for all redirection steps including name lookup, |
| 2487 | connect, pretransfer and transfer before the final transaction was |
| 2488 | started. time_redirect shows the complete execution time for multiple |
| 2489 | redirections. (Added in 7.12.3) |
| 2490 | .TP |
| 2491 | .B time_starttransfer |
| 2492 | The time, in seconds, it took from the start until the first byte was just |
| 2493 | about to be transferred. This includes time_pretransfer and also the time the |
| 2494 | server needed to calculate the result. |
| 2495 | .TP |
| 2496 | .B time_total |
| 2497 | The total time, in seconds, that the full operation lasted. |
| 2498 | .TP |
| 2499 | .B url_effective |
| 2500 | The URL that was fetched last. This is most meaningful if you've told curl |
| 2501 | to follow location: headers. |
| 2502 | .RE |
| 2503 | .IP |
| 2504 | If this option is used several times, the last one will be used. |
| 2505 | .IP "--xattr" |
| 2506 | When saving output to a file, this option tells curl to store certain file |
| 2507 | metadata in extended file attributes. Currently, the URL is stored in the |
| 2508 | xdg.origin.url attribute and, for HTTP, the content type is stored in |
| 2509 | the mime_type attribute. If the file system does not support extended |
| 2510 | attributes, a warning is issued. |
| 2511 | .SH FILES |
| 2512 | .I ~/.curlrc |
| 2513 | .RS |
| 2514 | Default config file, see \fI-K, --config\fP for details. |
| 2515 | .SH ENVIRONMENT |
| 2516 | The environment variables can be specified in lower case or upper case. The |
| 2517 | lower case version has precedence. http_proxy is an exception as it is only |
| 2518 | available in lower case. |
| 2519 | |
| 2520 | Using an environment variable to set the proxy has the same effect as using |
| 2521 | the \fI-x, --proxy\fP option. |
| 2522 | |
| 2523 | .IP "http_proxy [protocol://]<host>[:port]" |
| 2524 | Sets the proxy server to use for HTTP. |
| 2525 | .IP "HTTPS_PROXY [protocol://]<host>[:port]" |
| 2526 | Sets the proxy server to use for HTTPS. |
| 2527 | .IP "[url-protocol]_PROXY [protocol://]<host>[:port]" |
| 2528 | Sets the proxy server to use for [url-protocol], where the protocol is a |
| 2529 | protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP, |
| 2530 | SMTP, LDAP etc. |
| 2531 | .IP "ALL_PROXY [protocol://]<host>[:port]" |
| 2532 | Sets the proxy server to use if no protocol-specific proxy is set. |
| 2533 | .IP "NO_PROXY <comma-separated list of hosts>" |
| 2534 | list of host names that shouldn't go through any proxy. If set to a asterisk |
| 2535 | \&'*' only, it matches all hosts. |
| 2536 | |
| 2537 | Since 7.53.0, this environment variable disable the proxy even if specify |
| 2538 | \fI-x, --proxy\fP option. That is |
| 2539 | .B NO_PROXY=direct.example.com curl -x http://proxy.example.com |
| 2540 | .B http://direct.example.com |
| 2541 | accesses the target URL directly, and |
| 2542 | .B NO_PROXY=direct.example.com curl -x http://proxy.example.com |
| 2543 | .B http://somewhere.example.com |
| 2544 | accesses the target URL through proxy. |
| 2545 | |
| 2546 | .SH "PROXY PROTOCOL PREFIXES" |
| 2547 | Since curl version 7.21.7, the proxy string may be specified with a |
| 2548 | protocol:// prefix to specify alternative proxy protocols. |
| 2549 | |
| 2550 | If no protocol is specified in the proxy string or if the string doesn't match |
| 2551 | a supported one, the proxy will be treated as an HTTP proxy. |
| 2552 | |
| 2553 | The supported proxy protocol prefixes are as follows: |
| 2554 | .IP "socks4://" |
| 2555 | Makes it the equivalent of \fI--socks4\fP |
| 2556 | .IP "socks4a://" |
| 2557 | Makes it the equivalent of \fI--socks4a\fP |
| 2558 | .IP "socks5://" |
| 2559 | Makes it the equivalent of \fI--socks5\fP |
| 2560 | .IP "socks5h://" |
| 2561 | Makes it the equivalent of \fI--socks5-hostname\fP |
| 2562 | .SH EXIT CODES |
| 2563 | There are a bunch of different error codes and their corresponding error |
| 2564 | messages that may appear during bad conditions. At the time of this writing, |
| 2565 | the exit codes are: |
| 2566 | .IP 1 |
| 2567 | Unsupported protocol. This build of curl has no support for this protocol. |
| 2568 | .IP 2 |
| 2569 | Failed to initialize. |
| 2570 | .IP 3 |
| 2571 | URL malformed. The syntax was not correct. |
| 2572 | .IP 4 |
| 2573 | A feature or option that was needed to perform the desired request was not |
| 2574 | enabled or was explicitly disabled at build-time. To make curl able to do |
| 2575 | this, you probably need another build of libcurl! |
| 2576 | .IP 5 |
| 2577 | Couldn't resolve proxy. The given proxy host could not be resolved. |
| 2578 | .IP 6 |
| 2579 | Couldn't resolve host. The given remote host was not resolved. |
| 2580 | .IP 7 |
| 2581 | Failed to connect to host. |
| 2582 | .IP 8 |
| 2583 | Weird server reply. The server sent data curl couldn't parse. |
| 2584 | .IP 9 |
| 2585 | FTP access denied. The server denied login or denied access to the particular |
| 2586 | resource or directory you wanted to reach. Most often you tried to change to a |
| 2587 | directory that doesn't exist on the server. |
| 2588 | .IP 10 |
| 2589 | FTP accept failed. While waiting for the server to connect back when an active |
| 2590 | FTP session is used, an error code was sent over the control connection or |
| 2591 | similar. |
| 2592 | .IP 11 |
| 2593 | FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request. |
| 2594 | .IP 12 |
| 2595 | During an active FTP session while waiting for the server to connect back to |
| 2596 | curl, the timeout expired. |
| 2597 | .IP 13 |
| 2598 | FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request. |
| 2599 | .IP 14 |
| 2600 | FTP weird 227 format. Curl couldn't parse the 227-line the server sent. |
| 2601 | .IP 15 |
| 2602 | FTP can't get host. Couldn't resolve the host IP we got in the 227-line. |
| 2603 | .IP 16 |
| 2604 | HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is |
| 2605 | somewhat generic and can be one out of several problems, see the error message |
| 2606 | for details. |
| 2607 | .IP 17 |
| 2608 | FTP couldn't set binary. Couldn't change transfer method to binary. |
| 2609 | .IP 18 |
| 2610 | Partial file. Only a part of the file was transferred. |
| 2611 | .IP 19 |
| 2612 | FTP couldn't download/access the given file, the RETR (or similar) command |
| 2613 | failed. |
| 2614 | .IP 21 |
| 2615 | FTP quote error. A quote command returned error from the server. |
| 2616 | .IP 22 |
| 2617 | HTTP page not retrieved. The requested url was not found or returned another |
| 2618 | error with the HTTP error code being 400 or above. This return code only |
| 2619 | appears if \fI-f, --fail\fP is used. |
| 2620 | .IP 23 |
| 2621 | Write error. Curl couldn't write data to a local filesystem or similar. |
| 2622 | .IP 25 |
| 2623 | FTP couldn't STOR file. The server denied the STOR operation, used for FTP |
| 2624 | uploading. |
| 2625 | .IP 26 |
| 2626 | Read error. Various reading problems. |
| 2627 | .IP 27 |
| 2628 | Out of memory. A memory allocation request failed. |
| 2629 | .IP 28 |
| 2630 | Operation timeout. The specified time-out period was reached according to the |
| 2631 | conditions. |
| 2632 | .IP 30 |
| 2633 | FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT |
| 2634 | command, try doing a transfer using PASV instead! |
| 2635 | .IP 31 |
| 2636 | FTP couldn't use REST. The REST command failed. This command is used for |
| 2637 | resumed FTP transfers. |
| 2638 | .IP 33 |
| 2639 | HTTP range error. The range "command" didn't work. |
| 2640 | .IP 34 |
| 2641 | HTTP post error. Internal post-request generation error. |
| 2642 | .IP 35 |
| 2643 | SSL connect error. The SSL handshaking failed. |
| 2644 | .IP 36 |
| 2645 | Bad download resume. Couldn't continue an earlier aborted download. |
| 2646 | .IP 37 |
| 2647 | FILE couldn't read file. Failed to open the file. Permissions? |
| 2648 | .IP 38 |
| 2649 | LDAP cannot bind. LDAP bind operation failed. |
| 2650 | .IP 39 |
| 2651 | LDAP search failed. |
| 2652 | .IP 41 |
| 2653 | Function not found. A required LDAP function was not found. |
| 2654 | .IP 42 |
| 2655 | Aborted by callback. An application told curl to abort the operation. |
| 2656 | .IP 43 |
| 2657 | Internal error. A function was called with a bad parameter. |
| 2658 | .IP 45 |
| 2659 | Interface error. A specified outgoing interface could not be used. |
| 2660 | .IP 47 |
| 2661 | Too many redirects. When following redirects, curl hit the maximum amount. |
| 2662 | .IP 48 |
| 2663 | Unknown option specified to libcurl. This indicates that you passed a weird |
| 2664 | option to curl that was passed on to libcurl and rejected. Read up in the |
| 2665 | manual! |
| 2666 | .IP 49 |
| 2667 | Malformed telnet option. |
| 2668 | .IP 51 |
| 2669 | The peer's SSL certificate or SSH MD5 fingerprint was not OK. |
| 2670 | .IP 52 |
| 2671 | The server didn't reply anything, which here is considered an error. |
| 2672 | .IP 53 |
| 2673 | SSL crypto engine not found. |
| 2674 | .IP 54 |
| 2675 | Cannot set SSL crypto engine as default. |
| 2676 | .IP 55 |
| 2677 | Failed sending network data. |
| 2678 | .IP 56 |
| 2679 | Failure in receiving network data. |
| 2680 | .IP 58 |
| 2681 | Problem with the local certificate. |
| 2682 | .IP 59 |
| 2683 | Couldn't use specified SSL cipher. |
| 2684 | .IP 60 |
| 2685 | Peer certificate cannot be authenticated with known CA certificates. |
| 2686 | .IP 61 |
| 2687 | Unrecognized transfer encoding. |
| 2688 | .IP 62 |
| 2689 | Invalid LDAP URL. |
| 2690 | .IP 63 |
| 2691 | Maximum file size exceeded. |
| 2692 | .IP 64 |
| 2693 | Requested FTP SSL level failed. |
| 2694 | .IP 65 |
| 2695 | Sending the data requires a rewind that failed. |
| 2696 | .IP 66 |
| 2697 | Failed to initialise SSL Engine. |
| 2698 | .IP 67 |
| 2699 | The user name, password, or similar was not accepted and curl failed to log in. |
| 2700 | .IP 68 |
| 2701 | File not found on TFTP server. |
| 2702 | .IP 69 |
| 2703 | Permission problem on TFTP server. |
| 2704 | .IP 70 |
| 2705 | Out of disk space on TFTP server. |
| 2706 | .IP 71 |
| 2707 | Illegal TFTP operation. |
| 2708 | .IP 72 |
| 2709 | Unknown TFTP transfer ID. |
| 2710 | .IP 73 |
| 2711 | File already exists (TFTP). |
| 2712 | .IP 74 |
| 2713 | No such user (TFTP). |
| 2714 | .IP 75 |
| 2715 | Character conversion failed. |
| 2716 | .IP 76 |
| 2717 | Character conversion functions required. |
| 2718 | .IP 77 |
| 2719 | Problem with reading the SSL CA cert (path? access rights?). |
| 2720 | .IP 78 |
| 2721 | The resource referenced in the URL does not exist. |
| 2722 | .IP 79 |
| 2723 | An unspecified error occurred during the SSH session. |
| 2724 | .IP 80 |
| 2725 | Failed to shut down the SSL connection. |
| 2726 | .IP 82 |
| 2727 | Could not load CRL file, missing or wrong format (added in 7.19.0). |
| 2728 | .IP 83 |
| 2729 | Issuer check failed (added in 7.19.0). |
| 2730 | .IP 84 |
| 2731 | The FTP PRET command failed |
| 2732 | .IP 85 |
| 2733 | RTSP: mismatch of CSeq numbers |
| 2734 | .IP 86 |
| 2735 | RTSP: mismatch of Session Identifiers |
| 2736 | .IP 87 |
| 2737 | unable to parse FTP file list |
| 2738 | .IP 88 |
| 2739 | FTP chunk callback reported error |
| 2740 | .IP 89 |
| 2741 | No connection available, the session will be queued |
| 2742 | .IP 90 |
| 2743 | SSL public key does not matched pinned public key |
| 2744 | .IP XX |
| 2745 | More error codes will appear here in future releases. The existing ones |
| 2746 | are meant to never change. |
| 2747 | .SH AUTHORS / CONTRIBUTORS |
| 2748 | Daniel Stenberg is the main author, but the whole list of contributors is |
| 2749 | found in the separate THANKS file. |
| 2750 | .SH WWW |
| 2751 | https://curl.haxx.se |
| 2752 | .SH "SEE ALSO" |
| 2753 | .BR ftp (1), |
| 2754 | .BR wget (1) |