Lines Matching +full:curl +full:- +full:examples
8 .\" * Copyright (C) 1998 \- 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
12 .\" * are also available at https://curl.se/docs/copyright.html.
23 .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
25 .TH curl 1 "November 10 2021" "curl 7.80.0" "curl Manual"
27 curl \- transfer a URL
29 .B curl [options / URLs]
31 \fBcurl\fP is a tool for transferring data from or to a server. It supports these
37 curl offers a busload of useful tricks like proxy support, user
42 curl is powered by libcurl for all transfer-related features. See
45 The URL syntax is protocol-dependent. You find a detailed description in
55 "ftp://ftp.example.com/file[1-100].txt"
57 "ftp://ftp.example.com/file[001-100].txt" (with leading zeros)
59 "ftp://ftp.example.com/file[a-z].txt"
64 "http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html"
73 "http://example.com/file[1-100:10].txt"
75 "http://example.com/file[a-z:2].txt"
87 If you specify URL without protocol:// prefix, curl will attempt to guess what
89 based on often-used host name prefixes. For example, for host names starting
90 with "ftp." curl will assume you want to speak FTP.
92 curl will do its best to use what you pass to it as a URL. It is not trying to
96 curl will attempt to re-use connections for multiple file transfers, so that
99 specified on a single command line and cannot be used between separate curl
102 If not told otherwise, curl writes the received data to stdout. It can be
103 instructed to instead save that data into a local file, using the \fI\-o, \-\-output\fP or
104 \fI\-O, \-\-remote-name\fP options. If curl is given multiple URLs to transfer on the
107 curl does not parse or otherwise "understand" the content it gets or writes as
111 curl supports numerous protocols, or put in URL terms: schemes. Your
116 Read or write local files. curl does not support accessing file:// URL
120 curl supports the File Transfer Protocol with a lot of tweaks and levers. With
125 curl supports HTTP with numerous options and variations. It can speak HTTP
129 Using the mail reading protocol, curl can "download" emails for you. With or
132 curl can do directory lookups for you, with or without TLS.
134 curl supports MQTT version 3. Downloading over MQTT equals "subscribe" to a
142 and curl can download it.
144 curl supports RTSP 1.0 downloads.
146 curl supports SSH version 2 scp transfers.
148 curl supports SFTP (draft 5) done over SSH version 2.
150 curl supports SMB version 1 for upload and download.
155 Telling curl to fetch a telnet URL starts an interactive session where it
158 curl can do TFTP downloads and uploads.
160 curl normally displays a progress meter during operations, indicating the
166 curl displays this data to the terminal by default, so if you invoke curl to
172 redirect the response output to a file, using shell redirect (>), \fI\-o, \-\-output\fP or
178 If you prefer a progress "bar" instead of the regular meter, \fI\-#, \-\-progress-bar\fP is
180 \fI\-s, \-\-silent\fP option.
185 The short "single-dash" form of the options, \-d for example, may be used with
187 separator. The long "double-dash" form, \fI\-d, \-\-data\fP for example, requires a space
192 options \-O, \-L and \-v at once as \-OLv.
194 In general, all boolean options are enabled with \-\-\fBoption\fP and yet again
195 disabled with \-\-\fBno-\fPoption. That is, you use the exact same option name
196 but prefix it with "no-". However, in this list we mostly only list and show
197 the \-\-option version of them.
198 .IP "\-\-abstract-unix-socket <path>"
205 curl --abstract-unix-socket socketpath https://example.com
209 .IP "\-\-alt-svc <file name>"
210 (HTTPS) This option enables the alt-svc parser in curl. If the file name points to an
211 existing alt-svc cache file, that will be used. After a completed transfer,
214 Specify a "" file name (zero length) to avoid loading/saving and make curl
217 If this option is used several times, curl will load contents from all the
222 curl --alt-svc svc.txt https://example.com
226 .IP "\-\-anyauth"
227 (HTTP) Tells curl to figure out authentication method by itself, and use the most
229 request and checking the response-headers, thus possibly inducing an extra
230 network round-trip. This is used instead of setting a specific authentication
231 method, which you can do with \fI\-\-basic\fP, \fI\-\-digest\fP, \fI\-\-ntlm\fP, and \fI\-\-negotia…
233 Using \fI\-\-anyauth\fP is not recommended if you do uploads from stdin, since it may
238 Used together with \fI\-u, \-\-user\fP.
242 curl --anyauth --user me:pwd https://example.com
245 See also \fI--proxy-anyauth\fP, \fI--basic\fP and \fI--digest\fP.
246 .IP "\-a, \-\-append"
247 (FTP SFTP) When used in an upload, this makes curl append to the target file instead of
253 curl --upload-file local --append ftp://example.com/
255 .IP "\-\-aws-sigv4 <provider1[:provider2[:region[:service]]]>"
262 a resources collection (region-code) when the region name is omitted from
266 (service-code) when the service name is omitted from the endpoint.
270 curl --aws-sigv4 "aws:amz:east-2:es" --user "key:secret" https://example.com
274 .IP "\-\-basic"
275 (HTTP) Tells curl to use HTTP Basic authentication with the remote host. This is the
278 \fI\-\-ntlm\fP, \fI\-\-digest\fP, or \fI\-\-negotiate\fP).
280 Used together with \fI\-u, \-\-user\fP.
284 curl -u name:password --basic https://example.com
287 See also \fI--proxy-basic\fP.
288 .IP "\-\-cacert <file>"
289 (TLS) Tells curl to use the specified certificate file to verify the peer. The file
291 format. Normally curl is built to use a default file for this, so this option
294 curl recognizes the environment variable named \(aqCURL_CA_BUNDLE' if it is
298 The windows version of curl will automatically look for a CA certs file named
299 \(aqcurl-ca-bundle.crt', either in the same directory as curl.exe, or in the
302 If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
305 (iOS and macOS only) If curl is built against Secure Transport, then this
307 should not be set. If the option is not set, then curl will use the
320 curl --cacert CA-file.txt https://example.com
322 .IP "\-\-capath <dir>"
323 (TLS) Tells curl to use the specified certificate directory to verify the
325 \&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
327 c_rehash utility supplied with OpenSSL. Using \fI\-\-capath\fP can allow
328 OpenSSL-powered curl to make SSL-connections much more efficiently than using
329 \fI\-\-cacert\fP if the \-\-cacert file contains many CA certificates.
336 curl --capath /local/directory https://example.com
338 .IP "\-\-cert-status"
339 (TLS) Tells curl to verify the status of the server certificate by using the
350 curl --cert-status https://example.com
354 .IP "\-\-cert-type <type>"
355 (TLS) Tells curl what type the provided client certificate is using. PEM, DER, ENG
362 curl --cert-type PEM --cert file https://example.com
365 See also \fI-E, --cert\fP, \fI--key\fP and \fI--key-type\fP.
366 .IP "\-E, \-\-cert <certificate[:password]>"
367 (TLS) Tells curl to use the specified client certificate file when getting a file
368 with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
372 private key and the client certificate concatenated! See \fI\-E, \-\-cert\fP and \fI\-\-key\fP to
375 If curl is built against the NSS SSL library then this option can tell
376 curl the nickname of the certificate to use within the NSS database defined
385 If curl is built against OpenSSL library, and the engine pkcs11 is available,
388 PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option will be set
389 as "pkcs11" if none was provided and the \fI\-\-cert-type\fP option will be set as
392 (iOS and macOS only) If curl is built against Secure Transport, then the
394 system or user keychain, or the path to a PKCS#12-encoded certificate and
404 usually a SHA-1 hex string which you can see in certificate details. Following
413 curl --cert certfile --key keyfile https://example.com
416 See also \fI--cert-type\fP, \fI--key\fP and \fI--key-type\fP.
417 .IP "\-\-ciphers <list of ciphers>"
421 https://curl.se/docs/ssl-ciphers.html
427 curl --ciphers ECDHE-ECDSA-AES256-CCM8 https://example.com
429 .IP "\-\-compressed-ssh"
430 (SCP SFTP) Enables built-in SSH compression.
435 curl --compressed-ssh sftp://example.com/
439 .IP "\-\-compressed"
440 (HTTP) Request a compressed response using one of the algorithms curl supports, and
443 If this option is used and the server sends an unsupported encoding, curl will
449 curl --compressed https://example.com
451 .IP "\-K, \-\-config <file>"
452 Specify a text file to read curl arguments from. The command line arguments
473 Specify the filename to \fI\-K, \-\-config\fP as \(aq-' to make curl read the file from stdin.
476 it using the \fI\-\-url\fP option, and not by simply writing the URL on its own
479 url = "https://curl.se/docs/"
481 When curl is invoked, it (unless \fI\-q, \-\-disable\fP is used) checks for a default
491 4) Non-windows: use getpwuid to find the home directory
498 in the same dir the curl executable is placed. On Unix-like systems, it will
502 # \-\-\- Example file \-\-\-
506 user-agent = "superagent/1.0"
510 \-O
512 # \-\-\- End of example file \-\-\-
519 curl --config file.txt https://example.com
521 .IP "\-\-connect-timeout <fractional seconds>"
522 Maximum time in seconds that you allow curl\(aqs connection to take. This only
523 limits the connection phase, so if curl connects within the given period it
524 will continue \- if not it will exit. Since version 7.32.0, this option
529 Examples:
531 curl --connect-timeout 20 https://example.com
532 curl --connect-timeout 3.14 https://example.com
535 See also \fI-m, --max-time\fP.
536 .IP "\-\-connect-to <HOST1:PORT1:HOST2:PORT2>"
555 curl --connect-to example.com:443:example.net:8443 https://example.com
558 See also \fI--resolve\fP and \fI-H, --header\fP. Added in 7.49.0.
559 .IP "\-C, \-\-continue-at <offset>"
563 uploads, the FTP server command SIZE will not be used by curl.
565 Use "-C \-" to tell curl to automatically find out where/how to resume the
570 Examples:
572 curl -C - https://example.com
573 curl -C 400 https://example.com
576 See also \fI-r, --range\fP.
577 .IP "\-c, \-\-cookie-jar <filename>"
578 (HTTP) Specify to which file you want curl to write all cookies after a completed
579 operation. Curl writes all cookies from its in-memory cookie storage to the
582 you set the file name to a single dash, "-", the cookies will be written to
585 This command line option will activate the cookie engine that makes curl
586 record and use cookies. Another way to activate it is to use the \fI\-b, \-\-cookie\fP
589 If the cookie jar cannot be created or written to, the whole curl operation
590 will not fail or even report an error clearly. Using \fI\-v, \-\-verbose\fP will get a
597 Examples:
599 curl -c store-here.txt https://example.com
600 curl -c store-here.txt -b read-these https://example.com
602 .IP "\-b, \-\-cookie <data|filename>"
604 the data previously received from the server in a "Set-Cookie:" line. The
609 engine which will make curl record incoming cookies, which may be handy if
610 you are using this in combination with the \fI\-L, \-\-location\fP option or do multiple URL
611 transfers on the same invoke. If the file name is exactly a minus ("-"), curl
615 (Set-Cookie style) or the Netscape/Mozilla cookie file format.
617 The file specified with \fI\-b, \-\-cookie\fP is only used as input. No cookies will be
618 written to the file. To store cookies, use the \fI\-c, \-\-cookie-jar\fP option.
620 If you use the Set-Cookie file format and do not specify a domain then the
622 domain in Set-Cookie line (doing that will include sub-domains) or preferably:
628 back to a file, so using both \fI\-b, \-\-cookie\fP and \fI\-c, \-\-cookie-jar\fP in the same comma…
631 Examples:
633 curl -b cookiefile https://example.com
634 curl -b cookiefile -c cookiefile https://example.com
636 .IP "\-\-create-dirs"
637 When used in conjunction with the \fI\-o, \-\-output\fP option, curl will create the
639 directories mentioned with the \fI\-o, \-\-output\fP option, nothing else. If the \-\-output
645 To create remote directories when using FTP or SFTP, try \fI\-\-ftp-create-dirs\fP.
649 curl --create-dirs --output local/dir/file https://example.com
651 .IP "\-\-create-file-mode <mode>"
652 (SFTP SCP FILE) When curl is used to create files remotely using one of the supported
662 curl --create-file-mode 0777 -T localfile sftp://example.com/new
665 See also \fI--ftp-create-dirs\fP. Added in 7.75.0.
666 .IP "\-\-crlf"
673 curl --crlf -T file ftp://example.com/
675 .IP "\-\-crlfile <file>"
683 curl --crlfile rejects.txt https://example.com
685 .IP "\-\-curves <algorithm list>"
686 (TLS) Tells curl to request specific curves to use during SSL session establishment
688 them with ":" (e.g. "X25519:P-521"). The parameter is available identically
691 \fI\-\-curves\fP allows a OpenSSL powered curl to make SSL-connections with exactly
700 curl --curves X25519 https://example.com
704 .IP "\-\-data-ascii <data>"
705 (HTTP) This is just an alias for \fI\-d, \-\-data\fP.
709 curl --data-ascii @file https://example.com
711 .IP "\-\-data-binary <data>"
715 is posted in a similar manner as \fI\-d, \-\-data\fP does, except that newlines and
718 Like \fI\-d, \-\-data\fP the default content-type sent to the server is
719 application/x-www-form-urlencoded. If you want the data to be treated as
720 arbitrary binary data by the server then set the content-type to octet-stream:
721 \-H "Content-Type: application/octet-stream".
724 data as described in \fI\-d, \-\-data\fP.
728 curl --data-binary @filename https://example.com
730 .IP "\-\-data-raw <data>"
731 (HTTP) This posts data similarly to \fI\-d, \-\-data\fP but without the special
734 Examples:
736 curl --data-raw "hello" https://example.com
737 curl --data-raw "@at@at@" https://example.com
740 See also \fI-d, --data\fP. Added in 7.43.0.
741 .IP "\-\-data-urlencode <data>"
742 (HTTP) This posts data, similar to the other \fI\-d, \-\-data\fP options with the exception
743 that this performs URL-encoding.
745 To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
747 curl using one of the following syntaxes:
750 This will make curl URL-encode the content and pass that on. Just be careful
754 This will make curl URL-encode the content and pass that on. The preceding =
757 This will make curl URL-encode the content part and pass that on. Note that
758 the name part is expected to be URL-encoded already.
760 This will make curl load data from the given file (including any newlines),
761 URL-encode that data and pass it on in the POST.
763 This will make curl load data from the given file (including any newlines),
764 URL-encode that data and pass it on in the POST. The name part gets an equal
765 sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
766 name is expected to be URL-encoded already.
769 Examples:
771 curl --data-urlencode name=val https://example.com
772 curl --data-urlencode =encodethis https://example.com
773 curl --data-urlencode name@file https://example.com
774 curl --data-urlencode @fileonly https://example.com
777 See also \fI-d, --data\fP and \fI--data-raw\fP.
778 .IP "\-d, \-\-data <data>"
781 submit button. This will cause curl to pass the data to the server using the
782 content-type application/x-www-form-urlencoded. Compare to \fI\-F, \-\-form\fP.
784 \fI\-\-data-raw\fP is almost the same but does not have a special interpretation of
786 \fI\-\-data-binary\fP option. To URL-encode the value of a form field you may use
787 \fI\-\-data-urlencode\fP.
791 &-symbol. Thus, using \(aq-d name=daniel \-d skill=lousy' would generate a post
795 read the data from, or \- if you want curl to read the data from stdin. Posting
796 data from a file named \&\(aqfoobar' would thus be done with \fI\-d, \-\-data\fP @foobar. When
797 \fI\-d, \-\-data\fP is told to read from a file like that, carriage returns and newlines
799 interpretation use \fI\-\-data-raw\fP instead.
801 Examples:
803 curl -d "name=curl" https://example.com
804 curl -d "name=curl" -d "tool=cmdline" https://example.com
805 curl -d @filename https://example.com
808 …o \fI--data-binary\fP, \fI--data-urlencode\fP and \fI--data-raw\fP. This option overrides \fI-F, -…
809 .IP "\-\-delegation <LEVEL>"
816 Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
826 curl --delegation "none" https://example.com
828 .IP "\-\-digest"
831 combination with the normal \fI\-u, \-\-user\fP option to set user name and password.
837 curl -u name:password --digest https://example.com
840 See also \fI-u, --user\fP, \fI--proxy-digest\fP and \fI--anyauth\fP. This option overrides \fI--bas…
841 .IP "\-\-disable-eprt"
842 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active
843 FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT
849 \-\-eprt can be used to explicitly enable EPRT again and \-\-no-eprt is an alias
850 for \fI\-\-disable-eprt\fP.
856 passive mode you need to not use \fI\-P, \-\-ftp-port\fP or force it with \fI\-\-ftp-pasv\fP.
860 curl --disable-eprt ftp://example.com/
862 .IP "\-\-disable-epsv"
863 (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
864 transfers. Curl will normally always first attempt to use EPSV before
867 \-\-epsv can be used to explicitly enable EPSV again and \-\-no-epsv is an alias
868 for \fI\-\-disable-epsv\fP.
874 active mode you need to use \fI\-P, \-\-ftp-port\fP.
878 curl --disable-epsv ftp://example.com/
880 .IP "\-q, \-\-disable"
882 file will not be read and used. See the \fI\-K, \-\-config\fP for details on the default
887 curl -q https://example.com
889 .IP "\-\-disallow-username-in-url"
890 (HTTP) This tells curl to exit if passed a url containing a username. This is probably
891 most useful when the URL is being provided at run-time or similar.
895 curl --disallow-username-in-url https://example.com
898 See also \fI--proto\fP. Added in 7.61.0.
899 .IP "\-\-dns-interface <interface>"
900 (DNS) Tell curl to send outgoing DNS requests through <interface>. This option is a
901 counterpart to \fI\-\-interface\fP (which does not affect DNS). The supplied string
906 curl --dns-interface eth0 https://example.com
909 See also \fI--dns-ipv4-addr\fP and \fI--dns-ipv6-addr\fP. \fI--dns-interface\fP requires that the u…
910 .IP "\-\-dns-ipv4-addr <address>"
911 (DNS) Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
919 curl --dns-ipv4-addr 10.1.2.3 https://example.com
922 See also \fI--dns-interface\fP and \fI--dns-ipv6-addr\fP. \fI--dns-ipv4-addr\fP requires that the u…
923 .IP "\-\-dns-ipv6-addr <address>"
924 (DNS) Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
932 curl --dns-ipv6-addr 2a04:4e42::561 https://example.com
935 See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-ipv6-addr\fP requires that the u…
936 .IP "\-\-dns-servers <addresses>"
939 may also optionally be given as \fI:<port-number>\fP after each IP
946 curl --dns-servers 192.168.0.1,192.168.0.2 https://example.com
949 \fI--dns-servers\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33…
950 .IP "\-\-doh-cert-status"
951 (all) Same as \fI\-\-cert-status\fP but used for DoH (DNS-over-HTTPS).
955 curl --doh-cert-status --doh-url https://doh.example https://example.com
959 .IP "\-\-doh-insecure"
960 (all) Same as \fI\-k, \-\-insecure\fP but used for DoH (DNS-over-HTTPS).
964 curl --doh-insecure --doh-url https://doh.example https://example.com
968 .IP "\-\-doh-url <URL>"
969 (all) Specifies which DNS-over-HTTPS (DoH) server to use to resolve hostnames,
975 \fI\-\-doh-insecure\fP and \fI\-\-doh-cert-status\fP.
981 curl --doh-url https://doh.example https://example.com
985 .IP "\-D, \-\-dump-header <filename>"
996 curl --dump-header store.txt https://example.com
999 See also \fI-o, --output\fP.
1000 .IP "\-\-egd-file <file>"
1006 curl --egd-file /random/here https://example.com
1009 See also \fI--random-file\fP.
1010 .IP "\-\-engine <name>"
1011 (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI\-\-engine\fP
1012 list to print a list of build-time supported engines. Note that not all (and
1013 possibly none) of the engines may be available at run-time.
1017 curl --engine flavor https://example.com
1019 .IP "\-\-etag-compare <file>"
1021 from the given file by sending a custom If-None-Match header using the
1028 Use the option \fI\-\-etag-save\fP to first save the ETag from a response, and
1034 curl --etag-compare etag.txt https://example.com
1038 .IP "\-\-etag-save <file>"
1046 curl --etag-save storetag.txt https://example.com
1050 .IP "\-\-expect100-timeout <seconds>"
1051 (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue
1052 response when curl emits an Expects: 100-continue header in its request. By
1053 default curl will wait one second. This option accepts decimal values! When
1054 curl stops waiting, it will continue as if the response has been received.
1058 curl --expect100-timeout 2.5 -T file https://example.com
1061 See also \fI--connect-timeout\fP. Added in 7.47.0.
1062 .IP "\-\-fail-early"
1065 When curl is used to do multiple transfers on the command line, it will
1068 the error code curl returns. So early failures will be "hidden" by subsequent
1071 Using this option, curl will instead return an error on the first transfer
1075 This option is global and does not need to be specified for each use of \fI\-:, \-\-next\fP.
1077 This option does not imply \fI\-f, \-\-fail\fP, which causes transfers to fail due to the
1078 server\(aqs HTTP status code. You can combine the two options, however note \fI\-f, \-\-fail\fP
1079 is not global and is therefore contained by \fI\-:, \-\-next\fP.
1083 curl --fail-early https://example.com https://two.example
1087 .IP "\-\-fail-with-body"
1091 more). This flag will still allow curl to output and save that content but
1094 This is an alternative option to \fI\-f, \-\-fail\fP which makes curl fail for the same
1099 curl --fail-with-body https://example.com
1102 See also \fI-f, --fail\fP. Added in 7.76.0.
1103 .IP "\-f, \-\-fail"
1108 curl from outputting that and return error 22.
1110 This method is not fail-safe and there are occasions where non-successful
1116 curl --fail https://example.com
1119 See also \fI--fail-with-body\fP.
1120 .IP "\-\-false-start"
1121 (TLS) Tells curl to use false start during the TLS handshake. False start is a mode
1131 curl --false-start https://example.com
1135 .IP "\-\-form-string <name=string>"
1136 (HTTP SMTP IMAP) Similar to \fI\-F, \-\-form\fP except that the value string for the named paramete…
1138 the value have no special meaning. Use this in preference to \fI\-F, \-\-form\fP if
1140 \&\(aq@' or \&'<' features of \fI\-F, \-\-form\fP.
1144 curl --form-string "data" https://example.com
1147 See also \fI-F, --form\fP.
1148 .IP "\-F, \-\-form <name=content>"
1149 (HTTP SMTP IMAP) For HTTP protocol family, this lets curl emulate a filled-in form in which a
1150 user has pressed the submit button. This causes curl to POST data using the
1151 Content-Type multipart/form-data according to RFC 2388.
1163 Tell curl to read content from stdin instead of a file by using \- as
1165 contents is buffered in memory first by curl to determine its size and allow a
1166 possible resend. Defining a part\(aqs data from a named non-regular file (such
1173 form-field to which the file portrait.jpg will be the input:
1175 curl \-F profile=@portrait.jpg https://example.com/upload.cgi
1179 curl \-F name=John \-F shoesize=11 https://example.com/
1184 curl \-F "story=<hugefile.txt" https://example.com/
1186 You can also tell curl what Content-Type to use by using \(aqtype=', in a manner
1189 curl \-F "web=@index.html;type=text/html" example.com
1193 curl \-F "name=daniel;type=text/foo" example.com
1198 curl \-F "file=@localfile;filename=nameinpost" example.com
1200 If filename/path contains \(aq,' or ';', it must be quoted by double-quotes like:
1202 curl \-F "file=@\\"local,file\\";filename=\\"name;in;post\\"" example.com
1206 curl \-F \(aqfile=@"local,file";filename="name;in;post"' example.com
1208 Note that if a filename/path is quoted by double-quotes, any double-quote
1211 Quoting must also be applied to non-file data if it contains semicolons,
1214 curl \-F \(aqcolors="red; green; blue";type=text/x-myapp' example.com
1218 curl \-F "submit=OK;headers=\\"X-submit-type: OK\\"" example.com
1222 curl \-F "submit=OK;headers=@headerfile" example.com
1228 carriage-returns and trailing spaces are stripped.
1233 X-header-1: this is a header
1237 X-header-2: this is
1244 \- name can be omitted: the equal sign is the first character of the argument,
1246 \- if data starts with \(aq(', this signals to start a new multipart: it can be
1249 \- a multipart can be terminated with a \(aq=)' argument.
1251 Example: the following command sends an SMTP mime e-mail consisting in an
1255 curl \-F \(aq=(;type=multipart/alternative' \\
1257 \-F \(aq=plain text message' \\
1259 \-F \(aq= <body>HTML message</body>;type=text/html' \\
1261 \-F \(aq=)' \-F '=@textfile.txt' ... smtp://example.com
1265 Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters
1266 with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes data
1270 Example: send multipart mail with a quoted-printable text message and a
1273 curl \-F \(aq=text message;encoder=quoted-printable' \\
1275 \-F \(aq=@localfile;encoder=base64' ... smtp://example.com
1277 See further examples and details in the MANUAL.
1283 curl --form "name=curl" --form "file=@loadthis" https://example.com
1286 This option overrides \fI-d, --data\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP.
1287 .IP "\-\-ftp-account <data>"
1295 curl --ftp-account "mr.robot" ftp://example.com/
1297 .IP "\-\-ftp-alternative-to-user <command>"
1305 curl --ftp-alternative-to-user "U53r" ftp://example.com
1307 .IP "\-\-ftp-create-dirs"
1309 the server, the standard behavior of curl is to fail. Using this option, curl
1314 curl --ftp-create-dirs -T file ftp://example.com/remote/path/file
1317 See also \fI--create-dirs\fP.
1318 .IP "\-\-ftp-method <method>"
1319 (FTP) Control what method curl should use to reach a file on an FTP(S)
1323 curl does a single CWD operation for each path part in the given URL. For deep
1327 curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
1330 curl does one CWD with the full target directory and then operates on the file
1335 Examples:
1337 curl --ftp-method multicwd ftp://example.com/dir1/dir2/file
1338 curl --ftp-method nocwd ftp://example.com/dir1/dir2/file
1339 curl --ftp-method singlecwd ftp://example.com/dir1/dir2/file
1341 .IP "\-\-ftp-pasv"
1343 behavior, but using this option can be used to override a previous \fI\-P, \-\-ftp-port\fP
1348 correct \fI\-P, \-\-ftp-port\fP again.
1350 Passive mode means that curl will try the EPSV command first and then PASV,
1351 unless \fI\-\-disable-epsv\fP is used.
1355 curl --ftp-pasv ftp://example.com/
1358 See also \fI--disable-epsv\fP.
1359 .IP "\-P, \-\-ftp-port <address>"
1361 option makes curl use active mode. curl then tells the server to connect back
1372 .IP "-"
1373 make curl pick the same IP address that is already used for the control
1378 use of PORT with \fI\-\-ftp-pasv\fP. Disable the attempt to use the EPRT command
1379 instead of PORT by using \fI\-\-disable-eprt\fP. EPRT is really PORT++.
1381 You can also append \&":[start]-[end]\&" to the right of the address, to tell
1382 curl what TCP port range to use. That means you specify a port range, from a
1387 Examples:
1389 curl -P - ftp:/example.com
1390 curl -P eth0 ftp:/example.com
1391 curl -P 192.168.0.2 ftp:/example.com
1394 See also \fI--ftp-pasv\fP and \fI--disable-eprt\fP.
1395 .IP "\-\-ftp-pret"
1396 (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers,
1397 mainly drftpd, require this non-standard command for directory listings as
1402 curl --ftp-pret ftp://example.com/
1404 .IP "\-\-ftp-skip-pasv-ip"
1405 (FTP) Tell curl to not use the IP address the server suggests in its response
1406 to curl\(aqs PASV command when curl connects the data connection. Instead curl
1407 will re-use the same IP address it already uses for the control
1410 Since curl 7.74.0 this option is enabled by default.
1416 curl --ftp-skip-pasv-ip ftp://example.com/
1419 See also \fI--ftp-pasv\fP.
1420 .IP "\-\-ftp-ssl-ccc-mode <active/passive>"
1428 curl --ftp-ssl-ccc-mode active --ftp-ssl-ccc ftps://example.com/
1431 See also \fI--ftp-ssl-ccc\fP.
1432 .IP "\-\-ftp-ssl-ccc"
1440 curl --ftp-ssl-ccc ftps://example.com/
1443 See also \fI--ssl\fP and \fI--ftp-ssl-ccc-mode\fP.
1444 .IP "\-\-ftp-ssl-control"
1446 authentication, but non-encrypted data transfers for efficiency. Fails the
1451 curl --ftp-ssl-control ftp://example.com
1453 .IP "\-G, \-\-get"
1454 When used, this option will make all data specified with \fI\-d, \-\-data\fP, \fI\-\-data-binary\fP
1455 or \fI\-\-data-urlencode\fP to be used in an HTTP GET request instead of the POST
1459 If used in combination with \fI\-I, \-\-head\fP, the POST data will instead be appended to
1466 Examples:
1468 curl --get https://example.com
1469 curl --get -d "tool=curl" -d "age=old" https://example.com
1470 curl --get -I -d "tool=curl" https://example.com
1472 .IP "\-g, \-\-globoff"
1474 you can specify URLs that contain the letters {}[] without having curl itself
1480 curl -g "https://example.com/{[]}}}}"
1482 .IP "\-\-happy-eyeballs-timeout-ms <milliseconds>"
1484 addresses for dual-stack hosts, giving IPv6 a head-start of the specified
1490 "It is RECOMMENDED that connection attempts be paced 150-250 ms apart to
1498 curl --happy-eyeballs-timeout-ms 500 https://example.com
1502 .IP "\-\-haproxy-protocol"
1512 curl --haproxy-protocol https://example.com
1516 .IP "\-I, \-\-head"
1517 (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses
1519 curl displays the file size and last modification time only.
1523 curl -I https://example.com
1525 .IP "\-H, \-\-header <header/@file>"
1528 header that has the same name as one of the internal ones curl would use, your
1530 you to make even trickier stuff than curl would normally do. You should not
1533 the right side of the colon, as in: \-H \&"Host:". If you send the custom
1534 header with no-value then its header must be terminated with a semicolon, such
1535 as \-H \&"X-Custom-Header;" to send "X-Custom-Header:".
1537 curl will make sure that each header you add/replace is sent with the proper
1538 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
1543 for each line in the input file. Using @- will make curl read the header file
1546 You need \fI\-\-proxy-header\fP to send custom headers intended for a HTTP
1549 Passing on a "Transfer-Encoding: chunked" header when doing a HTTP request
1550 with a request body, will make curl send the data using chunked encoding.
1552 \fBWARNING\fP: headers set with this option will be set in all requests \- even
1553 after redirects are followed, like when told with \fI\-L, \-\-location\fP. This can lead to
1559 Examples:
1561 curl -H "X-First-Name: Joe" https://example.com
1562 curl -H "User-Agent: yes-please/2000" https://example.com
1563 curl -H "Host:" https://example.com
1566 See also \fI-A, --user-agent\fP and \fI-e, --referer\fP.
1567 .IP "\-h, \-\-help <category>"
1569 If no arg was provided, curl will display the most important
1571 If the argument "all" was provided, curl will display all options available.
1572 If the argument "category" was provided, curl will display all categories and
1577 curl --help all
1579 .IP "\-\-hostpubmd5 <md5>"
1581 be the 128 bit MD5 checksum of the remote host\(aqs public key, curl will refuse
1586 curl --hostpubmd5 e5c1c49020640a5ab0f2034854c321a8 sftp://example.com/
1588 .IP "\-\-hostpubsha256 <sha256>"
1589 (SFTP SCP) Pass a string containing a Base64-encoded SHA256 hash of the remote
1590 host\(aqs public key. Curl will refuse the connection with the host
1595 curl --hostpubsha256 NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ= sftp://example.com/
1599 .IP "\-\-hsts <file name>"
1604 Specify a "" file name (zero length) to avoid loading/saving and make curl
1607 If this option is used several times, curl will load contents from all the
1612 curl --hsts cache.txt https://example.com
1616 .IP "\-\-http0.9"
1617 (HTTP) Tells curl to be fine with HTTP version 0.9 response.
1620 connect with this to non-HTTP servers and still get a response since curl will
1621 simply transparently downgrade \- if allowed.
1623 Since curl 7.66.0, HTTP/0.9 is disabled by default.
1627 curl --http0.9 https://example.com
1631 .IP "\-0, \-\-http1.0"
1632 (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred
1637 curl --http1.0 https://example.com
1640 This option overrides \fI--http1.1\fP and \fI--http2\fP.
1641 .IP "\-\-http1.1"
1642 (HTTP) Tells curl to use HTTP version 1.1.
1646 curl --http1.1 https://example.com
1649 This option overrides \fI-0, --http1.0\fP and \fI--http2\fP. Added in 7.33.0.
1650 .IP "\-\-http2-prior-knowledge"
1651 (HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1
1658 curl --http2-prior-knowledge https://example.com
1661 …--http2-prior-knowledge\fP requires that the underlying libcurl was built to support HTTP/2. This …
1662 .IP "\-\-http2"
1663 (HTTP) Tells curl to use HTTP version 2.
1665 For HTTPS, this means curl will attempt to negotiate HTTP/2 in the TLS
1666 handshake. curl does this by default.
1668 For HTTP, this means curl will attempt to upgrade the request to HTTP/2 using
1673 curl --http2 https://example.com
1676 …--http1.1\fP and \fI--http3\fP. \fI--http2\fP requires that the underlying libcurl was built to su…
1677 .IP "\-\-http3"
1680 Tells curl to use HTTP version 3 directly to the host and port number used in
1682 redirected via Alt-Svc, but this option allows a user to circumvent that when
1685 This option will make curl fail if a QUIC connection cannot be established, it
1690 curl --http3 https://example.com
1693 …--http1.1\fP and \fI--http2\fP. \fI--http3\fP requires that the underlying libcurl was built to su…
1694 .IP "\-\-ignore-content-length"
1695 (FTP HTTP) For HTTP, Ignore the Content-Length header. This is particularly useful for
1696 servers running Apache 1.x, which will report incorrect Content-Length for
1706 curl --ignore-content-length https://example.com
1708 .IP "\-i, \-\-include"
1713 To view the request headers, consider the \fI\-v, \-\-verbose\fP option.
1717 curl -i https://example.com
1720 See also \fI-v, --verbose\fP.
1721 .IP "\-k, \-\-insecure"
1722 (TLS) By default, every SSL connection curl makes is verified to be secure. This
1723 option allows curl to proceed and operate even for server connections
1730 https://curl.se/docs/sslcerts.html
1736 curl --insecure https://example.com
1739 See also \fI--proxy-insecure\fP and \fI--cacert\fP.
1740 .IP "\-\-interface <name>"
1744 curl \-\-interface eth0:1 https://www.example.com/
1754 curl --interface eth0 https://example.com
1757 See also \fI--dns-interface\fP.
1758 .IP "\-4, \-\-ipv4"
1759 This option tells curl to resolve names to IPv4 addresses only, and not for
1764 curl --ipv4 https://example.com
1767 See also \fI--http1.1\fP and \fI--http2\fP. This option overrides \fI-6, --ipv6\fP.
1768 .IP "\-6, \-\-ipv6"
1769 This option tells curl to resolve names to IPv6 addresses only, and not for
1774 curl --ipv6 https://example.com
1777 See also \fI--http1.1\fP and \fI--http2\fP. This option overrides \fI-4, --ipv4\fP.
1778 .IP "\-j, \-\-junk-session-cookies"
1779 (HTTP) When curl is told to read cookies from a given file, this option will make it
1786 curl --junk-session-cookies -b cookies.txt https://example.com
1789 See also \fI-b, --cookie\fP and \fI-c, --cookie-jar\fP.
1790 .IP "\-\-keepalive-time <seconds>"
1794 TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
1795 option has no effect if \fI\-\-no-keepalive\fP is used.
1802 curl --keepalive-time 20 https://example.com
1804 .IP "\-\-key-type <type>"
1805 (TLS) Private key file type. Specify which type your \fI\-\-key\fP provided private key
1812 curl --key-type DER --key here https://example.com
1814 .IP "\-\-key <key>"
1816 file. For SSH, if not specified, curl tries the following candidates in order:
1819 If curl is built against OpenSSL library, and the engine pkcs11 is available,
1822 PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option will be set
1823 as "pkcs11" if none was provided and the \fI\-\-key-type\fP option will be set as
1830 curl --cert certificate --key here https://example.com
1832 .IP "\-\-krb <level>"
1841 curl --krb clear ftp://example.com/
1844 \fI--krb\fP requires that the underlying libcurl was built to support Kerberos.
1845 .IP "\-\-libcurl <file>"
1846 Append this option to any ordinary curl command line, and you will get
1847 libcurl-using C source code written to the file that does the equivalent
1848 of what your command-line operation does!
1851 \fI\-:, \-\-next\fP.
1858 curl --libcurl client.c https://example.com
1860 .IP "\-\-limit-rate <speed>"
1861 Specify the maximum transfer rate you want curl to use \- for both downloads
1869 are 1024 based. For example 1k is 1024. Examples: 200K, 3m and 1G.
1874 If you also use the \fI\-Y, \-\-speed-limit\fP option, that option will take precedence and
1875 might cripple the rate-limiting slightly, to help keeping the speed-limit
1880 Examples:
1882 curl --limit-rate 100K https://example.com
1883 curl --limit-rate 1000 https://example.com
1884 curl --limit-rate 10M https://example.com
1886 .IP "\-l, \-\-list-only"
1888 When listing an FTP directory, this switch forces a name-only view. This is
1889 especially useful if the user wants to machine-parse the contents of an FTP
1895 include sub-directories and symbolic links.
1900 to see if a specific message-id exists on the server and what size it is.
1902 Note: When combined with \fI\-X, \-\-request\fP, this option can be used to send a UIDL
1904 its message-id to make the request.
1908 curl --list-only ftp://example.com/dir/
1910 .IP "\-\-local-port <num/range>"
1911 Set a preferred single number or range (FROM-TO) of local port numbers to use
1918 curl --local-port 1000-3000 https://example.com
1920 .IP "\-\-location-trusted"
1921 (HTTP) Like \fI\-L, \-\-location\fP, but will allow sending the name + password to all hosts that
1928 curl --location-trusted -u user:password https://example.com
1931 See also \fI-u, --user\fP.
1932 .IP "\-L, \-\-location"
1935 option will make curl redo the request on the new place. If used together with
1936 \fI\-i, \-\-include\fP or \fI\-I, \-\-head\fP, headers from all requested pages will be shown. When
1937 authentication is used, curl only sends its credentials to the initial
1938 host. If a redirect takes curl to a different host, it will not be able to
1939 intercept the user+password. See also \fI\-\-location-trusted\fP on how to change
1941 \fI\-\-max-redirs\fP option.
1943 When curl follows a redirect and if the request is a POST, it will send the
1945 response code was any other 3xx code, curl will re-send the following request
1948 You can tell curl to not change POST requests to GET after a 30x response by
1949 using the dedicated options for that: \fI\-\-post301\fP, \fI\-\-post302\fP and \fI\-\-post303\fP.
1951 The method set with \fI\-X, \-\-request\fP overrides the method curl would otherwise select
1956 curl -L https://example.com
1958 .IP "\-\-login-options <options>"
1964 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
1970 curl --login-options 'AUTH=*' imap://example.com
1974 .IP "\-\-mail-auth <address>"
1981 curl --mail-auth user@example.come -T mail smtp://example.com/
1984 See also \fI--mail-rcpt\fP and \fI--mail-from\fP.
1985 .IP "\-\-mail-from <address>"
1990 curl --mail-from user@example.com -T mail smtp://example.com/
1993 See also \fI--mail-rcpt\fP and \fI--mail-auth\fP.
1994 .IP "\-\-mail-rcpt-allowfails"
1995 (SMTP) When sending data to multiple recipients, by default curl will abort SMTP
1999 The default behavior can be changed by passing \fI\-\-mail-rcpt-allowfails\fP
2000 command-line option which will make curl ignore errors and proceed with the
2003 If all recipients trigger RCPT TO failures and this flag is specified, curl
2009 curl --mail-rcpt-allowfails --mail-rcpt dest@example.com smtp://example.com
2013 .IP "\-\-mail-rcpt <address>"
2014 (SMTP) Specify a single e-mail address, user name or mailing list name. Repeat this
2022 specified using the mailing list name, such as "Friends" or "London-Office".
2027 curl --mail-rcpt user@example.net smtp://example.com
2029 .IP "\-M, \-\-manual"
2034 curl --manual
2036 .IP "\-\-max-filesize <bytes>"
2038 requested is larger than this value, the transfer will not start and curl will
2043 gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
2050 curl --max-filesize 100K https://example.com
2053 See also \fI--limit-rate\fP.
2054 .IP "\-\-max-redirs <num>"
2055 (HTTP) Set maximum number of redirections to follow. When \fI\-L, \-\-location\fP is used, to
2056 prevent curl from following too many redirects, by default, the limit is
2057 set to 50 redirects. Set this option to \-1 to make it unlimited.
2063 curl --max-redirs 3 --location https://example.com
2065 .IP "\-m, \-\-max-time <fractional seconds>"
2074 Examples:
2076 curl --max-time 10 https://example.com
2077 curl --max-time 2.92 https://example.com
2080 See also \fI--connect-timeout\fP.
2081 .IP "\-\-metalink"
2083 support has been disabled in curl since 7.78.0 for security reasons.
2087 curl --metalink file https://example.com
2089 .IP "\-\-negotiate"
2092 This option requires a library built with GSS-API or SSPI support. Use
2093 \fI\-V, \-\-version\fP to see if your curl supports GSS-API/SSPI or SPNEGO.
2095 When using this option, you must also provide a fake \fI\-u, \-\-user\fP option to activate
2096 the authentication code properly. Sending a \(aq-u :' is enough as the user name
2097 and password from the \fI\-u, \-\-user\fP option are not actually used.
2103 curl --negotiate -u : https://example.com
2106 See also \fI--basic\fP, \fI--ntlm\fP, \fI--anyauth\fP and \fI--proxy-negotiate\fP.
2107 .IP "\-\-netrc-file <filename>"
2108 This option is similar to \fI\-n, \-\-netrc\fP, except that you provide the path (absolute
2109 or relative) to the netrc file that curl should use. You can only specify one
2110 netrc file per invocation. If several \fI\-\-netrc-file\fP options are provided,
2113 It will abide by \fI\-\-netrc-optional\fP if specified.
2117 curl --netrc-file netrc https://example.com
2120 This option overrides \fI-n, --netrc\fP.
2121 .IP "\-\-netrc-optional"
2122 Similar to \fI\-n, \-\-netrc\fP, but this option makes the .netrc usage \fBoptional\fP
2123 and not mandatory as the \fI\-n, \-\-netrc\fP option does.
2127 curl --netrc-optional https://example.com
2130 See also \fI--netrc-file\fP. This option overrides \fI-n, --netrc\fP.
2131 .IP "\-n, \-\-netrc"
2132 Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user\(aqs home
2134 Unix. If used with HTTP, curl will enable user authentication. See
2135 \fInetrc(5)\fP and \fIftp(1)\fP for details on the file format. Curl will not
2137 neither world- nor group-readable). The environment variable "HOME" is used
2140 A quick and simple example of how to setup a \fI.netrc\fP to allow curl to FTP to
2148 curl --netrc https://example.com
2150 .IP "\-:, \-\-next"
2151 Tells curl to use a separate operation for the following URL and associated
2156 \fI\-:, \-\-next\fP will reset all local options and only global ones will have their
2157 values survive over to the operation following the \fI\-:, \-\-next\fP instruction. Global
2158 options include \fI\-v, \-\-verbose\fP, \fI\-\-trace\fP, \fI\-\-trace-ascii\fP and \fI\-\-fail-earl…
2163 curl www1.example.com \-\-next \-d postthis www2.example.com
2166 Examples:
2168 curl https://example.com --next -d postthis www2.example.com
2169 curl -I https://example.com --next https://example.net/
2173 .IP "\-\-no-alpn"
2180 curl --no-alpn https://example.com
2183 See also \fI--no-npn\fP and \fI--http2\fP. \fI--no-alpn\fP requires that the underlying libcurl was…
2184 .IP "\-N, \-\-no-buffer"
2185 Disables the buffering of the output stream. In normal work situations, curl
2191 \-\-buffer to enforce the buffering.
2195 curl --no-buffer https://example.com
2197 .IP "\-\-no-keepalive"
2198 Disables the use of keepalive messages on the TCP connection. curl otherwise
2202 \-\-keepalive to enforce keepalive.
2206 curl --no-keepalive https://example.com
2208 .IP "\-\-no-npn"
2215 curl --no-npn https://example.com
2218 See also \fI--no-alpn\fP and \fI--http2\fP. \fI--no-npn\fP requires that the underlying libcurl was…
2219 .IP "\-\-no-progress-meter"
2221 affecting warning and informational messages like \fI\-s, \-\-silent\fP does.
2224 \-\-progress-meter to enable the progress meter again.
2228 curl --no-progress-meter -o store https://example.com
2231 See also \fI-v, --verbose\fP and \fI-s, --silent\fP. Added in 7.67.0.
2232 .IP "\-\-no-sessionid"
2233 (TLS) Disable curl\(aqs use of SSL session-ID caching. By default all transfers are
2235 attempting to reuse SSL session-IDs, there seem to be broken SSL
2240 \-\-sessionid to enforce session-ID caching.
2244 curl --no-sessionid https://example.com
2246 .IP "\-\-noproxy <no-proxy-list>"
2247 Comma-separated list of hosts for which not to use a proxy, if one is
2260 curl --noproxy "www.example" https://example.com
2262 .IP "\-\-ntlm-wb"
2263 (HTTP) Enables NTLM much in the style \fI\-\-ntlm\fP does, but hand over the authentication
2268 curl --ntlm-wb -u user:password https://example.com
2271 See also \fI--ntlm\fP and \fI--proxy-ntlm\fP.
2272 .IP "\-\-ntlm"
2275 reverse-engineered by clever people and implemented in curl based on their
2281 \fI\-\-proxy-ntlm\fP.
2287 curl --ntlm -u user:password https://example.com
2290 …--proxy-ntlm\fP. \fI--ntlm\fP requires that the underlying libcurl was built to support TLS. This …
2291 .IP "\-\-oauth2-bearer <token>"
2294 the \fI\-\-url\fP or \fI\-u, \-\-user\fP options.
2302 curl --oauth2-bearer "mF_9.B5f-4.1JqM" https://example.com
2306 .IP "\-\-output-dir <dir>"
2309 \fI\-O, \-\-remote-name\fP or \fI\-o, \-\-output\fP are used.
2312 command line, up until the first \fI\-:, \-\-next\fP.
2315 unless \fI\-\-create-dirs\fP is also used.
2322 curl --output-dir "tmp" -O https://example.com
2325 See also \fI-O, --remote-name\fP and \fI-J, --remote-header-name\fP. Added in 7.73.0.
2326 .IP "\-o, \-\-output <file>"
2332 curl "http://{one,two}.example.com" \-o "file_#1.txt"
2336 curl "http://{site,host}.host[1-5].com" \-o "#1_#2"
2342 curl \-o aa example.com \-o bb example.net
2344 and the order of the \-o options and the URLs does not matter, just that the
2345 first \-o is for the first URL and so on, so the above command line can also be
2348 curl example.com example.net \-o aa \-o bb
2350 See also the \fI\-\-create-dirs\fP option to create the local directories
2351 dynamically. Specifying the output as \(aq-' (a single dash) will force the
2356 curl example.com \-o /dev/null
2360 curl example.com \-o nul
2362 Examples:
2364 curl -o file https://example.com
2365 curl "http://{one,two}.example.com" -o "file_#1.txt"
2366 curl "http://{site,host}.host[1-5].com" -o "#1_#2"
2367 curl -o file https://example.com -o file2 https://example.net
2370 See also \fI-O, --remote-name\fP, \fI--remote-name-all\fP and \fI-J, --remote-header-name\fP.
2371 .IP "\-\-parallel-immediate"
2372 When doing parallel transfers, this option will instruct curl that it should
2378 \fI\-:, \-\-next\fP.
2382 curl --parallel-immediate -Z https://example.com -o file1 https://example.com -o file2
2385 See also \fI-Z, --parallel\fP and \fI--parallel-max\fP. Added in 7.68.0.
2386 .IP "\-\-parallel-max <num>"
2387 When asked to do parallel transfers, using \fI\-Z, \-\-parallel\fP, this option controls
2391 \fI\-:, \-\-next\fP.
2397 curl --parallel-max 100 -Z https://example.com ftp://example.com/
2400 See also \fI-Z, --parallel\fP. Added in 7.66.0.
2401 .IP "\-Z, \-\-parallel"
2402 Makes curl perform its transfers in parallel as compared to the regular serial
2406 \fI\-:, \-\-next\fP.
2410 curl --parallel https://example.com -o file1 https://example.com -o file2
2414 .IP "\-\-pass <phrase>"
2421 curl --pass secret --key file https://example.com
2423 .IP "\-\-path-as-is"
2424 Tell curl to not handle sequences of /../ or /./ in the given URL
2425 path. Normally curl will squash or merge them according to standards but with
2430 curl --path-as-is https://example.com/../../etc/passwd
2434 .IP "\-\-pinnedpubkey <hashes>"
2435 (TLS) Tells curl to use the specified public key file (or hashes) to verify the
2442 if it does not exactly match the public key provided to this option, curl will
2463 Examples:
2465 curl --pinnedpubkey keyfile https://example.com
2466 curl --pinnedpubkey 'sha256//ce118b51897f4452dc' https://example.com
2470 .IP "\-\-post301"
2471 (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET
2472 requests when following a 301 redirection. The non-RFC behavior is ubiquitous
2473 in web browsers, so curl does the conversion by default to maintain
2475 a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
2479 curl --post301 --location -d "data" https://example.com
2482 See also \fI--post302\fP, \fI--post303\fP and \fI-L, --location\fP.
2483 .IP "\-\-post302"
2484 (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET
2485 requests when following a 302 redirection. The non-RFC behavior is ubiquitous
2486 in web browsers, so curl does the conversion by default to maintain
2488 a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
2492 curl --post302 --location -d "data" https://example.com
2495 See also \fI--post301\fP, \fI--post303\fP and \fI-L, --location\fP.
2496 .IP "\-\-post303"
2497 (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST requests into GET
2500 using \fI\-L, \-\-location\fP.
2504 curl --post303 --location -d "data" https://example.com
2507 See also \fI--post302\fP, \fI--post301\fP and \fI-L, --location\fP.
2508 .IP "\-\-preproxy [protocol://]host[:port]"
2509 Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI\-x, \-\-proxy\fP. In
2510 such a case curl first connects to the SOCKS proxy and then connects (through
2516 specified will make curl default to SOCKS4.
2522 by curl. This allows you to pass in special characters such as @ by using %40
2529 curl --preproxy socks5://proxy.example -x http://http.example https://example.com
2533 .IP "\-#, \-\-progress-bar"
2534 Make curl display transfer progress as a simple progress bar instead of the
2539 known size, there will be space ship (-=o=-) that moves back and forth but
2544 \fI\-:, \-\-next\fP.
2548 curl -# -O https://example.com
2550 .IP "\-\-proto-default <protocol>"
2551 Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
2558 Without this option set, curl guesses protocol based on the host name, see
2559 \fI\-\-url\fP for details.
2563 curl --proto-default https ftp.example.com
2567 .IP "\-\-proto-redir <protocols>"
2568 Tells curl to limit what protocols it may use on redirect. Protocols denied by
2569 \fI\-\-proto\fP are not overridden by this option. See \-\-proto for how protocols are
2574 curl \-\-proto-redir \-all,http,https http://example.com
2576 By default curl will only allow HTTP, HTTPS, FTP and FTPS on redirect (since
2582 curl --proto-redir =http,https https://example.com
2584 .IP "\-\-proto <protocols>"
2585 Tells curl to limit what protocols it may use for transfers. Protocols are
2594 .B \-
2606 .B \fI\-\-proto\fP \-ftps
2609 .B \fI\-\-proto\fP \-all,https,+http
2612 .B \fI\-\-proto\fP =http,https
2618 support for that protocol being built into curl to avoid an error.
2625 curl --proto =http,https,sftp https://example.com
2628 See also \fI--proto-redir\fP and \fI--proto-default\fP.
2629 .IP "\-\-proxy-anyauth"
2630 Tells curl to pick a suitable authentication method when communicating with
2631 the given HTTP proxy. This might cause an extra request/response round-trip.
2635 curl --proxy-anyauth --proxy-user user:passwd -x proxy https://example.com
2638 See also \fI-x, --proxy\fP, \fI--proxy-basic\fP and \fI--proxy-digest\fP.
2639 .IP "\-\-proxy-basic"
2640 Tells curl to use HTTP Basic authentication when communicating with the given
2641 proxy. Use \fI\-\-basic\fP for enabling HTTP Basic with a remote host. Basic is the
2642 default authentication method curl uses with proxies.
2646 curl --proxy-basic --proxy-user user:passwd -x proxy https://example.com
2649 See also \fI-x, --proxy\fP, \fI--proxy-anyauth\fP and \fI--proxy-digest\fP.
2650 .IP "\-\-proxy-cacert <file>"
2651 Same as \fI\-\-cacert\fP but used in HTTPS proxy context.
2655 curl --proxy-cacert CA-file.txt -x https://proxy https://example.com
2658 See also \fI--proxy-capath\fP, \fI--cacert\fP, \fI--capath\fP and \fI-x, --proxy\fP. Added in 7.52.…
2659 .IP "\-\-proxy-capath <dir>"
2660 Same as \fI\-\-capath\fP but used in HTTPS proxy context.
2664 curl --proxy-capath /local/directory -x https://proxy https://example.com
2667 See also \fI--proxy-cacert\fP, \fI-x, --proxy\fP and \fI--capath\fP. Added in 7.52.0.
2668 .IP "\-\-proxy-cert-type <type>"
2669 Same as \fI\-\-cert-type\fP but used in HTTPS proxy context.
2673 curl --proxy-cert-type PEM --proxy-cert file -x https://proxy https://example.com
2677 .IP "\-\-proxy-cert <cert[:passwd]>"
2678 Same as \fI\-E, \-\-cert\fP but used in HTTPS proxy context.
2682 curl --proxy-cert file -x https://proxy https://example.com
2686 .IP "\-\-proxy-ciphers <list>"
2687 Same as \fI\-\-ciphers\fP but used in HTTPS proxy context.
2691 curl --proxy-ciphers ECDHE-ECDSA-AES256-CCM8 -x https://proxy https://example.com
2695 .IP "\-\-proxy-crlfile <file>"
2696 Same as \fI\-\-crlfile\fP but used in HTTPS proxy context.
2700 curl --proxy-crlfile rejects.txt -x https://proxy https://example.com
2704 .IP "\-\-proxy-digest"
2705 Tells curl to use HTTP Digest authentication when communicating with the given
2706 proxy. Use \fI\-\-digest\fP for enabling HTTP Digest with a remote host.
2710 curl --proxy-digest --proxy-user user:passwd -x proxy https://example.com
2713 See also \fI-x, --proxy\fP, \fI--proxy-anyauth\fP and \fI--proxy-basic\fP.
2714 .IP "\-\-proxy-header <header/@file>"
2716 specify any number of extra headers. This is the equivalent option to \fI\-H, \-\-header\fP
2720 curl will make sure that each header you add/replace is sent with the proper
2721 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
2725 Headers specified with this option will not be included in requests that curl
2729 then adds a header for each line in the input file. Using @- will make curl
2734 Examples:
2736 curl --proxy-header "X-First-Name: Joe" -x http://proxy https://example.com
2737 curl --proxy-header "User-Agent: surprise" -x http://proxy https://example.com
2738 curl --proxy-header "Host:" -x http://proxy https://example.com
2742 .IP "\-\-proxy-insecure"
2743 Same as \fI\-k, \-\-insecure\fP but used in HTTPS proxy context.
2747 curl --proxy-insecure -x https://proxy https://example.com
2751 .IP "\-\-proxy-key-type <type>"
2752 Same as \fI\-\-key-type\fP but used in HTTPS proxy context.
2756 curl --proxy-key-type DER --proxy-key here -x https://proxy https://example.com
2760 .IP "\-\-proxy-key <key>"
2761 Same as \fI\-\-key\fP but used in HTTPS proxy context.
2765 curl --proxy-key here -x https://proxy https://example.com
2769 .IP "\-\-proxy-negotiate"
2770 Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
2771 with the given proxy. Use \fI\-\-negotiate\fP for enabling HTTP Negotiate (SPNEGO)
2776 curl --proxy-negotiate --proxy-user user:passwd -x proxy https://example.com
2779 See also \fI--proxy-anyauth\fP and \fI--proxy-basic\fP.
2780 .IP "\-\-proxy-ntlm"
2781 Tells curl to use HTTP NTLM authentication when communicating with the given
2782 proxy. Use \fI\-\-ntlm\fP for enabling NTLM with a remote host.
2786 curl --proxy-ntlm --proxy-user user:passwd -x http://proxy https://example.com
2789 See also \fI--proxy-negotiate\fP and \fI--proxy-anyauth\fP.
2790 .IP "\-\-proxy-pass <phrase>"
2791 Same as \fI\-\-pass\fP but used in HTTPS proxy context.
2795 curl --proxy-pass secret --proxy-key here -x https://proxy https://example.com
2799 .IP "\-\-proxy-pinnedpubkey <hashes>"
2800 (TLS) Tells curl to use the specified public key file (or hashes) to verify the
2807 if it does not exactly match the public key provided to this option, curl will
2812 Examples:
2814 curl --proxy-pinnedpubkey keyfile https://example.com
2815 curl --proxy-pinnedpubkey 'sha256//ce118b51897f4452dc' https://example.com
2819 .IP "\-\-proxy-service-name <name>"
2824 curl --proxy-service-name "shrubbery" -x proxy https://example.com
2828 .IP "\-\-proxy-ssl-allow-beast"
2829 Same as \fI\-\-ssl-allow-beast\fP but used in HTTPS proxy context.
2833 curl --proxy-ssl-allow-beast -x https://proxy https://example.com
2837 .IP "\-\-proxy-ssl-auto-client-cert"
2838 Same as \fI\-\-ssl-auto-client-cert\fP but used in HTTPS proxy context.
2842 curl --proxy-ssl-auto-client-cert -x https://proxy https://example.com
2846 .IP "\-\-proxy-tls13-ciphers <ciphersuite list>"
2851 https://curl.se/docs/ssl-ciphers.html
2853 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
2855 cipher suites by using the \fI\-\-proxy-ciphers\fP option.
2861 curl --proxy-tls13-ciphers TLS_AES_128_GCM_SHA256 -x proxy https://example.com
2865 .IP "\-\-proxy-tlsauthtype <type>"
2866 Same as \fI\-\-tlsauthtype\fP but used in HTTPS proxy context.
2870 curl --proxy-tlsauthtype SRP -x https://proxy https://example.com
2874 .IP "\-\-proxy-tlspassword <string>"
2875 Same as \fI\-\-tlspassword\fP but used in HTTPS proxy context.
2879 curl --proxy-tlspassword passwd -x https://proxy https://example.com
2883 .IP "\-\-proxy-tlsuser <name>"
2884 Same as \fI\-\-tlsuser\fP but used in HTTPS proxy context.
2888 curl --proxy-tlsuser smith -x https://proxy https://example.com
2892 .IP "\-\-proxy-tlsv1"
2893 Same as \fI\-1, \-\-tlsv1\fP but used in HTTPS proxy context.
2897 curl --proxy-tlsv1 -x https://proxy https://example.com
2901 .IP "\-U, \-\-proxy-user <user:password>"
2904 If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM
2905 authentication then you can tell curl to select the user name and password
2906 from your environment by specifying a single colon with this option: "-U :".
2908 On systems where it works, curl will hide the given option argument from
2918 curl --proxy-user name:pwd -x proxy https://example.com
2920 .IP "\-x, \-\-proxy [protocol://]host[:port]"
2944 one with the \fI\-p, \-\-proxytunnel\fP option.
2947 by curl. This allows you to pass in special characters such as @ by using %40
2958 curl --proxy http://proxy.example https://example.com
2960 .IP "\-\-proxy1.0 <host[:port]>"
2964 The only difference between this and the HTTP proxy option \fI\-x, \-\-proxy\fP, is that
2970 curl --proxy1.0 -x http://proxy https://example.com
2972 .IP "\-p, \-\-proxytunnel"
2973 When an HTTP proxy is used \fI\-x, \-\-proxy\fP, this option will make curl tunnel through
2975 requires that the proxy allows direct connect to the remote port number curl
2978 To suppress proxy CONNECT response headers when curl is set to output headers
2979 use \fI\-\-suppress-connect-headers\fP.
2983 curl --proxytunnel -x http://proxy https://example.com
2986 See also \fI-x, --proxy\fP.
2987 .IP "\-\-pubkey <key>"
2993 (As of 7.39.0, curl attempts to automatically extract the public key from the
3000 curl --pubkey file.pub sftp://example.com/
3002 .IP "\-Q, \-\-quote <command>"
3006 transfer, prefix them with a dash \(aq-'. To make commands be sent after curl
3011 By default curl will stop at first failure. To make curl continue even if the
3021 SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
3023 shell-style to embed spaces or special characters. Following is the list of
3066 curl --quote "DELE file" ftp://example.com/foo
3068 .IP "\-\-random-file <file>"
3071 also the \fI\-\-egd-file\fP option.
3075 curl --random-file rubbish https://example.com
3077 .IP "\-r, \-\-range <range>"
3082 .B 0-499
3085 .B 500-999
3088 .B \-500
3091 .B 9500-
3094 .B 0-0,-1
3097 .B 100-199,500-599
3098 specifies two separate 100-byte ranges(*) (HTTP)
3102 response, which will be returned as-is by curl! Parsing or otherwise
3105 Only digit characters (0-9) are valid in the \(aqstart' and 'stop' fields of the
3106 \&\(aqstart-stop' range syntax. If a non-digit character is given in the range,
3114 FTP and SFTP range downloads only support the simple \(aqstart-stop' syntax
3122 curl --range 22-44 https://example.com
3124 .IP "\-\-raw"
3130 curl --raw https://example.com
3132 .IP "\-e, \-\-referer <URL>"
3134 with the \fI\-H, \-\-header\fP flag of course. When used with \fI\-L, \-\-location\fP you can appe…
3135 ";auto" to the \fI\-e, \-\-referer\fP URL to make curl automatically set the previous URL
3137 even if you do not set an initial \fI\-e, \-\-referer\fP.
3141 Examples:
3143 curl --referer "https://fake.example" https://example.com
3144 curl --referer "https://fake.example;auto" -L https://example.com
3145 curl --referer ";auto" -L https://example.com
3148 See also \fI-A, --user-agent\fP and \fI-H, --header\fP.
3149 .IP "\-J, \-\-remote-header-name"
3150 (HTTP) This option tells the \fI\-O, \-\-remote-name\fP option to use the server-specified
3151 Content-Disposition filename instead of extracting a filename from the URL.
3158 There\(aqs no attempt to decode %-sequences (yet) in the provided file name, so
3167 curl -OJ https://example.com/file
3169 .IP "\-\-remote-name-all"
3171 if \fI\-O, \-\-remote-name\fP were used for each one. So if you want to disable that for a
3172 specific URL after \fI\-\-remote-name-all\fP has been used, you must use "-o \-" or
3173 \-\-no-remote-name.
3177 curl --remote-name-all ftp://example.com/file1 ftp://example.com/file2
3179 .IP "\-O, \-\-remote-name"
3185 directory before invoking curl with this option.
3189 server to be able to choose the file name refer to \fI\-J, \-\-remote-header-name\fP which
3194 encoded parts of the name, they will end up as-is as file name.
3200 curl -O https://example.com/filename
3202 .IP "\-R, \-\-remote-time"
3203 When used, this will make curl attempt to figure out the timestamp of the
3209 curl --remote-time -o foo https://example.com
3211 .IP "\-\-request-target <path>"
3212 (HTTP) Tells curl to use an alternative "target" (path) instead of using the path as
3219 curl --request-target "*" -X OPTIONS https://example.com
3223 .IP "\-X, \-\-request <command>"
3235 alter the way curl behaves. So for example if you want to make a proper HEAD
3236 request, using \-X HEAD will not suffice. You need to use the \fI\-I, \-\-head\fP option.
3238 The method string you set with \fI\-X, \-\-request\fP will be used for all requests, which
3239 if you for example use \fI\-L, \-\-location\fP may cause unintended side-effects when curl
3240 does not change request method according to the HTTP 30x response codes \- and
3259 Examples:
3261 curl -X "DELETE" https://example.com
3262 curl -X NLST ftp://example.com/
3264 .IP "\-\-resolve <[+]host:port:addr[,addr]...>"
3266 can make the curl requests(s) use a specified address and prevent the
3273 By specifying \(aq*' as host you can tell curl to resolve any host and specific
3274 port pair to the specified address. Wildcard is resolved last so any \fI\-\-resolve\fP
3277 The provided address set by this option will be used even if \fI\-4, \-\-ipv4\fP or \fI\-6, \-\-ipv…
3278 is set to make curl use another IP version.
3280 By prefixing the host with a \(aq+' you can make the entry time out after curl's
3283 is used curl will try to resolve the host as it normally would once the
3298 curl --resolve example.com:443:127.0.0.1 https://example.com
3300 .IP "\-\-retry-all-errors"
3301 Retry on any error. This option is used together with \fI\-\-retry\fP.
3309 \fBWARNING\fP: For server compatibility curl attempts to retry failed flaky
3318 By default curl will not error on an HTTP response code that indicates an HTTP
3321 \fI\-\-retry\fP is used then curl will retry on some HTTP response codes that indicate
3324 (4xx and 5xx) then combine with \fI\-f, \-\-fail\fP.
3328 curl --retry-all-errors https://example.com
3332 .IP "\-\-retry-connrefused"
3334 error too for \fI\-\-retry\fP. This option is used together with \-\-retry.
3338 curl --retry-connrefused --retry https://example.com
3342 .IP "\-\-retry-delay <seconds>"
3343 Make curl sleep this amount of time before each retry when a transfer has
3345 between retries). This option is only interesting if \fI\-\-retry\fP is also
3346 used. Setting this delay to zero will make curl use the default backoff time.
3352 curl --retry-delay 5 --retry https://example.com
3354 .IP "\-\-retry-max-time <seconds>"
3356 done as usual (see \fI\-\-retry\fP) as long as the timer has not reached this given
3359 limit a single request\(aqs maximum time, use \fI\-m, \-\-max-time\fP. Set this option to
3366 curl --retry-max-time 30 --retry 10 https://example.com
3368 .IP "\-\-retry <num>"
3369 If a transient error is returned when curl tries to perform a transfer, it
3371 makes curl do no retries (which is the default). Transient error means either:
3375 When curl is about to retry a transfer, it will first wait one second and then
3378 using \fI\-\-retry-delay\fP you disable this exponential backoff algorithm. See also
3379 \fI\-\-retry-max-time\fP to limit the total time allowed for retries.
3381 Since curl 7.66.0, curl will comply with the Retry-After: response header if
3388 curl --retry 7 https://example.com
3390 .IP "\-\-sasl-authzid <identity>"
3392 in addition to the authentication identity (authcid) as specified by \fI\-u, \-\-user\fP.
3401 curl --sasl-authzid zid imap://example.com/
3405 .IP "\-\-sasl-ir"
3410 curl --sasl-ir imap://example.com/
3414 .IP "\-\-service-name <name>"
3417 Examples: \fI\-\-negotiate\fP \fI\-\-service-name\fP sockd would use sockd/server-name.
3421 curl --service-name sockd/server https://example.com
3425 .IP "\-S, \-\-show-error"
3426 When used with \fI\-s, \-\-silent\fP, it makes curl show an error message if it fails.
3429 \fI\-:, \-\-next\fP.
3433 curl --show-error --silent https://example.com
3436 See also \fI--no-progress-meter\fP.
3437 .IP "\-s, \-\-silent"
3438 Silent or quiet mode. Do not show progress meter or error messages. Makes Curl
3442 Use \fI\-S, \-\-show-error\fP in addition to this option to disable progress meter but
3447 curl -s https://example.com
3450 See also \fI-v, --verbose\fP, \fI--stderr\fP and \fI--no-progress-meter\fP.
3451 .IP "\-\-socks4 <host[:port]>"
3453 assumed at port 1080. Using this socket type make curl resolve the host name
3456 This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
3459 This option is superfluous since you can specify a socks4 proxy with \fI\-x, \-\-proxy\fP
3462 Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
3463 \fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
3470 curl --socks4 hostname:4096 https://example.com
3472 .IP "\-\-socks4a <host[:port]>"
3476 This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
3479 This option is superfluous since you can specify a socks4a proxy with \fI\-x, \-\-proxy\fP
3482 Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
3483 \fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
3490 curl --socks4a hostname:4096 https://example.com
3492 .IP "\-\-socks5-basic"
3493 Tells curl to use username/password authentication when connecting to a SOCKS5
3495 \fI\-\-socks5-gssapi\fP to force GSS-API authentication to SOCKS5 proxies.
3499 curl --socks5-basic --socks5 hostname:4096 https://example.com
3503 .IP "\-\-socks5-gssapi-nec"
3504 As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
3506 implementation does not. The option \fI\-\-socks5-gssapi-nec\fP allows the
3511 curl --socks5-gssapi-nec --socks5 hostname:4096 https://example.com
3513 .IP "\-\-socks5-gssapi-service <name>"
3514 The default service name for a socks server is rcmd/server-fqdn. This option
3517 Examples: \fI\-\-socks5\fP proxy-name \fI\-\-socks5-gssapi-service\fP sockd would use
3518 sockd/proxy-name \fI\-\-socks5\fP proxy-name \fI\-\-socks5-gssapi-service\fP sockd/real-name
3519 would use sockd/real-name for cases where the proxy-name does not match the
3524 curl --socks5-gssapi-service sockd --socks5 hostname:4096 https://example.com
3526 .IP "\-\-socks5-gssapi"
3527 Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy.
3528 The GSS-API authentication is enabled by default (if curl is compiled with
3529 GSS-API support). Use \fI\-\-socks5-basic\fP to force username/password authentication
3534 curl --socks5-gssapi --socks5 hostname:4096 https://example.com
3538 .IP "\-\-socks5-hostname <host[:port]>"
3542 This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
3546 \fI\-x, \-\-proxy\fP using a socks5h:// protocol prefix.
3548 Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
3549 \fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
3556 curl --socks5-hostname proxy.example:7000 https://example.com
3558 .IP "\-\-socks5 <host[:port]>"
3559 Use the specified SOCKS5 proxy \- but resolve the host name locally. If the
3562 This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
3565 This option is superfluous since you can specify a socks5 proxy with \fI\-x, \-\-proxy\fP
3568 Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
3569 \fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
3574 This option (as well as \fI\-\-socks4\fP) does not work with IPV6, FTPS or LDAP.
3578 curl --socks5 proxy.example:7000 https://example.com
3580 .IP "\-Y, \-\-speed-limit <speed>"
3582 speed-time seconds it gets aborted. speed-time is set with \fI\-y, \-\-speed-time\fP and is
3589 curl --speed-limit 300 --speed-time 10 https://example.com
3591 .IP "\-y, \-\-speed-time <seconds>"
3592 If a download is slower than speed-limit bytes per second during a speed-time
3593 period, the download gets aborted. If speed-time is used, the default
3594 speed-limit will be 1 unless set with \fI\-Y, \-\-speed-limit\fP.
3597 this is a concern for you, try the \fI\-\-connect-timeout\fP option.
3603 curl --speed-limit 300 --speed-time 10 https://example.com
3605 .IP "\-\-ssl-allow-beast"
3606 This option tells curl to not work around a security flaw in the SSL3 and
3616 curl --ssl-allow-beast https://example.com
3618 .IP "\-\-ssl-auto-client-cert"
3628 curl --ssl-auto-client-cert https://example.com
3631 See also \fI--proxy-ssl-auto-client-cert\fP. Added in 7.77.0.
3632 .IP "\-\-ssl-no-revoke"
3633 (Schannel) This option tells curl to disable certificate revocation checks.
3639 curl --ssl-no-revoke https://example.com
3643 .IP "\-\-ssl-reqd"
3647 This option was formerly known as \-\-ftp-ssl-reqd.
3651 curl --ssl-reqd ftp://example.com
3653 .IP "\-\-ssl-revoke-best-effort"
3654 (Schannel) This option tells curl to ignore certificate revocation checks when
3660 curl --ssl-revoke-best-effort https://example.com
3664 .IP "\-\-ssl"
3665 (FTP IMAP POP3 SMTP) Try to use SSL/TLS for the connection. Reverts to a non-secure connection if
3666 the server does not support SSL/TLS. See also \fI\-\-ftp-ssl-control\fP and \fI\-\-ssl-reqd\fP
3669 This option was formerly known as \-\-ftp-ssl. That option
3674 curl --ssl pop3://example.com/
3676 .IP "\-2, \-\-sslv2"
3677 (SSL) This option previously asked curl to use SSLv2, but starting in curl 7.77.0
3683 curl --sslv2 https://example.com
3686 …--http1.1\fP and \fI--http2\fP. \fI-2, --sslv2\fP requires that the underlying libcurl was built t…
3687 .IP "\-3, \-\-sslv3"
3688 (SSL) This option previously asked curl to use SSLv3, but starting in curl 7.77.0
3694 curl --sslv3 https://example.com
3697 …--http1.1\fP and \fI--http2\fP. \fI-3, --sslv3\fP requires that the underlying libcurl was built t…
3698 .IP "\-\-stderr <file>"
3700 is a plain \(aq-', it is instead written to stdout.
3703 \fI\-:, \-\-next\fP.
3709 curl --stderr output.txt https://example.com
3712 See also \fI-v, --verbose\fP and \fI-s, --silent\fP.
3713 .IP "\-\-styled-output"
3715 terminal. Use \-\-no-styled-output to switch them off.
3718 \fI\-:, \-\-next\fP.
3722 curl --styled-output -I https://example.com
3726 .IP "\-\-suppress-connect-headers"
3727 When \fI\-p, \-\-proxytunnel\fP is used and a CONNECT request is made do not output proxy
3728 CONNECT response headers. This option is meant to be used with \fI\-D, \-\-dump-header\fP or
3729 \fI\-i, \-\-include\fP which are used to show protocol headers in the output. It has no
3730 effect on debug options such as \fI\-v, \-\-verbose\fP or \fI\-\-trace\fP, or any statistics.
3734 curl --suppress-connect-headers --include -x proxy https://example.com
3737 See also \fI-D, --dump-header\fP, \fI-i, --include\fP and \fI-p, --proxytunnel\fP. Added in 7.54.0.
3738 .IP "\-\-tcp-fastopen"
3743 curl --tcp-fastopen https://example.com
3747 .IP "\-\-tcp-nodelay"
3751 Since 7.50.2, curl sets this option by default and you need to explicitly
3756 curl --tcp-nodelay https://example.com
3758 .IP "\-t, \-\-telnet-option <opt=val>"
3769 curl -t TTYPE=vt100 telnet://example.com/
3771 .IP "\-\-tftp-blksize <value>"
3772 (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that curl will
3780 curl --tftp-blksize 1024 tftp://example.com/file
3782 .IP "\-\-tftp-no-options"
3783 (TFTP) Tells curl not to send TFTP options requests.
3786 or properly implement TFTP options. When this option is used \fI\-\-tftp-blksize\fP is
3791 curl --tftp-no-options tftp://192.168.0.1/
3795 .IP "\-z, \-\-time-cond <time>"
3802 Start the date expression with a dash (-) to make it request for a document
3808 Examples:
3810 curl -z "Wed 01 Sep 2021 12:18:00" https://example.com
3811 curl -z "-Wed 01 Sep 2021 12:18:00" https://example.com
3812 curl -z file https://example.com
3814 .IP "\-\-tls-max <VERSION>"
3819 includes QUIC-using (HTTP/3) transfers.
3834 Examples:
3836 curl --tls-max 1.2 https://example.com
3837 curl --tls-max 1.3 --tlsv1.2 https://example.com
3840 See also \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, \fI--tlsv1.2\fP and \fI--tlsv1.3\fP. \fI--tls-max\fP req…
3841 .IP "\-\-tls13-ciphers <ciphersuite list>"
3846 https://curl.se/docs/ssl-ciphers.html
3848 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
3850 cipher suites by using the \fI\-\-ciphers\fP option.
3856 curl --tls13-ciphers TLS_AES_128_GCM_SHA256 https://example.com
3860 .IP "\-\-tlsauthtype <type>"
3862 for TLS-SRP (RFC 5054). If \fI\-\-tlsuser\fP and \fI\-\-tlspassword\fP are specified but
3863 \fI\-\-tlsauthtype\fP is not, then this option defaults to "SRP". This option works
3864 only if the underlying libcurl is built with TLS-SRP support, which requires
3865 OpenSSL or GnuTLS with TLS-SRP support.
3869 curl --tlsauthtype SRP https://example.com
3871 .IP "\-\-tlspassword <string>"
3873 \fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlsuser\fP also be set.
3879 curl --tlspassword pwd --tlsuser user https://example.com
3881 .IP "\-\-tlsuser <name>"
3883 \fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlspassword\fP also is set.
3889 curl --tlspassword pwd --tlsuser user https://example.com
3891 .IP "\-\-tlsv1.0"
3892 (TLS) Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
3894 In old versions of curl this option was documented to allow _only_ TLS 1.0,
3895 but behavior was inconsistent depending on the TLS library. Use \fI\-\-tls-max\fP if
3900 curl --tlsv1.0 https://example.com
3904 .IP "\-\-tlsv1.1"
3905 (TLS) Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server.
3907 In old versions of curl this option was documented to allow _only_ TLS 1.1,
3908 but behavior was inconsistent depending on the TLS library. Use \fI\-\-tls-max\fP if
3913 curl --tlsv1.1 https://example.com
3917 .IP "\-\-tlsv1.2"
3918 (TLS) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server.
3920 In old versions of curl this option was documented to allow _only_ TLS 1.2,
3921 but behavior was inconsistent depending on the TLS library. Use \fI\-\-tls-max\fP if
3926 curl --tlsv1.2 https://example.com
3930 .IP "\-\-tlsv1.3"
3931 (TLS) Forces curl to use TLS version 1.3 or later when connecting to a remote TLS
3935 includes QUIC-using (HTTP/3) transfers.
3941 curl --tlsv1.3 https://example.com
3945 .IP "\-1, \-\-tlsv1"
3946 (SSL) Tells curl to use at least TLS version 1.x when negotiating with a remote TLS
3951 curl --tlsv1 https://example.com
3954 …--http1.1\fP and \fI--http2\fP. \fI-1, --tlsv1\fP requires that the underlying libcurl was built t…
3955 .IP "\-\-tr-encoding"
3956 (HTTP) Request a compressed Transfer-Encoding response using one of the algorithms
3957 curl supports, and uncompress the data while receiving it.
3961 curl --tr-encoding https://example.com
3963 .IP "\-\-trace-ascii <file>"
3965 descriptive information, to the given output file. Use "-" as filename to have
3968 This is similar to \fI\-\-trace\fP, but leaves out the hex part and only shows the
3973 \fI\-:, \-\-next\fP.
3979 curl --trace-ascii log.txt https://example.com
3982 This option overrides \fI--trace\fP and \fI-v, --verbose\fP.
3983 .IP "\-\-trace-time"
3984 Prepends a time stamp to each trace or verbose line that curl displays.
3987 \fI\-:, \-\-next\fP.
3991 curl --trace-time --trace-ascii output https://example.com
3993 .IP "\-\-trace <file>"
3995 descriptive information, to the given output file. Use "-" as filename to have
4000 \fI\-:, \-\-next\fP.
4006 curl --trace log.txt https://example.com
4009 This option overrides \fI-v, --verbose\fP and \fI--trace-ascii\fP.
4010 .IP "\-\-unix-socket <path>"
4015 curl --unix-socket socket-path https://example.com
4019 .IP "\-T, \-\-upload-file <file>"
4021 part in the specified URL, curl will append the local file name. NOTE that you
4022 must use a trailing / on the last directory to really prove to Curl that there
4023 is no file name or curl will think that your last directory name is the remote
4027 Use the file name "-" (a single dash) to use stdin instead of a given file.
4029 "-" to use stdin in non-blocking mode to allow reading server output while
4032 You can specify one \fI\-T, \-\-upload-file\fP for each URL on the command line. Each
4033 \fI\-T, \-\-upload-file\fP + URL pair specifies what to upload and to where. curl also
4034 supports "globbing" of the \fI\-T, \-\-upload-file\fP argument, meaning that you can upload
4040 formatted correctly by the user as curl will not transcode nor encode it
4043 Examples:
4045 curl -T file https://example.com
4046 curl -T "img[1-1000].png" ftp://ftp.example.com/
4047 curl --upload-file "{file1,file2}" https://example.com
4049 .IP "\-\-url <url>"
4054 then curl will make a guess based on the host. If the outermost sub-domain
4057 setting a default protocol, see \fI\-\-proto-default\fP for details.
4060 written, use the \fI\-o, \-\-output\fP or the \fI\-O, \-\-remote-name\fP options.
4067 curl --url https://example.com
4069 .IP "\-B, \-\-use-ascii"
4076 curl -B ftp://example.com/README
4078 .IP "\-A, \-\-user-agent <name>"
4079 (HTTP) Specify the User-Agent string to send to the HTTP server. To encode blanks in
4081 be set with the \fI\-H, \-\-header\fP or the \fI\-\-proxy-header\fP options.
4083 If you give an empty argument to \fI\-A, \-\-user-agent\fP (""), it will remove the header
4091 curl -A "Agent 007" https://example.com
4093 .IP "\-u, \-\-user <user:password>"
4095 \fI\-n, \-\-netrc\fP and \fI\-\-netrc-optional\fP.
4097 If you simply specify the user name, curl will prompt for a password.
4103 On systems where it works, curl will hide the given option argument from
4118 To specify the domain name use either Down-Level Logon Name or UPN (User
4122 If you use a Windows SSPI-enabled curl binary and perform Kerberos V5,
4123 Negotiate, NTLM or Digest authentication then you can tell curl to select
4125 with this option: "-u :".
4131 curl -u user:secret https://example.com
4133 .IP "\-v, \-\-verbose"
4134 Makes curl verbose during the operation. Useful for debugging and seeing
4136 sent by curl, \(aq<' means "header data" received by curl that is hidden in
4138 curl.
4140 If you only want HTTP headers in the output, \fI\-i, \-\-include\fP might be the option
4144 \fI\-\-trace\fP or \fI\-\-trace-ascii\fP instead.
4147 \fI\-:, \-\-next\fP.
4149 Use \fI\-s, \-\-silent\fP to make curl really quiet.
4153 curl --verbose https://example.com
4156 See also \fI-i, --include\fP. This option overrides \fI--trace\fP and \fI--trace-ascii\fP.
4157 .IP "\-V, \-\-version"
4158 Displays information about curl and the libcurl version it uses.
4160 The first line includes the full version of curl, libcurl and other 3rd party
4169 .IP "alt-svc"
4170 Support for the Alt-Svc: header is provided.
4172 This curl uses asynchronous name resolves. Asynchronous name resolves can be
4173 done using either the c-ares or the threaded resolver backends.
4177 curl was built with support for character set conversions (like EBCDIC)
4179 This curl uses a libcurl built with Debug. This enables more error-tracking
4180 and memory debugging etc. For curl-developers only!
4182 The built-in SASL authentication includes extensions to support SCRAM because
4184 .IP "GSS-API"
4185 GSS-API is supported.
4189 HTTP/2 support has been built-in.
4191 HTTP/3 support has been built-in.
4192 .IP "HTTPS-proxy"
4193 This curl is built to support HTTPS proxy.
4195 This curl supports IDN \- international domain names.
4201 This curl supports transfers of large files, files larger than 2GB.
4206 This curl supports multiple TLS backends.
4212 PSL is short for Public Suffix List and means that this curl has been built
4221 .IP "TLS-SRP"
4235 curl --version
4237 .IP "\-w, \-\-write-out <format>"
4238 Make curl display information on stdout after a completed transfer. The format
4241 curl read the format from a file with "@filename" and to tell curl to read the
4242 format from stdin you write "@-".
4245 text that curl thinks fit, as described below. All variables are specified as
4254 The %-symbol is a special symbol in the win32-environment, where all
4261 The Content-Type of the requested document, if there was any.
4270 The ultimate filename that curl writes out to. This is only meaningful if curl
4271 is told to write to a file with the \fI\-O, \-\-remote-name\fP or \fI\-o, \-\-output\fP
4272 option. It\(aqs most useful in combination with the \fI\-J, \-\-remote-header-name\fP
4276 The initial path curl ended up in when logging on to the remote FTP
4285 curl CONNECT request.
4294 The IP address of the local end of the most recently done connection \- can be
4314 The rest of the output is only shown if the transfer returned a non-zero error
4322 When an HTTP request was made without \fI\-L, \-\-location\fP to follow redirects (or when
4323 \fI\-\-max-redirs\fP is met), this variable will show the actual URL a redirect
4330 The remote IP address of the most recently done connection \- can be either
4358 The average download speed that curl measured for the complete download. Bytes
4362 The average upload speed that curl measured for the complete upload. Bytes per
4370 From this point on, the \fI\-w, \-\-write-out\fP output will be written to standard
4374 From this point on, the \fI\-w, \-\-write-out\fP output will be written to standard output.
4392 about to begin. This includes all pre-transfer commands and negotiations that
4413 The URL index number of this transfer, 0-indexed. De-globbed URLs share the
4417 The URL that was fetched last. This is most meaningful if you have told curl
4425 curl -w '%{http_code}\\n' https://example.com
4427 .IP "\-\-xattr"
4428 When saving output to a file, this option tells curl to store certain file
4436 curl --xattr -o storage https://example.com
4441 Default config file, see \fI\-K, \-\-config\fP for details.
4448 the \fI\-x, \-\-proxy\fP option.
4454 .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
4455 Sets the proxy server to use for [url-protocol], where the protocol is a
4456 protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
4459 Sets the proxy server to use if no protocol-specific proxy is set.
4460 .IP "NO_PROXY <comma-separated list of hosts/domains>"
4466 the \fI\-x, \-\-proxy\fP option. That is
4467 .B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
4470 .B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
4481 If curl was built with support for "MultiSSL", meaning that it has built-in
4483 the case insensitive name of the particular backend to use when curl is
4484 invoked. Setting a name that is not a built-in alternative will make curl
4487 SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
4488 mesalink, nss, openssl, rustls, schannel, secure-transport, wolfssl
4490 If curl was built with HTTP/3 support, setting this environment variable to a
4491 local directory will make curl produce qlogs in that directory, using file
4495 If you set this environment variable to a file name, curl will store TLS
4513 Makes it the equivalent of \fI\-\-socks4\fP
4515 Makes it the equivalent of \fI\-\-socks4a\fP
4517 Makes it the equivalent of \fI\-\-socks5\fP
4519 Makes it the equivalent of \fI\-\-socks5-hostname\fP
4525 Unsupported protocol. This build of curl has no support for this protocol.
4532 enabled or was explicitly disabled at build-time. To make curl able to do
4541 Weird server reply. The server sent data curl could not parse.
4551 FTP weird PASS reply. Curl could not parse the reply sent to the PASS request.
4554 curl, the timeout expired.
4556 FTP weird PASV reply, Curl could not parse the reply sent to the PASV request.
4558 FTP weird 227 format. Curl could not parse the 227-line the server sent.
4560 FTP cannot use host. Could not resolve the host IP we got in the 227-line.
4577 appears if \fI\-f, \-\-fail\fP is used.
4579 Write error. Curl could not write data to a local filesystem or similar.
4588 Operation timeout. The specified time-out period was reached according to the
4599 HTTP post error. Internal post-request generation error.
4613 Aborted by callback. An application told curl to abort the operation.
4619 Too many redirects. When following redirects, curl hit the maximum amount.
4622 option to curl that was passed on to libcurl and rejected. Read up in the
4657 The user name, password, or similar was not accepted and curl failed to log in.
4723 https://curl.se