man_de_curl
Différences
Ci-dessous, les différences entre deux révisions de la page.
man_de_curl [2015/12/22 00:32] – créée simon | man_de_curl [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ==== Man de la commande " | ||
- | < | ||
- | curl(1) | ||
- | |||
- | |||
- | |||
- | NAME | ||
- | curl - transfer a URL | ||
- | |||
- | SYNOPSIS | ||
- | curl [options] [URL...] | ||
- | |||
- | DESCRIPTION | ||
- | | ||
- | | ||
- | work without user interaction. | ||
- | |||
- | | ||
- | file transfer resume, Metalink, and more. As you will see below, the number of features will make your head spin! | ||
- | |||
- | curl is powered by libcurl for all transfer-related features. See libcurl(3) for details. | ||
- | |||
- | URL | ||
- | The URL syntax is protocol-dependent. You'll find a detailed description in RFC 3986. | ||
- | |||
- | You can specify multiple URLs or parts of URLs by writing part sets within braces as in: | ||
- | |||
- | http:// | ||
- | |||
- | or you can get sequences of alphanumeric series by using [] as in: | ||
- | |||
- | ftp:// | ||
- | ftp:// | ||
- | ftp:// | ||
- | |||
- | | ||
- | |||
- | http:// | ||
- | |||
- | You can specify any amount of URLs on the command line. They will be fetched in a sequential manner in the specified order. | ||
- | |||
- | You can specify a step counter for the ranges to get every Nth number or letter: | ||
- | |||
- | http:// | ||
- | http:// | ||
- | |||
- | If you specify URL without protocol:// prefix, curl will attempt to guess what protocol you might want. It will then default | ||
- | | ||
- | | ||
- | |||
- | curl will do its best to use what you pass to it as a URL. It is not trying to validate it as a syntactically correct URL by any | ||
- | means but is instead very liberal with what it accepts. | ||
- | |||
- | | ||
- | | ||
- | | ||
- | |||
- | PROGRESS METER | ||
- | | ||
- | mated time left, etc. | ||
- | |||
- | curl displays this data to the terminal by default, so if you invoke curl to do an operation and it is about to write data to the | ||
- | | ||
- | |||
- | If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redi‐ | ||
- | rect (>), -o [file] or similar. | ||
- | |||
- | It is not the same case for FTP upload as that operation does not spit out any response data to the terminal. | ||
- | |||
- | If you prefer a progress " | ||
- | |||
- | OPTIONS | ||
- | | ||
- | |||
- | The short " | ||
- | | ||
- | | ||
- | |||
- | Short version options that don't need any additional values can be used immediately next to each other, like for example you can | ||
- | | ||
- | |||
- | | ||
- | same option name but prefix it with " | ||
- | | ||
- | line option.) | ||
- | |||
- | -#, --progress-bar | ||
- | Make curl display progress as a simple progress bar instead of the standard, more informational, | ||
- | |||
- | -:, --next | ||
- | Tells curl to use a separate operation for the following URL and associated options. This allows you to send several | ||
- | requests, | ||
- | (Added in 7.36.0) | ||
- | |||
- | -0, --http1.0 | ||
- | (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred: HTTP 1.1. | ||
- | |||
- | | ||
- | (HTTP) Tells curl to use HTTP version 1.1. This is the internal default version. (Added in 7.33.0) | ||
- | |||
- | | ||
- | (HTTP) Tells curl to issue its requests using HTTP 2. This requires that the underlying libcurl was built to support | ||
- | (Added in 7.33.0) | ||
- | |||
- | | ||
- | Disable | ||
- | is used by a libcurl that supports HTTP 2 to negotiate HTTP 2 support with the server during https sessions. | ||
- | |||
- | (Added in 7.36.0) | ||
- | |||
- | | ||
- | Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built with an SSL library | ||
- | ALPN is used by a libcurl that supports HTTP 2 to negotiate HTTP 2 support with the server during https sessions. | ||
- | |||
- | (Added in 7.36.0) | ||
- | |||
- | -1, --tlsv1 | ||
- | (SSL) Forces | ||
- | --tlsv1.1, and --tlsv1.2 to control the TLS version more precisely (if the SSL backend in use supports | ||
- | control). | ||
- | |||
- | -2, --sslv2 | ||
- | (SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server. | ||
- | |||
- | -3, --sslv3 | ||
- | (SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server. | ||
- | |||
- | -4, --ipv4 | ||
- | If curl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), | ||
- | curl to resolve names to IPv4 addresses only. | ||
- | |||
- | -6, --ipv6 | ||
- | If curl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), | ||
- | curl to resolve names to IPv6 addresses only. | ||
- | |||
- | -a, --append | ||
- | (FTP/SFTP) When used in an upload, this will tell curl to append to the target file instead of overwriting it. If the file | ||
- | doesn' | ||
- | |||
- | -A, --user-agent <agent string> | ||
- | (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if this field isn' | ||
- | " | ||
- | -H, --header option of course. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote | ||
- | support. | ||
- | round-trip. This is used instead of setting a specific authentication method, which you can do with --basic, | ||
- | --ntlm, and --negotiate. | ||
- | |||
- | Note that using --anyauth is not recommended if you do uploads from stdin, since it may require data to be sent twice and | ||
- | then the client must be able to rewind. If the need should arise when uploading from stdin, | ||
- | fail. | ||
- | |||
- | -b, --cookie < | ||
- | (HTTP) | ||
- | " | ||
- | |||
- | If no ' | ||
- | which should | ||
- | curl record incoming cookies too, which may be handy if you're using this in combination with the -L, --location | ||
- | The file format of the file to read cookies from should be plain HTTP headers or the Netscape/ | ||
- | |||
- | NOTE that the file specified | ||
- | cookies, use the -c, --cookie-jar option or you could even save the HTTP headers to a file using -D, --dump-header! | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -B, --use-ascii | ||
- | (FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using an URL that ends with "; | ||
- | causes data sent to stdout to be in text mode for win32 systems. | ||
- | |||
- | | ||
- | (HTTP) | ||
- | use it to override a previously set option that sets a different authentication | ||
- | --negotiate). | ||
- | |||
- | -c, --cookie-jar <file name> | ||
- | (HTTP) | ||
- | viously read from a specified file as well as all cookies received from remote server(s). If no cookies are known, no file | ||
- | will be written. | ||
- | dash, " | ||
- | |||
- | This command line option will activate the cookie engine that makes curl record and use cookies. Another way to activate | ||
- | it is to use the -b, --cookie option. | ||
- | |||
- | If the cookie | ||
- | Using -v will get a warning displayed, but that is the only visible feedback you get about this possibly lethal situation. | ||
- | |||
- | If this option is used several times, the last specified file name will be used. | ||
- | |||
- | -C, --continue-at < | ||
- | Continue/ | ||
- | skipped, | ||
- | uploads, the FTP server command SIZE will not be used by curl. | ||
- | |||
- | Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/ | ||
- | files to figure that out. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (SSL) Specifies | ||
- | cipher list details on this URL: http:// | ||
- | |||
- | NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS ciphers is in the NSSCipherSuite | ||
- | this URL: http:// | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (HTTP) | ||
- | this option is used and the server sends an unsupported encoding, curl will report an error. | ||
- | |||
- | | ||
- | Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, | ||
- | curl has connected this option is of no more use. Since 7.32.0, this option accepts decimal values, but the actual time‐ | ||
- | out will decrease in accuracy as the specified timeout increases in decimal precision. See also the -m, --max-time option. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | When used in conjunction with the -o option, curl will create the necessary local directory | ||
- | option creates the dirs mentioned with the -o option, nothing else. If the -o file name uses no dir or if the dirs it men‐ | ||
- | tions already exist, no dir will be created. | ||
- | |||
- | To create remote directories when using FTP or SFTP, try --ftp-create-dirs. | ||
- | |||
- | | ||
- | |||
- | | ||
- | (HTTPS/ | ||
- | are to be considered revoked. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | (Added in 7.19.7) | ||
- | |||
- | -d, --data < | ||
- | (HTTP) | ||
- | filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the con‐ | ||
- | tent-type application/ | ||
- | |||
- | -d, --data | ||
- | URL-encode the value of a form field you may use --data-urlencode. | ||
- | |||
- | If any of these options is used more than once on the same command line, the data pieces specified will be merged together | ||
- | with a separating | ||
- | ' | ||
- | |||
- | If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to | ||
- | read the data from stdin. Multiple files can also be specified. Posting data from a file named ' | ||
- | with --data @foobar. When --data is told to read from a file like that, carriage returns and newlines | ||
- | out. | ||
- | |||
- | -D, --dump-header < | ||
- | Write the protocol headers to the specified file. | ||
- | |||
- | This option | ||
- | could then be read in a second curl invocation by using the -b, --cookie option! The -c, --cookie-jar option is however | ||
- | better way to store cookies. | ||
- | |||
- | When used in FTP, the FTP server response lines are considered being " | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | |||
- | | ||
- | See -d, --data. | ||
- | |||
- | | ||
- | (HTTP) This posts data exactly as specified with no extra processing whatsoever. | ||
- | |||
- | If you start the data with the letter @, the rest should be a filename. | ||
- | ascii does, except that newlines and carriage returns are preserved and conversions are never done. | ||
- | |||
- | If this option is used several times, the ones following the first will append data as described in -d, --data. | ||
- | |||
- | | ||
- | (HTTP) This posts data, similar to the other --data options with the exception that this performs URL-encoding. (Added | ||
- | 7.18.0) | ||
- | |||
- | To be CGI-compliant, | ||
- | < | ||
- | |||
- | content | ||
- | This will make curl URL-encode the content and pass that on. Just be careful so that the content | ||
- | any = or @ symbols, as that will then make the syntax match one of the other cases below! | ||
- | |||
- | =content | ||
- | This will make curl URL-encode the content and pass that on. The preceding = symbol is not included in the data. | ||
- | |||
- | name=content | ||
- | | ||
- | | ||
- | |||
- | @filename | ||
- | This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in | ||
- | the POST. | ||
- | |||
- | name@filename | ||
- | | ||
- | the POST. The name part gets an equal sign appended, resulting in name=urlencoded-file-content. Note that the name | ||
- | is expected to be URL-encoded already. | ||
- | |||
- | | ||
- | Set LEVEL to tell the server what it is allowed to delegate when it comes to user credentials. Used with GSS/ | ||
- | |||
- | none | ||
- | |||
- | policy Delegates | ||
- | | ||
- | |||
- | always Unconditionally allow the server to delegate. | ||
- | |||
- | | ||
- | (HTTP) Enables HTTP Digest authentication. This is an authentication scheme that prevents the password | ||
- | over the wire in clear text. Use this in combination with the normal -u, --user option to set user name and password. See | ||
- | also --ntlm, --negotiate and --anyauth for related options. | ||
- | |||
- | If this option is used several times, only the first one is used. | ||
- | |||
- | | ||
- | (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active | ||
- | always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and | ||
- | LPRT are extensions to the original FTP protocol, and may not work on all servers, but they enable more functionality in a | ||
- | better way than the traditional PORT command. | ||
- | |||
- | --eprt can be used to explicitly enable EPRT again and --no-eprt is an alias for --disable-eprt. | ||
- | |||
- | Disabling | ||
- | or force it with --ftp-pasv. | ||
- | |||
- | | ||
- | (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally | ||
- | attempt to use EPSV before PASV, but with this option, it will not try using EPSV. | ||
- | |||
- | --epsv can be used to explicitly enable EPSV again and --no-epsv is an alias for --disable-epsv. | ||
- | |||
- | Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use -P, --ftp-port. | ||
- | |||
- | | ||
- | Tell curl to send outgoing DNS requests through < | ||
- | affect DNS). The supplied string must be an interface name (not an address). | ||
- | |||
- | This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares | ||
- | the only such one. (Added in 7.33.0) | ||
- | |||
- | | ||
- | Tell curl to bind to < | ||
- | argument should be a single IPv4 address. | ||
- | |||
- | This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares | ||
- | the only such one. (Added in 7.33.0) | ||
- | |||
- | | ||
- | Tell curl to bind to < | ||
- | argument should be a single IPv6 address. | ||
- | |||
- | This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares | ||
- | the only such one. (Added in 7.33.0) | ||
- | |||
- | | ||
- | Set the list of DNS servers to be used instead of the system default. | ||
- | commas. Port numbers may also optionally be given as :< | ||
- | |||
- | This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares | ||
- | the only such one. (Added in 7.33.0) | ||
- | |||
- | -e, --referer <URL> | ||
- | (HTTP) | ||
- | course. | ||
- | vious URL when it follows | ||
- | --referer. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -E, --cert < | ||
- | (SSL) Tells curl to use the specified client certificate file when getting a file with HTTPS, FTPS or another | ||
- | protocol. | ||
- | If the optional password isn't specified, it will be queried for on the terminal. Note that this option | ||
- | tificate" | ||
- | independently. | ||
- | |||
- | If curl is built against the NSS SSL library then this option can tell curl the nickname of the certificate to use within | ||
- | the NSS database defined by the environment variable SSL_DIR (or by default / | ||
- | (libnsspem.so) is available then PEM files may be loaded. If you want to use a file from the current | ||
- | precede | ||
- | preceded by " | ||
- | as " | ||
- | |||
- | (iOS and Mac OS X only) If curl is built against Secure Transport, then the certificate string can either be the name of a | ||
- | certificate/ | ||
- | you want to use a file from the current directory, please precede it with " | ||
- | nickname. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Select the OpenSSL crypto engine to use for cipher operations. Use --engine list to print a list of build-time | ||
- | engines. Note that not all (or none) of the engines may be available at run-time. | ||
- | |||
- | | ||
- | (RISC OS ONLY) Sets a range of environment variables, using the names the -w option supports, to allow easier extraction | ||
- | of useful information after having run curl. | ||
- | |||
- | | ||
- | (SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket is used to seed the random engine | ||
- | connections. See also the --random-file option. | ||
- | |||
- | | ||
- | (SSL) Tells curl what certificate | ||
- | specified, PEM is assumed. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (SSL) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. | ||
- | The certificate(s) | ||
- | cally used to alter that default file. | ||
- | |||
- | curl recognizes the environment variable named ' | ||
- | cert bundle. This option overrides that variable. | ||
- | |||
- | The windows | ||
- | directory as curl.exe, or in the Current Working Directory, or in any folder along your PATH. | ||
- | |||
- | If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available | ||
- | option to work properly. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (SSL) Tells curl to use the specified certificate directory to verify the peer. Multiple paths can be provided by separat‐ | ||
- | ing them with ":" | ||
- | OpenSSL, the directory must have been processed using the c_rehash utility supplied with OpenSSL. Using --capath can allow | ||
- | OpenSSL-powered curl to make SSL-connections much more efficiently than using --cacert if the --cacert file contains | ||
- | CA certificates. | ||
- | |||
- | If this option | ||
- | used. | ||
- | |||
- | -f, --fail | ||
- | (HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better | ||
- | with failed attempts. In normal cases when an HTTP server fails to deliver a document, it returns an HTML document stating | ||
- | so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22. | ||
- | |||
- | This method is not fail-safe and there are occasions where non-successful response codes will slip through, | ||
- | when authentication is involved (response codes 401 and 407). | ||
- | |||
- | -F, --form < | ||
- | (HTTP) | ||
- | data using the Content-Type multipart/ | ||
- | force the ' | ||
- | fix the file name with the symbol <. The difference between @ and < is then that @ makes a file get attached in the post | ||
- | as a file upload, while the < makes a text field and just get the contents for that text field from a file. | ||
- | |||
- | Example, | ||
- | will be the input: | ||
- | |||
- | curl -F password=@/ | ||
- | |||
- | To read content from stdin instead of a file, use - as the filename. This goes for both @ and < constructs. | ||
- | |||
- | You can also tell curl what Content-Type to use by using ' | ||
- | |||
- | curl -F " | ||
- | |||
- | or | ||
- | |||
- | curl -F " | ||
- | |||
- | You can also explicitly change the name field of a file upload part by setting filename=, like this: | ||
- | |||
- | curl -F " | ||
- | |||
- | If filename/ | ||
- | |||
- | curl -F " | ||
- | |||
- | or | ||
- | |||
- | curl -F ' | ||
- | |||
- | Note that if a filename/ | ||
- | by backslash. | ||
- | |||
- | See further examples and details in the MANUAL. | ||
- | |||
- | This option can be used multiple times. | ||
- | |||
- | | ||
- | (FTP) When an FTP server asks for " | ||
- | using the ACCT command. (Added in 7.13.0) | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (FTP) If authenticating with the USER and PASS commands fails, send this command. | ||
- | Transport | ||
- | from the certificate. (Added in 7.15.5) | ||
- | |||
- | | ||
- | (FTP/SFTP) When an FTP or SFTP URL/ | ||
- | of curl is to fail. Using this option, curl will instead attempt to create missing directories. | ||
- | |||
- | | ||
- | (FTP) Control | ||
- | following alternatives: | ||
- | |||
- | multicwd | ||
- | curl does a single CWD operation for each path part in the given URL. For deep hierarchies | ||
- | | ||
- | |||
- | nocwd curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these com‐ | ||
- | | ||
- | |||
- | singlecwd | ||
- | curl does one CWD with the full target directory and then operates on the file " | ||
- | | ||
- | | ||
- | |||
- | | ||
- | (FTP) Use passive | ||
- | used to override a previous -P/ | ||
- | |||
- | If this option is used several times, only the first one is used. Undoing an enforced passive really isn't doable but you | ||
- | must then instead enforce the correct -P, --ftp-port again. | ||
- | |||
- | Passive mode means that curl will try the EPSV command first and then PASV, unless --disable-epsv is used. | ||
- | |||
- | | ||
- | (FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects | ||
- | the data connection. Instead curl will re-use the same IP address it already uses for the control | ||
- | 7.14.2) | ||
- | |||
- | This option has no effect if PORT, EPRT or EPSV is used instead of PASV. | ||
- | |||
- | | ||
- | (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-stan‐ | ||
- | dard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x) | ||
- | |||
- | | ||
- | (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control | ||
- | communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See | ||
- | --ftp-ssl-ccc-mode for other modes. | ||
- | |||
- | | ||
- | (FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The passive mode will not initiate the shutdown, but instead wait | ||
- | for the server | ||
- | waits for a reply from the server. | ||
- | |||
- | | ||
- | (FTP) Require SSL/TLS for the FTP login, clear for transfer. | ||
- | fers for efficiency. | ||
- | but will be removed in a future version. | ||
- | |||
- | | ||
- | (HTTP) Similar to --form except that the value string for the named parameter is used literally. Leading ' | ||
- | acters, and the '; | ||
- | sibility that the string value may accidentally trigger the ' | ||
- | |||
- | -g, --globoff | ||
- | This option switches off the "URL globbing parser" | ||
- | ters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents | ||
- | but they should be encoded according to the URI standard. | ||
- | |||
- | -G, --get | ||
- | When used, this option will make all data specified with -d, --data, --data-binary or --data-urlencode to be used in an | ||
- | HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?' | ||
- | separator. | ||
- | |||
- | If used in combination with -I, the POST data will instead be appended to the URL with a HEAD request. | ||
- | |||
- | If this option is used several times, only the first one is used. This is because undoing a GET doesn' | ||
- | you should then instead enforce the alternative method you prefer. | ||
- | |||
- | -H, --header < | ||
- | (HTTP) | ||
- | Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your exter‐ | ||
- | nally set header | ||
- | normally do. You should not replace internally set headers without knowing perfectly well what you' | ||
- | internal header by giving a replacement without content on the right side of the colon, as in: -H " | ||
- | custom header with no-value then its header must be terminated with a semicolon, such as -H " | ||
- | Custom-Header:" | ||
- | |||
- | curl will make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus not add | ||
- | that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you. | ||
- | |||
- | See also the -A, --user-agent and -e, --referer options. | ||
- | |||
- | Starting in 7.37.0, you need --proxy-header to send custom headers intended for a proxy. | ||
- | |||
- | Example: | ||
- | |||
- | # curl -H " | ||
- | |||
- | This option can be used multiple times to add/ | ||
- | |||
- | | ||
- | (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum | ||
- | host's public key, curl will refuse the connection with the host unless the md5sums match. (Added in 7.17.1) | ||
- | |||
- | | ||
- | (HTTP) | ||
- | incorrect Content-Length for files larger than 2 gigabytes. | ||
- | |||
- | -i, --include | ||
- | (HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, | ||
- | HTTP-version and more... | ||
- | |||
- | -I, --head | ||
- | (HTTP/ | ||
- | header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only. | ||
- | |||
- | | ||
- | Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example | ||
- | look like: | ||
- | |||
- | curl --interface eth0:1 http:// | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -j, --junk-session-cookies | ||
- | (HTTP) | ||
- | will basically have the same effect as if a new session is started. Typical browsers always discard session | ||
- | they' | ||
- | |||
- | -J, --remote-header-name | ||
- | (HTTP) | ||
- | extracting a filename from the URL. | ||
- | |||
- | There' | ||
- | pected file names. | ||
- | |||
- | -k, --insecure | ||
- | (SSL) This option | ||
- | attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered | ||
- | " | ||
- | |||
- | See this online resource for further details: http:// | ||
- | |||
- | -K, --config <config file> | ||
- | Specify | ||
- | be written which then will be used as if they were written on the actual command line. | ||
- | |||
- | Options and their parameters must be specified on the same config file line, separated by whitespace, colon, or the equals | ||
- | sign. Long option names can optionally be given in the config file without the initial double dashes and if so, the colon | ||
- | or equals characters can be used as separators. If the option is specified with one or two dashes, there can be no colon | ||
- | or equals character between the option and its parameter. | ||
- | |||
- | If the parameter is to contain whitespace, the parameter must be enclosed within quotes. Within double quotes, the follow‐ | ||
- | ing escape sequences are available: \\, \", \t, \n, \r and \v. A backslash preceding any other letter is ignored. | ||
- | first column of a config line is a '#' | ||
- | per physical line in the config file. | ||
- | |||
- | Specify the filename to -K, --config as ' | ||
- | |||
- | Note that to be able to specify a URL in the config file, you need to specify it using the --url option, and not by simply | ||
- | writing the URL on its own line. So, it could look similar to this: | ||
- | |||
- | url = " | ||
- | |||
- | When curl is invoked, | ||
- | config file is checked for in the following places in this order: | ||
- | |||
- | 1) curl tries to find the "home dir": It first checks for the CURL_HOME and then the HOME environment | ||
- | that, it uses getpwuid() on UNIX-like systems (which returns the home dir given the current user in your system). On Win‐ | ||
- | dows, it then checks for the APPDATA variable, or as a last resort the ' | ||
- | |||
- | 2) On windows, if there is no _curlrc file in the home dir, it checks for one in the same dir the curl executable | ||
- | placed. On UNIX-like systems, it will simply try to load .curlrc from the determined home dir. | ||
- | |||
- | # --- Example file --- | ||
- | # this is a comment | ||
- | url = " | ||
- | output = " | ||
- | user-agent = " | ||
- | |||
- | # and fetch another URL too | ||
- | url = " | ||
- | -O | ||
- | referer = " | ||
- | # --- End of example file --- | ||
- | |||
- | This option can be used multiple times to load multiple config files. | ||
- | |||
- | | ||
- | This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individ‐ | ||
- | ual keepalive probes. It is currently effective on operating systems offering the TCP_KEEPIDLE | ||
- | options | ||
- | 7.18.0) | ||
- | |||
- | If this option is used several times, the last one will be used. If unspecified, | ||
- | |||
- | --key <key> | ||
- | (SSL/SSH) Private key file name. Allows you to provide your private key in this separate file. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (SSL) Private key file type. Specify which type your --key provided private key is. DER, PEM, and ENG are supported. | ||
- | not specified, PEM is assumed. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | --krb < | ||
- | (FTP) Enable | ||
- | tial', or ' | ||
- | |||
- | This option requires a library built with kerberos4 support. This is not very common. Use -V, --version | ||
- | curl supports it. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -l, --list-only | ||
- | (FTP) When listing an FTP directory, this switch forces a name-only view. This is especially useful if the user wants to | ||
- | machine-parse the contents of an FTP directory since the normal directory view doesn' | ||
- | used like this, the option causes a NLST command to be sent to the server instead of LIST. | ||
- | |||
- | Note: Some FTP servers list only files in their response to NLST; they do not include sub-directories and symbolic links. | ||
- | |||
- | (POP3) When retrieving a specific email from POP3, this switch forces a LIST command to be performed instead of RETR. This | ||
- | is particularly useful if the user wants to see if a specific message id exists on the server and what size it is. | ||
- | |||
- | Note: When combined with -X, --request < | ||
- | use the email' | ||
- | |||
- | -L, --location | ||
- | (HTTP/ | ||
- | header and a 3XX response code), this option will make curl redo the request on the new place. If used together | ||
- | --include | ||
- | credentials to the initial host. If a redirect takes curl to a different | ||
- | user+password. See also --location-trusted on how to change this. You can limit the amount of redirects to follow by using | ||
- | the --max-redirs option. | ||
- | |||
- | When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following | ||
- | request | ||
- | send the following request using the same unmodified method. | ||
- | |||
- | You can tell curl to not change the non-GET request method to GET after a 30x response by using the dedicated options | ||
- | that: --post301, --post302 and -post303. | ||
- | |||
- | | ||
- | Append | ||
- | that does the equivalent of what your command-line operation does! | ||
- | |||
- | If this option is used several times, the last given file name will be used. (Added in 7.16.1) | ||
- | |||
- | | ||
- | Specify the maximum transfer rate you want curl to use - for both downloads and uploads. This feature | ||
- | have a limited | ||
- | would be. | ||
- | |||
- | The given speed is measured in bytes/ | ||
- | kilobytes, ' | ||
- | |||
- | The given rate is the average | ||
- | speeds in short bursts, but over time it uses no more than the given rate. | ||
- | |||
- | If you also use the -Y, --speed-limit option, that option | ||
- | slightly, to help keeping the speed-limit logic working. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Set a preferred number or range of local port numbers to use for the connection(s). | ||
- | a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connec‐ | ||
- | tion setup failures. (Added in 7.15.2) | ||
- | |||
- | | ||
- | (HTTP/ | ||
- | This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentica‐ | ||
- | tion info (which is plaintext in the case of HTTP Basic authentication). | ||
- | |||
- | -m, --max-time < | ||
- | Maximum | ||
- | hanging for hours due to slow networks or links going down. Since 7.32.0, this option accepts | ||
- | actual timeout will decrease in accuracy as the specified timeout increases in decimal precision. | ||
- | timeout option. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Specify the login options to use during server authentication. | ||
- | |||
- | You can use the login options to specify protocol specific options that may be used during authentication. At present only | ||
- | IMAP, POP3 and SMTP support login options. For more information about the login options please see RFC 2384, RFC 5092 and | ||
- | IETF draft draft-earhart-url-smtp-00.txt (Added in 7.34.0). | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (SMTP) Specify a single address. This will be used to specify the authentication address (identity) of a submitted message | ||
- | that is being relayed to another server. | ||
- | |||
- | (Added in 7.25.0) | ||
- | |||
- | | ||
- | (SMTP) Specify a single address that the given mail should get sent from. | ||
- | |||
- | (Added in 7.20.0) | ||
- | |||
- | | ||
- | Specify | ||
- | will not start and curl will return with exit code 63. | ||
- | |||
- | NOTE: The file size is not always known prior to download, and for such files this option has no effect even if the file | ||
- | transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. | ||
- | |||
- | | ||
- | (SMTP) Specify a single address, user name or mailing list name. | ||
- | |||
- | When performing a mail transfer, the recipient should specify a valid email address to send the mail to. (Added in 7.20.0) | ||
- | |||
- | When performing | ||
- | and domain (as per Section 3.5 of RFC5321). (Added in 7.34.0) | ||
- | |||
- | When performing a mailing list expand (EXPN command), the recipient should be specified using the mailing list name, such | ||
- | as " | ||
- | |||
- | | ||
- | Set maximum | ||
- | from following redirections "in absurdum" | ||
- | it limitless. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | This option | ||
- | ported) and make use of the mirrors listed within for failover if there are errors (such as the file or server | ||
- | available). | ||
- | and processed in memory and not stored in the local file system. | ||
- | |||
- | Example to use a remote Metalink file: | ||
- | |||
- | curl --metalink http:// | ||
- | |||
- | To use a Metalink file in the local file system, use FILE protocol (file://): | ||
- | |||
- | curl --metalink file:// | ||
- | |||
- | Please note that if FILE protocol is disabled, there is no way to use a local Metalink file at the time of this writing. | ||
- | Also note that if --metalink and --include are used together, --include will be ignored. This is because including headers | ||
- | in the response will break Metalink parser and if the headers are included in the file described in Metalink | ||
- | check will fail. | ||
- | |||
- | (Added in 7.27.0, if built against the libmetalink library.) | ||
- | |||
- | -n, --netrc | ||
- | Makes curl scan the .netrc (_netrc on Windows) file in the user's home directory for login name and password. This is typ‐ | ||
- | ically used for FTP on UNIX. If used with HTTP, curl will enable user authentication. See netrc(4) or ftp(1) | ||
- | on the file format. Curl will not complain if that file doesn' | ||
- | or group-readable). The environment variable " | ||
- | |||
- | A quick and very simple example of how to setup a .netrc to allow curl to FTP to the machine | ||
- | name ' | ||
- | |||
- | machine host.domain.com login myself password secret | ||
- | |||
- | -N, --no-buffer | ||
- | Disables | ||
- | that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. | ||
- | this option will disable that buffering. | ||
- | |||
- | Note that this is the negated option name documented. You can thus use --buffer to enforce the buffering. | ||
- | |||
- | | ||
- | This option | ||
- | should use. You can only specify one netrc file per invocation. If several --netrc-file options are provided, | ||
- | last one will be used. (Added in 7.21.5) | ||
- | |||
- | This option overrides any use of --netrc as they are mutually exclusive. | ||
- | fied. | ||
- | |||
- | |||
- | | ||
- | Very similar to --netrc, but this option makes the .netrc usage optional and not mandatory as the --netrc option does. | ||
- | |||
- | |||
- | | ||
- | (HTTP) Enables Negotiate (SPNEGO) authentication. | ||
- | |||
- | If you want to enable Negotiate (SPNEGO) for proxy authentication, | ||
- | |||
- | This option requires a library built with GSS-API or SSPI support. Use -V, --version to see if your curl supports | ||
- | API/SSPI and SPNEGO. | ||
- | |||
- | When using this option, you must also provide a fake -u, --user option to activate the authentication code properly. Send‐ | ||
- | ing a '-u :' is enough as the user name and password from the -u option aren't actually used. | ||
- | |||
- | If this option is used several times, only the first one is used. | ||
- | |||
- | | ||
- | Disables the use of keepalive messages on the TCP connection, as by default curl enables them. | ||
- | |||
- | Note that this is the negated option name documented. You can thus use --keepalive to enforce keepalive. | ||
- | |||
- | | ||
- | (SSL) Disable curl's use of SSL session-ID caching. | ||
- | nothing | ||
- | wild that may require you to disable this in order for you to succeed. (Added in 7.16.0) | ||
- | |||
- | Note that this is the negated option name documented. You can thus use --sessionid to enforce session-ID caching. | ||
- | |||
- | | ||
- | Comma-separated list of hosts which do not use a proxy, if one is specified. | ||
- | which matches | ||
- | contains the hostname, | ||
- | www.local.com, | ||
- | |||
- | | ||
- | servers. It is a proprietary protocol, reverse-engineered by clever people and implemented in curl based on their efforts. | ||
- | This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and docu‐ | ||
- | mented authentication method instead, such as Digest. | ||
- | |||
- | If you want to enable NTLM for your proxy authentication, | ||
- | |||
- | This option requires a library built with SSL support. Use -V, --version to see if your curl supports NTLM. | ||
- | |||
- | If this option is used several times, only the first one is used. | ||
- | |||
- | -o, --output < | ||
- | Write output to < | ||
- | by a number | ||
- | Like in: | ||
- | |||
- | curl http:// | ||
- | |||
- | or use several variables like: | ||
- | |||
- | curl http:// | ||
- | |||
- | You may use this option as many times as the number of URLs you have. | ||
- | |||
- | See also the --create-dirs option to create the local directories dynamically. Specifying the output | ||
- | dash) will force the output to be done to stdout. | ||
- | |||
- | -O, --remote-name | ||
- | Write output | ||
- | is cut off.) | ||
- | |||
- | The remote file name to use for saving is extracted from the given URL, nothing else. | ||
- | |||
- | Consequentially, | ||
- | tory, make sure you change current working directory before you invoke curl with the -O, --remote-name flag! | ||
- | |||
- | There is no URL decoding done on the file name. If it has %20 or other URL encoded parts of the name, they will end up as- | ||
- | is as file name. | ||
- | |||
- | You may use this option as many times as the number of URLs you have. | ||
- | |||
- | | ||
- | (IMAP, POP3, SMTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token is used in conjunction | ||
- | with the user name which can be specified as part of the --url or -u, --user options. | ||
- | |||
- | The Bearer Token and user name are formatted according to RFC 6750. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (HTTP) | ||
- | This is the equivalent option to -H, --header but is for proxy communication only like in CONNECT requests when you want a | ||
- | separate header sent to the proxy to what is sent to the actual remote host. | ||
- | |||
- | curl will make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus not add | ||
- | that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you. | ||
- | |||
- | Headers specified with this option will not be included in requests that curl knows will not be sent to a proxy. | ||
- | |||
- | This option can be used multiple times to add/ | ||
- | |||
- | (Added in 7.37.0) | ||
- | |||
- | -p, --proxytunnel | ||
- | When an HTTP proxy is used (-x, --proxy), this option will cause non-HTTP protocols to attempt to tunnel through the proxy | ||
- | instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and | ||
- | requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to. | ||
- | |||
- | -P, --ftp-port < | ||
- | (FTP) Reverses the default initiator/ | ||
- | practice, | ||
- | the server to setup an IP address and port for it to connect to. < | ||
- | |||
- | interface | ||
- | i.e " | ||
- | |||
- | IP address | ||
- | i.e " | ||
- | |||
- | host name | ||
- | i.e " | ||
- | |||
- | - make curl pick the same IP address that is already used for the control connection | ||
- | |||
- | If this option is used several times, the last one will be used. Disable the use of PORT with --ftp-pasv. Disable the attempt | ||
- | use the EPRT command instead of PORT by using --disable-eprt. EPRT is really PORT++. | ||
- | |||
- | | ||
- | means you specify a port range, from a lower to a higher number. A single number works as well, but do note that it increases the | ||
- | risk of failure since the port may not be available. | ||
- | |||
- | | ||
- | (SSL/SSH) Passphrase for the private key | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | (HTTP) | ||
- | rection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain | ||
- | tency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when | ||
- | using -L, --location (Added in 7.17.1) | ||
- | |||
- | | ||
- | (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following | ||
- | rection. | ||
- | tency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when | ||
- | using -L, --location (Added in 7.19.1) | ||
- | |||
- | | ||
- | (HTTP) | ||
- | rection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain | ||
- | tency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when | ||
- | using -L, --location (Added in 7.26.0) | ||
- | |||
- | | ||
- | Tells curl to use the listed protocols for its initial retrieval. Protocols are evaluated left to right, are comma sepa‐ | ||
- | rated, and are each a protocol name or ' | ||
- | |||
- | + Permit this protocol in addition to protocols already permitted (this is the default if no modifier is used). | ||
- | |||
- | - Deny this protocol, removing it from the list of protocols already permitted. | ||
- | |||
- | = Permit | ||
- | | ||
- | |||
- | For example: | ||
- | |||
- | --proto -ftps uses the default protocols, but disables ftps | ||
- | |||
- | --proto -all, | ||
- | only enables http and https | ||
- | |||
- | --proto =http,https | ||
- | also only enables http and https | ||
- | |||
- | Unknown protocols produce a warning. This allows scripts to safely rely on being able to disable | ||
- | protocols, without relying upon support for that protocol being built into curl to avoid an error. | ||
- | |||
- | This option | ||
- | instance of the option. | ||
- | |||
- | (Added in 7.20.2) | ||
- | |||
- | | ||
- | Tells curl to use the listed protocols after a redirect. See --proto for how protocols are represented. | ||
- | |||
- | (Added in 7.20.2) | ||
- | |||
- | | ||
- | Tells curl to pick a suitable authentication method when communicating with the given proxy. This might cause an extra | ||
- | request/ | ||
- | |||
- | | ||
- | Tells curl to use HTTP Basic authentication when communicating with the given proxy. Use --basic for enabling HTTP Basic | ||
- | with a remote host. Basic is the default authentication method curl uses with proxies. | ||
- | |||
- | | ||
- | Tells curl to use HTTP Digest authentication when communicating with the given proxy. | ||
- | Digest with a remote host. | ||
- | |||
- | | ||
- | Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating with the given proxy. Use --negotiate for | ||
- | enabling HTTP Negotiate (SPNEGO) with a remote host. (Added in 7.17.1) | ||
- | |||
- | | ||
- | Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use --ntlm for enabling | ||
- | remote host. | ||
- | |||
- | | ||
- | Use the specified HTTP 1.0 proxy. If the port number is not specified, it is assumed at port 1080. | ||
- | |||
- | The only difference | ||
- | proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1. | ||
- | |||
- | | ||
- | (SSH) Public key file name. Allows you to provide your public key in this separate file. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | for details on the default config file search path. | ||
- | |||
- | -Q, --quote < | ||
- | (FTP/ | ||
- | place (just after the initial PWD command in an FTP transfer, to be exact). To make commands take place after a successful | ||
- | transfer, prefix them with a dash ' | ||
- | the transfer command(s), prefix the command with a ' | ||
- | commands. | ||
- | tactically correct FTP commands as RFC 959 defines to FTP servers, or one of the commands listed below to SFTP servers. | ||
- | This option | ||
- | curl continue even if the command fails as by default curl will stop at first failure. | ||
- | |||
- | SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands itself before sending them to the server. | ||
- | File names may be quoted shell-style to embed spaces or special characters. | ||
- | quote commands: | ||
- | |||
- | chgrp group file | ||
- | The chgrp command sets the group ID of the file named by the file operand to the group ID specified | ||
- | | ||
- | |||
- | chmod mode file | ||
- | The chmod command modifies the file mode bits of the specified file. The mode operand is an octal integer mode num‐ | ||
- | ber. | ||
- | |||
- | chown user file | ||
- | The chown command sets the owner of the file named by the file operand to the user ID specified by the user oper‐ | ||
- | and. The user operand is a decimal integer user ID. | ||
- | |||
- | ln source_file target_file | ||
- | | ||
- | tion. | ||
- | |||
- | mkdir directory_name | ||
- | The mkdir command creates the directory named by the directory_name operand. | ||
- | |||
- | pwd The pwd command returns the absolute pathname of the current working directory. | ||
- | |||
- | rename source target | ||
- | The rename command renames the file or directory named by the source operand to the destination path named by the | ||
- | | ||
- | |||
- | rm file | ||
- | The rm command removes the file specified by the file operand. | ||
- | |||
- | rmdir directory | ||
- | The rmdir command removes the directory entry specified by the directory operand, provided it is empty. | ||
- | |||
- | symlink source_file target_file | ||
- | See ln. | ||
- | |||
- | -r, --range < | ||
- | (HTTP/ | ||
- | Ranges can be specified in a number of ways. | ||
- | |||
- | 0-499 | ||
- | |||
- | 500-999 | ||
- | |||
- | -500 specifies the last 500 bytes | ||
- | |||
- | 9500- | ||
- | |||
- | 0-0, | ||
- | |||
- | 500-700, | ||
- | specifies 300 bytes from offset 500(H) | ||
- | |||
- | 100-199, | ||
- | specifies two separate 100-byte ranges(*)(H) | ||
- | |||
- | (*) = NOTE that this will cause the server to reply with a multipart response! | ||
- | |||
- | Only digit characters (0-9) are valid in the ' | ||
- | is given in the range, the server' | ||
- | |||
- | | ||
- | | ||
- | |||
- | FTP and SFTP range downloads only support the simple ' | ||
- | | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -R, --remote-time | ||
- | When used, this will make curl attempt to figure out the timestamp of the remote file, and if that is available make the | ||
- | local file get that same timestamp. | ||
- | |||
- | | ||
- | (SSL) Specify the path name to file containing what will be considered as random data. The data is used to seed the random | ||
- | engine for SSL connections. | ||
- | |||
- | | ||
- | unaltered, raw. (Added in 7.16.2) | ||
- | |||
- | | ||
- | This option changes the default action for all given URLs to be dealt with as if -O, --remote-name were used for each one. | ||
- | So if you want to disable that for a specific URL after --remote-name-all has been used, you must use "-o -" or --no- | ||
- | remote-name. (Added in 7.19.0) | ||
- | |||
- | | ||
- | Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified | ||
- | address | ||
- | vided on the command line. The port number should be the number used for the specific protocol the host will be used for. | ||
- | It means you need several entries if you want to provide address for the same host but different ports. | ||
- | |||
- | This option can be used many times to add many host names to resolve. | ||
- | |||
- | (Added in 7.21.3) | ||
- | |||
- | | ||
- | If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving | ||
- | up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, | ||
- | FTP 4xx response code or an HTTP 5xx response code. | ||
- | |||
- | When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double | ||
- | the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries. | ||
- | --retry-delay | ||
- | for retries. (Added in 7.12.3) | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Make curl sleep this amount of time before each retry when a transfer has failed with a transient error (it changes | ||
- | default | ||
- | delay to zero will make curl use the default backoff time. (Added in 7.12.3) | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | The retry timer is reset before the first transfer attempt. Retries will be done as usual (see --retry) | ||
- | timer hasn' | ||
- | while performing, it may take longer than this given time period. To limit a single request´s maximum time, use -m, --max- | ||
- | time. Set this option to zero to not timeout retries. (Added in 7.12.3) | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -s, --silent | ||
- | Silent or quiet mode. Don't show progress meter or error messages. | ||
- | for, potentially even to the terminal/ | ||
- | |||
- | | ||
- | Enable initial response in SASL authentication. | ||
- | |||
- | -S, --show-error | ||
- | When used with -s it makes curl show an error message if it fails. | ||
- | |||
- | | ||
- | support SSL/ | ||
- | |||
- | This option was formerly known as --ftp-ssl (Added in 7.11.0). That option name can still be used but will be removed in a | ||
- | future version. | ||
- | |||
- | | ||
- | (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. | ||
- | SSL/TLS. (Added in 7.20.0) | ||
- | |||
- | This option was formerly known as --ftp-ssl-reqd (added in 7.15.5). That option name can still be used but will be removed | ||
- | in a future version. | ||
- | |||
- | | ||
- | (SSL) This option tells curl to not work around a security flaw in the SSL3 and TLS1.0 protocols known as BEAST. | ||
- | option | ||
- | mentations. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly | ||
- | 7.25.0) | ||
- | |||
- | | ||
- | Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2) | ||
- | |||
- | This option overrides any previous use of -x, --proxy, as they are mutually exclusive. | ||
- | |||
- | Since 7.21.7, this option is superfluous since you can specify a socks4 proxy with -x, --proxy using a socks4:// protocol | ||
- | prefix. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0) | ||
- | |||
- | This option overrides any previous use of -x, --proxy, as they are mutually exclusive. | ||
- | |||
- | Since 7.21.7, this option is superfluous since you can specify a socks4a proxy with -x, --proxy using a socks4a:// | ||
- | col prefix. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Use the specified | ||
- | assumed at port 1080. (Added in 7.18.0) | ||
- | |||
- | This option overrides any previous use of -x, --proxy, as they are mutually exclusive. | ||
- | |||
- | Since 7.21.7, this option is superfluous since you can specify a socks5 hostname proxy with -x, --proxy using a socks5h:// | ||
- | protocol prefix. | ||
- | |||
- | If this option is used several times, the last one will be used. (This option was previously wrongly documented and used | ||
- | as --socks without the number appended.) | ||
- | |||
- | | ||
- | Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed | ||
- | port 1080. | ||
- | |||
- | This option overrides any previous use of -x, --proxy, as they are mutually exclusive. | ||
- | |||
- | Since 7.21.7, this option is superfluous since you can specify a socks5 proxy with -x, --proxy using a socks5:// protocol | ||
- | prefix. | ||
- | |||
- | If this option is used several times, the last one will be used. (This option was previously wrongly documented | ||
- | as --socks without the number appended.) | ||
- | |||
- | This option (as well as --socks4) does not work with IPV6, FTPS or LDAP. | ||
- | |||
- | | ||
- | The default service name for a socks server is rcmd/ | ||
- | |||
- | Examples: | ||
- | api-service sockd/ | ||
- | (Added in 7.19.4). | ||
- | |||
- | | ||
- | As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961 says in section 4.3/4.4 it should be pro‐ | ||
- | tected, but the NEC reference implementation does not. The option --socks5-gssapi-nec allows the unprotected exchange | ||
- | the protection mode negotiation. (Added in 7.19.4). | ||
- | |||
- | | ||
- | Redirect | ||
- | stdout. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -t, --telnet-option < | ||
- | Pass options to the telnet protocol. Supported options are: | ||
- | |||
- | TTYPE=< | ||
- | |||
- | XDISPLOC=< | ||
- | |||
- | NEW_ENV=< | ||
- | |||
- | -T, --upload-file < | ||
- | This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append | ||
- | the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no | ||
- | file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the | ||
- | upload operation to fail. If this is used on an HTTP(S) server, the PUT command will be used. | ||
- | |||
- | Use the file name " | ||
- | period) may be specified instead of " | ||
- | being uploaded. | ||
- | |||
- | You can specify | ||
- | also supports " | ||
- | URL globbing style supported in the URL, like this: | ||
- | |||
- | curl -T " | ||
- | |||
- | or even | ||
- | |||
- | curl -T " | ||
- | |||
- | | ||
- | Turn on the TCP_NODELAY option. See the curl_easy_setopt(3) man page for details about this option. (Added in 7.11.2) | ||
- | |||
- | | ||
- | (TFTP) | ||
- | or from a TFTP server. By default 512 bytes will be used. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | (Added in 7.20.0) | ||
- | |||
- | | ||
- | Set TLS authentication type. Currently, the only supported option is " | ||
- | --tlspassword are specified but --tlsauthtype is not, then this option defaults to " | ||
- | |||
- | | ||
- | Set password for use with the TLS authentication method specified with --tlsauthtype. Requires that --tlsuser also be set. | ||
- | (Added in 7.21.4) | ||
- | |||
- | | ||
- | Set username for use with the TLS authentication method specified with --tlsauthtype. Requires that --tlspassword also be | ||
- | set. (Added in 7.21.4) | ||
- | |||
- | | ||
- | (SSL) Forces curl to use TLS version 1.0 when negotiating with a remote TLS server. | ||
- | |||
- | | ||
- | (SSL) Forces curl to use TLS version 1.1 when negotiating with a remote TLS server. | ||
- | |||
- | | ||
- | (SSL) Forces curl to use TLS version 1.2 when negotiating with a remote TLS server. | ||
- | |||
- | | ||
- | (HTTP) | ||
- | while receiving it. | ||
- | |||
- | (Added in 7.21.6) | ||
- | |||
- | | ||
- | Enables a full trace dump of all incoming and outgoing data, including descriptive information, | ||
- | Use " | ||
- | |||
- | This option overrides previous uses of -v, --verbose or --trace-ascii. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Enables | ||
- | Use " | ||
- | |||
- | This is very similar to --trace, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller | ||
- | output that might be easier to read for untrained humans. | ||
- | |||
- | This option overrides previous uses of -v, --verbose or --trace. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | Prepends a time stamp to each trace or verbose line that curl displays. | ||
- | |||
- | -u, --user < | ||
- | Specify the user name and password to use for server authentication. Overrides -n, --netrc and --netrc-optional. | ||
- | |||
- | If you simply specify the user name, curl will prompt for a password. | ||
- | |||
- | The user name and passwords are split up on the first colon, which makes it impossible to use a colon in the user name | ||
- | with this option. The password can, still. | ||
- | |||
- | When using Kerberos V5 with a Windows based server you should include the Windows domain name in the user name, in order | ||
- | for the server to successfully obtain a Kerberos Ticket. If you don't then the initial authentication handshake may fail. | ||
- | |||
- | When using NTLM, the user name can be specified simply as the user name, without the domain, if there is a single domain | ||
- | and forest in your setup for example. | ||
- | |||
- | To specify the domain name use either Down-Level Logon Name or UPN (User Principal | ||
- | PLE\user and user@example.com respectively. | ||
- | |||
- | If you use a Windows SSPI-enabled curl binary and perform Kerberos V5, Negotiate or NTLM authentication then you can tell | ||
- | curl to select the user name and password from your environment by specifying a single colon with this option: "-u :". | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -U, --proxy-user < | ||
- | Specify the user name and password to use for proxy authentication. | ||
- | |||
- | If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM authentication then you can tell curl to | ||
- | select the user name and password from your environment by specifying a single colon with this option: "-U :". | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | --url <URL> | ||
- | Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file. | ||
- | |||
- | This option | ||
- | --remote-name options. | ||
- | |||
- | -v, --verbose | ||
- | Makes the fetching more verbose/ | ||
- | by curl, '<' | ||
- | tional info provided by curl. | ||
- | |||
- | Note that if you only want HTTP headers in the output, -i, --include might be the option you're looking for. | ||
- | |||
- | If you think this option still doesn' | ||
- | |||
- | This option overrides previous uses of --trace-ascii or --trace. | ||
- | |||
- | Use -s, --silent to make curl quiet. | ||
- | |||
- | -w, --write-out < | ||
- | Defines what to display on stdout after a completed and successful operation. The format is a string | ||
- | plain text mixed with any number of variables. The string can be specified as " | ||
- | you specify it " | ||
- | |||
- | The variables present in the output format will be substituted by the value or text that curl thinks | ||
- | below. | ||
- | a newline by using \n, a carriage return with \r and a tab space with \t. | ||
- | |||
- | NOTE: The %-symbol is a special symbol in the win32-environment, | ||
- | this option. | ||
- | |||
- | The variables available are: | ||
- | |||
- | content_type | ||
- | |||
- | filename_effective | ||
- | | ||
- | with the --remote-name or --output option. It's most useful in combination | ||
- | | ||
- | |||
- | ftp_entry_path The initial path curl ended up in when logging on to the remote FTP server. (Added in 7.15.4) | ||
- | |||
- | http_code | ||
- | alias response_code was added to show the same info. | ||
- | |||
- | http_connect | ||
- | | ||
- | |||
- | local_ip | ||
- | | ||
- | |||
- | local_port | ||
- | |||
- | num_connects | ||
- | |||
- | num_redirects | ||
- | |||
- | redirect_url | ||
- | | ||
- | |||
- | remote_ip | ||
- | |||
- | remote_port | ||
- | |||
- | size_download | ||
- | |||
- | size_header | ||
- | |||
- | size_request | ||
- | |||
- | size_upload | ||
- | |||
- | speed_download The average download speed that curl measured for the complete download. Bytes per second. | ||
- | |||
- | speed_upload | ||
- | |||
- | ssl_verify_result | ||
- | | ||
- | | ||
- | |||
- | time_appconnect | ||
- | The time, in seconds, it took from the start until the SSL/SSH/etc connect/ | ||
- | | ||
- | |||
- | time_connect | ||
- | | ||
- | |||
- | time_namelookup | ||
- | The time, in seconds, it took from the start until the name resolving was completed. | ||
- | |||
- | time_pretransfer | ||
- | The time, in seconds, it took from the start until the file transfer was just about to begin. This includes | ||
- | all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. | ||
- | |||
- | time_redirect | ||
- | | ||
- | tiple redirections. (Added in 7.12.3) | ||
- | |||
- | time_starttransfer | ||
- | | ||
- | | ||
- | |||
- | time_total | ||
- | | ||
- | |||
- | url_effective | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -x, --proxy < | ||
- | Use the specified proxy. | ||
- | |||
- | The proxy string | ||
- | socks4a://, socks5:// or socks5h:// to request the specific SOCKS version to be used. No protocol specified, | ||
- | all others will be treated as HTTP proxies. (The protocol support was added in curl 7.21.7) | ||
- | |||
- | If the port number is not specified in the proxy string, it is assumed to be 1080. | ||
- | |||
- | This option overrides existing environment variables that set the proxy to use. If there' | ||
- | a proxy, you can set proxy to "" | ||
- | |||
- | All operations that are performed over an HTTP proxy will transparently be converted to HTTP. It means that certain proto‐ | ||
- | col specific operations might not be available. This is not the case if you can tunnel through the proxy, as one with the | ||
- | -p, --proxytunnel option. | ||
- | |||
- | User and password that might be provided in the proxy string are URL decoded by curl. This allows you to pass in special | ||
- | characters such as @ by using %40 or pass in a colon with %3a. | ||
- | |||
- | The proxy host can be specified | ||
- | (http://) and the embedded user + password. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -X, --request < | ||
- | (HTTP) Specifies a custom request method to use when communicating with the HTTP server. | ||
- | used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and expla‐ | ||
- | nations. Common additional HTTP requests include PUT and DELETE, but related technologies | ||
- | COPY, MOVE and more. | ||
- | |||
- | Normally | ||
- | command line options. | ||
- | |||
- | This option only changes the actual word used in the HTTP request, it does not alter the way curl behaves. So for example | ||
- | if you want to make a proper HEAD request, using -X HEAD will not suffice. You need to use the -I, --head option. | ||
- | |||
- | (FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP. | ||
- | |||
- | (POP3) Specifies a custom POP3 command to use instead of LIST or RETR. (Added in 7.26.0) | ||
- | |||
- | (IMAP) Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0) | ||
- | |||
- | (SMTP) Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0) | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | | ||
- | When saving | ||
- | rently, the URL is stored in the xdg.origin.url attribute and, for HTTP, the content | ||
- | attribute. If the file system does not support extended attributes, a warning is issued. | ||
- | |||
- | |||
- | -y, --speed-time < | ||
- | If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed- | ||
- | time is used, the default speed-limit will be 1 unless set with -Y. | ||
- | |||
- | This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the --con‐ | ||
- | nect-timeout option. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -Y, --speed-limit < | ||
- | If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is | ||
- | set with -y and is 30 if not set. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -z, --time-cond <date expression> | ||
- | (HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modified | ||
- | that time. The <date expression> | ||
- | a filename and tries to get the modification date (mtime) from < | ||
- | expression details. | ||
- | |||
- | Start the date expression | ||
- | default is a document that is newer than the specified date/time. | ||
- | |||
- | If this option is used several times, the last one will be used. | ||
- | |||
- | -h, --help | ||
- | Usage help. | ||
- | |||
- | -M, --manual | ||
- | Manual. Display the huge help text. | ||
- | |||
- | -V, --version | ||
- | Displays information about curl and the libcurl version it uses. | ||
- | |||
- | The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable. | ||
- | |||
- | The second line (starts with " | ||
- | |||
- | The third line (starts with " | ||
- | |||
- | IPv6 You can use IPv6 with this. | ||
- | |||
- | krb4 Krb4 for FTP is supported. | ||
- | |||
- | SSL HTTPS and FTPS are supported. | ||
- | |||
- | libz | ||
- | |||
- | NTLM NTLM authentication is supported. | ||
- | |||
- | Debug This curl uses a libcurl built with Debug. This enables more error-tracking and memory | ||
- | | ||
- | |||
- | AsynchDNS | ||
- | This curl uses asynchronous name resolves. | ||
- | |||
- | SPNEGO SPNEGO authentication is supported. | ||
- | |||
- | Largefile | ||
- | This curl supports transfers of large files, files larger than 2GB. | ||
- | |||
- | IDN This curl supports IDN - international domain names. | ||
- | |||
- | GSS-API | ||
- | | ||
- | |||
- | SSPI SSPI is supported. | ||
- | |||
- | TLS-SRP | ||
- | SRP (Secure Remote Password) authentication is supported for TLS. | ||
- | |||
- | Metalink | ||
- | | ||
- | | ||
- | |||
- | FILES | ||
- | | ||
- | Default config file, see -K, --config for details. | ||
- | |||
- | ENVIRONMENT | ||
- | The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy | ||
- | | ||
- | |||
- | Using an environment variable to set the proxy has the same effect as using the --proxy option. | ||
- | |||
- | |||
- | | ||
- | Sets the proxy server to use for HTTP. | ||
- | |||
- | | ||
- | Sets the proxy server to use for HTTPS. | ||
- | |||
- | | ||
- | Sets the proxy server to use for [url-protocol], | ||
- | URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc. | ||
- | |||
- | | ||
- | Sets the proxy server to use if no protocol-specific proxy is set. | ||
- | |||
- | | ||
- | list of host names that shouldn' | ||
- | |||
- | PROXY PROTOCOL PREFIXES | ||
- | Since curl version 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols. | ||
- | |||
- | If no protocol is specified in the proxy string or if the string doesn' | ||
- | HTTP proxy. | ||
- | |||
- | The supported proxy protocol prefixes are as follows: | ||
- | |||
- | | ||
- | Makes it the equivalent of --socks4 | ||
- | |||
- | | ||
- | Makes it the equivalent of --socks4a | ||
- | |||
- | | ||
- | Makes it the equivalent of --socks5 | ||
- | |||
- | | ||
- | Makes it the equivalent of --socks5-hostname | ||
- | |||
- | EXIT CODES | ||
- | | ||
- | time of this writing, the exit codes are: | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | time. To make curl able to do this, you probably need another build of libcurl! | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | Most often you tried to change to a directory that doesn' | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | above. This return code only appears if -f, --fail is used. | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | instead! | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | and rejected. Read up in the manual! | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | AUTHORS / CONTRIBUTORS | ||
- | | ||
- | |||
- | WWW | ||
- | | ||
- | |||
- | FTP | ||
- | | ||
- | |||
- | SEE ALSO | ||
- | | ||
- | |||
- | |||
- | |||
- | Curl 7.38.0 | ||
- | </ |
man_de_curl.1450744334.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)