logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

curl.1 (231498B)


  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX\-License\-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
  26. .\"
  27. .TH curl 1 "December 05 2023" "curl 8.5.0" "curl Manual"
  28. .SH NAME
  29. curl \- transfer a URL
  30. .SH SYNOPSIS
  31. .B curl [options / URLs]
  32. .SH DESCRIPTION
  33. \fBcurl\fP is a tool for transferring data from or to a server using URLs. It
  34. supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS,
  35. IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP,
  36. SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.
  37. curl is powered by libcurl for all transfer\-related features. See
  38. \fIlibcurl(3)\fP for details.
  39. .SH URL
  40. The URL syntax is protocol\-dependent. You find a detailed description in
  41. RFC 3986.
  42. If you provide a URL without a leading \fBprotocol://\fP scheme, curl guesses
  43. what protocol you want. It then defaults to HTTP but assumes others based on
  44. often\-used host name prefixes. For example, for host names starting with
  45. \(dqftp." curl assumes you want FTP.
  46. You can specify any amount of URLs on the command line. They are fetched in a
  47. sequential manner in the specified order unless you use \fI\-Z, \-\-parallel\fP. You can
  48. specify command line options and URLs mixed and in any order on the command
  49. line.
  50. curl attempts to reuse connections when doing multiple transfers, so that
  51. getting many files from the same server do not use multiple connects and setup
  52. handshakes. This improves speed. Connection reuse can only be done for URLs
  53. specified for a single command line invocation and cannot be performed between
  54. separate curl runs.
  55. Provide an IPv6 zone id in the URL with an escaped percentage sign. Like in
  56. .nf
  57. \(dqhttp://[fe80::3%25eth0]/"
  58. .fi
  59. Everything provided on the command line that is not a command line option or
  60. its argument, curl assumes is a URL and treats it as such.
  61. .SH GLOBBING
  62. You can specify multiple URLs or parts of URLs by writing lists within braces
  63. or ranges within brackets. We call this "globbing".
  64. Provide a list with three different names like this:
  65. .nf
  66. \(dqhttp://site.{one,two,three}.com"
  67. .fi
  68. or you can get sequences of alphanumeric series by using [] as in:
  69. .nf
  70. \(dqftp://ftp.example.com/file[1\-100].txt"
  71. .fi
  72. .nf
  73. \(dqftp://ftp.example.com/file[001\-100].txt" (with leading zeros)
  74. .fi
  75. .nf
  76. \(dqftp://ftp.example.com/file[a\-z].txt"
  77. .fi
  78. Nested sequences are not supported, but you can use several ones next to each
  79. other:
  80. .nf
  81. \(dqhttp://example.com/archive[1996\-1999]/vol[1\-4]/part{a,b,c}.html"
  82. .fi
  83. You can specify a step counter for the ranges to get every Nth number or
  84. letter:
  85. .nf
  86. \(dqhttp://example.com/file[1\-100:10].txt"
  87. .fi
  88. .nf
  89. \(dqhttp://example.com/file[a\-z:2].txt"
  90. .fi
  91. When using [] or {} sequences when invoked from a command line prompt, you
  92. probably have to put the full URL within double quotes to avoid the shell from
  93. interfering with it. This also goes for other characters treated special, like
  94. for example \(aq&\(aq, \(aq?\(aq and \(aq*\(aq.
  95. Switch off globbing with \fI\-g, \-\-globoff\fP.
  96. .SH VARIABLES
  97. curl supports command line variables (added in 8.3.0). Set variables with
  98. \fI\-\-variable\fP name=content or \fI\-\-variable\fP name@file (where "file" can be stdin if
  99. set to a single dash (\-)).
  100. Variable contents can expanded in option parameters using "{{name}}" (without
  101. the quotes) if the option name is prefixed with "\--expand\-". This gets the
  102. contents of the variable "name" inserted, or a blank if the name does not
  103. exist as a variable. Insert "{{" verbatim in the string by prefixing it with a
  104. backslash, like "\\{{".
  105. You an access and expand environment variables by first importing them. You
  106. can select to either require the environment variable to be set or you can
  107. provide a default value in case it is not already set. Plain \fI\-\-variable\fP %name
  108. imports the variable called \(aqname\(aq but exits with an error if that environment
  109. variable is not already set. To provide a default value if it is not set, use
  110. \fI\-\-variable\fP %name=content or \fI\-\-variable\fP %name@content.
  111. Example. Get the USER environment variable into the URL, fail if USER is not
  112. set:
  113. .nf
  114. \--variable \(aq%USER\(aq
  115. \--expand\-url = "https://example.com/api/{{USER}}/method"
  116. .fi
  117. When expanding variables, curl supports a set of functions that can make the
  118. variable contents more convenient to use. It can trim leading and trailing
  119. white space with \fItrim\fP, it can output the contents as a JSON quoted string
  120. with \fIjson\fP, URL encode the string with \fIurl\fP or base64 encode it with
  121. \fIb64\fP. You apply function to a variable expansion, add them colon separated to
  122. the right side of the variable. Variable content holding null bytes that are
  123. not encoded when expanded cause error.
  124. Example: get the contents of a file called $HOME/.secret into a variable
  125. called "fix". Make sure that the content is trimmed and percent\-encoded sent
  126. as POST data:
  127. .nf
  128. \--variable %HOME
  129. \--expand\-variable fix@{{HOME}}/.secret
  130. \--expand\-data "{{fix:trim:url}}"
  131. https://example.com/
  132. .fi
  133. Command line variables and expansions were added in in 8.3.0.
  134. .SH OUTPUT
  135. If not told otherwise, curl writes the received data to stdout. It can be
  136. instructed to instead save that data into a local file, using the \fI\-o, \-\-output\fP or
  137. \fI\-O, \-\-remote\-name\fP options. If curl is given multiple URLs to transfer on the
  138. command line, it similarly needs multiple options for where to save them.
  139. curl does not parse or otherwise "understand" the content it gets or writes as
  140. output. It does no encoding or decoding, unless explicitly asked to with
  141. dedicated command line options.
  142. .SH PROTOCOLS
  143. curl supports numerous protocols, or put in URL terms: schemes. Your
  144. particular build may not support them all.
  145. .IP DICT
  146. Lets you lookup words using online dictionaries.
  147. .IP FILE
  148. Read or write local files. curl does not support accessing file:// URL
  149. remotely, but when running on Microsoft Windows using the native UNC approach
  150. works.
  151. .IP FTP(S)
  152. curl supports the File Transfer Protocol with a lot of tweaks and levers. With
  153. or without using TLS.
  154. .IP GOPHER(S)
  155. Retrieve files.
  156. .IP HTTP(S)
  157. curl supports HTTP with numerous options and variations. It can speak HTTP
  158. version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
  159. command line options.
  160. .IP IMAP(S)
  161. Using the mail reading protocol, curl can "download" emails for you. With or
  162. without using TLS.
  163. .IP LDAP(S)
  164. curl can do directory lookups for you, with or without TLS.
  165. .IP MQTT
  166. curl supports MQTT version 3. Downloading over MQTT equals "subscribe" to a
  167. topic while uploading/posting equals "publish" on a topic. MQTT over TLS is
  168. not supported (yet).
  169. .IP POP3(S)
  170. Downloading from a pop3 server means getting a mail. With or without using
  171. TLS.
  172. .IP RTMP(S)
  173. The \fI\fPRealtime Messaging Protocol\fI\fP is primarily used to serve streaming media
  174. and curl can download it.
  175. .IP RTSP
  176. curl supports RTSP 1.0 downloads.
  177. .IP SCP
  178. curl supports SSH version 2 scp transfers.
  179. .IP SFTP
  180. curl supports SFTP (draft 5) done over SSH version 2.
  181. .IP SMB(S)
  182. curl supports SMB version 1 for upload and download.
  183. .IP SMTP(S)
  184. Uploading contents to an SMTP server means sending an email. With or without
  185. TLS.
  186. .IP TELNET
  187. Telling curl to fetch a telnet URL starts an interactive session where it
  188. sends what it reads on stdin and outputs what the server sends it.
  189. .IP TFTP
  190. curl can do TFTP downloads and uploads.
  191. .SH "PROGRESS METER"
  192. curl normally displays a progress meter during operations, indicating the
  193. amount of transferred data, transfer speeds and estimated time left, etc. The
  194. progress meter displays the transfer rate in bytes per second. The suffixes
  195. (k, M, G, T, P) are 1024 based. For example 1k is 1024 bytes. 1M is 1048576
  196. bytes.
  197. curl displays this data to the terminal by default, so if you invoke curl to
  198. do an operation and it is about to write data to the terminal, it
  199. \fIdisables\fP the progress meter as otherwise it would mess up the output
  200. mixing progress meter and response data.
  201. If you want a progress meter for HTTP POST or PUT requests, you need to
  202. redirect the response output to a file, using shell redirect (>), \fI\-o, \-\-output\fP or
  203. similar.
  204. This does not apply to FTP upload as that operation does not spit out any
  205. response data to the terminal.
  206. If you prefer a progress "bar" instead of the regular meter, \fI\-#, \-\-progress\-bar\fP is
  207. your friend. You can also disable the progress meter completely with the
  208. \fI\-s, \-\-silent\fP option.
  209. .SH VERSION
  210. This man page describes curl 8.5.0. If you use a later version, chances are
  211. this man page does not fully document it. If you use an earlier version, this
  212. document tries to include version information about which specific version
  213. that introduced changes.
  214. You can always learn which the latest curl version is by running
  215. .nf
  216. curl https://curl.se/info
  217. .fi
  218. The online version of this man page is always showing the latest incarnation:
  219. https://curl.se/docs/manpage.html
  220. .SH OPTIONS
  221. Options start with one or two dashes. Many of the options require an
  222. additional value next to them. If provided text does not start with a dash, it
  223. is presumed to be and treated as a URL.
  224. The short "single\-dash" form of the options, \-d for example, may be used with
  225. or without a space between it and its value, although a space is a recommended
  226. separator. The long "double\-dash" form, \fI\-d, \-\-data\fP for example, requires a space
  227. between it and its value.
  228. Short version options that do not need any additional values can be used
  229. immediately next to each other, like for example you can specify all the
  230. options \fI\-O\fP, \fI\-L\fP and \fI\-v\fP at once as \fI\-OLv\fP.
  231. In general, all boolean options are enabled with \--\fBoption\fP and yet again
  232. disabled with \--\fBno\-\fPoption. That is, you use the same option name but
  233. prefix it with "no\-". However, in this list we mostly only list and show the
  234. \fI\--option\fP version of them.
  235. When \fI\-:, \-\-next\fP is used, it resets the parser state and you start again with a
  236. clean option state, except for the options that are "global". Global options
  237. retain their values and meaning even after \fI\-:, \-\-next\fP.
  238. The following options are global:
  239. \fI\-\-fail\-early\fP, \fI\-\-libcurl\fP, \fI\-\-parallel\-immediate\fP, \fI\-Z, \-\-parallel\fP, \fI\-#, \-\-progress\-bar\fP, \fI\-\-rate\fP, \fI\-S, \-\-show\-error\fP, \fI\-\-stderr\fP, \fI\-\-styled\-output\fP, \fI\-\-trace\-ascii\fP, \fI\-\-trace\-config\fP, \fI\-\-trace\-ids\fP, \fI\-\-trace\-time\fP, \fI\-\-trace\fP and \fI\-v, \-\-verbose\fP.
  240. .IP "\-\-abstract\-unix\-socket <path>"
  241. (HTTP) Connect through an abstract Unix domain socket, instead of using the network.
  242. Note: netstat shows the path of an abstract socket prefixed with \(aq@\(aq, however
  243. the <path> argument should not have this leading character.
  244. If \fI\-\-abstract\-unix\-socket\fP is provided several times, the last set value is used.
  245. Example:
  246. .nf
  247. curl \-\-abstract\-unix\-socket socketpath https://example.com
  248. .fi
  249. See also \fI\-\-unix\-socket\fP. Added in 7.53.0.
  250. .IP "\-\-alt\-svc <file name>"
  251. (HTTPS) This option enables the alt\-svc parser in curl. If the file name points to an
  252. existing alt\-svc cache file, that gets used. After a completed transfer, the
  253. cache is saved to the file name again if it has been modified.
  254. Specify a "" file name (zero length) to avoid loading/saving and make curl
  255. just handle the cache in memory.
  256. If this option is used several times, curl loads contents from all the
  257. files but the last one is used for saving.
  258. \fI\-\-alt\-svc\fP can be used several times in a command line
  259. Example:
  260. .nf
  261. curl \-\-alt\-svc svc.txt https://example.com
  262. .fi
  263. See also \fI\-\-resolve\fP and \fI\-\-connect\-to\fP. Added in 7.64.1.
  264. .IP "\-\-anyauth"
  265. (HTTP) Tells curl to figure out authentication method by itself, and use the most
  266. secure one the remote site claims to support. This is done by first doing a
  267. request and checking the response\-headers, thus possibly inducing an extra
  268. network round\-trip. This is used instead of setting a specific authentication
  269. method, which you can do with \fI\-\-basic\fP, \fI\-\-digest\fP, \fI\-\-ntlm\fP, and \fI\-\-negotiate\fP.
  270. Using \fI\-\-anyauth\fP is not recommended if you do uploads from stdin, since it may
  271. require data to be sent twice and then the client must be able to rewind. If
  272. the need should arise when uploading from stdin, the upload operation fails.
  273. Used together with \fI\-u, \-\-user\fP.
  274. Providing \fI\-\-anyauth\fP multiple times has no extra effect.
  275. Example:
  276. .nf
  277. curl \-\-anyauth \-\-user me:pwd https://example.com
  278. .fi
  279. See also \fI\-\-proxy\-anyauth\fP, \fI\-\-basic\fP and \fI\-\-digest\fP.
  280. .IP "\-a, \-\-append"
  281. (FTP SFTP) When used in an upload, this option makes curl append to the target file
  282. instead of overwriting it. If the remote file does not exist, it is
  283. created. Note that this flag is ignored by some SFTP servers (including
  284. OpenSSH).
  285. Providing \fI\-a, \-\-append\fP multiple times has no extra effect.
  286. Disable it again with \-\-no\-append.
  287. Example:
  288. .nf
  289. curl \-\-upload\-file local \-\-append ftp://example.com/
  290. .fi
  291. See also \fI-r, \-\-range\fP and \fI-C, \-\-continue\-at\fP.
  292. .IP "\-\-aws\-sigv4 <provider1[:provider2[:region[:service]]]>"
  293. Use AWS V4 signature authentication in the transfer.
  294. The provider argument is a string that is used by the algorithm when creating
  295. outgoing authentication headers.
  296. The region argument is a string that points to a geographic area of
  297. a resources collection (region\-code) when the region name is omitted from
  298. the endpoint.
  299. The service argument is a string that points to a function provided by a cloud
  300. (service\-code) when the service name is omitted from the endpoint.
  301. If \fI\-\-aws\-sigv4\fP is provided several times, the last set value is used.
  302. Example:
  303. .nf
  304. curl \-\-aws\-sigv4 "aws:amz:us\-east\-2:es" \-\-user "key:secret" https://example.com
  305. .fi
  306. See also \fI\-\-basic\fP and \fI-u, \-\-user\fP. Added in 7.75.0.
  307. .IP "\-\-basic"
  308. (HTTP) Tells curl to use HTTP Basic authentication with the remote host. This is the
  309. default and this option is usually pointless, unless you use it to override a
  310. previously set option that sets a different authentication method (such as
  311. \fI\-\-ntlm\fP, \fI\-\-digest\fP, or \fI\-\-negotiate\fP).
  312. Used together with \fI\-u, \-\-user\fP.
  313. Providing \fI\-\-basic\fP multiple times has no extra effect.
  314. Example:
  315. .nf
  316. curl \-u name:password \-\-basic https://example.com
  317. .fi
  318. See also \fI\-\-proxy\-basic\fP.
  319. .IP "\-\-ca\-native"
  320. (TLS) Tells curl to use the CA store from the native operating system to verify the
  321. peer. By default, curl otherwise uses a CA store provided in a single file or
  322. directory, but when using this option it interfaces the operating system\(aqs
  323. own vault.
  324. This option only works for curl on Windows when built to use OpenSSL. When
  325. curl on Windows is built to use Schannel, this feature is implied and curl
  326. then only uses the native CA store.
  327. curl built with wolfSSL also supports this option (added in 8.3.0).
  328. Providing \fI\-\-ca\-native\fP multiple times has no extra effect.
  329. Disable it again with \-\-no\-ca\-native.
  330. Example:
  331. .nf
  332. curl \-\-ca\-native https://example.com
  333. .fi
  334. See also \fI\-\-cacert\fP, \fI\-\-capath\fP and \fI-k, \-\-insecure\fP. Added in 8.2.0.
  335. .IP "\-\-cacert <file>"
  336. (TLS) Tells curl to use the specified certificate file to verify the peer. The file
  337. may contain multiple CA certificates. The certificate(s) must be in PEM
  338. format. Normally curl is built to use a default file for this, so this option
  339. is typically used to alter that default file.
  340. curl recognizes the environment variable named \(aqCURL_CA_BUNDLE\(aq if it is
  341. set, and uses the given path as a path to a CA cert bundle. This option
  342. overrides that variable.
  343. The windows version of curl automatically looks for a CA certs file named
  344. \(aqcurl\-ca\-bundle.crt\(aq, either in the same directory as curl.exe, or in the
  345. Current Working Directory, or in any folder along your PATH.
  346. (iOS and macOS only) If curl is built against Secure Transport, then this
  347. option is supported for backward compatibility with other SSL engines, but it
  348. should not be set. If the option is not set, then curl uses the certificates
  349. in the system and user Keychain to verify the peer, which is the preferred
  350. method of verifying the peer\(aqs certificate chain.
  351. (Schannel only) This option is supported for Schannel in Windows 7 or later
  352. (added in 7.60.0). This option is supported for backward compatibility with
  353. other SSL engines; instead it is recommended to use Windows\(aq store of root
  354. certificates (the default for Schannel).
  355. If \fI\-\-cacert\fP is provided several times, the last set value is used.
  356. Example:
  357. .nf
  358. curl \-\-cacert CA\-file.txt https://example.com
  359. .fi
  360. See also \fI\-\-capath\fP and \fI-k, \-\-insecure\fP.
  361. .IP "\-\-capath <dir>"
  362. (TLS) Tells curl to use the specified certificate directory to verify the
  363. peer. Multiple paths can be provided by separating them with ":" (e.g.
  364. \(dqpath1:path2:path3"). The certificates must be in PEM format, and if curl is
  365. built against OpenSSL, the directory must have been processed using the
  366. c_rehash utility supplied with OpenSSL. Using \fI\-\-capath\fP can allow
  367. OpenSSL\-powered curl to make SSL\-connections much more efficiently than using
  368. \fI\-\-cacert\fP if the \fI\-\-cacert\fP file contains many CA certificates.
  369. If this option is set, the default capath value is ignored.
  370. If \fI\-\-capath\fP is provided several times, the last set value is used.
  371. Example:
  372. .nf
  373. curl \-\-capath /local/directory https://example.com
  374. .fi
  375. See also \fI\-\-cacert\fP and \fI-k, \-\-insecure\fP.
  376. .IP "\-\-cert\-status"
  377. (TLS) Tells curl to verify the status of the server certificate by using the
  378. Certificate Status Request (aka. OCSP stapling) TLS extension.
  379. If this option is enabled and the server sends an invalid (e.g. expired)
  380. response, if the response suggests that the server certificate has been
  381. revoked, or no response at all is received, the verification fails.
  382. This is currently only implemented in the OpenSSL and GnuTLS backends.
  383. Providing \fI\-\-cert\-status\fP multiple times has no extra effect.
  384. Disable it again with \-\-no\-cert\-status.
  385. Example:
  386. .nf
  387. curl \-\-cert\-status https://example.com
  388. .fi
  389. See also \fI\-\-pinnedpubkey\fP.
  390. .IP "\-\-cert\-type <type>"
  391. (TLS) Tells curl what type the provided client certificate is using. PEM, DER, ENG
  392. and P12 are recognized types.
  393. The default type depends on the TLS backend and is usually PEM, however for
  394. Secure Transport and Schannel it is P12. If \fI\-E, \-\-cert\fP is a pkcs11: URI then ENG is
  395. the default type.
  396. If \fI\-\-cert\-type\fP is provided several times, the last set value is used.
  397. Example:
  398. .nf
  399. curl \-\-cert\-type PEM \-\-cert file https://example.com
  400. .fi
  401. See also \fI-E, \-\-cert\fP, \fI\-\-key\fP and \fI\-\-key\-type\fP.
  402. .IP "\-E, \-\-cert <certificate[:password]>"
  403. (TLS) Tells curl to use the specified client certificate file when getting a file
  404. with HTTPS, FTPS or another SSL\-based protocol. The certificate must be in
  405. PKCS#12 format if using Secure Transport, or PEM format if using any other
  406. engine. If the optional password is not specified, it is queried for on
  407. the terminal. Note that this option assumes a certificate file that is the
  408. private key and the client certificate concatenated. See \fI\-E, \-\-cert\fP and \fI\-\-key\fP to
  409. specify them independently.
  410. In the <certificate> portion of the argument, you must escape the character ":"
  411. as "\\:" so that it is not recognized as the password delimiter. Similarly, you
  412. must escape the character "\\" as "\\\\" so that it is not recognized as an
  413. escape character.
  414. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  415. then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
  416. a PKCS#11 device. A string beginning with "pkcs11:" is interpreted as a
  417. PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option is set as
  418. \(dqpkcs11" if none was provided and the \fI\-\-cert\-type\fP option is set as "ENG" if
  419. none was provided.
  420. (iOS and macOS only) If curl is built against Secure Transport, then the
  421. certificate string can either be the name of a certificate/private key in the
  422. system or user keychain, or the path to a PKCS#12\-encoded certificate and
  423. private key. If you want to use a file from the current directory, please
  424. precede it with "./" prefix, in order to avoid confusion with a nickname.
  425. (Schannel only) Client certificates must be specified by a path
  426. expression to a certificate store. (Loading \fIPFX\fP is not supported; you can
  427. import it to a store first). You can use
  428. \(dq<store location>\\<store name>\\<thumbprint>" to refer to a certificate
  429. in the system certificates store, for example,
  430. \fI"CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a"\fP. Thumbprint is
  431. usually a SHA\-1 hex string which you can see in certificate details. Following
  432. store locations are supported: \fICurrentUser\fP, \fILocalMachine\fP, \fICurrentService\fP,
  433. \fIServices\fP, \fICurrentUserGroupPolicy\fP, \fILocalMachineGroupPolicy\fP and
  434. \fILocalMachineEnterprise\fP.
  435. If \fI\-E, \-\-cert\fP is provided several times, the last set value is used.
  436. Example:
  437. .nf
  438. curl \-\-cert certfile \-\-key keyfile https://example.com
  439. .fi
  440. See also \fI\-\-cert\-type\fP, \fI\-\-key\fP and \fI\-\-key\-type\fP.
  441. .IP "\-\-ciphers <list of ciphers>"
  442. (TLS) Specifies which ciphers to use in the connection. The list of ciphers must
  443. specify valid ciphers. Read up on SSL cipher list details on this URL:
  444. https://curl.se/docs/ssl\-ciphers.html
  445. If \fI\-\-ciphers\fP is provided several times, the last set value is used.
  446. Example:
  447. .nf
  448. curl \-\-ciphers ECDHE\-ECDSA\-AES256\-CCM8 https://example.com
  449. .fi
  450. See also \fI\-\-tlsv1.3\fP, \fI\-\-tls13\-ciphers\fP and \fI\-\-proxy\-ciphers\fP.
  451. .IP "\-\-compressed\-ssh"
  452. (SCP SFTP) Enables built\-in SSH compression.
  453. This is a request, not an order; the server may or may not do it.
  454. Providing \fI\-\-compressed\-ssh\fP multiple times has no extra effect.
  455. Disable it again with \-\-no\-compressed\-ssh.
  456. Example:
  457. .nf
  458. curl \-\-compressed\-ssh sftp://example.com/
  459. .fi
  460. See also \fI\-\-compressed\fP. Added in 7.56.0.
  461. .IP "\-\-compressed"
  462. (HTTP) Request a compressed response using one of the algorithms curl supports, and
  463. automatically decompress the content.
  464. Response headers are not modified when saved, so if they are "interpreted"
  465. separately again at a later point they might appear to be saying that the
  466. content is (still) compressed; while in fact it has already been decompressed.
  467. If this option is used and the server sends an unsupported encoding, curl
  468. reports an error. This is a request, not an order; the server may or may not
  469. deliver data compressed.
  470. Providing \fI\-\-compressed\fP multiple times has no extra effect.
  471. Disable it again with \-\-no\-compressed.
  472. Example:
  473. .nf
  474. curl \-\-compressed https://example.com
  475. .fi
  476. See also \fI\-\-compressed\-ssh\fP.
  477. .IP "\-K, \-\-config <file>"
  478. Specify a text file to read curl arguments from. The command line arguments
  479. found in the text file are used as if they were provided on the command
  480. line.
  481. Options and their parameters must be specified on the same line in the file,
  482. separated by whitespace, colon, or the equals sign. Long option names can
  483. optionally be given in the config file without the initial double dashes and
  484. if so, the colon or equals characters can be used as separators. If the option
  485. is specified with one or two dashes, there can be no colon or equals character
  486. between the option and its parameter.
  487. If the parameter contains whitespace or starts with a colon (:) or equals sign
  488. (=), it must be specified enclosed within double quotes (\&"). Within double
  489. quotes the following escape sequences are available: \\\\, \\", \\t, \\n, \\r
  490. and \\v. A backslash preceding any other letter is ignored.
  491. If the first non\-blank column of a config line is a \(aq#\(aq character, that line
  492. is treated as a comment.
  493. Only write one option per physical line in the config file. A single line is
  494. required to be no more than 10 megabytes (since 8.2.0).
  495. Specify the filename to \fI\-K, \-\-config\fP as \(aq\-\(aq to make curl read the file from stdin.
  496. Note that to be able to specify a URL in the config file, you need to specify
  497. it using the \fI\-\-url\fP option, and not by simply writing the URL on its own
  498. line. So, it could look similar to this:
  499. url = "https://curl.se/docs/"
  500. .nf
  501. # \--\- Example file \--\-
  502. # this is a comment
  503. url = "example.com"
  504. output = "curlhere.html"
  505. user\-agent = "superagent/1.0"
  506. .fi
  507. .nf
  508. # and fetch another URL too
  509. url = "example.com/docs/manpage.html"
  510. \-O
  511. referer = "http://nowhereatall.example.com/"
  512. # \--\- End of example file \--\-
  513. .fi
  514. When curl is invoked, it (unless \fI\-q, \-\-disable\fP is used) checks for a default
  515. config file and uses it if found, even when \fI\-K, \-\-config\fP is used. The default
  516. config file is checked for in the following places in this order:
  517. 1) \fB"$CURL_HOME/.curlrc"\fP
  518. 2) \fB"$XDG_CONFIG_HOME/curlrc"\fP (Added in 7.73.0)
  519. 3) \fB"$HOME/.curlrc"\fP
  520. 4) Windows: \fB"%USERPROFILE%\\.curlrc"\fP
  521. 5) Windows: \fB"%APPDATA%\\.curlrc"\fP
  522. 6) Windows: \fI\fP"%USERPROFILE%\\Application Data\\.curlrc"\fI\fP
  523. 7) Non\-Windows: use getpwuid to find the home directory
  524. 8) On Windows, if it finds no \fI.curlrc\fP file in the sequence described above, it
  525. checks for one in the same dir the curl executable is placed.
  526. On Windows two filenames are checked per location: \fI.curlrc\fP and \fI_curlrc\fP,
  527. preferring the former. Older versions on Windows checked for \fI_curlrc\fP only.
  528. \fI\-K, \-\-config\fP can be used several times in a command line
  529. Example:
  530. .nf
  531. curl \-\-config file.txt https://example.com
  532. .fi
  533. See also \fI-q, \-\-disable\fP.
  534. .IP "\-\-connect\-timeout <fractional seconds>"
  535. Maximum time in seconds that you allow curl\(aqs connection to take. This only
  536. limits the connection phase, so if curl connects within the given period it
  537. continues \- if not it exits.
  538. This option accepts decimal values. The decimal value needs
  539. to be provided using a dot (.) as decimal separator \- not the local version
  540. even if it might be using another separator.
  541. The connection phase is considered complete when the DNS lookup and requested
  542. TCP, TLS or QUIC handshakes are done.
  543. If \fI\-\-connect\-timeout\fP is provided several times, the last set value is used.
  544. Examples:
  545. .nf
  546. curl \-\-connect\-timeout 20 https://example.com
  547. curl \-\-connect\-timeout 3.14 https://example.com
  548. .fi
  549. See also \fI-m, \-\-max\-time\fP.
  550. .IP "\-\-connect\-to <HOST1:PORT1:HOST2:PORT2>"
  551. For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead.
  552. This option is suitable to direct requests at a specific server, e.g. at a
  553. specific cluster node in a cluster of servers. This option is only used to
  554. establish the network connection. It does NOT affect the hostname/port that is
  555. used for TLS/SSL (e.g. SNI, certificate verification) or for the application
  556. protocols. "HOST1" and "PORT1" may be the empty string, meaning "any
  557. host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the
  558. request\(aqs original host/port".
  559. A "host" specified to this option is compared as a string, so it needs to
  560. match the name used in request URL. It can be either numerical such as
  561. \(dq127.0.0.1" or the full host name such as "example.org".
  562. \fI\-\-connect\-to\fP can be used several times in a command line
  563. Example:
  564. .nf
  565. curl \-\-connect\-to example.com:443:example.net:8443 https://example.com
  566. .fi
  567. See also \fI\-\-resolve\fP and \fI-H, \-\-header\fP.
  568. .IP "\-C, \-\-continue\-at <offset>"
  569. Continue/Resume a previous file transfer at the given offset. The given offset
  570. is the exact number of bytes that are skipped, counting from the beginning
  571. of the source file before it is transferred to the destination. If used with
  572. uploads, the FTP server command SIZE is not used by curl.
  573. Use "\-C \-" to tell curl to automatically find out where/how to resume the
  574. transfer. It then uses the given output/input files to figure that out.
  575. If \fI\-C, \-\-continue\-at\fP is provided several times, the last set value is used.
  576. Examples:
  577. .nf
  578. curl \-C \- https://example.com
  579. curl \-C 400 https://example.com
  580. .fi
  581. See also \fI-r, \-\-range\fP.
  582. .IP "\-c, \-\-cookie\-jar <filename>"
  583. (HTTP) Specify to which file you want curl to write all cookies after a completed
  584. operation. Curl writes all cookies from its in\-memory cookie storage to the
  585. given file at the end of operations. If no cookies are known, no data is
  586. written. The file is created using the Netscape cookie file format. If you set
  587. the file name to a single dash, "\-", the cookies are written to stdout.
  588. The file specified with \fI\-c, \-\-cookie\-jar\fP is only used for output. No cookies are
  589. read from the file. To read cookies, use the \fI\-b, \-\-cookie\fP option. Both options
  590. can specify the same file.
  591. This command line option activates the cookie engine that makes curl record
  592. and use cookies. The \fI\-b, \-\-cookie\fP option also activates it.
  593. If the cookie jar cannot be created or written to, the whole curl operation
  594. does not fail or even report an error clearly. Using \fI\-v, \-\-verbose\fP gets a warning
  595. displayed, but that is the only visible feedback you get about this possibly
  596. lethal situation.
  597. If \fI\-c, \-\-cookie\-jar\fP is provided several times, the last set value is used.
  598. Examples:
  599. .nf
  600. curl \-c store\-here.txt https://example.com
  601. curl \-c store\-here.txt \-b read\-these https://example.com
  602. .fi
  603. See also \fI-b, \-\-cookie\fP.
  604. .IP "\-b, \-\-cookie <data|filename>"
  605. (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly the
  606. data previously received from the server in a "Set\-Cookie:" line. The data
  607. should be in the format "NAME1=VALUE1; NAME2=VALUE2". This makes curl use the
  608. cookie header with this content explicitly in all outgoing request(s). If
  609. multiple requests are done due to authentication, followed redirects or
  610. similar, they all get this cookie passed on.
  611. If no \(aq=\(aq symbol is used in the argument, it is instead treated as a filename
  612. to read previously stored cookie from. This option also activates the cookie
  613. engine which makes curl record incoming cookies, which may be handy if you are
  614. using this in combination with the \fI\-L, \-\-location\fP option or do multiple URL
  615. transfers on the same invoke. If the file name is exactly a minus ("\-"), curl
  616. instead reads the contents from stdin.
  617. The file format of the file to read cookies from should be plain HTTP headers
  618. (Set\-Cookie style) or the Netscape/Mozilla cookie file format.
  619. The file specified with \fI\-b, \-\-cookie\fP is only used as input. No cookies are written
  620. to the file. To store cookies, use the \fI\-c, \-\-cookie\-jar\fP option.
  621. If you use the Set\-Cookie file format and do not specify a domain then the
  622. cookie is not sent since the domain never matches. To address this, set a
  623. domain in Set\-Cookie line (doing that includes subdomains) or preferably: use
  624. the Netscape format.
  625. Users often want to both read cookies from a file and write updated cookies
  626. back to a file, so using both \fI\-b, \-\-cookie\fP and \fI\-c, \-\-cookie\-jar\fP in the same command
  627. line is common.
  628. \fI\-b, \-\-cookie\fP can be used several times in a command line
  629. Examples:
  630. .nf
  631. curl \-b cookiefile https://example.com
  632. curl \-b cookiefile \-c cookiefile https://example.com
  633. .fi
  634. See also \fI-c, \-\-cookie\-jar\fP and \fI-j, \-\-junk\-session\-cookies\fP.
  635. .IP "\-\-create\-dirs"
  636. When used in conjunction with the \fI\-o, \-\-output\fP option, curl creates the necessary
  637. local directory hierarchy as needed. This option creates the directories
  638. mentioned with the \fI\-o, \-\-output\fP option combined with the path possibly set with
  639. \fI\-\-output\-dir\fP. If the combined output file name uses no directory, or if the
  640. directories it mentions already exist, no directories are created.
  641. Created directories are made with mode 0750 on unix style file systems.
  642. To create remote directories when using FTP or SFTP, try \fI\-\-ftp\-create\-dirs\fP.
  643. Providing \fI\-\-create\-dirs\fP multiple times has no extra effect.
  644. Disable it again with \-\-no\-create\-dirs.
  645. Example:
  646. .nf
  647. curl \-\-create\-dirs \-\-output local/dir/file https://example.com
  648. .fi
  649. See also \fI\-\-ftp\-create\-dirs\fP and \fI\-\-output\-dir\fP.
  650. .IP "\-\-create\-file\-mode <mode>"
  651. (SFTP SCP FILE) When curl is used to create files remotely using one of the supported
  652. protocols, this option allows the user to set which \(aqmode\(aq to set on the file
  653. at creation time, instead of the default 0644.
  654. This option takes an octal number as argument.
  655. If \fI\-\-create\-file\-mode\fP is provided several times, the last set value is used.
  656. Example:
  657. .nf
  658. curl \-\-create\-file\-mode 0777 \-T localfile sftp://example.com/new
  659. .fi
  660. See also \fI\-\-ftp\-create\-dirs\fP. Added in 7.75.0.
  661. .IP "\-\-crlf"
  662. (FTP SMTP) Convert line feeds to carriage return plus line feeds in upload. Useful for
  663. \fI\fPMVS (OS/390)\fI\fP.
  664. (SMTP added in 7.40.0)
  665. Providing \fI\-\-crlf\fP multiple times has no extra effect.
  666. Disable it again with \-\-no\-crlf.
  667. Example:
  668. .nf
  669. curl \-\-crlf \-T file ftp://example.com/
  670. .fi
  671. See also \fI-B, \-\-use\-ascii\fP.
  672. .IP "\-\-crlfile <file>"
  673. (TLS) Provide a file using PEM format with a Certificate Revocation List that may
  674. specify peer certificates that are to be considered revoked.
  675. If \fI\-\-crlfile\fP is provided several times, the last set value is used.
  676. Example:
  677. .nf
  678. curl \-\-crlfile rejects.txt https://example.com
  679. .fi
  680. See also \fI\-\-cacert\fP and \fI\-\-capath\fP.
  681. .IP "\-\-curves <algorithm list>"
  682. (TLS) Tells curl to request specific curves to use during SSL session establishment
  683. according to RFC 8422, 5.1. Multiple algorithms can be provided by separating
  684. them with ":" (e.g. "X25519:P\-521"). The parameter is available identically
  685. in the "openssl s_client/s_server" utilities.
  686. \fI\-\-curves\fP allows a OpenSSL powered curl to make SSL\-connections with exactly
  687. the (EC) curve requested by the client, avoiding nontransparent client/server
  688. negotiations.
  689. If this option is set, the default curves list built into OpenSSL are ignored.
  690. If \fI\-\-curves\fP is provided several times, the last set value is used.
  691. Example:
  692. .nf
  693. curl \-\-curves X25519 https://example.com
  694. .fi
  695. See also \fI\-\-ciphers\fP. Added in 7.73.0.
  696. .IP "\-\-data\-ascii <data>"
  697. (HTTP) This is just an alias for \fI\-d, \-\-data\fP.
  698. \fI\-\-data\-ascii\fP can be used several times in a command line
  699. Example:
  700. .nf
  701. curl \-\-data\-ascii @file https://example.com
  702. .fi
  703. See also \fI\-\-data\-binary\fP, \fI\-\-data\-raw\fP and \fI\-\-data\-urlencode\fP.
  704. .IP "\-\-data\-binary <data>"
  705. (HTTP) This posts data exactly as specified with no extra processing whatsoever.
  706. If you start the data with the letter @, the rest should be a filename. Data
  707. is posted in a similar manner as \fI\-d, \-\-data\fP does, except that newlines and
  708. carriage returns are preserved and conversions are never done.
  709. Like \fI\-d, \-\-data\fP the default content\-type sent to the server is
  710. application/x\-www\-form\-urlencoded. If you want the data to be treated as
  711. arbitrary binary data by the server then set the content\-type to octet\-stream:
  712. -H "Content\-Type: application/octet\-stream".
  713. If this option is used several times, the ones following the first append
  714. data as described in \fI\-d, \-\-data\fP.
  715. \fI\-\-data\-binary\fP can be used several times in a command line
  716. Example:
  717. .nf
  718. curl \-\-data\-binary @filename https://example.com
  719. .fi
  720. See also \fI\-\-data\-ascii\fP.
  721. .IP "\-\-data\-raw <data>"
  722. (HTTP) This posts data similarly to \fI\-d, \-\-data\fP but without the special
  723. interpretation of the @ character.
  724. \fI\-\-data\-raw\fP can be used several times in a command line
  725. Examples:
  726. .nf
  727. curl \-\-data\-raw "hello" https://example.com
  728. curl \-\-data\-raw "@at@at@" https://example.com
  729. .fi
  730. See also \fI-d, \-\-data\fP.
  731. .IP "\-\-data\-urlencode <data>"
  732. (HTTP) This posts data, similar to the other \fI\-d, \-\-data\fP options with the exception
  733. that this performs URL\-encoding.
  734. To be CGI\-compliant, the <data> part should begin with a \fIname\fP followed
  735. by a separator and a content specification. The <data> part can be passed to
  736. curl using one of the following syntaxes:
  737. .RS
  738. .IP "content"
  739. This makes curl URL\-encode the content and pass that on. Just be careful
  740. so that the content does not contain any = or @ symbols, as that makes
  741. the syntax match one of the other cases below!
  742. .IP "=content"
  743. This makes curl URL\-encode the content and pass that on. The preceding =
  744. symbol is not included in the data.
  745. .IP "name=content"
  746. This makes curl URL\-encode the content part and pass that on. Note that
  747. the name part is expected to be URL\-encoded already.
  748. .IP "@filename"
  749. This makes curl load data from the given file (including any newlines),
  750. URL\-encode that data and pass it on in the POST.
  751. .IP "name@filename"
  752. This makes curl load data from the given file (including any newlines),
  753. URL\-encode that data and pass it on in the POST. The name part gets an equal
  754. sign appended, resulting in \fIname=urlencoded\-file\-content\fP. Note that the
  755. name is expected to be URL\-encoded already.
  756. .RE
  757. .IP
  758. \fI\-\-data\-urlencode\fP can be used several times in a command line
  759. Examples:
  760. .nf
  761. curl \-\-data\-urlencode name=val https://example.com
  762. curl \-\-data\-urlencode =encodethis https://example.com
  763. curl \-\-data\-urlencode name@file https://example.com
  764. curl \-\-data\-urlencode @fileonly https://example.com
  765. .fi
  766. See also \fI-d, \-\-data\fP and \fI\-\-data\-raw\fP.
  767. .IP "\-d, \-\-data <data>"
  768. (HTTP MQTT) Sends the specified data in a POST request to the HTTP server, in the same way
  769. that a browser does when a user has filled in an HTML form and presses the
  770. submit button. This makes curl pass the data to the server using the
  771. content\-type application/x\-www\-form\-urlencoded. Compare to \fI\-F, \-\-form\fP.
  772. \fI\-\-data\-raw\fP is almost the same but does not have a special interpretation of
  773. the @ character. To post data purely binary, you should instead use the
  774. \fI\-\-data\-binary\fP option. To URL\-encode the value of a form field you may use
  775. \fI\-\-data\-urlencode\fP.
  776. If any of these options is used more than once on the same command line, the
  777. data pieces specified are merged with a separating &\-symbol. Thus, using
  778. \(aq\-d name=daniel \-d skill=lousy\(aq would generate a post chunk that looks like
  779. \(aqname=daniel&skill=lousy\(aq.
  780. If you start the data with the letter @, the rest should be a file name to
  781. read the data from, or \- if you want curl to read the data from stdin. Posting
  782. data from a file named \(aqfoobar\(aq would thus be done with \fI\-d, \-\-data\fP @foobar. When
  783. \fI\-d, \-\-data\fP is told to read from a file like that, carriage returns and newlines
  784. are stripped out. If you do not want the @ character to have a special
  785. interpretation use \fI\-\-data\-raw\fP instead.
  786. The data for this option is passed on to the server exactly as provided on the
  787. command line. curl does not convert, change or improve it. It is up to the
  788. user to provide the data in the correct form.
  789. \fI\-d, \-\-data\fP can be used several times in a command line
  790. Examples:
  791. .nf
  792. curl \-d "name=curl" https://example.com
  793. curl \-d "name=curl" \-d "tool=cmdline" https://example.com
  794. curl \-d @filename https://example.com
  795. .fi
  796. See also \fI\-\-data\-binary\fP, \fI\-\-data\-urlencode\fP and \fI\-\-data\-raw\fP. This option is mutually exclusive to \fI-F, \-\-form\fP and \fI-I, \-\-head\fP and \fI-T, \-\-upload\-file\fP.
  797. .IP "\-\-delegation <LEVEL>"
  798. (GSS/kerberos) Set LEVEL to tell the server what it is allowed to delegate when it
  799. comes to user credentials.
  800. .RS
  801. .IP "none"
  802. Do not allow any delegation.
  803. .IP "policy"
  804. Delegates if and only if the OK\-AS\-DELEGATE flag is set in the Kerberos
  805. service ticket, which is a matter of realm policy.
  806. .IP "always"
  807. Unconditionally allow the server to delegate.
  808. .RE
  809. .IP
  810. If \fI\-\-delegation\fP is provided several times, the last set value is used.
  811. Example:
  812. .nf
  813. curl \-\-delegation "none" https://example.com
  814. .fi
  815. See also \fI-k, \-\-insecure\fP and \fI\-\-ssl\fP.
  816. .IP "\-\-digest"
  817. (HTTP) Enables HTTP Digest authentication. This is an authentication scheme that
  818. prevents the password from being sent over the wire in clear text. Use this in
  819. combination with the normal \fI\-u, \-\-user\fP option to set user name and password.
  820. Providing \fI\-\-digest\fP multiple times has no extra effect.
  821. Disable it again with \-\-no\-digest.
  822. Example:
  823. .nf
  824. curl \-u name:password \-\-digest https://example.com
  825. .fi
  826. See also \fI-u, \-\-user\fP, \fI\-\-proxy\-digest\fP and \fI\-\-anyauth\fP. This option is mutually exclusive to \fI\-\-basic\fP and \fI\-\-ntlm\fP and \fI\-\-negotiate\fP.
  827. .IP "\-\-disable\-eprt"
  828. (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active
  829. FTP transfers. Curl normally first attempts to use EPRT before using PORT, but
  830. with this option, it uses PORT right away. EPRT is an extension to the
  831. original FTP protocol, and does not work on all servers, but enables more
  832. functionality in a better way than the traditional PORT command.
  833. -\-eprt can be used to explicitly enable EPRT again and \--no\-eprt is an alias
  834. for \fI\-\-disable\-eprt\fP.
  835. If the server is accessed using IPv6, this option has no effect as EPRT is
  836. necessary then.
  837. Disabling EPRT only changes the active behavior. If you want to switch to
  838. passive mode you need to not use \fI\-P, \-\-ftp\-port\fP or force it with \fI\-\-ftp\-pasv\fP.
  839. Providing \fI\-\-disable\-eprt\fP multiple times has no extra effect.
  840. Disable it again with \-\-no\-disable\-eprt.
  841. Example:
  842. .nf
  843. curl \-\-disable\-eprt ftp://example.com/
  844. .fi
  845. See also \fI\-\-disable\-epsv\fP and \fI-P, \-\-ftp\-port\fP.
  846. .IP "\-\-disable\-epsv"
  847. (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
  848. transfers. Curl normally first attempts to use EPSV before PASV, but with this
  849. option, it does not try EPSV.
  850. -\-epsv can be used to explicitly enable EPSV again and \--no\-epsv is an alias
  851. for \fI\-\-disable\-epsv\fP.
  852. If the server is an IPv6 host, this option has no effect as EPSV is necessary
  853. then.
  854. Disabling EPSV only changes the passive behavior. If you want to switch to
  855. active mode you need to use \fI\-P, \-\-ftp\-port\fP.
  856. Providing \fI\-\-disable\-epsv\fP multiple times has no extra effect.
  857. Disable it again with \-\-no\-disable\-epsv.
  858. Example:
  859. .nf
  860. curl \-\-disable\-epsv ftp://example.com/
  861. .fi
  862. See also \fI\-\-disable\-eprt\fP and \fI-P, \-\-ftp\-port\fP.
  863. .IP "\-q, \-\-disable"
  864. If used as the \fBfirst\fP parameter on the command line, the \fIcurlrc\fP config
  865. file is not read or used. See the \fI\-K, \-\-config\fP for details on the default config
  866. file search path.
  867. Prior to 7.50.0 curl supported the short option name \fIq\fP but not the long
  868. option name \fIdisable\fP.
  869. Providing \fI\-q, \-\-disable\fP multiple times has no extra effect.
  870. Disable it again with \-\-no\-disable.
  871. Example:
  872. .nf
  873. curl \-q https://example.com
  874. .fi
  875. See also \fI-K, \-\-config\fP.
  876. .IP "\-\-disallow\-username\-in\-url"
  877. (HTTP) This tells curl to exit if passed a URL containing a username. This is probably
  878. most useful when the URL is being provided at runtime or similar.
  879. Providing \fI\-\-disallow\-username\-in\-url\fP multiple times has no extra effect.
  880. Disable it again with \-\-no\-disallow\-username\-in\-url.
  881. Example:
  882. .nf
  883. curl \-\-disallow\-username\-in\-url https://example.com
  884. .fi
  885. See also \fI\-\-proto\fP. Added in 7.61.0.
  886. .IP "\-\-dns\-interface <interface>"
  887. (DNS) Tell curl to send outgoing DNS requests through <interface>. This option is a
  888. counterpart to \fI\-\-interface\fP (which does not affect DNS). The supplied string
  889. must be an interface name (not an address).
  890. If \fI\-\-dns\-interface\fP is provided several times, the last set value is used.
  891. Example:
  892. .nf
  893. curl \-\-dns\-interface eth0 https://example.com
  894. .fi
  895. See also \fI\-\-dns\-ipv4\-addr\fP and \fI\-\-dns\-ipv6\-addr\fP. \fI\-\-dns\-interface\fP requires that the underlying libcurl was built to support c-ares.
  896. .IP "\-\-dns\-ipv4\-addr <address>"
  897. (DNS) Tell curl to bind to a specific IP address when making IPv4 DNS requests, so
  898. that the DNS requests originate from this address. The argument should be a
  899. single IPv4 address.
  900. If \fI\-\-dns\-ipv4\-addr\fP is provided several times, the last set value is used.
  901. Example:
  902. .nf
  903. curl \-\-dns\-ipv4\-addr 10.1.2.3 https://example.com
  904. .fi
  905. See also \fI\-\-dns\-interface\fP and \fI\-\-dns\-ipv6\-addr\fP. \fI\-\-dns\-ipv4\-addr\fP requires that the underlying libcurl was built to support c-ares.
  906. .IP "\-\-dns\-ipv6\-addr <address>"
  907. (DNS) Tell curl to bind to a specific IP address when making IPv6 DNS requests, so
  908. that the DNS requests originate from this address. The argument should be a
  909. single IPv6 address.
  910. If \fI\-\-dns\-ipv6\-addr\fP is provided several times, the last set value is used.
  911. Example:
  912. .nf
  913. curl \-\-dns\-ipv6\-addr 2a04:4e42::561 https://example.com
  914. .fi
  915. See also \fI\-\-dns\-interface\fP and \fI\-\-dns\-ipv4\-addr\fP. \fI\-\-dns\-ipv6\-addr\fP requires that the underlying libcurl was built to support c-ares.
  916. .IP "\-\-dns\-servers <addresses>"
  917. Set the list of DNS servers to be used instead of the system default.
  918. The list of IP addresses should be separated with commas. Port numbers
  919. may also optionally be given as \fI:<port\-number>\fP after each IP
  920. address.
  921. If \fI\-\-dns\-servers\fP is provided several times, the last set value is used.
  922. Example:
  923. .nf
  924. curl \-\-dns\-servers 192.168.0.1,192.168.0.2 https://example.com
  925. .fi
  926. See also \fI\-\-dns\-interface\fP and \fI\-\-dns\-ipv4\-addr\fP. \fI\-\-dns\-servers\fP requires that the underlying libcurl was built to support c-ares.
  927. .IP "\-\-doh\-cert\-status"
  928. Same as \fI\-\-cert\-status\fP but used for DoH (DNS\-over\-HTTPS).
  929. Providing \fI\-\-doh\-cert\-status\fP multiple times has no extra effect.
  930. Disable it again with \-\-no\-doh\-cert\-status.
  931. Example:
  932. .nf
  933. curl \-\-doh\-cert\-status \-\-doh\-url https://doh.example https://example.com
  934. .fi
  935. See also \fI\-\-doh\-insecure\fP. Added in 7.76.0.
  936. .IP "\-\-doh\-insecure"
  937. Same as \fI\-k, \-\-insecure\fP but used for DoH (DNS\-over\-HTTPS).
  938. Providing \fI\-\-doh\-insecure\fP multiple times has no extra effect.
  939. Disable it again with \-\-no\-doh\-insecure.
  940. Example:
  941. .nf
  942. curl \-\-doh\-insecure \-\-doh\-url https://doh.example https://example.com
  943. .fi
  944. See also \fI\-\-doh\-url\fP. Added in 7.76.0.
  945. .IP "\-\-doh\-url <URL>"
  946. Specifies which DNS\-over\-HTTPS (DoH) server to use to resolve hostnames,
  947. instead of using the default name resolver mechanism. The URL must be HTTPS.
  948. Some SSL options that you set for your transfer also applies to DoH since the
  949. name lookups take place over SSL. However, the certificate verification
  950. settings are not inherited but are controlled separately via \fI\-\-doh\-insecure\fP
  951. and \fI\-\-doh\-cert\-status\fP.
  952. This option is unset if an empty string "" is used as the URL.
  953. (Added in 7.85.0)
  954. If \fI\-\-doh\-url\fP is provided several times, the last set value is used.
  955. Example:
  956. .nf
  957. curl \-\-doh\-url https://doh.example https://example.com
  958. .fi
  959. See also \fI\-\-doh\-insecure\fP. Added in 7.62.0.
  960. .IP "\-D, \-\-dump\-header <filename>"
  961. (HTTP FTP) Write the received protocol headers to the specified file. If no headers are
  962. received, the use of this option creates an empty file.
  963. When used in FTP, the FTP server response lines are considered being "headers"
  964. and thus are saved there.
  965. Having multiple transfers in one set of operations (i.e. the URLs in one
  966. \fI\-:, \-\-next\fP clause), appends them to the same file, separated by a blank line.
  967. If \fI\-D, \-\-dump\-header\fP is provided several times, the last set value is used.
  968. Example:
  969. .nf
  970. curl \-\-dump\-header store.txt https://example.com
  971. .fi
  972. See also \fI-o, \-\-output\fP.
  973. .IP "\-\-egd\-file <file>"
  974. (TLS) Deprecated option (added in 7.84.0). Prior to that it only had an effect on
  975. curl if built to use old versions of OpenSSL.
  976. Specify the path name to the Entropy Gathering Daemon socket. The socket is
  977. used to seed the random engine for SSL connections.
  978. If \fI\-\-egd\-file\fP is provided several times, the last set value is used.
  979. Example:
  980. .nf
  981. curl \-\-egd\-file /random/here https://example.com
  982. .fi
  983. See also \fI\-\-random\-file\fP.
  984. .IP "\-\-engine <name>"
  985. (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI\-\-engine\fP
  986. list to print a list of build\-time supported engines. Note that not all (and
  987. possibly none) of the engines may be available at runtime.
  988. If \fI\-\-engine\fP is provided several times, the last set value is used.
  989. Example:
  990. .nf
  991. curl \-\-engine flavor https://example.com
  992. .fi
  993. See also \fI\-\-ciphers\fP and \fI\-\-curves\fP.
  994. .IP "\-\-etag\-compare <file>"
  995. (HTTP) This option makes a conditional HTTP request for the specific ETag read
  996. from the given file by sending a custom If\-None\-Match header using the
  997. stored ETag.
  998. For correct results, make sure that the specified file contains only a
  999. single line with the desired ETag. An empty file is parsed as an empty
  1000. ETag.
  1001. Use the option \fI\-\-etag\-save\fP to first save the ETag from a response, and
  1002. then use this option to compare against the saved ETag in a subsequent
  1003. request.
  1004. If \fI\-\-etag\-compare\fP is provided several times, the last set value is used.
  1005. Example:
  1006. .nf
  1007. curl \-\-etag\-compare etag.txt https://example.com
  1008. .fi
  1009. See also \fI\-\-etag\-save\fP and \fI-z, \-\-time\-cond\fP. Added in 7.68.0.
  1010. .IP "\-\-etag\-save <file>"
  1011. (HTTP) This option saves an HTTP ETag to the specified file. An ETag is a
  1012. caching related header, usually returned in a response.
  1013. If no ETag is sent by the server, an empty file is created.
  1014. If \fI\-\-etag\-save\fP is provided several times, the last set value is used.
  1015. Example:
  1016. .nf
  1017. curl \-\-etag\-save storetag.txt https://example.com
  1018. .fi
  1019. See also \fI\-\-etag\-compare\fP. Added in 7.68.0.
  1020. .IP "\-\-expect100\-timeout <seconds>"
  1021. (HTTP) Maximum time in seconds that you allow curl to wait for a 100\-continue
  1022. response when curl emits an Expects: 100\-continue header in its request. By
  1023. default curl waits one second. This option accepts decimal values! When
  1024. curl stops waiting, it continues as if the response has been received.
  1025. The decimal value needs to provided using a dot (.) as decimal separator \- not
  1026. the local version even if it might be using another separator.
  1027. If \fI\-\-expect100\-timeout\fP is provided several times, the last set value is used.
  1028. Example:
  1029. .nf
  1030. curl \-\-expect100\-timeout 2.5 \-T file https://example.com
  1031. .fi
  1032. See also \fI\-\-connect\-timeout\fP.
  1033. .IP "\-\-fail\-early"
  1034. Fail and exit on the first detected transfer error.
  1035. When curl is used to do multiple transfers on the command line, it attempts to
  1036. operate on each given URL, one by one. By default, it ignores errors if there
  1037. are more URLs given and the last URL\(aqs success determines the error code curl
  1038. returns. So early failures are "hidden" by subsequent successful transfers.
  1039. Using this option, curl instead returns an error on the first transfer that
  1040. fails, independent of the amount of URLs that are given on the command
  1041. line. This way, no transfer failures go undetected by scripts and similar.
  1042. This option does not imply \fI\-f, \-\-fail\fP, which causes transfers to fail due to the
  1043. server\(aqs HTTP status code. You can combine the two options, however note \fI\-f, \-\-fail\fP
  1044. is not global and is therefore contained by \fI\-:, \-\-next\fP.
  1045. This option is global and does not need to be specified for each use of --next.
  1046. Providing \fI\-\-fail\-early\fP multiple times has no extra effect.
  1047. Disable it again with \-\-no\-fail\-early.
  1048. Example:
  1049. .nf
  1050. curl \-\-fail\-early https://example.com https://two.example
  1051. .fi
  1052. See also \fI-f, \-\-fail\fP and \fI\-\-fail\-with\-body\fP. Added in 7.52.0.
  1053. .IP "\-\-fail\-with\-body"
  1054. (HTTP) Return an error on server errors where the HTTP response code is 400 or
  1055. greater). In normal cases when an HTTP server fails to deliver a document, it
  1056. returns an HTML document stating so (which often also describes why and
  1057. more). This flag allows curl to output and save that content but also to
  1058. return error 22.
  1059. This is an alternative option to \fI\-f, \-\-fail\fP which makes curl fail for the same
  1060. circumstances but without saving the content.
  1061. Providing \fI\-\-fail\-with\-body\fP multiple times has no extra effect.
  1062. Disable it again with \-\-no\-fail\-with\-body.
  1063. Example:
  1064. .nf
  1065. curl \-\-fail\-with\-body https://example.com
  1066. .fi
  1067. See also \fI-f, \-\-fail\fP and \fI\-\-fail\-early\fP. This option is mutually exclusive to \fI-f, \-\-fail\fP. Added in 7.76.0.
  1068. .IP "\-f, \-\-fail"
  1069. (HTTP) Fail fast with no output at all on server errors. This is useful to enable
  1070. scripts and users to better deal with failed attempts. In normal cases when an
  1071. HTTP server fails to deliver a document, it returns an HTML document stating
  1072. so (which often also describes why and more). This flag prevents curl from
  1073. outputting that and return error 22.
  1074. This method is not fail\-safe and there are occasions where non\-successful
  1075. response codes slip through, especially when authentication is involved
  1076. (response codes 401 and 407).
  1077. Providing \fI\-f, \-\-fail\fP multiple times has no extra effect.
  1078. Disable it again with \-\-no\-fail.
  1079. Example:
  1080. .nf
  1081. curl \-\-fail https://example.com
  1082. .fi
  1083. See also \fI\-\-fail\-with\-body\fP and \fI\-\-fail\-early\fP. This option is mutually exclusive to \fI\-\-fail\-with\-body\fP.
  1084. .IP "\-\-false\-start"
  1085. (TLS) Tells curl to use false start during the TLS handshake. False start is a mode
  1086. where a TLS client starts sending application data before verifying the
  1087. server\(aqs Finished message, thus saving a round trip when performing a full
  1088. handshake.
  1089. This is currently only implemented in the Secure Transport (on iOS 7.0 or
  1090. later, or OS X 10.9 or later) backend.
  1091. Providing \fI\-\-false\-start\fP multiple times has no extra effect.
  1092. Disable it again with \-\-no\-false\-start.
  1093. Example:
  1094. .nf
  1095. curl \-\-false\-start https://example.com
  1096. .fi
  1097. See also \fI\-\-tcp\-fastopen\fP.
  1098. .IP "\-\-form\-escape"
  1099. (HTTP) Tells curl to pass on names of multipart form fields and files using
  1100. backslash\-escaping instead of percent\-encoding.
  1101. If \fI\-\-form\-escape\fP is provided several times, the last set value is used.
  1102. Example:
  1103. .nf
  1104. curl \-\-form\-escape \-F \(aqfield\\name=curl\(aq \-F \(aqfile=@load"this\(aq https://example.com
  1105. .fi
  1106. See also \fI-F, \-\-form\fP. Added in 7.81.0.
  1107. .IP "\-\-form\-string <name=string>"
  1108. (HTTP SMTP IMAP) Similar to \fI\-F, \-\-form\fP except that the value string for the named parameter is used
  1109. literally. Leading \(aq@\(aq and \(aq<\(aq characters, and the \(aq;type=\(aq string in
  1110. the value have no special meaning. Use this in preference to \fI\-F, \-\-form\fP if
  1111. there is any possibility that the string value may accidentally trigger the
  1112. \(aq@\(aq or \(aq<\(aq features of \fI\-F, \-\-form\fP.
  1113. \fI\-\-form\-string\fP can be used several times in a command line
  1114. Example:
  1115. .nf
  1116. curl \-\-form\-string "data" https://example.com
  1117. .fi
  1118. See also \fI-F, \-\-form\fP.
  1119. .IP "\-F, \-\-form <name=content>"
  1120. (HTTP SMTP IMAP) For HTTP protocol family, this lets curl emulate a filled\-in form in which a
  1121. user has pressed the submit button. This causes curl to POST data using the
  1122. Content\-Type multipart/form\-data according to RFC 2388.
  1123. For SMTP and IMAP protocols, this is the means to compose a multipart mail
  1124. message to transmit.
  1125. This enables uploading of binary files etc. To force the \(aqcontent\(aq part to be
  1126. a file, prefix the file name with an @ sign. To just get the content part from
  1127. a file, prefix the file name with the symbol <. The difference between @ and <
  1128. is then that @ makes a file get attached in the post as a file upload, while
  1129. the < makes a text field and just get the contents for that text field from a
  1130. file.
  1131. Tell curl to read content from stdin instead of a file by using \- as
  1132. filename. This goes for both @ and < constructs. When stdin is used, the
  1133. contents is buffered in memory first by curl to determine its size and allow a
  1134. possible resend. Defining a part\(aqs data from a named non\-regular file (such as
  1135. a named pipe or similar) is not subject to buffering and is instead read at
  1136. transmission time; since the full size is unknown before the transfer starts,
  1137. such data is sent as chunks by HTTP and rejected by IMAP.
  1138. Example: send an image to an HTTP server, where \(aqprofile\(aq is the name of the
  1139. form\-field to which the file \fBportrait.jpg\fP is the input:
  1140. .nf
  1141. curl \-F profile=@portrait.jpg https://example.com/upload.cgi
  1142. .fi
  1143. Example: send your name and shoe size in two text fields to the server:
  1144. .nf
  1145. curl \-F name=John \-F shoesize=11 https://example.com/
  1146. .fi
  1147. Example: send your essay in a text field to the server. Send it as a plain
  1148. text field, but get the contents for it from a local file:
  1149. .nf
  1150. curl \-F "story=<hugefile.txt" https://example.com/
  1151. .fi
  1152. You can also tell curl what Content\-Type to use by using \(aqtype=\(aq, in a manner
  1153. similar to:
  1154. .nf
  1155. curl \-F "web=@index.html;type=text/html" example.com
  1156. .fi
  1157. or
  1158. .nf
  1159. curl \-F "name=daniel;type=text/foo" example.com
  1160. .fi
  1161. You can also explicitly change the name field of a file upload part by setting
  1162. filename=, like this:
  1163. .nf
  1164. curl \-F "file=@localfile;filename=nameinpost" example.com
  1165. .fi
  1166. If filename/path contains \(aq,\(aq or \(aq;\(aq, it must be quoted by double\-quotes like:
  1167. .nf
  1168. curl \-F "file=@\\"local,file\\";filename=\\"name;in;post\\"" example.com
  1169. .fi
  1170. or
  1171. .nf
  1172. curl \-F \(aqfile=@"local,file";filename="name;in;post"\(aq example.com
  1173. .fi
  1174. Note that if a filename/path is quoted by double\-quotes, any double\-quote
  1175. or backslash within the filename must be escaped by backslash.
  1176. Quoting must also be applied to non\-file data if it contains semicolons,
  1177. leading/trailing spaces or leading double quotes:
  1178. .nf
  1179. curl \-F \(aqcolors="red; green; blue";type=text/x\-myapp\(aq example.com
  1180. .fi
  1181. You can add custom headers to the field by setting headers=, like
  1182. .nf
  1183. curl \-F "submit=OK;headers=\\"X\-submit\-type: OK\\"" example.com
  1184. .fi
  1185. or
  1186. .nf
  1187. curl \-F "submit=OK;headers=@headerfile" example.com
  1188. .fi
  1189. The headers= keyword may appear more that once and above notes about quoting
  1190. apply. When headers are read from a file, Empty lines and lines starting
  1191. with \(aq#\(aq are comments and ignored; each header can be folded by splitting
  1192. between two words and starting the continuation line with a space; embedded
  1193. carriage\-returns and trailing spaces are stripped.
  1194. Here is an example of a header file contents:
  1195. .nf
  1196. # This file contain two headers.
  1197. X\-header\-1: this is a header
  1198. .fi
  1199. .nf
  1200. # The following header is folded.
  1201. X\-header\-2: this is
  1202. another header
  1203. .fi
  1204. To support sending multipart mail messages, the syntax is extended as follows:
  1205. .br
  1206. - name can be omitted: the equal sign is the first character of the argument,
  1207. .br
  1208. - if data starts with \(aq(\(aq, this signals to start a new multipart: it can be
  1209. followed by a content type specification.
  1210. .br
  1211. - a multipart can be terminated with a \(aq=)\(aq argument.
  1212. Example: the following command sends an SMTP mime email consisting in an
  1213. inline part in two alternative formats: plain text and HTML. It attaches a
  1214. text file:
  1215. .nf
  1216. curl \-F \(aq=(;type=multipart/alternative\(aq \\
  1217. \-F \(aq=plain text message\(aq \\
  1218. \-F \(aq= <body>HTML message</body>;type=text/html\(aq \\
  1219. \-F \(aq=)\(aq \-F \(aq=@textfile.txt\(aq ... smtp://example.com
  1220. .fi
  1221. Data can be encoded for transfer using encoder=. Available encodings are
  1222. \fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding
  1223. Content\-Transfer\-Encoding header, \fI7bit\fP that only rejects 8\-bit characters
  1224. with a transfer error, \fIquoted\-printable\fP and \fIbase64\fP that encodes data
  1225. according to the corresponding schemes, limiting lines length to 76
  1226. characters.
  1227. Example: send multipart mail with a quoted\-printable text message and a
  1228. base64 attached file:
  1229. .nf
  1230. curl \-F \(aq=text message;encoder=quoted\-printable\(aq \\
  1231. \-F \(aq=@localfile;encoder=base64\(aq ... smtp://example.com
  1232. .fi
  1233. See further examples and details in the MANUAL.
  1234. \fI\-F, \-\-form\fP can be used several times in a command line
  1235. Example:
  1236. .nf
  1237. curl \-\-form "name=curl" \-\-form "file=@loadthis" https://example.com
  1238. .fi
  1239. See also \fI-d, \-\-data\fP, \fI\-\-form\-string\fP and \fI\-\-form\-escape\fP. This option is mutually exclusive to \fI-d, \-\-data\fP and \fI-I, \-\-head\fP and \fI-T, \-\-upload\-file\fP.
  1240. .IP "\-\-ftp\-account <data>"
  1241. (FTP) When an FTP server asks for "account data" after user name and password has
  1242. been provided, this data is sent off using the ACCT command.
  1243. If \fI\-\-ftp\-account\fP is provided several times, the last set value is used.
  1244. Example:
  1245. .nf
  1246. curl \-\-ftp\-account "mr.robot" ftp://example.com/
  1247. .fi
  1248. See also \fI-u, \-\-user\fP.
  1249. .IP "\-\-ftp\-alternative\-to\-user <command>"
  1250. (FTP) If authenticating with the USER and PASS commands fails, send this command.
  1251. When connecting to Tumbleweed\(aqs Secure Transport server over FTPS using a
  1252. client certificate, using "SITE AUTH" tells the server to retrieve the
  1253. username from the certificate.
  1254. If \fI\-\-ftp\-alternative\-to\-user\fP is provided several times, the last set value is used.
  1255. Example:
  1256. .nf
  1257. curl \-\-ftp\-alternative\-to\-user "U53r" ftp://example.com
  1258. .fi
  1259. See also \fI\-\-ftp\-account\fP and \fI-u, \-\-user\fP.
  1260. .IP "\-\-ftp\-create\-dirs"
  1261. (FTP SFTP) When an FTP or SFTP URL/operation uses a path that does not currently exist on
  1262. the server, the standard behavior of curl is to fail. Using this option, curl
  1263. instead attempts to create missing directories.
  1264. Providing \fI\-\-ftp\-create\-dirs\fP multiple times has no extra effect.
  1265. Disable it again with \-\-no\-ftp\-create\-dirs.
  1266. Example:
  1267. .nf
  1268. curl \-\-ftp\-create\-dirs \-T file ftp://example.com/remote/path/file
  1269. .fi
  1270. See also \fI\-\-create\-dirs\fP.
  1271. .IP "\-\-ftp\-method <method>"
  1272. (FTP) Control what method curl should use to reach a file on an FTP(S)
  1273. server. The method argument should be one of the following alternatives:
  1274. .RS
  1275. .IP multicwd
  1276. curl does a single CWD operation for each path part in the given URL. For deep
  1277. hierarchies this means many commands. This is how RFC 1738 says it should
  1278. be done. This is the default but the slowest behavior.
  1279. .IP nocwd
  1280. curl does no CWD at all. curl does SIZE, RETR, STOR etc and give a full
  1281. path to the server for all these commands. This is the fastest behavior.
  1282. .IP singlecwd
  1283. curl does one CWD with the full target directory and then operates on the file
  1284. \(dqnormally" (like in the multicwd case). This is somewhat more standards
  1285. compliant than \(aqnocwd\(aq but without the full penalty of \(aqmulticwd\(aq.
  1286. .RE
  1287. .IP
  1288. If \fI\-\-ftp\-method\fP is provided several times, the last set value is used.
  1289. Examples:
  1290. .nf
  1291. curl \-\-ftp\-method multicwd ftp://example.com/dir1/dir2/file
  1292. curl \-\-ftp\-method nocwd ftp://example.com/dir1/dir2/file
  1293. curl \-\-ftp\-method singlecwd ftp://example.com/dir1/dir2/file
  1294. .fi
  1295. See also \fI-l, \-\-list\-only\fP.
  1296. .IP "\-\-ftp\-pasv"
  1297. (FTP) Use passive mode for the data connection. Passive is the internal default
  1298. behavior, but using this option can be used to override a previous \fI\-P, \-\-ftp\-port\fP
  1299. option.
  1300. Reversing an enforced passive really is not doable but you must then instead
  1301. enforce the correct \fI\-P, \-\-ftp\-port\fP again.
  1302. Passive mode means that curl tries the EPSV command first and then PASV,
  1303. unless \fI\-\-disable\-epsv\fP is used.
  1304. Providing \fI\-\-ftp\-pasv\fP multiple times has no extra effect.
  1305. Disable it again with \-\-no\-ftp\-pasv.
  1306. Example:
  1307. .nf
  1308. curl \-\-ftp\-pasv ftp://example.com/
  1309. .fi
  1310. See also \fI\-\-disable\-epsv\fP.
  1311. .IP "\-P, \-\-ftp\-port <address>"
  1312. (FTP) Reverses the default initiator/listener roles when connecting with FTP. This
  1313. option makes curl use active mode. curl then tells the server to connect back
  1314. to the client\(aqs specified address and port, while passive mode asks the server
  1315. to setup an IP address and port for it to connect to. <address> should be one
  1316. of:
  1317. .RS
  1318. .IP interface
  1319. e.g. "eth0" to specify which interface\(aqs IP address you want to use (Unix only)
  1320. .IP "IP address"
  1321. e.g. "192.168.10.1" to specify the exact IP address
  1322. .IP "host name"
  1323. e.g. "my.host.domain" to specify the machine
  1324. .IP "\-"
  1325. make curl pick the same IP address that is already used for the control
  1326. connection
  1327. .RE
  1328. .IP
  1329. Disable the use of PORT with \fI\-\-ftp\-pasv\fP. Disable the attempt to use the EPRT
  1330. command instead of PORT by using \fI\-\-disable\-eprt\fP. EPRT is really PORT++.
  1331. You can also append ":[start]\-[end]\&" to the right of the address, to tell
  1332. curl what TCP port range to use. That means you specify a port range, from a
  1333. lower to a higher number. A single number works as well, but do note that it
  1334. increases the risk of failure since the port may not be available.
  1335. If \fI\-P, \-\-ftp\-port\fP is provided several times, the last set value is used.
  1336. Examples:
  1337. .nf
  1338. curl \-P \- ftp:/example.com
  1339. curl \-P eth0 ftp:/example.com
  1340. curl \-P 192.168.0.2 ftp:/example.com
  1341. .fi
  1342. See also \fI\-\-ftp\-pasv\fP and \fI\-\-disable\-eprt\fP.
  1343. .IP "\-\-ftp\-pret"
  1344. (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers,
  1345. mainly drftpd, require this non\-standard command for directory listings as
  1346. well as up and downloads in PASV mode.
  1347. Providing \fI\-\-ftp\-pret\fP multiple times has no extra effect.
  1348. Disable it again with \-\-no\-ftp\-pret.
  1349. Example:
  1350. .nf
  1351. curl \-\-ftp\-pret ftp://example.com/
  1352. .fi
  1353. See also \fI-P, \-\-ftp\-port\fP and \fI\-\-ftp\-pasv\fP.
  1354. .IP "\-\-ftp\-skip\-pasv\-ip"
  1355. (FTP) Tell curl to not use the IP address the server suggests in its response to
  1356. curl\(aqs PASV command when curl connects the data connection. Instead curl
  1357. reuses the same IP address it already uses for the control connection.
  1358. This option is enabled by default (added in 7.74.0).
  1359. This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
  1360. Providing \fI\-\-ftp\-skip\-pasv\-ip\fP multiple times has no extra effect.
  1361. Disable it again with \-\-no\-ftp\-skip\-pasv\-ip.
  1362. Example:
  1363. .nf
  1364. curl \-\-ftp\-skip\-pasv\-ip ftp://example.com/
  1365. .fi
  1366. See also \fI\-\-ftp\-pasv\fP.
  1367. .IP "\-\-ftp\-ssl\-ccc\-mode <active/passive>"
  1368. (FTP) Sets the CCC mode. The passive mode does not initiate the shutdown, but
  1369. instead waits for the server to do it, and does not reply to the shutdown from
  1370. the server. The active mode initiates the shutdown and waits for a reply from
  1371. the server.
  1372. Providing \fI\-\-ftp\-ssl\-ccc\-mode\fP multiple times has no extra effect.
  1373. Disable it again with \-\-no\-ftp\-ssl\-ccc\-mode.
  1374. Example:
  1375. .nf
  1376. curl \-\-ftp\-ssl\-ccc\-mode active \-\-ftp\-ssl\-ccc ftps://example.com/
  1377. .fi
  1378. See also \fI\-\-ftp\-ssl\-ccc\fP.
  1379. .IP "\-\-ftp\-ssl\-ccc"
  1380. (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after
  1381. authenticating. The rest of the control channel communication is be
  1382. unencrypted. This allows NAT routers to follow the FTP transaction. The
  1383. default mode is passive.
  1384. Providing \fI\-\-ftp\-ssl\-ccc\fP multiple times has no extra effect.
  1385. Disable it again with \-\-no\-ftp\-ssl\-ccc.
  1386. Example:
  1387. .nf
  1388. curl \-\-ftp\-ssl\-ccc ftps://example.com/
  1389. .fi
  1390. See also \fI\-\-ssl\fP and \fI\-\-ftp\-ssl\-ccc\-mode\fP.
  1391. .IP "\-\-ftp\-ssl\-control"
  1392. (FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
  1393. authentication, but non\-encrypted data transfers for efficiency. Fails the
  1394. transfer if the server does not support SSL/TLS.
  1395. Providing \fI\-\-ftp\-ssl\-control\fP multiple times has no extra effect.
  1396. Disable it again with \-\-no\-ftp\-ssl\-control.
  1397. Example:
  1398. .nf
  1399. curl \-\-ftp\-ssl\-control ftp://example.com
  1400. .fi
  1401. See also \fI\-\-ssl\fP.
  1402. .IP "\-G, \-\-get"
  1403. When used, this option makes all data specified with \fI\-d, \-\-data\fP, \fI\-\-data\-binary\fP
  1404. or \fI\-\-data\-urlencode\fP to be used in an HTTP GET request instead of the POST
  1405. request that otherwise would be used. The data is appended to the URL
  1406. with a \(aq?\(aq separator.
  1407. If used in combination with \fI\-I, \-\-head\fP, the POST data is instead appended to the
  1408. URL with a HEAD request.
  1409. Providing \fI\-G, \-\-get\fP multiple times has no extra effect.
  1410. Disable it again with \-\-no\-get.
  1411. Examples:
  1412. .nf
  1413. curl \-\-get https://example.com
  1414. curl \-\-get \-d "tool=curl" \-d "age=old" https://example.com
  1415. curl \-\-get \-I \-d "tool=curl" https://example.com
  1416. .fi
  1417. See also \fI-d, \-\-data\fP and \fI-X, \-\-request\fP.
  1418. .IP "\-g, \-\-globoff"
  1419. This option switches off the "URL globbing parser". When you set this option,
  1420. you can specify URLs that contain the letters {}[] without having curl itself
  1421. interpret them. Note that these letters are not normal legal URL contents but
  1422. they should be encoded according to the URI standard.
  1423. Providing \fI\-g, \-\-globoff\fP multiple times has no extra effect.
  1424. Disable it again with \-\-no\-globoff.
  1425. Example:
  1426. .nf
  1427. curl \-g "https://example.com/{[]}}}}"
  1428. .fi
  1429. See also \fI-K, \-\-config\fP and \fI-q, \-\-disable\fP.
  1430. .IP "\-\-happy\-eyeballs\-timeout\-ms <milliseconds>"
  1431. Happy Eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6
  1432. addresses for dual\-stack hosts, giving IPv6 a head\-start of the specified
  1433. number of milliseconds. If the IPv6 address cannot be connected to within that
  1434. time, then a connection attempt is made to the IPv4 address in parallel. The
  1435. first connection to be established is the one that is used.
  1436. The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says
  1437. \(dqIt is RECOMMENDED that connection attempts be paced 150\-250 ms apart to
  1438. balance human factors against network load." libcurl currently defaults to
  1439. 200 ms. Firefox and Chrome currently default to 300 ms.
  1440. If \fI\-\-happy\-eyeballs\-timeout\-ms\fP is provided several times, the last set value is used.
  1441. Example:
  1442. .nf
  1443. curl \-\-happy\-eyeballs\-timeout\-ms 500 https://example.com
  1444. .fi
  1445. See also \fI-m, \-\-max\-time\fP and \fI\-\-connect\-timeout\fP. Added in 7.59.0.
  1446. .IP "\-\-haproxy\-clientip"
  1447. (HTTP) Sets a client IP in HAProxy PROXY protocol v1 header at the beginning of the
  1448. connection.
  1449. For valid requests, IPv4 addresses must be indicated as a series of exactly
  1450. 4 integers in the range [0..255] inclusive written in decimal representation
  1451. separated by exactly one dot between each other. Heading zeroes are not
  1452. permitted in front of numbers in order to avoid any possible confusion
  1453. with octal numbers. IPv6 addresses must be indicated as series of 4 hexadecimal
  1454. digits (upper or lower case) delimited by colons between each other, with the
  1455. acceptance of one double colon sequence to replace the largest acceptable range
  1456. of consecutive zeroes. The total number of decoded bits must exactly be 128.
  1457. Otherwise, any string can be accepted for the client IP and get sent.
  1458. It replaces \fI\-\-haproxy\-protocol\fP if used, it is not necessary to specify both flags.
  1459. This option is primarily useful when sending test requests to
  1460. verify a service is working as intended.
  1461. If \fI\-\-haproxy\-clientip\fP is provided several times, the last set value is used.
  1462. Example:
  1463. .nf
  1464. curl \-\-haproxy\-clientip $IP
  1465. .fi
  1466. See also \fI-x, \-\-proxy\fP. Added in 8.2.0.
  1467. .IP "\-\-haproxy\-protocol"
  1468. (HTTP) Send a HAProxy PROXY protocol v1 header at the beginning of the
  1469. connection. This is used by some load balancers and reverse proxies to
  1470. indicate the client\(aqs true IP address and port.
  1471. This option is primarily useful when sending test requests to a service that
  1472. expects this header.
  1473. Providing \fI\-\-haproxy\-protocol\fP multiple times has no extra effect.
  1474. Disable it again with \-\-no\-haproxy\-protocol.
  1475. Example:
  1476. .nf
  1477. curl \-\-haproxy\-protocol https://example.com
  1478. .fi
  1479. See also \fI-x, \-\-proxy\fP. Added in 7.60.0.
  1480. .IP "\-I, \-\-head"
  1481. (HTTP FTP FILE) Fetch the headers only! HTTP\-servers feature the command HEAD which this uses
  1482. to get nothing but the header of a document. When used on an FTP or FILE file,
  1483. curl displays the file size and last modification time only.
  1484. Providing \fI\-I, \-\-head\fP multiple times has no extra effect.
  1485. Disable it again with \-\-no\-head.
  1486. Example:
  1487. .nf
  1488. curl \-I https://example.com
  1489. .fi
  1490. See also \fI-G, \-\-get\fP, \fI-v, \-\-verbose\fP and \fI\-\-trace\-ascii\fP.
  1491. .IP "\-H, \-\-header <header/@file>"
  1492. (HTTP IMAP SMTP) Extra header to include in information sent. When used within an HTTP request,
  1493. it is added to the regular request headers.
  1494. For an IMAP or SMTP MIME uploaded mail built with \fI\-F, \-\-form\fP options, it is
  1495. prepended to the resulting MIME document, effectively including it at the mail
  1496. global level. It does not affect raw uploaded mails (Added in 7.56.0).
  1497. You may specify any number of extra headers. Note that if you should add a
  1498. custom header that has the same name as one of the internal ones curl would
  1499. use, your externally set header is used instead of the internal one. This
  1500. allows you to make even trickier stuff than curl would normally do. You should
  1501. not replace internally set headers without knowing perfectly well what you are
  1502. doing. Remove an internal header by giving a replacement without content on
  1503. the right side of the colon, as in: \-H "Host:". If you send the custom header
  1504. with no\-value then its header must be terminated with a semicolon, such as \-H
  1505. \(dqX\-Custom\-Header;" to send "X\-Custom\-Header:".
  1506. curl makes sure that each header you add/replace is sent with the proper
  1507. end\-of\-line marker, you should thus \fBnot\fP add that as a part of the header
  1508. content: do not add newlines or carriage returns, they only mess things up for
  1509. you. curl passes on the verbatim string you give it without any filter or
  1510. other safe guards. That includes white space and control characters.
  1511. This option can take an argument in @filename style, which then adds a header
  1512. for each line in the input file. Using @\- makes curl read the header file from
  1513. stdin. Added in 7.55.0.
  1514. Please note that most anti\-spam utilities check the presence and value of
  1515. several MIME mail headers: these are "From:", "To:", "Date:" and "Subject:"
  1516. among others and should be added with this option.
  1517. You need \fI\-\-proxy\-header\fP to send custom headers intended for an HTTP
  1518. proxy. Added in 7.37.0.
  1519. Passing on a "Transfer\-Encoding: chunked" header when doing an HTTP request
  1520. with a request body, makes curl send the data using chunked encoding.
  1521. \fBWARNING\fP: headers set with this option are set in all HTTP requests \- even
  1522. after redirects are followed, like when told with \fI\-L, \-\-location\fP. This can lead to
  1523. the header being sent to other hosts than the original host, so sensitive
  1524. headers should be used with caution combined with following redirects.
  1525. \fI\-H, \-\-header\fP can be used several times in a command line
  1526. Examples:
  1527. .nf
  1528. curl \-H "X\-First\-Name: Joe" https://example.com
  1529. curl \-H "User\-Agent: yes\-please/2000" https://example.com
  1530. curl \-H "Host:" https://example.com
  1531. curl \-H @headers.txt https://example.com
  1532. .fi
  1533. See also \fI-A, \-\-user\-agent\fP and \fI-e, \-\-referer\fP.
  1534. .IP "\-h, \-\-help <category>"
  1535. Usage help. This lists all curl command line options within the given
  1536. \fBcategory\fP.
  1537. If no argument is provided, curl displays only the most important command line
  1538. arguments.
  1539. For category \fBall\fP, curl displays help for all options.
  1540. If \fBcategory\fP is specified, curl displays all available help categories.
  1541. Example:
  1542. .nf
  1543. curl \-\-help all
  1544. .fi
  1545. See also \fI-v, \-\-verbose\fP.
  1546. .IP "\-\-hostpubmd5 <md5>"
  1547. (SFTP SCP) Pass a string containing 32 hexadecimal digits. The string should
  1548. be the 128 bit MD5 checksum of the remote host\(aqs public key, curl refuses
  1549. the connection with the host unless the md5sums match.
  1550. If \fI\-\-hostpubmd5\fP is provided several times, the last set value is used.
  1551. Example:
  1552. .nf
  1553. curl \-\-hostpubmd5 e5c1c49020640a5ab0f2034854c321a8 sftp://example.com/
  1554. .fi
  1555. See also \fI\-\-hostpubsha256\fP.
  1556. .IP "\-\-hostpubsha256 <sha256>"
  1557. (SFTP SCP) Pass a string containing a Base64\-encoded SHA256 hash of the remote host\(aqs
  1558. public key. Curl refuses the connection with the host unless the hashes match.
  1559. This feature requires libcurl to be built with libssh2 and does not work with
  1560. other SSH backends.
  1561. If \fI\-\-hostpubsha256\fP is provided several times, the last set value is used.
  1562. Example:
  1563. .nf
  1564. curl \-\-hostpubsha256 NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ= sftp://example.com/
  1565. .fi
  1566. See also \fI\-\-hostpubmd5\fP. Added in 7.80.0.
  1567. .IP "\-\-hsts <file name>"
  1568. (HTTPS) This option enables HSTS for the transfer. If the file name points to an
  1569. existing HSTS cache file, that is used. After a completed transfer, the
  1570. cache is saved to the file name again if it has been modified.
  1571. If curl is told to use HTTP:// for a transfer involving a host name that
  1572. exists in the HSTS cache, it upgrades the transfer to use HTTPS. Each HSTS
  1573. cache entry has an individual life time after which the upgrade is no longer
  1574. performed.
  1575. Specify a "" file name (zero length) to avoid loading/saving and make curl
  1576. just handle HSTS in memory.
  1577. If this option is used several times, curl loads contents from all the
  1578. files but the last one is used for saving.
  1579. \fI\-\-hsts\fP can be used several times in a command line
  1580. Example:
  1581. .nf
  1582. curl \-\-hsts cache.txt https://example.com
  1583. .fi
  1584. See also \fI\-\-proto\fP. Added in 7.74.0.
  1585. .IP "\-\-http0.9"
  1586. (HTTP) Tells curl to be fine with HTTP version 0.9 response.
  1587. HTTP/0.9 is a response without headers and therefore you can also connect with
  1588. this to non\-HTTP servers and still get a response since curl simply
  1589. transparently downgrades \- if allowed.
  1590. HTTP/0.9 is disabled by default (added in 7.66.0)
  1591. Providing \fI\-\-http0.9\fP multiple times has no extra effect.
  1592. Disable it again with \-\-no\-http0.9.
  1593. Example:
  1594. .nf
  1595. curl \-\-http0.9 https://example.com
  1596. .fi
  1597. See also \fI\-\-http1.1\fP, \fI\-\-http2\fP and \fI\-\-http3\fP. Added in 7.64.0.
  1598. .IP "\-0, \-\-http1.0"
  1599. (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred
  1600. HTTP version.
  1601. Providing \fI\-0, \-\-http1.0\fP multiple times has no extra effect.
  1602. Example:
  1603. .nf
  1604. curl \-\-http1.0 https://example.com
  1605. .fi
  1606. See also \fI\-\-http0.9\fP and \fI\-\-http1.1\fP. This option is mutually exclusive to \fI\-\-http1.1\fP and \fI\-\-http2\fP and \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1607. .IP "\-\-http1.1"
  1608. (HTTP) Tells curl to use HTTP version 1.1.
  1609. Providing \fI\-\-http1.1\fP multiple times has no extra effect.
  1610. Example:
  1611. .nf
  1612. curl \-\-http1.1 https://example.com
  1613. .fi
  1614. See also \fI-0, \-\-http1.0\fP and \fI\-\-http0.9\fP. This option is mutually exclusive to \fI-0, \-\-http1.0\fP and \fI\-\-http2\fP and \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1615. .IP "\-\-http2\-prior\-knowledge"
  1616. (HTTP) Tells curl to issue its non\-TLS HTTP requests using HTTP/2 without HTTP/1.1
  1617. Upgrade. It requires prior knowledge that the server supports HTTP/2 straight
  1618. away. HTTPS requests still do HTTP/2 the standard way with negotiated protocol
  1619. version in the TLS handshake.
  1620. Providing \fI\-\-http2\-prior\-knowledge\fP multiple times has no extra effect.
  1621. Disable it again with \-\-no\-http2\-prior\-knowledge.
  1622. Example:
  1623. .nf
  1624. curl \-\-http2\-prior\-knowledge https://example.com
  1625. .fi
  1626. See also \fI\-\-http2\fP and \fI\-\-http3\fP. \fI\-\-http2\-prior\-knowledge\fP requires that the underlying libcurl was built to support HTTP/2. This option is mutually exclusive to \fI\-\-http1.1\fP and \fI-0, \-\-http1.0\fP and \fI\-\-http2\fP and \fI\-\-http3\fP.
  1627. .IP "\-\-http2"
  1628. (HTTP) Tells curl to use HTTP version 2.
  1629. For HTTPS, this means curl negotiates HTTP/2 in the TLS handshake. curl does
  1630. this by default.
  1631. For HTTP, this means curl attempts to upgrade the request to HTTP/2 using the
  1632. Upgrade: request header.
  1633. When curl uses HTTP/2 over HTTPS, it does not itself insist on TLS 1.2 or
  1634. higher even though that is required by the specification. A user can add this
  1635. version requirement with \fI\-\-tlsv1.2\fP.
  1636. Providing \fI\-\-http2\fP multiple times has no extra effect.
  1637. Example:
  1638. .nf
  1639. curl \-\-http2 https://example.com
  1640. .fi
  1641. See also \fI\-\-http1.1\fP, \fI\-\-http3\fP and \fI\-\-no\-alpn\fP. \fI\-\-http2\fP requires that the underlying libcurl was built to support HTTP/2. This option is mutually exclusive to \fI\-\-http1.1\fP and \fI-0, \-\-http1.0\fP and \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1642. .IP "\-\-http3\-only"
  1643. (HTTP) **WARNING**: this option is experimental. Do not use in production.
  1644. Instructs curl to use HTTP/3 to the host in the URL, with no fallback to
  1645. earlier HTTP versions. HTTP/3 can only be used for HTTPS and not for HTTP
  1646. URLs. For HTTP, this option triggers an error.
  1647. This option allows a user to avoid using the Alt\-Svc method of upgrading to
  1648. HTTP/3 when you know that the target speaks HTTP/3 on the given host and port.
  1649. This option makes curl fail if a QUIC connection cannot be established, it
  1650. does not attempt any other HTTP versions on its own. Use \fI\-\-http3\fP for similar
  1651. functionality \fIwith\fP a fallback.
  1652. Providing \fI\-\-http3\-only\fP multiple times has no extra effect.
  1653. Example:
  1654. .nf
  1655. curl \-\-http3\-only https://example.com
  1656. .fi
  1657. See also \fI\-\-http1.1\fP, \fI\-\-http2\fP and \fI\-\-http3\fP. \fI\-\-http3\-only\fP requires that the underlying libcurl was built to support HTTP/3. This option is mutually exclusive to \fI\-\-http1.1\fP and \fI-0, \-\-http1.0\fP and \fI\-\-http2\fP and \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP. Added in 7.88.0.
  1658. .IP "\-\-http3"
  1659. (HTTP) **WARNING**: this option is experimental. Do not use in production.
  1660. Tells curl to try HTTP/3 to the host in the URL, but fallback to earlier
  1661. HTTP versions if the HTTP/3 connection establishment fails. HTTP/3 is only
  1662. available for HTTPS and not for HTTP URLs.
  1663. This option allows a user to avoid using the Alt\-Svc method of upgrading to
  1664. HTTP/3 when you know that the target speaks HTTP/3 on the given host and port.
  1665. When asked to use HTTP/3, curl issues a separate attempt to use older HTTP
  1666. versions with a slight delay, so if the HTTP/3 transfer fails or is slow, curl
  1667. still tries to proceed with an older HTTP version.
  1668. Use \fI\-\-http3\-only\fP for similar functionality \fIwithout\fP a fallback.
  1669. Providing \fI\-\-http3\fP multiple times has no extra effect.
  1670. Example:
  1671. .nf
  1672. curl \-\-http3 https://example.com
  1673. .fi
  1674. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP. \fI\-\-http3\fP requires that the underlying libcurl was built to support HTTP/3. This option is mutually exclusive to \fI\-\-http1.1\fP and \fI-0, \-\-http1.0\fP and \fI\-\-http2\fP and \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\-only\fP. Added in 7.66.0.
  1675. .IP "\-\-ignore\-content\-length"
  1676. (FTP HTTP) For HTTP, Ignore the Content\-Length header. This is particularly useful for
  1677. servers running Apache 1.x, which reports incorrect Content\-Length for
  1678. files larger than 2 gigabytes.
  1679. For FTP, this makes curl skip the SIZE command to figure out the size before
  1680. downloading a file.
  1681. This option does not work for HTTP if libcurl was built to use hyper.
  1682. Providing \fI\-\-ignore\-content\-length\fP multiple times has no extra effect.
  1683. Disable it again with \-\-no\-ignore\-content\-length.
  1684. Example:
  1685. .nf
  1686. curl \-\-ignore\-content\-length https://example.com
  1687. .fi
  1688. See also \fI\-\-ftp\-skip\-pasv\-ip\fP.
  1689. .IP "\-i, \-\-include"
  1690. Include the HTTP response headers in the output. The HTTP response headers can
  1691. include things like server name, cookies, date of the document, HTTP version
  1692. and more...
  1693. To view the request headers, consider the \fI\-v, \-\-verbose\fP option.
  1694. Prior to 7.75.0 curl did not print the headers if \fI\-f, \-\-fail\fP was used in
  1695. combination with this option and there was error reported by server.
  1696. Providing \fI\-i, \-\-include\fP multiple times has no extra effect.
  1697. Disable it again with \-\-no\-include.
  1698. Example:
  1699. .nf
  1700. curl \-i https://example.com
  1701. .fi
  1702. See also \fI-v, \-\-verbose\fP.
  1703. .IP "\-k, \-\-insecure"
  1704. (TLS SFTP SCP) By default, every secure connection curl makes is verified to be secure before
  1705. the transfer takes place. This option makes curl skip the verification step
  1706. and proceed without checking.
  1707. When this option is not used for protocols using TLS, curl verifies the
  1708. server\(aqs TLS certificate before it continues: that the certificate contains
  1709. the right name which matches the host name used in the URL and that the
  1710. certificate has been signed by a CA certificate present in the cert store.
  1711. See this online resource for further details:
  1712. .nf
  1713. https://curl.se/docs/sslcerts.html
  1714. .fi
  1715. For SFTP and SCP, this option makes curl skip the \fIknown_hosts\fP verification.
  1716. \fIknown_hosts\fP is a file normally stored in the user\(aqs home directory in the
  1717. \(dq.ssh" subdirectory, which contains host names and their public keys.
  1718. \fBWARNING\fP: using this option makes the transfer insecure.
  1719. When curl uses secure protocols it trusts responses and allows for example
  1720. HSTS and Alt\-Svc information to be stored and used subsequently. Using
  1721. \fI\-k, \-\-insecure\fP can make curl trust and use such information from malicious
  1722. servers.
  1723. Providing \fI\-k, \-\-insecure\fP multiple times has no extra effect.
  1724. Disable it again with \-\-no\-insecure.
  1725. Example:
  1726. .nf
  1727. curl \-\-insecure https://example.com
  1728. .fi
  1729. See also \fI\-\-proxy\-insecure\fP, \fI\-\-cacert\fP and \fI\-\-capath\fP.
  1730. .IP "\-\-interface <name>"
  1731. Perform an operation using a specified interface. You can enter interface
  1732. name, IP address or host name. An example could look like:
  1733. .nf
  1734. curl \--interface eth0:1 https://www.example.com/
  1735. .fi
  1736. On Linux it can be used to specify a \fBVRF\fP, but the binary needs to either
  1737. have \fBCAP_NET_RAW\fP or to be run as root. More information about Linux
  1738. \fBVRF\fP: https://www.kernel.org/doc/Documentation/networking/vrf.txt
  1739. If \fI\-\-interface\fP is provided several times, the last set value is used.
  1740. Example:
  1741. .nf
  1742. curl \-\-interface eth0 https://example.com
  1743. .fi
  1744. See also \fI\-\-dns\-interface\fP.
  1745. .IP "\-\-ipfs\-gateway <URL>"
  1746. Specify which gateway to use for IPFS and IPNS URLs. Not specifying this will
  1747. instead make curl check if the IPFS_GATEWAY environment variable is set, or if
  1748. a ~/.ipfs/gateway file holding the gateway URL exists.
  1749. If you run a local IPFS node, this gateway is by default available under
  1750. http://localhost:8080. A full example URL would look like:
  1751. .nf
  1752. curl \--ipfs\-gateway http://localhost:8080 ipfs://bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi
  1753. .fi
  1754. There are many public IPFS gateways. See for example:
  1755. .nf
  1756. https://ipfs.github.io/public\-gateway\-checker/
  1757. .fi
  1758. WARNING: If you opt to go for a remote gateway you should be aware that you
  1759. completely trust the gateway. This is fine in local gateways as you host it
  1760. yourself. With remote gateways there could potentially be a malicious actor
  1761. returning you data that does not match the request you made, inspect or even
  1762. interfere with the request. You will not notice this when using curl. A
  1763. mitigation could be to go for a "trustless" gateway. This means you locally
  1764. verify that the data. Consult the docs page on trusted vs trustless:
  1765. https://docs.ipfs.tech/reference/http/gateway/#trusted\-vs\-trustless
  1766. If \fI\-\-ipfs\-gateway\fP is provided several times, the last set value is used.
  1767. Example:
  1768. .nf
  1769. curl \-\-ipfs\-gateway https://example.com ipfs://
  1770. .fi
  1771. See also \fI-h, \-\-help\fP and \fI-M, \-\-manual\fP. Added in 8.4.0.
  1772. .IP "\-4, \-\-ipv4"
  1773. This option tells curl to use IPv4 addresses only when resolving host names,
  1774. and not for example try IPv6.
  1775. Providing \fI\-4, \-\-ipv4\fP multiple times has no extra effect.
  1776. Example:
  1777. .nf
  1778. curl \-\-ipv4 https://example.com
  1779. .fi
  1780. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP. This option is mutually exclusive to \fI-6, \-\-ipv6\fP.
  1781. .IP "\-6, \-\-ipv6"
  1782. This option tells curl to use IPv6 addresses only when resolving host names,
  1783. and not for example try IPv4.
  1784. Providing \fI\-6, \-\-ipv6\fP multiple times has no extra effect.
  1785. Example:
  1786. .nf
  1787. curl \-\-ipv6 https://example.com
  1788. .fi
  1789. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP. This option is mutually exclusive to \fI-4, \-\-ipv4\fP.
  1790. .IP "\-\-json <data>"
  1791. (HTTP) Sends the specified JSON data in a POST request to the HTTP server. \fI\-\-json\fP
  1792. works as a shortcut for passing on these three options:
  1793. .nf
  1794. \--data [arg]
  1795. \--header "Content\-Type: application/json"
  1796. \--header "Accept: application/json"
  1797. .fi
  1798. There is \fI\fPno verification\fI\fP that the passed in data is actual JSON or that
  1799. the syntax is correct.
  1800. If you start the data with the letter @, the rest should be a file name to
  1801. read the data from, or a single dash (\-) if you want curl to read the data
  1802. from stdin. Posting data from a file named \(aqfoobar\(aq would thus be done with
  1803. \fI\-\-json\fP @foobar and to instead read the data from stdin, use \fI\-\-json\fP @\-.
  1804. If this option is used more than once on the same command line, the additional
  1805. data pieces are concatenated to the previous before sending.
  1806. The headers this option sets can be overridden with \fI\-H, \-\-header\fP as usual.
  1807. \fI\-\-json\fP can be used several times in a command line
  1808. Examples:
  1809. .nf
  1810. curl \-\-json \(aq{ "drink": "coffe" }\(aq https://example.com
  1811. curl \-\-json \(aq{ "drink":\(aq \-\-json \(aq "coffe" }\(aq https://example.com
  1812. curl \-\-json @prepared https://example.com
  1813. curl \-\-json @\- https://example.com < json.txt
  1814. .fi
  1815. See also \fI\-\-data\-binary\fP and \fI\-\-data\-raw\fP. This option is mutually exclusive to \fI-F, \-\-form\fP and \fI-I, \-\-head\fP and \fI-T, \-\-upload\-file\fP. Added in 7.82.0.
  1816. .IP "\-j, \-\-junk\-session\-cookies"
  1817. (HTTP) When curl is told to read cookies from a given file, this option makes it
  1818. discard all "session cookies". This has the same effect as if a new session is
  1819. started. Typical browsers discard session cookies when they are closed down.
  1820. Providing \fI\-j, \-\-junk\-session\-cookies\fP multiple times has no extra effect.
  1821. Disable it again with \-\-no\-junk\-session\-cookies.
  1822. Example:
  1823. .nf
  1824. curl \-\-junk\-session\-cookies \-b cookies.txt https://example.com
  1825. .fi
  1826. See also \fI-b, \-\-cookie\fP and \fI-c, \-\-cookie\-jar\fP.
  1827. .IP "\-\-keepalive\-time <seconds>"
  1828. This option sets the time a connection needs to remain idle before sending
  1829. keepalive probes and the time between individual keepalive probes. It is
  1830. currently effective on operating systems offering the TCP_KEEPIDLE and
  1831. TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP\-UX and more).
  1832. Keepalives are used by the TCP stack to detect broken networks on idle
  1833. connections. The number of missed keepalive probes before declaring the
  1834. connection down is OS dependent and is commonly 9 or 10. This option has no
  1835. effect if \fI\-\-no\-keepalive\fP is used.
  1836. If unspecified, the option defaults to 60 seconds.
  1837. If \fI\-\-keepalive\-time\fP is provided several times, the last set value is used.
  1838. Example:
  1839. .nf
  1840. curl \-\-keepalive\-time 20 https://example.com
  1841. .fi
  1842. See also \fI\-\-no\-keepalive\fP and \fI-m, \-\-max\-time\fP.
  1843. .IP "\-\-key\-type <type>"
  1844. (TLS) Private key file type. Specify which type your \fI\-\-key\fP provided private key
  1845. is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
  1846. If \fI\-\-key\-type\fP is provided several times, the last set value is used.
  1847. Example:
  1848. .nf
  1849. curl \-\-key\-type DER \-\-key here https://example.com
  1850. .fi
  1851. See also \fI\-\-key\fP.
  1852. .IP "\-\-key <key>"
  1853. (TLS SSH) Private key file name. Allows you to provide your private key in this separate
  1854. file. For SSH, if not specified, curl tries the following candidates in order:
  1855. \(aq~/.ssh/id_rsa\(aq, \(aq~/.ssh/id_dsa\(aq, \(aq./id_rsa\(aq, \(aq./id_dsa\(aq.
  1856. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  1857. then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in
  1858. a PKCS#11 device. A string beginning with "pkcs11:" is interpreted as a
  1859. PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option is set as
  1860. \(dqpkcs11" if none was provided and the \fI\-\-key\-type\fP option is set as "ENG" if
  1861. none was provided.
  1862. If curl is built against Secure Transport or Schannel then this option is
  1863. ignored for TLS protocols (HTTPS, etc). Those backends expect the private key
  1864. to be already present in the keychain or PKCS#12 file containing the
  1865. certificate.
  1866. If \fI\-\-key\fP is provided several times, the last set value is used.
  1867. Example:
  1868. .nf
  1869. curl \-\-cert certificate \-\-key here https://example.com
  1870. .fi
  1871. See also \fI\-\-key\-type\fP and \fI-E, \-\-cert\fP.
  1872. .IP "\-\-krb <level>"
  1873. (FTP) Enable Kerberos authentication and use. The level must be entered and should
  1874. be one of \(aqclear\(aq, \(aqsafe\(aq, \(aqconfidential\(aq, or \(aqprivate\(aq. Should you use a
  1875. level that is not one of these, \(aqprivate\(aq is used.
  1876. If \fI\-\-krb\fP is provided several times, the last set value is used.
  1877. Example:
  1878. .nf
  1879. curl \-\-krb clear ftp://example.com/
  1880. .fi
  1881. See also \fI\-\-delegation\fP and \fI\-\-ssl\fP. \fI\-\-krb\fP requires that the underlying libcurl was built to support Kerberos.
  1882. .IP "\-\-libcurl <file>"
  1883. Append this option to any ordinary curl command line, and you get
  1884. libcurl\-using C source code written to the file that does the equivalent of
  1885. what your command\-line operation does!
  1886. This option is global and does not need to be specified for each use of --next.
  1887. If \fI\-\-libcurl\fP is provided several times, the last set value is used.
  1888. Example:
  1889. .nf
  1890. curl \-\-libcurl client.c https://example.com
  1891. .fi
  1892. See also \fI-v, \-\-verbose\fP.
  1893. .IP "\-\-limit\-rate <speed>"
  1894. Specify the maximum transfer rate you want curl to use \- for both downloads
  1895. and uploads. This feature is useful if you have a limited pipe and you would like
  1896. your transfer not to use your entire bandwidth. To make it slower than it
  1897. otherwise would be.
  1898. The given speed is measured in bytes/second, unless a suffix is appended.
  1899. Appending \(aqk\(aq or \(aqK\(aq counts the number as kilobytes, \(aqm\(aq or \(aqM\(aq makes it
  1900. megabytes, while \(aqg\(aq or \(aqG\(aq makes it gigabytes. The suffixes (k, M, G, T, P)
  1901. are 1024 based. For example 1k is 1024. Examples: 200K, 3m and 1G.
  1902. The rate limiting logic works on averaging the transfer speed to no more than
  1903. the set threshold over a period of multiple seconds.
  1904. If you also use the \fI\-Y, \-\-speed\-limit\fP option, that option takes precedence and
  1905. might cripple the rate\-limiting slightly, to help keeping the speed\-limit
  1906. logic working.
  1907. If \fI\-\-limit\-rate\fP is provided several times, the last set value is used.
  1908. Examples:
  1909. .nf
  1910. curl \-\-limit\-rate 100K https://example.com
  1911. curl \-\-limit\-rate 1000 https://example.com
  1912. curl \-\-limit\-rate 10M https://example.com
  1913. .fi
  1914. See also \fI\-\-rate\fP, \fI-Y, \-\-speed\-limit\fP and \fI-y, \-\-speed\-time\fP.
  1915. .IP "\-l, \-\-list\-only"
  1916. (FTP POP3 SFTP) (FTP)
  1917. When listing an FTP directory, this switch forces a name\-only view. This is
  1918. especially useful if the user wants to machine\-parse the contents of an FTP
  1919. directory since the normal directory view does not use a standard look or
  1920. format. When used like this, the option causes an NLST command to be sent to
  1921. the server instead of LIST.
  1922. Note: Some FTP servers list only files in their response to NLST; they do not
  1923. include sub\-directories and symbolic links.
  1924. (SFTP)
  1925. When listing an SFTP directory, this switch forces a name\-only view, one per line.
  1926. This is especially useful if the user wants to machine\-parse the contents of an
  1927. SFTP directory since the normal directory view provides more information than just
  1928. file names.
  1929. (POP3)
  1930. When retrieving a specific email from POP3, this switch forces a LIST command
  1931. to be performed instead of RETR. This is particularly useful if the user wants
  1932. to see if a specific message\-id exists on the server and what size it is.
  1933. Note: When combined with \fI\-X, \-\-request\fP, this option can be used to send a UIDL
  1934. command instead, so the user may use the email\(aqs unique identifier rather than
  1935. its message\-id to make the request.
  1936. Providing \fI\-l, \-\-list\-only\fP multiple times has no extra effect.
  1937. Disable it again with \-\-no\-list\-only.
  1938. Example:
  1939. .nf
  1940. curl \-\-list\-only ftp://example.com/dir/
  1941. .fi
  1942. See also \fI-Q, \-\-quote\fP and \fI-X, \-\-request\fP.
  1943. .IP "\-\-local\-port <num/range>"
  1944. Set a preferred single number or range (FROM\-TO) of local port numbers to use
  1945. for the connection(s). Note that port numbers by nature are a scarce resource
  1946. so setting this range to something too narrow might cause unnecessary
  1947. connection setup failures.
  1948. If \fI\-\-local\-port\fP is provided several times, the last set value is used.
  1949. Example:
  1950. .nf
  1951. curl \-\-local\-port 1000\-3000 https://example.com
  1952. .fi
  1953. See also \fI-g, \-\-globoff\fP.
  1954. .IP "\-\-location\-trusted"
  1955. (HTTP) Like \fI\-L, \-\-location\fP, but allows sending the name + password to all hosts that the
  1956. site may redirect to. This may or may not introduce a security breach if the
  1957. site redirects you to a site to which you send your authentication info
  1958. (which is plaintext in the case of HTTP Basic authentication).
  1959. Providing \fI\-\-location\-trusted\fP multiple times has no extra effect.
  1960. Disable it again with \-\-no\-location\-trusted.
  1961. Example:
  1962. .nf
  1963. curl \-\-location\-trusted \-u user:password https://example.com
  1964. .fi
  1965. See also \fI-u, \-\-user\fP.
  1966. .IP "\-L, \-\-location"
  1967. (HTTP) If the server reports that the requested page has moved to a different
  1968. location (indicated with a Location: header and a 3XX response code), this
  1969. option makes curl redo the request on the new place. If used together with
  1970. \fI\-i, \-\-include\fP or \fI\-I, \-\-head\fP, headers from all requested pages are shown.
  1971. When authentication is used, curl only sends its credentials to the initial
  1972. host. If a redirect takes curl to a different host, it does not get the
  1973. user+password pass on. See also \fI\-\-location\-trusted\fP on how to change this.
  1974. Limit the amount of redirects to follow by using the \fI\-\-max\-redirs\fP option.
  1975. When curl follows a redirect and if the request is a POST, it sends the
  1976. following request with a GET if the HTTP response was 301, 302, or 303. If the
  1977. response code was any other 3xx code, curl resends the following request using
  1978. the same unmodified method.
  1979. You can tell curl to not change POST requests to GET after a 30x response by
  1980. using the dedicated options for that: \fI\-\-post301\fP, \fI\-\-post302\fP and \fI\-\-post303\fP.
  1981. The method set with \fI\-X, \-\-request\fP overrides the method curl would otherwise select
  1982. to use.
  1983. Providing \fI\-L, \-\-location\fP multiple times has no extra effect.
  1984. Disable it again with \-\-no\-location.
  1985. Example:
  1986. .nf
  1987. curl \-L https://example.com
  1988. .fi
  1989. See also \fI\-\-resolve\fP and \fI\-\-alt\-svc\fP.
  1990. .IP "\-\-login\-options <options>"
  1991. (IMAP LDAP POP3 SMTP) Specify the login options to use during server authentication.
  1992. You can use login options to specify protocol specific options that may be
  1993. used during authentication. At present only IMAP, POP3 and SMTP support login
  1994. options. For more information about login options please see RFC 2384,
  1995. RFC 5092 and the IETF draft
  1996. https://datatracker.ietf.org/doc/html/draft\-earhart\-url\-smtp\-00.
  1997. Since 8.2.0, IMAP supports the login option "AUTH=+LOGIN". With this option,
  1998. curl uses the plain (not SASL) LOGIN IMAP command even if the server
  1999. advertises SASL authentication. Care should be taken in using this option, as
  2000. it sends your password over the network in plain text. This does not work if
  2001. the IMAP server disables the plain LOGIN (e.g. to prevent password snooping).
  2002. If \fI\-\-login\-options\fP is provided several times, the last set value is used.
  2003. Example:
  2004. .nf
  2005. curl \-\-login\-options \(aqAUTH=*\(aq imap://example.com
  2006. .fi
  2007. See also \fI-u, \-\-user\fP.
  2008. .IP "\-\-mail\-auth <address>"
  2009. (SMTP) Specify a single address. This is used to specify the authentication address
  2010. (identity) of a submitted message that is being relayed to another server.
  2011. If \fI\-\-mail\-auth\fP is provided several times, the last set value is used.
  2012. Example:
  2013. .nf
  2014. curl \-\-mail\-auth user@example.come \-T mail smtp://example.com/
  2015. .fi
  2016. See also \fI\-\-mail\-rcpt\fP and \fI\-\-mail\-from\fP.
  2017. .IP "\-\-mail\-from <address>"
  2018. (SMTP) Specify a single address that the given mail should get sent from.
  2019. If \fI\-\-mail\-from\fP is provided several times, the last set value is used.
  2020. Example:
  2021. .nf
  2022. curl \-\-mail\-from user@example.com \-T mail smtp://example.com/
  2023. .fi
  2024. See also \fI\-\-mail\-rcpt\fP and \fI\-\-mail\-auth\fP.
  2025. .IP "\-\-mail\-rcpt\-allowfails"
  2026. (SMTP) When sending data to multiple recipients, by default curl aborts SMTP
  2027. conversation if at least one of the recipients causes RCPT TO command to
  2028. return an error.
  2029. The default behavior can be changed by passing \fI\-\-mail\-rcpt\-allowfails\fP
  2030. command\-line option which makes curl ignore errors and proceed with the
  2031. remaining valid recipients.
  2032. If all recipients trigger RCPT TO failures and this flag is specified, curl
  2033. still aborts the SMTP conversation and returns the error received from to the
  2034. last RCPT TO command.
  2035. Providing \fI\-\-mail\-rcpt\-allowfails\fP multiple times has no extra effect.
  2036. Disable it again with \-\-no\-mail\-rcpt\-allowfails.
  2037. Example:
  2038. .nf
  2039. curl \-\-mail\-rcpt\-allowfails \-\-mail\-rcpt dest@example.com smtp://example.com
  2040. .fi
  2041. See also \fI\-\-mail\-rcpt\fP. Added in 7.69.0.
  2042. .IP "\-\-mail\-rcpt <address>"
  2043. (SMTP) Specify a single email address, user name or mailing list name. Repeat this
  2044. option several times to send to multiple recipients.
  2045. When performing an address verification (\fBVRFY\fP command), the recipient should be
  2046. specified as the user name or user name and domain (as per Section 3.5 of
  2047. RFC 5321).
  2048. When performing a mailing list expand (EXPN command), the recipient should be
  2049. specified using the mailing list name, such as "Friends" or "London\-Office".
  2050. \fI\-\-mail\-rcpt\fP can be used several times in a command line
  2051. Example:
  2052. .nf
  2053. curl \-\-mail\-rcpt user@example.net smtp://example.com
  2054. .fi
  2055. See also \fI\-\-mail\-rcpt\-allowfails\fP.
  2056. .IP "\-M, \-\-manual"
  2057. Manual. Display the huge help text.
  2058. Example:
  2059. .nf
  2060. curl \-\-manual
  2061. .fi
  2062. See also \fI-v, \-\-verbose\fP, \fI\-\-libcurl\fP and \fI\-\-trace\fP.
  2063. .IP "\-\-max\-filesize <bytes>"
  2064. (FTP HTTP MQTT) Specify the maximum size (in bytes) of a file to download. If the file
  2065. requested is larger than this value, the transfer does not start and curl
  2066. returns with exit code 63.
  2067. A size modifier may be used. For example, Appending \(aqk\(aq or \(aqK\(aq counts the
  2068. number as kilobytes, \(aqm\(aq or \(aqM\(aq makes it megabytes, while \(aqg\(aq or \(aqG\(aq makes it
  2069. gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
  2070. \fBNOTE\fP: before curl 8.4.0, when the file size is not known prior to
  2071. download, for such files this option has no effect even if the file transfer
  2072. ends up being larger than this given limit.
  2073. Starting with curl 8.4.0, this option aborts the transfer if it reaches the
  2074. threshold during transfer.
  2075. If \fI\-\-max\-filesize\fP is provided several times, the last set value is used.
  2076. Example:
  2077. .nf
  2078. curl \-\-max\-filesize 100K https://example.com
  2079. .fi
  2080. See also \fI\-\-limit\-rate\fP.
  2081. .IP "\-\-max\-redirs <num>"
  2082. (HTTP) Set maximum number of redirections to follow. When \fI\-L, \-\-location\fP is used, to
  2083. prevent curl from following too many redirects, by default, the limit is
  2084. set to 50 redirects. Set this option to \-1 to make it unlimited.
  2085. If \fI\-\-max\-redirs\fP is provided several times, the last set value is used.
  2086. Example:
  2087. .nf
  2088. curl \-\-max\-redirs 3 \-\-location https://example.com
  2089. .fi
  2090. See also \fI-L, \-\-location\fP.
  2091. .IP "\-m, \-\-max\-time <fractional seconds>"
  2092. Maximum time in seconds that you allow each transfer to take. This is useful
  2093. for preventing your batch jobs from hanging for hours due to slow networks or
  2094. links going down. This option accepts decimal values.
  2095. If you enable retrying the transfer (\fI\-\-retry\fP) then the maximum time counter is
  2096. reset each time the transfer is retried. You can use \fI\-\-retry\-max\-time\fP to limit
  2097. the retry time.
  2098. The decimal value needs to provided using a dot (.) as decimal separator \- not
  2099. the local version even if it might be using another separator.
  2100. If \fI\-m, \-\-max\-time\fP is provided several times, the last set value is used.
  2101. Examples:
  2102. .nf
  2103. curl \-\-max\-time 10 https://example.com
  2104. curl \-\-max\-time 2.92 https://example.com
  2105. .fi
  2106. See also \fI\-\-connect\-timeout\fP and \fI\-\-retry\-max\-time\fP.
  2107. .IP "\-\-metalink"
  2108. This option was previously used to specify a Metalink resource. Metalink
  2109. support is disabled in curl for security reasons (added in 7.78.0).
  2110. If \fI\-\-metalink\fP is provided several times, the last set value is used.
  2111. Example:
  2112. .nf
  2113. curl \-\-metalink file https://example.com
  2114. .fi
  2115. See also \fI-Z, \-\-parallel\fP.
  2116. .IP "\-\-negotiate"
  2117. (HTTP) Enables Negotiate (SPNEGO) authentication.
  2118. This option requires a library built with GSS\-API or SSPI support. Use
  2119. \fI\-V, \-\-version\fP to see if your curl supports GSS\-API/SSPI or SPNEGO.
  2120. When using this option, you must also provide a fake \fI\-u, \-\-user\fP option to activate
  2121. the authentication code properly. Sending a \(aq\-u :\(aq is enough as the user name
  2122. and password from the \fI\-u, \-\-user\fP option are not actually used.
  2123. Providing \fI\-\-negotiate\fP multiple times has no extra effect.
  2124. Example:
  2125. .nf
  2126. curl \-\-negotiate \-u : https://example.com
  2127. .fi
  2128. See also \fI\-\-basic\fP, \fI\-\-ntlm\fP, \fI\-\-anyauth\fP and \fI\-\-proxy\-negotiate\fP.
  2129. .IP "\-\-netrc\-file <filename>"
  2130. This option is similar to \fI\-n, \-\-netrc\fP, except that you provide the path (absolute
  2131. or relative) to the netrc file that curl should use. You can only specify one
  2132. netrc file per invocation.
  2133. It abides by \fI\-\-netrc\-optional\fP if specified.
  2134. If \fI\-\-netrc\-file\fP is provided several times, the last set value is used.
  2135. Example:
  2136. .nf
  2137. curl \-\-netrc\-file netrc https://example.com
  2138. .fi
  2139. See also \fI-n, \-\-netrc\fP, \fI-u, \-\-user\fP and \fI-K, \-\-config\fP. This option is mutually exclusive to \fI-n, \-\-netrc\fP.
  2140. .IP "\-\-netrc\-optional"
  2141. Similar to \fI\-n, \-\-netrc\fP, but this option makes the .netrc usage \fBoptional\fP
  2142. and not mandatory as the \fI\-n, \-\-netrc\fP option does.
  2143. Providing \fI\-\-netrc\-optional\fP multiple times has no extra effect.
  2144. Disable it again with \-\-no\-netrc\-optional.
  2145. Example:
  2146. .nf
  2147. curl \-\-netrc\-optional https://example.com
  2148. .fi
  2149. See also \fI\-\-netrc\-file\fP. This option is mutually exclusive to \fI-n, \-\-netrc\fP.
  2150. .IP "\-n, \-\-netrc"
  2151. Makes curl scan the \fI.netrc\fP file in the user\(aqs home directory for login name
  2152. and password. This is typically used for FTP on Unix. If used with HTTP, curl
  2153. enables user authentication. See \fInetrc(5)\fP and \fIftp(1)\fP for details on the
  2154. file format. Curl does not complain if that file does not have the right
  2155. permissions (it should be neither world\- nor group\-readable). The environment
  2156. variable "HOME" is used to find the home directory.
  2157. On Windows two filenames in the home directory are checked: \fI.netrc\fP and
  2158. \fI_netrc\fP, preferring the former. Older versions on Windows checked for \fI_netrc\fP
  2159. only.
  2160. A quick and simple example of how to setup a \fI.netrc\fP to allow curl to FTP to
  2161. the machine host.domain.com with user name \(aqmyself\(aq and password \(aqsecret\(aq
  2162. could look similar to:
  2163. .nf
  2164. machine host.domain.com
  2165. login myself
  2166. password secret
  2167. .fi
  2168. Providing \fI\-n, \-\-netrc\fP multiple times has no extra effect.
  2169. Disable it again with \-\-no\-netrc.
  2170. Example:
  2171. .nf
  2172. curl \-\-netrc https://example.com
  2173. .fi
  2174. See also \fI\-\-netrc\-file\fP, \fI-K, \-\-config\fP and \fI-u, \-\-user\fP. This option is mutually exclusive to \fI\-\-netrc\-file\fP and \fI\-\-netrc\-optional\fP.
  2175. .IP "\-:, \-\-next"
  2176. Tells curl to use a separate operation for the following URL and associated
  2177. options. This allows you to send several URL requests, each with their own
  2178. specific options, for example, such as different user names or custom requests
  2179. for each.
  2180. \fI\-:, \-\-next\fP resets all local options and only global ones have their values survive
  2181. over to the operation following the \fI\-:, \-\-next\fP instruction. Global options include
  2182. \fI\-v, \-\-verbose\fP, \fI\-\-trace\fP, \fI\-\-trace\-ascii\fP and \fI\-\-fail\-early\fP.
  2183. For example, you can do both a GET and a POST in a single command line:
  2184. .nf
  2185. curl www1.example.com \--next \-d postthis www2.example.com
  2186. .fi
  2187. \fI\-:, \-\-next\fP can be used several times in a command line
  2188. Examples:
  2189. .nf
  2190. curl https://example.com \-\-next \-d postthis www2.example.com
  2191. curl \-I https://example.com \-\-next https://example.net/
  2192. .fi
  2193. See also \fI-Z, \-\-parallel\fP and \fI-K, \-\-config\fP.
  2194. .IP "\-\-no\-alpn"
  2195. (HTTPS) Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
  2196. with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
  2197. HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
  2198. Note that this is the negated option name documented. You can use \--alpn to
  2199. enable ALPN.
  2200. Providing \fI\-\-no\-alpn\fP multiple times has no extra effect.
  2201. Disable it again with \-\-alpn.
  2202. Example:
  2203. .nf
  2204. curl \-\-no\-alpn https://example.com
  2205. .fi
  2206. See also \fI\-\-no\-npn\fP and \fI\-\-http2\fP. \fI\-\-no\-alpn\fP requires that the underlying libcurl was built to support TLS.
  2207. .IP "\-N, \-\-no\-buffer"
  2208. Disables the buffering of the output stream. In normal work situations, curl
  2209. uses a standard buffered output stream that has the effect that it outputs the
  2210. data in chunks, not necessarily exactly when the data arrives. Using this
  2211. option disables that buffering.
  2212. Note that this is the negated option name documented. You can use \--buffer to
  2213. enable buffering again.
  2214. Providing \fI\-N, \-\-no\-buffer\fP multiple times has no extra effect.
  2215. Disable it again with \-\-buffer.
  2216. Example:
  2217. .nf
  2218. curl \-\-no\-buffer https://example.com
  2219. .fi
  2220. See also \fI-#, \-\-progress\-bar\fP.
  2221. .IP "\-\-no\-clobber"
  2222. When used in conjunction with the \fI\-o, \-\-output\fP, \fI\-J, \-\-remote\-header\-name\fP,
  2223. \fI\-O, \-\-remote\-name\fP, or \fI\-\-remote\-name\-all\fP options, curl avoids overwriting files
  2224. that already exist. Instead, a dot and a number gets appended to the name of
  2225. the file that would be created, up to filename.100 after which it does not
  2226. create any file.
  2227. Note that this is the negated option name documented. You can thus use
  2228. -\-clobber to enforce the clobbering, even if \fI\-J, \-\-remote\-header\-name\fP is
  2229. specified.
  2230. Providing \fI\-\-no\-clobber\fP multiple times has no extra effect.
  2231. Disable it again with \-\-clobber.
  2232. Example:
  2233. .nf
  2234. curl \-\-no\-clobber \-\-output local/dir/file https://example.com
  2235. .fi
  2236. See also \fI-o, \-\-output\fP and \fI-O, \-\-remote\-name\fP. Added in 7.83.0.
  2237. .IP "\-\-no\-keepalive"
  2238. Disables the use of keepalive messages on the TCP connection. curl otherwise
  2239. enables them by default.
  2240. Note that this is the negated option name documented. You can thus use
  2241. -\-keepalive to enforce keepalive.
  2242. Providing \fI\-\-no\-keepalive\fP multiple times has no extra effect.
  2243. Disable it again with \-\-keepalive.
  2244. Example:
  2245. .nf
  2246. curl \-\-no\-keepalive https://example.com
  2247. .fi
  2248. See also \fI\-\-keepalive\-time\fP.
  2249. .IP "\-\-no\-npn"
  2250. (HTTPS) curl never uses NPN, this option has no effect (added in 7.86.0).
  2251. Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
  2252. with an SSL library that supports NPN. NPN is used by a libcurl that supports
  2253. HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
  2254. Providing \fI\-\-no\-npn\fP multiple times has no extra effect.
  2255. Disable it again with \-\-npn.
  2256. Example:
  2257. .nf
  2258. curl \-\-no\-npn https://example.com
  2259. .fi
  2260. See also \fI\-\-no\-alpn\fP and \fI\-\-http2\fP. \fI\-\-no\-npn\fP requires that the underlying libcurl was built to support TLS.
  2261. .IP "\-\-no\-progress\-meter"
  2262. Option to switch off the progress meter output without muting or otherwise
  2263. affecting warning and informational messages like \fI\-s, \-\-silent\fP does.
  2264. Note that this is the negated option name documented. You can thus use
  2265. -\-progress\-meter to enable the progress meter again.
  2266. Providing \fI\-\-no\-progress\-meter\fP multiple times has no extra effect.
  2267. Disable it again with \-\-progress\-meter.
  2268. Example:
  2269. .nf
  2270. curl \-\-no\-progress\-meter \-o store https://example.com
  2271. .fi
  2272. See also \fI-v, \-\-verbose\fP and \fI-s, \-\-silent\fP. Added in 7.67.0.
  2273. .IP "\-\-no\-sessionid"
  2274. (TLS) Disable curl\(aqs use of SSL session\-ID caching. By default all transfers are
  2275. done using the cache. Note that while nothing should ever get hurt by
  2276. attempting to reuse SSL session\-IDs, there seem to be broken SSL
  2277. implementations in the wild that may require you to disable this in order for
  2278. you to succeed.
  2279. Note that this is the negated option name documented. You can thus use
  2280. -\-sessionid to enforce session\-ID caching.
  2281. Providing \fI\-\-no\-sessionid\fP multiple times has no extra effect.
  2282. Disable it again with \-\-sessionid.
  2283. Example:
  2284. .nf
  2285. curl \-\-no\-sessionid https://example.com
  2286. .fi
  2287. See also \fI-k, \-\-insecure\fP.
  2288. .IP "\-\-noproxy <no\-proxy\-list>"
  2289. Comma\-separated list of hosts for which not to use a proxy, if one is
  2290. specified. The only wildcard is a single * character, which matches all hosts,
  2291. and effectively disables the proxy. Each name in this list is matched as
  2292. either a domain which contains the hostname, or the hostname itself. For
  2293. example, local.com would match local.com, local.com:80, and www.local.com, but
  2294. not www.notlocal.com.
  2295. This option overrides the environment variables that disable the proxy
  2296. (\(aqno_proxy\(aq and \(aqNO_PROXY\(aq) (added in 7.53.0). If there is an environment
  2297. variable disabling a proxy, you can set the no proxy list to "" to override
  2298. it.
  2299. IP addresses specified to this option can be provided using CIDR notation
  2300. (added in 7.86.0): an appended slash and number specifies the number of
  2301. \(dqnetwork bits" out of the address to use in the comparison. For example
  2302. \(dq192.168.0.0/16" would match all addresses starting with "192.168".
  2303. If \fI\-\-noproxy\fP is provided several times, the last set value is used.
  2304. Example:
  2305. .nf
  2306. curl \-\-noproxy "www.example" https://example.com
  2307. .fi
  2308. See also \fI-x, \-\-proxy\fP.
  2309. .IP "\-\-ntlm\-wb"
  2310. (HTTP) Enables NTLM much in the style \fI\-\-ntlm\fP does, but hand over the authentication
  2311. to the separate binary ntlmauth application that is executed when needed.
  2312. Providing \fI\-\-ntlm\-wb\fP multiple times has no extra effect.
  2313. Example:
  2314. .nf
  2315. curl \-\-ntlm\-wb \-u user:password https://example.com
  2316. .fi
  2317. See also \fI\-\-ntlm\fP and \fI\-\-proxy\-ntlm\fP.
  2318. .IP "\-\-ntlm"
  2319. (HTTP) Enables NTLM authentication. The NTLM authentication method was designed by
  2320. Microsoft and is used by IIS web servers. It is a proprietary protocol,
  2321. reverse\-engineered by clever people and implemented in curl based on their
  2322. efforts. This kind of behavior should not be endorsed, you should encourage
  2323. everyone who uses NTLM to switch to a public and documented authentication
  2324. method instead, such as Digest.
  2325. If you want to enable NTLM for your proxy authentication, then use
  2326. \fI\-\-proxy\-ntlm\fP.
  2327. Providing \fI\-\-ntlm\fP multiple times has no extra effect.
  2328. Example:
  2329. .nf
  2330. curl \-\-ntlm \-u user:password https://example.com
  2331. .fi
  2332. See also \fI\-\-proxy\-ntlm\fP. \fI\-\-ntlm\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI\-\-basic\fP and \fI\-\-negotiate\fP and \fI\-\-digest\fP and \fI\-\-anyauth\fP.
  2333. .IP "\-\-oauth2\-bearer <token>"
  2334. (IMAP LDAP POP3 SMTP HTTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
  2335. is used in conjunction with the user name which can be specified as part of
  2336. the \fI\-\-url\fP or \fI\-u, \-\-user\fP options.
  2337. The Bearer Token and user name are formatted according to RFC 6750.
  2338. If \fI\-\-oauth2\-bearer\fP is provided several times, the last set value is used.
  2339. Example:
  2340. .nf
  2341. curl \-\-oauth2\-bearer "mF_9.B5f\-4.1JqM" https://example.com
  2342. .fi
  2343. See also \fI\-\-basic\fP, \fI\-\-ntlm\fP and \fI\-\-digest\fP.
  2344. .IP "\-\-output\-dir <dir>"
  2345. This option specifies the directory in which files should be stored, when
  2346. \fI\-O, \-\-remote\-name\fP or \fI\-o, \-\-output\fP are used.
  2347. The given output directory is used for all URLs and output options on the
  2348. command line, up until the first \fI\-:, \-\-next\fP.
  2349. If the specified target directory does not exist, the operation fails unless
  2350. \fI\-\-create\-dirs\fP is also used.
  2351. If \fI\-\-output\-dir\fP is provided several times, the last set value is used.
  2352. Example:
  2353. .nf
  2354. curl \-\-output\-dir "tmp" \-O https://example.com
  2355. .fi
  2356. See also \fI-O, \-\-remote\-name\fP and \fI-J, \-\-remote\-header\-name\fP. Added in 7.73.0.
  2357. .IP "\-o, \-\-output <file>"
  2358. Write output to <file> instead of stdout. If you are using {} or [] to fetch
  2359. multiple documents, you should quote the URL and you can use \(aq#\(aq followed by a
  2360. number in the <file> specifier. That variable is replaced with the current
  2361. string for the URL being fetched. Like in:
  2362. .nf
  2363. curl "http://{one,two}.example.com" \-o "file_#1.txt"
  2364. .fi
  2365. or use several variables like:
  2366. .nf
  2367. curl "http://{site,host}.host[1\-5].example" \-o "#1_#2"
  2368. .fi
  2369. You may use this option as many times as the number of URLs you have. For
  2370. example, if you specify two URLs on the same command line, you can use it like
  2371. this:
  2372. .nf
  2373. curl \-o aa example.com \-o bb example.net
  2374. .fi
  2375. and the order of the \-o options and the URLs does not matter, just that the
  2376. first \-o is for the first URL and so on, so the above command line can also be
  2377. written as
  2378. .nf
  2379. curl example.com example.net \-o aa \-o bb
  2380. .fi
  2381. See also the \fI\-\-create\-dirs\fP option to create the local directories
  2382. dynamically. Specifying the output as \(aq\-\(aq (a single dash) passes the output to
  2383. stdout.
  2384. To suppress response bodies, you can redirect output to /dev/null:
  2385. .nf
  2386. curl example.com \-o /dev/null
  2387. .fi
  2388. Or for Windows:
  2389. .nf
  2390. curl example.com \-o nul
  2391. .fi
  2392. \fI\-o, \-\-output\fP can be used several times in a command line
  2393. Examples:
  2394. .nf
  2395. curl \-o file https://example.com
  2396. curl "http://{one,two}.example.com" \-o "file_#1.txt"
  2397. curl "http://{site,host}.host[1\-5].example" \-o "#1_#2"
  2398. curl \-o file https://example.com \-o file2 https://example.net
  2399. .fi
  2400. See also \fI-O, \-\-remote\-name\fP, \fI\-\-remote\-name\-all\fP and \fI-J, \-\-remote\-header\-name\fP.
  2401. .IP "\-\-parallel\-immediate"
  2402. When doing parallel transfers, this option instructs curl that it should
  2403. rather prefer opening up more connections in parallel at once rather than
  2404. waiting to see if new transfers can be added as multiplexed streams on another
  2405. connection.
  2406. This option is global and does not need to be specified for each use of --next.
  2407. Providing \fI\-\-parallel\-immediate\fP multiple times has no extra effect.
  2408. Disable it again with \-\-no\-parallel\-immediate.
  2409. Example:
  2410. .nf
  2411. curl \-\-parallel\-immediate \-Z https://example.com \-o file1 https://example.com \-o file2
  2412. .fi
  2413. See also \fI-Z, \-\-parallel\fP and \fI\-\-parallel\-max\fP. Added in 7.68.0.
  2414. .IP "\-\-parallel\-max <num>"
  2415. When asked to do parallel transfers, using \fI\-Z, \-\-parallel\fP, this option controls
  2416. the maximum amount of transfers to do simultaneously.
  2417. This option is global and does not need to be specified for each use of
  2418. \fI\-:, \-\-next\fP.
  2419. The default is 50.
  2420. If \fI\-\-parallel\-max\fP is provided several times, the last set value is used.
  2421. Example:
  2422. .nf
  2423. curl \-\-parallel\-max 100 \-Z https://example.com ftp://example.com/
  2424. .fi
  2425. See also \fI-Z, \-\-parallel\fP. Added in 7.66.0.
  2426. .IP "\-Z, \-\-parallel"
  2427. Makes curl perform its transfers in parallel as compared to the regular serial
  2428. manner.
  2429. This option is global and does not need to be specified for each use of --next.
  2430. Providing \fI\-Z, \-\-parallel\fP multiple times has no extra effect.
  2431. Disable it again with \-\-no\-parallel.
  2432. Example:
  2433. .nf
  2434. curl \-\-parallel https://example.com \-o file1 https://example.com \-o file2
  2435. .fi
  2436. See also \fI-:, \-\-next\fP and \fI-v, \-\-verbose\fP. Added in 7.66.0.
  2437. .IP "\-\-pass <phrase>"
  2438. (SSH TLS) Passphrase for the private key.
  2439. If \fI\-\-pass\fP is provided several times, the last set value is used.
  2440. Example:
  2441. .nf
  2442. curl \-\-pass secret \-\-key file https://example.com
  2443. .fi
  2444. See also \fI\-\-key\fP and \fI-u, \-\-user\fP.
  2445. .IP "\-\-path\-as\-is"
  2446. Tell curl to not handle sequences of /../ or /./ in the given URL
  2447. path. Normally curl squashes or merges them according to standards but with
  2448. this option set you tell it not to do that.
  2449. Providing \fI\-\-path\-as\-is\fP multiple times has no extra effect.
  2450. Disable it again with \-\-no\-path\-as\-is.
  2451. Example:
  2452. .nf
  2453. curl \-\-path\-as\-is https://example.com/../../etc/passwd
  2454. .fi
  2455. See also \fI\-\-request\-target\fP.
  2456. .IP "\-\-pinnedpubkey <hashes>"
  2457. (TLS) Tells curl to use the specified public key file (or hashes) to verify the
  2458. peer. This can be a path to a file which contains a single public key in PEM
  2459. or DER format, or any number of base64 encoded sha256 hashes preceded by
  2460. \(aqsha256//\(aq and separated by \(aq;\(aq.
  2461. When negotiating a TLS or SSL connection, the server sends a certificate
  2462. indicating its identity. A public key is extracted from this certificate and
  2463. if it does not exactly match the public key provided to this option, curl
  2464. aborts the connection before sending or receiving any data.
  2465. This option is independent of option \fI\-k, \-\-insecure\fP. If you use both options
  2466. together then the peer is still verified by public key.
  2467. PEM/DER support:
  2468. OpenSSL and GnuTLS, wolfSSL (added in 7.43.0), mbedTLS
  2469. , Secure Transport macOS 10.7+/iOS 10+ (7.54.1), Schannel
  2470. (7.58.1)
  2471. sha256 support:
  2472. OpenSSL, GnuTLS and wolfSSL, mbedTLS (added in 7.47.0),
  2473. Secure Transport macOS 10.7+/iOS 10+ (7.54.1), Schannel (7.58.1)
  2474. Other SSL backends not supported.
  2475. If \fI\-\-pinnedpubkey\fP is provided several times, the last set value is used.
  2476. Examples:
  2477. .nf
  2478. curl \-\-pinnedpubkey keyfile https://example.com
  2479. curl \-\-pinnedpubkey \(aqsha256//ce118b51897f4452dc\(aq https://example.com
  2480. .fi
  2481. See also \fI\-\-hostpubsha256\fP.
  2482. .IP "\-\-post301"
  2483. (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET
  2484. requests when following a 301 redirection. The non\-RFC behavior is ubiquitous
  2485. in web browsers, so curl does the conversion by default to maintain
  2486. consistency. However, a server may require a POST to remain a POST after such
  2487. a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
  2488. Providing \fI\-\-post301\fP multiple times has no extra effect.
  2489. Disable it again with \-\-no\-post301.
  2490. Example:
  2491. .nf
  2492. curl \-\-post301 \-\-location \-d "data" https://example.com
  2493. .fi
  2494. See also \fI\-\-post302\fP, \fI\-\-post303\fP and \fI-L, \-\-location\fP.
  2495. .IP "\-\-post302"
  2496. (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET
  2497. requests when following a 302 redirection. The non\-RFC behavior is ubiquitous
  2498. in web browsers, so curl does the conversion by default to maintain
  2499. consistency. However, a server may require a POST to remain a POST after such
  2500. a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
  2501. Providing \fI\-\-post302\fP multiple times has no extra effect.
  2502. Disable it again with \-\-no\-post302.
  2503. Example:
  2504. .nf
  2505. curl \-\-post302 \-\-location \-d "data" https://example.com
  2506. .fi
  2507. See also \fI\-\-post301\fP, \fI\-\-post303\fP and \fI-L, \-\-location\fP.
  2508. .IP "\-\-post303"
  2509. (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST requests into GET
  2510. requests when following 303 redirections. A server may require a POST to
  2511. remain a POST after a 303 redirection. This option is meaningful only when
  2512. using \fI\-L, \-\-location\fP.
  2513. Providing \fI\-\-post303\fP multiple times has no extra effect.
  2514. Disable it again with \-\-no\-post303.
  2515. Example:
  2516. .nf
  2517. curl \-\-post303 \-\-location \-d "data" https://example.com
  2518. .fi
  2519. See also \fI\-\-post302\fP, \fI\-\-post301\fP and \fI-L, \-\-location\fP.
  2520. .IP "\-\-preproxy [protocol://]host[:port]"
  2521. Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI\-x, \-\-proxy\fP. In
  2522. such a case curl first connects to the SOCKS proxy and then connects (through
  2523. SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy.
  2524. The pre proxy string should be specified with a protocol:// prefix to specify
  2525. alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
  2526. socks5h:// to request the specific SOCKS version to be used. No protocol
  2527. specified makes curl default to SOCKS4.
  2528. If the port number is not specified in the proxy string, it is assumed to be
  2529. 1080.
  2530. User and password that might be provided in the proxy string are URL decoded
  2531. by curl. This allows you to pass in special characters such as @ by using %40
  2532. or pass in a colon with %3a.
  2533. If \fI\-\-preproxy\fP is provided several times, the last set value is used.
  2534. Example:
  2535. .nf
  2536. curl \-\-preproxy socks5://proxy.example \-x http://http.example https://example.com
  2537. .fi
  2538. See also \fI-x, \-\-proxy\fP and \fI\-\-socks5\fP. Added in 7.52.0.
  2539. .IP "\-#, \-\-progress\-bar"
  2540. Make curl display transfer progress as a simple progress bar instead of the
  2541. standard, more informational, meter.
  2542. This progress bar draws a single line of \(aq#\(aq characters across the screen and
  2543. shows a percentage if the transfer size is known. For transfers without a
  2544. known size, there is a space ship (\-=o=\-) that moves back and forth but only
  2545. while data is being transferred, with a set of flying hash sign symbols on
  2546. top.
  2547. This option is global and does not need to be specified for each use of --next.
  2548. Providing \fI\-#, \-\-progress\-bar\fP multiple times has no extra effect.
  2549. Disable it again with \-\-no\-progress\-bar.
  2550. Example:
  2551. .nf
  2552. curl \-# \-O https://example.com
  2553. .fi
  2554. See also \fI\-\-styled\-output\fP.
  2555. .IP "\-\-proto\-default <protocol>"
  2556. Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
  2557. An unknown or unsupported protocol causes error
  2558. \fICURLE_UNSUPPORTED_PROTOCOL\fP (1).
  2559. This option does not change the default proxy protocol (http).
  2560. Without this option set, curl guesses protocol based on the host name, see
  2561. \fI\-\-url\fP for details.
  2562. If \fI\-\-proto\-default\fP is provided several times, the last set value is used.
  2563. Example:
  2564. .nf
  2565. curl \-\-proto\-default https ftp.example.com
  2566. .fi
  2567. See also \fI\-\-proto\fP and \fI\-\-proto\-redir\fP.
  2568. .IP "\-\-proto\-redir <protocols>"
  2569. Tells curl to limit what protocols it may use on redirect. Protocols denied by
  2570. \fI\-\-proto\fP are not overridden by this option. See \fI\-\-proto\fP for how protocols are
  2571. represented.
  2572. Example, allow only HTTP and HTTPS on redirect:
  2573. .nf
  2574. curl \--proto\-redir \-all,http,https http://example.com
  2575. .fi
  2576. By default curl only allows HTTP, HTTPS, FTP and FTPS on redirects (added in
  2577. 7.65.2). Specifying \fIall\fP or \fI+all\fP enables all protocols on redirects, which
  2578. is not good for security.
  2579. If \fI\-\-proto\-redir\fP is provided several times, the last set value is used.
  2580. Example:
  2581. .nf
  2582. curl \-\-proto\-redir =http,https https://example.com
  2583. .fi
  2584. See also \fI\-\-proto\fP.
  2585. .IP "\-\-proto <protocols>"
  2586. Tells curl to limit what protocols it may use for transfers. Protocols are
  2587. evaluated left to right, are comma separated, and are each a protocol name or
  2588. \(aqall\(aq, optionally prefixed by zero or more modifiers. Available modifiers are:
  2589. .RS
  2590. .TP 3
  2591. .B +
  2592. Permit this protocol in addition to protocols already permitted (this is
  2593. the default if no modifier is used).
  2594. .TP
  2595. .B \-
  2596. Deny this protocol, removing it from the list of protocols already permitted.
  2597. .TP
  2598. .B =
  2599. Permit only this protocol (ignoring the list already permitted), though
  2600. subject to later modification by subsequent entries in the comma separated
  2601. list.
  2602. .RE
  2603. .IP
  2604. For example:
  2605. .RS
  2606. .TP 15
  2607. .B \fI\-\-proto\fP \-ftps
  2608. uses the default protocols, but disables ftps
  2609. .TP
  2610. .B \fI\-\-proto\fP \-all,https,+http
  2611. only enables http and https
  2612. .TP
  2613. .B \fI\-\-proto\fP =http,https
  2614. also only enables http and https
  2615. .RE
  2616. .IP
  2617. Unknown and disabled protocols produce a warning. This allows scripts to
  2618. safely rely on being able to disable potentially dangerous protocols, without
  2619. relying upon support for that protocol being built into curl to avoid an error.
  2620. This option can be used multiple times, in which case the effect is the same
  2621. as concatenating the protocols into one instance of the option.
  2622. If \fI\-\-proto\fP is provided several times, the last set value is used.
  2623. Example:
  2624. .nf
  2625. curl \-\-proto =http,https,sftp https://example.com
  2626. .fi
  2627. See also \fI\-\-proto\-redir\fP and \fI\-\-proto\-default\fP.
  2628. .IP "\-\-proxy\-anyauth"
  2629. Tells curl to pick a suitable authentication method when communicating with
  2630. the given HTTP proxy. This might cause an extra request/response round\-trip.
  2631. Providing \fI\-\-proxy\-anyauth\fP multiple times has no extra effect.
  2632. Example:
  2633. .nf
  2634. curl \-\-proxy\-anyauth \-\-proxy\-user user:passwd \-x proxy https://example.com
  2635. .fi
  2636. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-basic\fP and \fI\-\-proxy\-digest\fP.
  2637. .IP "\-\-proxy\-basic"
  2638. Tells curl to use HTTP Basic authentication when communicating with the given
  2639. proxy. Use \fI\-\-basic\fP for enabling HTTP Basic with a remote host. Basic is the
  2640. default authentication method curl uses with proxies.
  2641. Providing \fI\-\-proxy\-basic\fP multiple times has no extra effect.
  2642. Example:
  2643. .nf
  2644. curl \-\-proxy\-basic \-\-proxy\-user user:passwd \-x proxy https://example.com
  2645. .fi
  2646. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-anyauth\fP and \fI\-\-proxy\-digest\fP.
  2647. .IP "\-\-proxy\-ca\-native"
  2648. (TLS) Tells curl to use the CA store from the native operating system to verify the
  2649. HTTPS proxy. By default, curl uses a CA store provided in a single file or
  2650. directory, but when using this option it interfaces the operating system\(aqs own
  2651. vault.
  2652. This option only works for curl on Windows when built to use OpenSSL. When
  2653. curl on Windows is built to use Schannel, this feature is implied and curl
  2654. then only uses the native CA store.
  2655. curl built with wolfSSL also supports this option (added in 8.3.0).
  2656. Providing \fI\-\-proxy\-ca\-native\fP multiple times has no extra effect.
  2657. Disable it again with \-\-no\-proxy\-ca\-native.
  2658. Example:
  2659. .nf
  2660. curl \-\-ca\-native https://example.com
  2661. .fi
  2662. See also \fI\-\-cacert\fP, \fI\-\-capath\fP and \fI-k, \-\-insecure\fP. Added in 8.2.0.
  2663. .IP "\-\-proxy\-cacert <file>"
  2664. Same as \fI\-\-cacert\fP but used in HTTPS proxy context.
  2665. If \fI\-\-proxy\-cacert\fP is provided several times, the last set value is used.
  2666. Example:
  2667. .nf
  2668. curl \-\-proxy\-cacert CA\-file.txt \-x https://proxy https://example.com
  2669. .fi
  2670. See also \fI\-\-proxy\-capath\fP, \fI\-\-cacert\fP, \fI\-\-capath\fP and \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2671. .IP "\-\-proxy\-capath <dir>"
  2672. Same as \fI\-\-capath\fP but used in HTTPS proxy context.
  2673. If \fI\-\-proxy\-capath\fP is provided several times, the last set value is used.
  2674. Example:
  2675. .nf
  2676. curl \-\-proxy\-capath /local/directory \-x https://proxy https://example.com
  2677. .fi
  2678. See also \fI\-\-proxy\-cacert\fP, \fI-x, \-\-proxy\fP and \fI\-\-capath\fP. Added in 7.52.0.
  2679. .IP "\-\-proxy\-cert\-type <type>"
  2680. Same as \fI\-\-cert\-type\fP but used in HTTPS proxy context.
  2681. If \fI\-\-proxy\-cert\-type\fP is provided several times, the last set value is used.
  2682. Example:
  2683. .nf
  2684. curl \-\-proxy\-cert\-type PEM \-\-proxy\-cert file \-x https://proxy https://example.com
  2685. .fi
  2686. See also \fI\-\-proxy\-cert\fP. Added in 7.52.0.
  2687. .IP "\-\-proxy\-cert <cert[:passwd]>"
  2688. Same as \fI\-E, \-\-cert\fP but used in HTTPS proxy context.
  2689. If \fI\-\-proxy\-cert\fP is provided several times, the last set value is used.
  2690. Example:
  2691. .nf
  2692. curl \-\-proxy\-cert file \-x https://proxy https://example.com
  2693. .fi
  2694. See also \fI\-\-proxy\-cert\-type\fP. Added in 7.52.0.
  2695. .IP "\-\-proxy\-ciphers <list>"
  2696. Same as \fI\-\-ciphers\fP but used in HTTPS proxy context.
  2697. Specifies which ciphers to use in the connection to the HTTPS proxy. The list
  2698. of ciphers must specify valid ciphers. Read up on SSL cipher list details on
  2699. this URL:
  2700. https://curl.se/docs/ssl\-ciphers.html
  2701. If \fI\-\-proxy\-ciphers\fP is provided several times, the last set value is used.
  2702. Example:
  2703. .nf
  2704. curl \-\-proxy\-ciphers ECDHE\-ECDSA\-AES256\-CCM8 \-x https://proxy https://example.com
  2705. .fi
  2706. See also \fI\-\-ciphers\fP, \fI\-\-curves\fP and \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2707. .IP "\-\-proxy\-crlfile <file>"
  2708. Same as \fI\-\-crlfile\fP but used in HTTPS proxy context.
  2709. If \fI\-\-proxy\-crlfile\fP is provided several times, the last set value is used.
  2710. Example:
  2711. .nf
  2712. curl \-\-proxy\-crlfile rejects.txt \-x https://proxy https://example.com
  2713. .fi
  2714. See also \fI\-\-crlfile\fP and \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2715. .IP "\-\-proxy\-digest"
  2716. Tells curl to use HTTP Digest authentication when communicating with the given
  2717. proxy. Use \fI\-\-digest\fP for enabling HTTP Digest with a remote host.
  2718. Providing \fI\-\-proxy\-digest\fP multiple times has no extra effect.
  2719. Example:
  2720. .nf
  2721. curl \-\-proxy\-digest \-\-proxy\-user user:passwd \-x proxy https://example.com
  2722. .fi
  2723. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-anyauth\fP and \fI\-\-proxy\-basic\fP.
  2724. .IP "\-\-proxy\-header <header/@file>"
  2725. (HTTP) Extra header to include in the request when sending HTTP to a proxy. You may
  2726. specify any number of extra headers. This is the equivalent option to \fI\-H, \-\-header\fP
  2727. but is for proxy communication only like in CONNECT requests when you want a
  2728. separate header sent to the proxy to what is sent to the actual remote host.
  2729. curl makes sure that each header you add/replace is sent with the proper
  2730. end\-of\-line marker, you should thus \fBnot\fP add that as a part of the header
  2731. content: do not add newlines or carriage returns, they only mess things up for
  2732. you.
  2733. Headers specified with this option are not included in requests that curl
  2734. knows are not be sent to a proxy.
  2735. This option can take an argument in @filename style, which then adds a header
  2736. for each line in the input file (added in 7.55.0). Using @\- makes curl read
  2737. the headers from stdin.
  2738. This option can be used multiple times to add/replace/remove multiple headers.
  2739. \fI\-\-proxy\-header\fP can be used several times in a command line
  2740. Examples:
  2741. .nf
  2742. curl \-\-proxy\-header "X\-First\-Name: Joe" \-x http://proxy https://example.com
  2743. curl \-\-proxy\-header "User\-Agent: surprise" \-x http://proxy https://example.com
  2744. curl \-\-proxy\-header "Host:" \-x http://proxy https://example.com
  2745. .fi
  2746. See also \fI-x, \-\-proxy\fP.
  2747. .IP "\-\-proxy\-http2"
  2748. (HTTP) Tells curl to try negotiate HTTP version 2 with an HTTPS proxy. The proxy might
  2749. still only offer HTTP/1 and then curl sticks to using that version.
  2750. This has no effect for any other kinds of proxies.
  2751. Providing \fI\-\-proxy\-http2\fP multiple times has no extra effect.
  2752. Disable it again with \-\-no\-proxy\-http2.
  2753. Example:
  2754. .nf
  2755. curl \-\-proxy\-http2 \-x proxy https://example.com
  2756. .fi
  2757. See also \fI-x, \-\-proxy\fP. \fI\-\-proxy\-http2\fP requires that the underlying libcurl was built to support HTTP/2. Added in 8.1.0.
  2758. .IP "\-\-proxy\-insecure"
  2759. Same as \fI\-k, \-\-insecure\fP but used in HTTPS proxy context.
  2760. Providing \fI\-\-proxy\-insecure\fP multiple times has no extra effect.
  2761. Disable it again with \-\-no\-proxy\-insecure.
  2762. Example:
  2763. .nf
  2764. curl \-\-proxy\-insecure \-x https://proxy https://example.com
  2765. .fi
  2766. See also \fI-x, \-\-proxy\fP and \fI-k, \-\-insecure\fP. Added in 7.52.0.
  2767. .IP "\-\-proxy\-key\-type <type>"
  2768. Same as \fI\-\-key\-type\fP but used in HTTPS proxy context.
  2769. If \fI\-\-proxy\-key\-type\fP is provided several times, the last set value is used.
  2770. Example:
  2771. .nf
  2772. curl \-\-proxy\-key\-type DER \-\-proxy\-key here \-x https://proxy https://example.com
  2773. .fi
  2774. See also \fI\-\-proxy\-key\fP and \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2775. .IP "\-\-proxy\-key <key>"
  2776. Same as \fI\-\-key\fP but used in HTTPS proxy context.
  2777. If \fI\-\-proxy\-key\fP is provided several times, the last set value is used.
  2778. Example:
  2779. .nf
  2780. curl \-\-proxy\-key here \-x https://proxy https://example.com
  2781. .fi
  2782. See also \fI\-\-proxy\-key\-type\fP and \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2783. .IP "\-\-proxy\-negotiate"
  2784. Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
  2785. with the given proxy. Use \fI\-\-negotiate\fP for enabling HTTP Negotiate (SPNEGO)
  2786. with a remote host.
  2787. Providing \fI\-\-proxy\-negotiate\fP multiple times has no extra effect.
  2788. Example:
  2789. .nf
  2790. curl \-\-proxy\-negotiate \-\-proxy\-user user:passwd \-x proxy https://example.com
  2791. .fi
  2792. See also \fI\-\-proxy\-anyauth\fP and \fI\-\-proxy\-basic\fP.
  2793. .IP "\-\-proxy\-ntlm"
  2794. Tells curl to use HTTP NTLM authentication when communicating with the given
  2795. proxy. Use \fI\-\-ntlm\fP for enabling NTLM with a remote host.
  2796. Providing \fI\-\-proxy\-ntlm\fP multiple times has no extra effect.
  2797. Example:
  2798. .nf
  2799. curl \-\-proxy\-ntlm \-\-proxy\-user user:passwd \-x http://proxy https://example.com
  2800. .fi
  2801. See also \fI\-\-proxy\-negotiate\fP and \fI\-\-proxy\-anyauth\fP.
  2802. .IP "\-\-proxy\-pass <phrase>"
  2803. Same as \fI\-\-pass\fP but used in HTTPS proxy context.
  2804. If \fI\-\-proxy\-pass\fP is provided several times, the last set value is used.
  2805. Example:
  2806. .nf
  2807. curl \-\-proxy\-pass secret \-\-proxy\-key here \-x https://proxy https://example.com
  2808. .fi
  2809. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-key\fP. Added in 7.52.0.
  2810. .IP "\-\-proxy\-pinnedpubkey <hashes>"
  2811. (TLS) Tells curl to use the specified public key file (or hashes) to verify the
  2812. proxy. This can be a path to a file which contains a single public key in PEM
  2813. or DER format, or any number of base64 encoded sha256 hashes preceded by
  2814. \(aqsha256//\(aq and separated by \(aq;\(aq.
  2815. When negotiating a TLS or SSL connection, the server sends a certificate
  2816. indicating its identity. A public key is extracted from this certificate and
  2817. if it does not exactly match the public key provided to this option, curl
  2818. aborts the connection before sending or receiving any data.
  2819. If \fI\-\-proxy\-pinnedpubkey\fP is provided several times, the last set value is used.
  2820. Examples:
  2821. .nf
  2822. curl \-\-proxy\-pinnedpubkey keyfile https://example.com
  2823. curl \-\-proxy\-pinnedpubkey \(aqsha256//ce118b51897f4452dc\(aq https://example.com
  2824. .fi
  2825. See also \fI\-\-pinnedpubkey\fP and \fI-x, \-\-proxy\fP. Added in 7.59.0.
  2826. .IP "\-\-proxy\-service\-name <name>"
  2827. This option allows you to change the service name for proxy negotiation.
  2828. If \fI\-\-proxy\-service\-name\fP is provided several times, the last set value is used.
  2829. Example:
  2830. .nf
  2831. curl \-\-proxy\-service\-name "shrubbery" \-x proxy https://example.com
  2832. .fi
  2833. See also \fI\-\-service\-name\fP and \fI-x, \-\-proxy\fP.
  2834. .IP "\-\-proxy\-ssl\-allow\-beast"
  2835. Same as \fI\-\-ssl\-allow\-beast\fP but used in HTTPS proxy context.
  2836. Providing \fI\-\-proxy\-ssl\-allow\-beast\fP multiple times has no extra effect.
  2837. Disable it again with \-\-no\-proxy\-ssl\-allow\-beast.
  2838. Example:
  2839. .nf
  2840. curl \-\-proxy\-ssl\-allow\-beast \-x https://proxy https://example.com
  2841. .fi
  2842. See also \fI\-\-ssl\-allow\-beast\fP and \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2843. .IP "\-\-proxy\-ssl\-auto\-client\-cert"
  2844. Same as \fI\-\-ssl\-auto\-client\-cert\fP but used in HTTPS proxy context.
  2845. Providing \fI\-\-proxy\-ssl\-auto\-client\-cert\fP multiple times has no extra effect.
  2846. Disable it again with \-\-no\-proxy\-ssl\-auto\-client\-cert.
  2847. Example:
  2848. .nf
  2849. curl \-\-proxy\-ssl\-auto\-client\-cert \-x https://proxy https://example.com
  2850. .fi
  2851. See also \fI\-\-ssl\-auto\-client\-cert\fP and \fI-x, \-\-proxy\fP. Added in 7.77.0.
  2852. .IP "\-\-proxy\-tls13\-ciphers <ciphersuite list>"
  2853. (TLS) Specifies which cipher suites to use in the connection to your HTTPS proxy
  2854. when it negotiates TLS 1.3. The list of ciphers suites must specify valid
  2855. ciphers. Read up on TLS 1.3 cipher suite details on this URL:
  2856. https://curl.se/docs/ssl\-ciphers.html
  2857. This option is currently used only when curl is built to use OpenSSL 1.1.1 or
  2858. later. If you are using a different SSL backend you can try setting TLS 1.3
  2859. cipher suites by using the \fI\-\-proxy\-ciphers\fP option.
  2860. If \fI\-\-proxy\-tls13\-ciphers\fP is provided several times, the last set value is used.
  2861. Example:
  2862. .nf
  2863. curl \-\-proxy\-tls13\-ciphers TLS_AES_128_GCM_SHA256 \-x proxy https://example.com
  2864. .fi
  2865. See also \fI\-\-tls13\-ciphers\fP, \fI\-\-curves\fP and \fI\-\-proxy\-ciphers\fP. Added in 7.61.0.
  2866. .IP "\-\-proxy\-tlsauthtype <type>"
  2867. Same as \fI\-\-tlsauthtype\fP but used in HTTPS proxy context.
  2868. If \fI\-\-proxy\-tlsauthtype\fP is provided several times, the last set value is used.
  2869. Example:
  2870. .nf
  2871. curl \-\-proxy\-tlsauthtype SRP \-x https://proxy https://example.com
  2872. .fi
  2873. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-tlsuser\fP. Added in 7.52.0.
  2874. .IP "\-\-proxy\-tlspassword <string>"
  2875. Same as \fI\-\-tlspassword\fP but used in HTTPS proxy context.
  2876. If \fI\-\-proxy\-tlspassword\fP is provided several times, the last set value is used.
  2877. Example:
  2878. .nf
  2879. curl \-\-proxy\-tlspassword passwd \-x https://proxy https://example.com
  2880. .fi
  2881. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-tlsuser\fP. Added in 7.52.0.
  2882. .IP "\-\-proxy\-tlsuser <name>"
  2883. Same as \fI\-\-tlsuser\fP but used in HTTPS proxy context.
  2884. If \fI\-\-proxy\-tlsuser\fP is provided several times, the last set value is used.
  2885. Example:
  2886. .nf
  2887. curl \-\-proxy\-tlsuser smith \-x https://proxy https://example.com
  2888. .fi
  2889. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-tlspassword\fP. Added in 7.52.0.
  2890. .IP "\-\-proxy\-tlsv1"
  2891. Same as \fI\-1, \-\-tlsv1\fP but used in HTTPS proxy context.
  2892. Providing \fI\-\-proxy\-tlsv1\fP multiple times has no extra effect.
  2893. Example:
  2894. .nf
  2895. curl \-\-proxy\-tlsv1 \-x https://proxy https://example.com
  2896. .fi
  2897. See also \fI-x, \-\-proxy\fP. Added in 7.52.0.
  2898. .IP "\-U, \-\-proxy\-user <user:password>"
  2899. Specify the user name and password to use for proxy authentication.
  2900. If you use a Windows SSPI\-enabled curl binary and do either Negotiate or NTLM
  2901. authentication then you can tell curl to select the user name and password
  2902. from your environment by specifying a single colon with this option: "\-U :".
  2903. On systems where it works, curl hides the given option argument from process
  2904. listings. This is not enough to protect credentials from possibly getting seen
  2905. by other users on the same system as they still are visible for a moment
  2906. before cleared. Such sensitive data should be retrieved from a file instead or
  2907. similar and never used in clear text in a command line.
  2908. If \fI\-U, \-\-proxy\-user\fP is provided several times, the last set value is used.
  2909. Example:
  2910. .nf
  2911. curl \-\-proxy\-user name:pwd \-x proxy https://example.com
  2912. .fi
  2913. See also \fI\-\-proxy\-pass\fP.
  2914. .IP "\-x, \-\-proxy [protocol://]host[:port]"
  2915. Use the specified proxy.
  2916. The proxy string can be specified with a protocol:// prefix. No protocol
  2917. specified or http:// it is treated as an HTTP proxy. Use socks4://,
  2918. socks4a://, socks5:// or socks5h:// to request a specific SOCKS version to be
  2919. used.
  2920. Unix domain sockets are supported for socks proxy. Set localhost for the host
  2921. part. e.g. socks5h://localhost/path/to/socket.sock
  2922. HTTPS proxy support works set with the https:// protocol prefix for OpenSSL
  2923. and GnuTLS (added in 7.52.0). It also works for BearSSL, mbedTLS, rustls,
  2924. Schannel, Secure Transport and wolfSSL (added in 7.87.0).
  2925. Unrecognized and unsupported proxy protocols cause an error (added in 7.52.0).
  2926. Ancient curl versions ignored unknown schemes and used http:// instead.
  2927. If the port number is not specified in the proxy string, it is assumed to be
  2928. 1080.
  2929. This option overrides existing environment variables that set the proxy to
  2930. use. If there is an environment variable setting a proxy, you can set proxy to
  2931. \(dq" to override it.
  2932. All operations that are performed over an HTTP proxy are transparently
  2933. converted to HTTP. It means that certain protocol specific operations might
  2934. not be available. This is not the case if you can tunnel through the proxy, as
  2935. one with the \fI\-p, \-\-proxytunnel\fP option.
  2936. User and password that might be provided in the proxy string are URL decoded
  2937. by curl. This allows you to pass in special characters such as @ by using %40
  2938. or pass in a colon with %3a.
  2939. The proxy host can be specified the same way as the proxy environment
  2940. variables, including the protocol prefix (http://) and the embedded user +
  2941. password.
  2942. When a proxy is used, the active FTP mode as set with \fI\-P, \-\-ftp\-port\fP, cannot be
  2943. used.
  2944. If \fI\-x, \-\-proxy\fP is provided several times, the last set value is used.
  2945. Example:
  2946. .nf
  2947. curl \-\-proxy http://proxy.example https://example.com
  2948. .fi
  2949. See also \fI\-\-socks5\fP and \fI\-\-proxy\-basic\fP.
  2950. .IP "\-\-proxy1.0 <host[:port]>"
  2951. Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
  2952. assumed at port 1080.
  2953. The only difference between this and the HTTP proxy option \fI\-x, \-\-proxy\fP, is that
  2954. attempts to use CONNECT through the proxy specifies an HTTP 1.0 protocol
  2955. instead of the default HTTP 1.1.
  2956. Providing \fI\-\-proxy1.0\fP multiple times has no extra effect.
  2957. Example:
  2958. .nf
  2959. curl \-\-proxy1.0 \-x http://proxy https://example.com
  2960. .fi
  2961. See also \fI-x, \-\-proxy\fP, \fI\-\-socks5\fP and \fI\-\-preproxy\fP.
  2962. .IP "\-p, \-\-proxytunnel"
  2963. When an HTTP proxy is used \fI\-x, \-\-proxy\fP, this option makes curl tunnel the traffic
  2964. through the proxy. The tunnel approach is made with the HTTP proxy CONNECT
  2965. request and requires that the proxy allows direct connect to the remote port
  2966. number curl wants to tunnel through to.
  2967. To suppress proxy CONNECT response headers when curl is set to output headers
  2968. use \fI\-\-suppress\-connect\-headers\fP.
  2969. Providing \fI\-p, \-\-proxytunnel\fP multiple times has no extra effect.
  2970. Disable it again with \-\-no\-proxytunnel.
  2971. Example:
  2972. .nf
  2973. curl \-\-proxytunnel \-x http://proxy https://example.com
  2974. .fi
  2975. See also \fI-x, \-\-proxy\fP.
  2976. .IP "\-\-pubkey <key>"
  2977. (SFTP SCP) Public key file name. Allows you to provide your public key in this separate
  2978. file.
  2979. curl attempts to automatically extract the public key from the private key
  2980. file, so passing this option is generally not required. Note that this public
  2981. key extraction requires libcurl to be linked against a copy of libssh2 1.2.8
  2982. or higher that is itself linked against OpenSSL.
  2983. If \fI\-\-pubkey\fP is provided several times, the last set value is used.
  2984. Example:
  2985. .nf
  2986. curl \-\-pubkey file.pub sftp://example.com/
  2987. .fi
  2988. See also \fI\-\-pass\fP.
  2989. .IP "\-Q, \-\-quote <command>"
  2990. (FTP SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are
  2991. sent BEFORE the transfer takes place (just after the initial \fBPWD\fP command
  2992. in an FTP transfer, to be exact). To make commands take place after a
  2993. successful transfer, prefix them with a dash \(aq\-\(aq.
  2994. (FTP only) To make commands be sent after curl has changed the working
  2995. directory, just before the file transfer command(s), prefix the command with a
  2996. \(aq+\(aq. This is not performed when a directory listing is performed.
  2997. You may specify any number of commands.
  2998. By default curl stops at first failure. To make curl continue even if the
  2999. command fails, prefix the command with an asterisk (*). Otherwise, if the
  3000. server returns failure for one of the commands, the entire operation is
  3001. aborted.
  3002. You must send syntactically correct FTP commands as RFC 959 defines to FTP
  3003. servers, or one of the commands listed below to SFTP servers.
  3004. SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
  3005. itself before sending them to the server. File names may be quoted
  3006. shell\-style to embed spaces or special characters. Following is the list of
  3007. all supported SFTP quote commands:
  3008. .RS
  3009. .TP
  3010. \fI\fP"atime date file"\fI\fP
  3011. The atime command sets the last access time of the file named by the file
  3012. operand. The <date expression> can be all sorts of date strings, see the
  3013. \fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
  3014. .TP
  3015. \fI\fP"chgrp group file"\fI\fP
  3016. The chgrp command sets the group ID of the file named by the file operand to
  3017. the group ID specified by the group operand. The group operand is a decimal
  3018. integer group ID.
  3019. .TP
  3020. \fI\fP"chmod mode file"\fI\fP
  3021. The chmod command modifies the file mode bits of the specified file. The
  3022. mode operand is an octal integer mode number.
  3023. .TP
  3024. \fI\fP"chown user file"\fI\fP
  3025. The chown command sets the owner of the file named by the file operand to the
  3026. user ID specified by the user operand. The user operand is a decimal
  3027. integer user ID.
  3028. .TP
  3029. \fI\fP"ln source_file target_file"\fI\fP
  3030. The ln and symlink commands create a symbolic link at the target_file location
  3031. pointing to the source_file location.
  3032. .TP
  3033. \fI\fP"mkdir directory_name"\fI\fP
  3034. The mkdir command creates the directory named by the directory_name operand.
  3035. .TP
  3036. \fI\fP"mtime date file"\fI\fP
  3037. The mtime command sets the last modification time of the file named by the
  3038. file operand. The <date expression> can be all sorts of date strings, see the
  3039. \fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
  3040. .TP
  3041. \fB"pwd"\fP
  3042. The pwd command returns the absolute path name of the current working directory.
  3043. .TP
  3044. \fI\fP"rename source target"\fI\fP
  3045. The rename command renames the file or directory named by the source
  3046. operand to the destination path named by the target operand.
  3047. .TP
  3048. \fI\fP"rm file"\fI\fP
  3049. The rm command removes the file specified by the file operand.
  3050. .TP
  3051. \fI\fP"rmdir directory"\fI\fP
  3052. The rmdir command removes the directory entry specified by the directory
  3053. operand, provided it is empty.
  3054. .TP
  3055. \fI\fP"symlink source_file target_file"\fI\fP
  3056. See ln.
  3057. .RE
  3058. .IP
  3059. \fI\-Q, \-\-quote\fP can be used several times in a command line
  3060. Example:
  3061. .nf
  3062. curl \-\-quote "DELE file" ftp://example.com/foo
  3063. .fi
  3064. See also \fI-X, \-\-request\fP.
  3065. .IP "\-\-random\-file <file>"
  3066. Deprecated option. This option is ignored (added in 7.84.0). Prior to that it
  3067. only had an effect on curl if built to use old versions of OpenSSL.
  3068. Specify the path name to file containing random data. The data may be used to
  3069. seed the random engine for SSL connections.
  3070. If \fI\-\-random\-file\fP is provided several times, the last set value is used.
  3071. Example:
  3072. .nf
  3073. curl \-\-random\-file rubbish https://example.com
  3074. .fi
  3075. See also \fI\-\-egd\-file\fP.
  3076. .IP "\-r, \-\-range <range>"
  3077. (HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
  3078. server or a local FILE. Ranges can be specified in a number of ways.
  3079. .RS
  3080. .TP 10
  3081. .B 0\-499
  3082. specifies the first 500 bytes
  3083. .TP
  3084. .B 500\-999
  3085. specifies the second 500 bytes
  3086. .TP
  3087. .B \-500
  3088. specifies the last 500 bytes
  3089. .TP
  3090. .B 9500\-
  3091. specifies the bytes from offset 9500 and forward
  3092. .TP
  3093. .B 0\-0,\-1
  3094. specifies the first and last byte only(*)(HTTP)
  3095. .TP
  3096. .B 100\-199,500\-599
  3097. specifies two separate 100\-byte ranges(*) (HTTP)
  3098. .RE
  3099. .IP
  3100. (*) = NOTE that this causes the server to reply with a multipart response,
  3101. which is returned as\-is by curl! Parsing or otherwise transforming this
  3102. response is the responsibility of the caller.
  3103. Only digit characters (0\-9) are valid in the \(aqstart\(aq and \(aqstop\(aq fields of the
  3104. \(aqstart\-stop\(aq range syntax. If a non\-digit character is given in the range, the
  3105. server\(aqs response is unspecified, depending on the server\(aqs configuration.
  3106. Many HTTP/1.1 servers do not have this feature enabled, so that when you
  3107. attempt to get a range, curl instead gets the whole document.
  3108. FTP and SFTP range downloads only support the simple \(aqstart\-stop\(aq syntax
  3109. (optionally with one of the numbers omitted). FTP use depends on the extended
  3110. FTP command SIZE.
  3111. If \fI\-r, \-\-range\fP is provided several times, the last set value is used.
  3112. Example:
  3113. .nf
  3114. curl \-\-range 22\-44 https://example.com
  3115. .fi
  3116. See also \fI-C, \-\-continue\-at\fP and \fI-a, \-\-append\fP.
  3117. .IP "\-\-rate <max request rate>"
  3118. Specify the maximum transfer frequency you allow curl to use \- in number of
  3119. transfer starts per time unit (sometimes called request rate). Without this
  3120. option, curl starts the next transfer as fast as possible.
  3121. If given several URLs and a transfer completes faster than the allowed rate,
  3122. curl waits until the next transfer is started to maintain the requested
  3123. rate. This option has no effect when \fI\-Z, \-\-parallel\fP is used.
  3124. The request rate is provided as "N/U" where N is an integer number and U is a
  3125. time unit. Supported units are \(aqs\(aq (second), \(aqm\(aq (minute), \(aqh\(aq (hour) and \(aqd\(aq
  3126. /(day, as in a 24 hour unit). The default time unit, if no "/U" is provided,
  3127. is number of transfers per hour.
  3128. If curl is told to allow 10 requests per minute, it does not start the next
  3129. request until 6 seconds have elapsed since the previous transfer was started.
  3130. This function uses millisecond resolution. If the allowed frequency is set
  3131. more than 1000 per second, it instead runs unrestricted.
  3132. When retrying transfers, enabled with \fI\-\-retry\fP, the separate retry delay logic
  3133. is used and not this setting.
  3134. This option is global and does not need to be specified for each use of --next.
  3135. If \fI\-\-rate\fP is provided several times, the last set value is used.
  3136. Examples:
  3137. .nf
  3138. curl \-\-rate 2/s https://example.com ...
  3139. curl \-\-rate 3/h https://example.com ...
  3140. curl \-\-rate 14/m https://example.com ...
  3141. .fi
  3142. See also \fI\-\-limit\-rate\fP and \fI\-\-retry\-delay\fP. Added in 7.84.0.
  3143. .IP "\-\-raw"
  3144. (HTTP) When used, it disables all internal HTTP decoding of content or transfer
  3145. encodings and instead makes them passed on unaltered, raw.
  3146. Providing \fI\-\-raw\fP multiple times has no extra effect.
  3147. Disable it again with \-\-no\-raw.
  3148. Example:
  3149. .nf
  3150. curl \-\-raw https://example.com
  3151. .fi
  3152. See also \fI\-\-tr\-encoding\fP.
  3153. .IP "\-e, \-\-referer <URL>"
  3154. (HTTP) Sends the "Referrer Page" information to the HTTP server. This can also be set
  3155. with the \fI\-H, \-\-header\fP flag of course. When used with \fI\-L, \-\-location\fP you can append
  3156. \(dq;auto" to the \fI\-e, \-\-referer\fP URL to make curl automatically set the previous URL
  3157. when it follows a Location: header. The ";auto" string can be used alone,
  3158. even if you do not set an initial \fI\-e, \-\-referer\fP.
  3159. If \fI\-e, \-\-referer\fP is provided several times, the last set value is used.
  3160. Examples:
  3161. .nf
  3162. curl \-\-referer "https://fake.example" https://example.com
  3163. curl \-\-referer "https://fake.example;auto" \-L https://example.com
  3164. curl \-\-referer ";auto" \-L https://example.com
  3165. .fi
  3166. See also \fI-A, \-\-user\-agent\fP and \fI-H, \-\-header\fP.
  3167. .IP "\-J, \-\-remote\-header\-name"
  3168. (HTTP) This option tells the \fI\-O, \-\-remote\-name\fP option to use the server\-specified
  3169. Content\-Disposition filename instead of extracting a filename from the URL. If
  3170. the server\-provided file name contains a path, that is stripped off before the
  3171. file name is used.
  3172. The file is saved in the current directory, or in the directory specified with
  3173. \fI\-\-output\-dir\fP.
  3174. If the server specifies a file name and a file with that name already exists
  3175. in the destination directory, it is not overwritten and an error occurs \-
  3176. unless you allow it by using the \--clobber option. If the server does not
  3177. specify a file name then this option has no effect.
  3178. There is no attempt to decode %\-sequences (yet) in the provided file name, so
  3179. this option may provide you with rather unexpected file names.
  3180. This feature uses the name from the "filename" field, it does not yet support
  3181. the "filename*" field (filenames with explicit character sets).
  3182. \fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A
  3183. rogue server could send you the name of a DLL or other file that could be
  3184. loaded automatically by Windows or some third party software.
  3185. Providing \fI\-J, \-\-remote\-header\-name\fP multiple times has no extra effect.
  3186. Disable it again with \-\-no\-remote\-header\-name.
  3187. Example:
  3188. .nf
  3189. curl \-OJ https://example.com/file
  3190. .fi
  3191. See also \fI-O, \-\-remote\-name\fP.
  3192. .IP "\-\-remote\-name\-all"
  3193. This option changes the default action for all given URLs to be dealt with as
  3194. if \fI\-O, \-\-remote\-name\fP were used for each one. So if you want to disable that for a
  3195. specific URL after \fI\-\-remote\-name\-all\fP has been used, you must use "\-o \-" or
  3196. -\-no\-remote\-name.
  3197. Providing \fI\-\-remote\-name\-all\fP multiple times has no extra effect.
  3198. Disable it again with \-\-no\-remote\-name\-all.
  3199. Example:
  3200. .nf
  3201. curl \-\-remote\-name\-all ftp://example.com/file1 ftp://example.com/file2
  3202. .fi
  3203. See also \fI-O, \-\-remote\-name\fP.
  3204. .IP "\-O, \-\-remote\-name"
  3205. Write output to a local file named like the remote file we get. (Only the file
  3206. part of the remote file is used, the path is cut off.)
  3207. The file is saved in the current working directory. If you want the file saved
  3208. in a different directory, make sure you change the current working directory
  3209. before invoking curl with this option or use \fI\-\-output\-dir\fP.
  3210. The remote file name to use for saving is extracted from the given URL,
  3211. nothing else, and if it already exists it is overwritten. If you want the
  3212. server to be able to choose the file name refer to \fI\-J, \-\-remote\-header\-name\fP which
  3213. can be used in addition to this option. If the server chooses a file name and
  3214. that name already exists it is not overwritten.
  3215. There is no URL decoding done on the file name. If it has %20 or other URL
  3216. encoded parts of the name, they end up as\-is as file name.
  3217. You may use this option as many times as the number of URLs you have.
  3218. \fI\-O, \-\-remote\-name\fP can be used several times in a command line
  3219. Example:
  3220. .nf
  3221. curl \-O https://example.com/filename
  3222. .fi
  3223. See also \fI\-\-remote\-name\-all\fP, \fI\-\-output\-dir\fP and \fI-J, \-\-remote\-header\-name\fP.
  3224. .IP "\-R, \-\-remote\-time"
  3225. Makes curl attempt to figure out the timestamp of the remote file that is
  3226. getting downloaded, and if that is available make the local file get that same
  3227. timestamp.
  3228. Providing \fI\-R, \-\-remote\-time\fP multiple times has no extra effect.
  3229. Disable it again with \-\-no\-remote\-time.
  3230. Example:
  3231. .nf
  3232. curl \-\-remote\-time \-o foo https://example.com
  3233. .fi
  3234. See also \fI-O, \-\-remote\-name\fP and \fI-z, \-\-time\-cond\fP.
  3235. .IP "\-\-remove\-on\-error"
  3236. When curl returns an error when told to save output in a local file, this
  3237. option removes that saved file before exiting. This prevents curl from
  3238. leaving a partial file in the case of an error during transfer.
  3239. If the output is not a file, this option has no effect.
  3240. Providing \fI\-\-remove\-on\-error\fP multiple times has no extra effect.
  3241. Disable it again with \-\-no\-remove\-on\-error.
  3242. Example:
  3243. .nf
  3244. curl \-\-remove\-on\-error \-o output https://example.com
  3245. .fi
  3246. See also \fI-f, \-\-fail\fP. Added in 7.83.0.
  3247. .IP "\-\-request\-target <path>"
  3248. (HTTP) Tells curl to use an alternative "target" (path) instead of using the path as
  3249. provided in the URL. Particularly useful when wanting to issue HTTP requests
  3250. without leading slash or other data that does not follow the regular URL
  3251. pattern, like "OPTIONS *".
  3252. curl passes on the verbatim string you give it its the request without any
  3253. filter or other safe guards. That includes white space and control characters.
  3254. If \fI\-\-request\-target\fP is provided several times, the last set value is used.
  3255. Example:
  3256. .nf
  3257. curl \-\-request\-target "*" \-X OPTIONS https://example.com
  3258. .fi
  3259. See also \fI-X, \-\-request\fP. Added in 7.55.0.
  3260. .IP "\-X, \-\-request <method>"
  3261. Change the method to use when starting the transfer.
  3262. curl passes on the verbatim string you give it its the request without any
  3263. filter or other safe guards. That includes white space and control characters.
  3264. .RS
  3265. .TP 15
  3266. \fBHTTP\fP
  3267. Specifies a custom request method to use when communicating with the HTTP
  3268. server. The specified request method is used instead of the method otherwise
  3269. used (which defaults to \fIGET\fP). Read the HTTP 1.1 specification for details
  3270. and explanations. Common additional HTTP requests include \fIPUT\fP and \fIDELETE\fP,
  3271. but related technologies like WebDAV offers \fIPROPFIND\fP, \fICOPY\fP, \fIMOVE\fP and
  3272. more.
  3273. Normally you do not need this option. All sorts of \fIGET\fP, \fIHEAD\fP, \fIPOST\fP and
  3274. \fIPUT\fP requests are rather invoked by using dedicated command line options.
  3275. This option only changes the actual word used in the HTTP request, it does not
  3276. alter the way curl behaves. So for example if you want to make a proper HEAD
  3277. request, using \-X HEAD does not suffice. You need to use the \fI\-I, \-\-head\fP option.
  3278. The method string you set with \fI\-X, \-\-request\fP is used for all requests, which
  3279. if you for example use \fI\-L, \-\-location\fP may cause unintended side\-effects when curl
  3280. does not change request method according to the HTTP 30x response codes \- and
  3281. similar.
  3282. .TP
  3283. \fBFTP\fP
  3284. Specifies a custom FTP command to use instead of \fILIST\fP when doing file lists
  3285. with FTP.
  3286. .TP
  3287. \fBPOP3\fP
  3288. Specifies a custom POP3 command to use instead of \fILIST\fP or \fIRETR\fP.
  3289. .TP
  3290. \fBIMAP\fP
  3291. Specifies a custom IMAP command to use instead of \fILIST\fP.
  3292. .TP
  3293. \fBSMTP\fP
  3294. Specifies a custom SMTP command to use instead of \fIHELP\fP or \fBVRFY\fP.
  3295. .RE
  3296. .IP
  3297. If \fI\-X, \-\-request\fP is provided several times, the last set value is used.
  3298. Examples:
  3299. .nf
  3300. curl \-X "DELETE" https://example.com
  3301. curl \-X NLST ftp://example.com/
  3302. .fi
  3303. See also \fI\-\-request\-target\fP.
  3304. .IP "\-\-resolve <[+]host:port:addr[,addr]...>"
  3305. Provide a custom address for a specific host and port pair. Using this, you
  3306. can make the curl requests(s) use a specified address and prevent the
  3307. otherwise normally resolved address to be used. Consider it a sort of
  3308. /etc/hosts alternative provided on the command line. The port number should be
  3309. the number used for the specific protocol the host is used for. It means
  3310. you need several entries if you want to provide address for the same host but
  3311. different ports.
  3312. By specifying \(aq*\(aq as host you can tell curl to resolve any host and specific
  3313. port pair to the specified address. Wildcard is resolved last so any \fI\-\-resolve\fP
  3314. with a specific host and port is used first.
  3315. The provided address set by this option is used even if \fI\-4, \-\-ipv4\fP or \fI\-6, \-\-ipv6\fP is
  3316. set to make curl use another IP version.
  3317. By prefixing the host with a \(aq+\(aq you can make the entry time out after curl\(aqs
  3318. default timeout (1 minute). Note that this only makes sense for long running
  3319. parallel transfers with a lot of files. In such cases, if this option is used
  3320. curl tries to resolve the host as it normally would once the timeout has
  3321. expired.
  3322. Support for providing the IP address within [brackets] was added in 7.57.0.
  3323. Support for providing multiple IP addresses per entry was added in 7.59.0.
  3324. Support for resolving with wildcard was added in 7.64.0.
  3325. Support for the \(aq+\(aq prefix was was added in 7.75.0.
  3326. \fI\-\-resolve\fP can be used several times in a command line
  3327. Example:
  3328. .nf
  3329. curl \-\-resolve example.com:443:127.0.0.1 https://example.com
  3330. .fi
  3331. See also \fI\-\-connect\-to\fP and \fI\-\-alt\-svc\fP.
  3332. .IP "\-\-retry\-all\-errors"
  3333. Retry on any error. This option is used together with \fI\-\-retry\fP.
  3334. This option is the "sledgehammer" of retrying. Do not use this option by
  3335. default (for example in your \fBcurlrc\fP), there may be unintended consequences
  3336. such as sending or receiving duplicate data. Do not use with redirected input
  3337. or output. You\(aqd be much better off handling your unique problems in shell
  3338. script. Please read the example below.
  3339. \fBWARNING\fP: For server compatibility curl attempts to retry failed flaky
  3340. transfers as close as possible to how they were started, but this is not
  3341. possible with redirected input or output. For example, before retrying it
  3342. removes output data from a failed partial transfer that was written to an
  3343. output file. However this is not true of data redirected to a | pipe or >
  3344. file, which are not reset. We strongly suggest you do not parse or record
  3345. output via redirect in combination with this option, since you may receive
  3346. duplicate data.
  3347. By default curl does not return error for transfers with an HTTP response code
  3348. that indicates an HTTP error, if the transfer was successful. For example, if
  3349. a server replies 404 Not Found and the reply is fully received then that is
  3350. not an error. When \fI\-\-retry\fP is used then curl retries on some HTTP response
  3351. codes that indicate transient HTTP errors, but that does not include most 4xx
  3352. response codes such as 404. If you want to retry on all response codes that
  3353. indicate HTTP errors (4xx and 5xx) then combine with \fI\-f, \-\-fail\fP.
  3354. Providing \fI\-\-retry\-all\-errors\fP multiple times has no extra effect.
  3355. Disable it again with \-\-no\-retry\-all\-errors.
  3356. Example:
  3357. .nf
  3358. curl \-\-retry 5 \-\-retry\-all\-errors https://example.com
  3359. .fi
  3360. See also \fI\-\-retry\fP. Added in 7.71.0.
  3361. .IP "\-\-retry\-connrefused"
  3362. In addition to the other conditions, consider ECONNREFUSED as a transient
  3363. error too for \fI\-\-retry\fP. This option is used together with \fI\-\-retry\fP.
  3364. Providing \fI\-\-retry\-connrefused\fP multiple times has no extra effect.
  3365. Disable it again with \-\-no\-retry\-connrefused.
  3366. Example:
  3367. .nf
  3368. curl \-\-retry\-connrefused \-\-retry 7 https://example.com
  3369. .fi
  3370. See also \fI\-\-retry\fP and \fI\-\-retry\-all\-errors\fP. Added in 7.52.0.
  3371. .IP "\-\-retry\-delay <seconds>"
  3372. Make curl sleep this amount of time before each retry when a transfer has
  3373. failed with a transient error (it changes the default backoff time algorithm
  3374. between retries). This option is only interesting if \fI\-\-retry\fP is also
  3375. used. Setting this delay to zero makes curl use the default backoff time.
  3376. If \fI\-\-retry\-delay\fP is provided several times, the last set value is used.
  3377. Example:
  3378. .nf
  3379. curl \-\-retry\-delay 5 \-\-retry 7 https://example.com
  3380. .fi
  3381. See also \fI\-\-retry\fP.
  3382. .IP "\-\-retry\-max\-time <seconds>"
  3383. The retry timer is reset before the first transfer attempt. Retries are done
  3384. as usual (see \fI\-\-retry\fP) as long as the timer has not reached this given
  3385. limit. Notice that if the timer has not reached the limit, the request is
  3386. made and while performing, it may take longer than this given time period. To
  3387. limit a single request\(aqs maximum time, use \fI\-m, \-\-max\-time\fP. Set this option to zero
  3388. to not timeout retries.
  3389. If \fI\-\-retry\-max\-time\fP is provided several times, the last set value is used.
  3390. Example:
  3391. .nf
  3392. curl \-\-retry\-max\-time 30 \-\-retry 10 https://example.com
  3393. .fi
  3394. See also \fI\-\-retry\fP.
  3395. .IP "\-\-retry <num>"
  3396. If a transient error is returned when curl tries to perform a transfer, it
  3397. retries this number of times before giving up. Setting the number to 0
  3398. makes curl do no retries (which is the default). Transient error means either:
  3399. a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
  3400. response code.
  3401. When curl is about to retry a transfer, it first waits one second and then for
  3402. all forthcoming retries it doubles the waiting time until it reaches 10
  3403. minutes which then remains delay between the rest of the retries. By using
  3404. \fI\-\-retry\-delay\fP you disable this exponential backoff algorithm. See also
  3405. \fI\-\-retry\-max\-time\fP to limit the total time allowed for retries.
  3406. curl complies with the Retry\-After: response header if one was present to know
  3407. when to issue the next retry (added in 7.66.0).
  3408. If \fI\-\-retry\fP is provided several times, the last set value is used.
  3409. Example:
  3410. .nf
  3411. curl \-\-retry 7 https://example.com
  3412. .fi
  3413. See also \fI\-\-retry\-max\-time\fP.
  3414. .IP "\-\-sasl\-authzid <identity>"
  3415. Use this authorization identity (\fBauthzid\fP), during SASL PLAIN
  3416. authentication, in addition to the authentication identity (\fBauthcid\fP) as
  3417. specified by \fI\-u, \-\-user\fP.
  3418. If the option is not specified, the server derives the \fBauthzid\fP from the
  3419. \fBauthcid\fP, but if specified, and depending on the server implementation, it
  3420. may be used to access another user\(aqs inbox, that the user has been granted
  3421. access to, or a shared mailbox for example.
  3422. If \fI\-\-sasl\-authzid\fP is provided several times, the last set value is used.
  3423. Example:
  3424. .nf
  3425. curl \-\-sasl\-authzid zid imap://example.com/
  3426. .fi
  3427. See also \fI\-\-login\-options\fP. Added in 7.66.0.
  3428. .IP "\-\-sasl\-ir"
  3429. Enable initial response in SASL authentication.
  3430. Providing \fI\-\-sasl\-ir\fP multiple times has no extra effect.
  3431. Disable it again with \-\-no\-sasl\-ir.
  3432. Example:
  3433. .nf
  3434. curl \-\-sasl\-ir imap://example.com/
  3435. .fi
  3436. See also \fI\-\-sasl\-authzid\fP.
  3437. .IP "\-\-service\-name <name>"
  3438. This option allows you to change the service name for SPNEGO.
  3439. If \fI\-\-service\-name\fP is provided several times, the last set value is used.
  3440. Example:
  3441. .nf
  3442. curl \-\-service\-name sockd/server https://example.com
  3443. .fi
  3444. See also \fI\-\-negotiate\fP and \fI\-\-proxy\-service\-name\fP.
  3445. .IP "\-S, \-\-show\-error"
  3446. When used with \fI\-s, \-\-silent\fP, it makes curl show an error message if it fails.
  3447. This option is global and does not need to be specified for each use of --next.
  3448. Providing \fI\-S, \-\-show\-error\fP multiple times has no extra effect.
  3449. Disable it again with \-\-no\-show\-error.
  3450. Example:
  3451. .nf
  3452. curl \-\-show\-error \-\-silent https://example.com
  3453. .fi
  3454. See also \fI\-\-no\-progress\-meter\fP.
  3455. .IP "\-s, \-\-silent"
  3456. Silent or quiet mode. Do not show progress meter or error messages. Makes Curl
  3457. mute. It still outputs the data you ask for, potentially even to the
  3458. terminal/stdout unless you redirect it.
  3459. Use \fI\-S, \-\-show\-error\fP in addition to this option to disable progress meter but
  3460. still show error messages.
  3461. Providing \fI\-s, \-\-silent\fP multiple times has no extra effect.
  3462. Disable it again with \-\-no\-silent.
  3463. Example:
  3464. .nf
  3465. curl \-s https://example.com
  3466. .fi
  3467. See also \fI-v, \-\-verbose\fP, \fI\-\-stderr\fP and \fI\-\-no\-progress\-meter\fP.
  3468. .IP "\-\-socks4 <host[:port]>"
  3469. Use the specified SOCKS4 proxy. If the port number is not specified, it is
  3470. assumed at port 1080. Using this socket type make curl resolve the host name
  3471. and passing the address on to the proxy.
  3472. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3473. socks4://localhost/path/to/socket.sock
  3474. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3475. exclusive.
  3476. This option is superfluous since you can specify a socks4 proxy with \fI\-x, \-\-proxy\fP
  3477. using a socks4:// protocol prefix.
  3478. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time proxy is used
  3479. with an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
  3480. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3481. HTTPS proxy.
  3482. If \fI\-\-socks4\fP is provided several times, the last set value is used.
  3483. Example:
  3484. .nf
  3485. curl \-\-socks4 hostname:4096 https://example.com
  3486. .fi
  3487. See also \fI\-\-socks4a\fP, \fI\-\-socks5\fP and \fI\-\-socks5\-hostname\fP.
  3488. .IP "\-\-socks4a <host[:port]>"
  3489. Use the specified SOCKS4a proxy. If the port number is not specified, it is
  3490. assumed at port 1080. This asks the proxy to resolve the host name.
  3491. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3492. socks4a://localhost/path/to/socket.sock
  3493. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3494. exclusive.
  3495. This option is superfluous since you can specify a socks4a proxy with \fI\-x, \-\-proxy\fP
  3496. using a socks4a:// protocol prefix.
  3497. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time \fI\-x, \-\-proxy\fP is
  3498. used with an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
  3499. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3500. HTTPS proxy.
  3501. If \fI\-\-socks4a\fP is provided several times, the last set value is used.
  3502. Example:
  3503. .nf
  3504. curl \-\-socks4a hostname:4096 https://example.com
  3505. .fi
  3506. See also \fI\-\-socks4\fP, \fI\-\-socks5\fP and \fI\-\-socks5\-hostname\fP.
  3507. .IP "\-\-socks5\-basic"
  3508. Tells curl to use username/password authentication when connecting to a SOCKS5
  3509. proxy. The username/password authentication is enabled by default. Use
  3510. \fI\-\-socks5\-gssapi\fP to force GSS\-API authentication to SOCKS5 proxies.
  3511. Providing \fI\-\-socks5\-basic\fP multiple times has no extra effect.
  3512. Example:
  3513. .nf
  3514. curl \-\-socks5\-basic \-\-socks5 hostname:4096 https://example.com
  3515. .fi
  3516. See also \fI\-\-socks5\fP. Added in 7.55.0.
  3517. .IP "\-\-socks5\-gssapi\-nec"
  3518. As part of the GSS\-API negotiation a protection mode is negotiated. RFC 1961
  3519. says in section 4.3/4.4 it should be protected, but the NEC reference
  3520. implementation does not. The option \fI\-\-socks5\-gssapi\-nec\fP allows the
  3521. unprotected exchange of the protection mode negotiation.
  3522. Providing \fI\-\-socks5\-gssapi\-nec\fP multiple times has no extra effect.
  3523. Disable it again with \-\-no\-socks5\-gssapi\-nec.
  3524. Example:
  3525. .nf
  3526. curl \-\-socks5\-gssapi\-nec \-\-socks5 hostname:4096 https://example.com
  3527. .fi
  3528. See also \fI\-\-socks5\fP.
  3529. .IP "\-\-socks5\-gssapi\-service <name>"
  3530. The default service name for a socks server is \fBrcmd/server\-fqdn\fP. This option
  3531. allows you to change it.
  3532. If \fI\-\-socks5\-gssapi\-service\fP is provided several times, the last set value is used.
  3533. Example:
  3534. .nf
  3535. curl \-\-socks5\-gssapi\-service sockd \-\-socks5 hostname:4096 https://example.com
  3536. .fi
  3537. See also \fI\-\-socks5\fP.
  3538. .IP "\-\-socks5\-gssapi"
  3539. Tells curl to use GSS\-API authentication when connecting to a SOCKS5 proxy.
  3540. The GSS\-API authentication is enabled by default (if curl is compiled with
  3541. GSS\-API support). Use \fI\-\-socks5\-basic\fP to force username/password authentication
  3542. to SOCKS5 proxies.
  3543. Providing \fI\-\-socks5\-gssapi\fP multiple times has no extra effect.
  3544. Disable it again with \-\-no\-socks5\-gssapi.
  3545. Example:
  3546. .nf
  3547. curl \-\-socks5\-gssapi \-\-socks5 hostname:4096 https://example.com
  3548. .fi
  3549. See also \fI\-\-socks5\fP. Added in 7.55.0.
  3550. .IP "\-\-socks5\-hostname <host[:port]>"
  3551. Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
  3552. the port number is not specified, it is assumed at port 1080.
  3553. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3554. socks5h://localhost/path/to/socket.sock
  3555. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3556. exclusive.
  3557. This option is superfluous since you can specify a socks5 hostname proxy with
  3558. \fI\-x, \-\-proxy\fP using a socks5h:// protocol prefix.
  3559. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time \fI\-x, \-\-proxy\fP is
  3560. used with an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
  3561. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3562. HTTPS proxy.
  3563. If \fI\-\-socks5\-hostname\fP is provided several times, the last set value is used.
  3564. Example:
  3565. .nf
  3566. curl \-\-socks5\-hostname proxy.example:7000 https://example.com
  3567. .fi
  3568. See also \fI\-\-socks5\fP and \fI\-\-socks4a\fP.
  3569. .IP "\-\-socks5 <host[:port]>"
  3570. Use the specified SOCKS5 proxy \- but resolve the host name locally. If the
  3571. port number is not specified, it is assumed at port 1080.
  3572. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3573. socks5://localhost/path/to/socket.sock
  3574. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3575. exclusive.
  3576. This option is superfluous since you can specify a socks5 proxy with \fI\-x, \-\-proxy\fP
  3577. using a socks5:// protocol prefix.
  3578. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time \fI\-x, \-\-proxy\fP is
  3579. used with an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
  3580. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3581. HTTPS proxy.
  3582. This option (as well as \fI\-\-socks4\fP) does not work with IPV6, FTPS or LDAP.
  3583. If \fI\-\-socks5\fP is provided several times, the last set value is used.
  3584. Example:
  3585. .nf
  3586. curl \-\-socks5 proxy.example:7000 https://example.com
  3587. .fi
  3588. See also \fI\-\-socks5\-hostname\fP and \fI\-\-socks4a\fP.
  3589. .IP "\-Y, \-\-speed\-limit <speed>"
  3590. If a transfer is slower than this given speed (in bytes per second) for
  3591. speed\-time seconds it gets aborted. speed\-time is set with \fI\-y, \-\-speed\-time\fP and is
  3592. 30 if not set.
  3593. If \fI\-Y, \-\-speed\-limit\fP is provided several times, the last set value is used.
  3594. Example:
  3595. .nf
  3596. curl \-\-speed\-limit 300 \-\-speed\-time 10 https://example.com
  3597. .fi
  3598. See also \fI-y, \-\-speed\-time\fP, \fI\-\-limit\-rate\fP and \fI-m, \-\-max\-time\fP.
  3599. .IP "\-y, \-\-speed\-time <seconds>"
  3600. If a transfer runs slower than speed\-limit bytes per second during a
  3601. speed\-time period, the transfer is aborted. If speed\-time is used, the default
  3602. speed\-limit is 1 unless set with \fI\-Y, \-\-speed\-limit\fP.
  3603. This option controls transfers (in both directions) but does not affect slow
  3604. connects etc. If this is a concern for you, try the \fI\-\-connect\-timeout\fP option.
  3605. If \fI\-y, \-\-speed\-time\fP is provided several times, the last set value is used.
  3606. Example:
  3607. .nf
  3608. curl \-\-speed\-limit 300 \-\-speed\-time 10 https://example.com
  3609. .fi
  3610. See also \fI-Y, \-\-speed\-limit\fP and \fI\-\-limit\-rate\fP.
  3611. .IP "\-\-ssl\-allow\-beast"
  3612. This option tells curl to not work around a security flaw in the SSL3 and
  3613. TLS1.0 protocols known as BEAST. If this option is not used, the SSL layer
  3614. may use workarounds known to cause interoperability problems with some older
  3615. SSL implementations.
  3616. \fBWARNING\fP: this option loosens the SSL security, and by using this flag you
  3617. ask for exactly that.
  3618. Providing \fI\-\-ssl\-allow\-beast\fP multiple times has no extra effect.
  3619. Disable it again with \-\-no\-ssl\-allow\-beast.
  3620. Example:
  3621. .nf
  3622. curl \-\-ssl\-allow\-beast https://example.com
  3623. .fi
  3624. See also \fI\-\-proxy\-ssl\-allow\-beast\fP and \fI-k, \-\-insecure\fP.
  3625. .IP "\-\-ssl\-auto\-client\-cert"
  3626. (Schannel) Tell libcurl to automatically locate and use a client certificate
  3627. for authentication, when requested by the server. Since the server can request
  3628. any certificate that supports client authentication in the OS certificate
  3629. store it could be a privacy violation and unexpected.
  3630. Providing \fI\-\-ssl\-auto\-client\-cert\fP multiple times has no extra effect.
  3631. Disable it again with \-\-no\-ssl\-auto\-client\-cert.
  3632. Example:
  3633. .nf
  3634. curl \-\-ssl\-auto\-client\-cert https://example.com
  3635. .fi
  3636. See also \fI\-\-proxy\-ssl\-auto\-client\-cert\fP. Added in 7.77.0.
  3637. .IP "\-\-ssl\-no\-revoke"
  3638. (Schannel) This option tells curl to disable certificate revocation checks.
  3639. WARNING: this option loosens the SSL security, and by using this flag you ask
  3640. for exactly that.
  3641. Providing \fI\-\-ssl\-no\-revoke\fP multiple times has no extra effect.
  3642. Disable it again with \-\-no\-ssl\-no\-revoke.
  3643. Example:
  3644. .nf
  3645. curl \-\-ssl\-no\-revoke https://example.com
  3646. .fi
  3647. See also \fI\-\-crlfile\fP.
  3648. .IP "\-\-ssl\-reqd"
  3649. (FTP IMAP POP3 SMTP LDAP) Require SSL/TLS for the connection. Terminates the connection if the transfer
  3650. cannot be upgraded to use SSL/TLS.
  3651. This option is handled in LDAP (added in 7.81.0). It is fully supported by the
  3652. OpenLDAP backend and rejected by the generic ldap backend if explicit TLS is
  3653. required.
  3654. This option is unnecessary if you use a URL scheme that in itself implies
  3655. immediate and implicit use of TLS, like for FTPS, IMAPS, POP3S, SMTPS and
  3656. LDAPS. Such a transfer always fails if the TLS handshake does not work.
  3657. This option was formerly known as \--ftp\-ssl\-reqd.
  3658. Providing \fI\-\-ssl\-reqd\fP multiple times has no extra effect.
  3659. Disable it again with \-\-no\-ssl\-reqd.
  3660. Example:
  3661. .nf
  3662. curl \-\-ssl\-reqd ftp://example.com
  3663. .fi
  3664. See also \fI\-\-ssl\fP and \fI-k, \-\-insecure\fP.
  3665. .IP "\-\-ssl\-revoke\-best\-effort"
  3666. (Schannel) This option tells curl to ignore certificate revocation checks when
  3667. they failed due to missing/offline distribution points for the revocation check
  3668. lists.
  3669. Providing \fI\-\-ssl\-revoke\-best\-effort\fP multiple times has no extra effect.
  3670. Disable it again with \-\-no\-ssl\-revoke\-best\-effort.
  3671. Example:
  3672. .nf
  3673. curl \-\-ssl\-revoke\-best\-effort https://example.com
  3674. .fi
  3675. See also \fI\-\-crlfile\fP and \fI-k, \-\-insecure\fP. Added in 7.70.0.
  3676. .IP "\-\-ssl"
  3677. (FTP IMAP POP3 SMTP LDAP) Warning: this is considered an insecure option. Consider using \fI\-\-ssl\-reqd\fP
  3678. instead to be sure curl upgrades to a secure connection.
  3679. Try to use SSL/TLS for the connection. Reverts to a non\-secure connection if
  3680. the server does not support SSL/TLS. See also \fI\-\-ftp\-ssl\-control\fP and \fI\-\-ssl\-reqd\fP
  3681. for different levels of encryption required.
  3682. This option is handled in LDAP (added in 7.81.0). It is fully supported by the
  3683. OpenLDAP backend and ignored by the generic ldap backend.
  3684. Please note that a server may close the connection if the negotiation does
  3685. not succeed.
  3686. This option was formerly known as \--ftp\-ssl. That option
  3687. name can still be used but might be removed in a future version.
  3688. Providing \fI\-\-ssl\fP multiple times has no extra effect.
  3689. Disable it again with \-\-no\-ssl.
  3690. Example:
  3691. .nf
  3692. curl \-\-ssl pop3://example.com/
  3693. .fi
  3694. See also \fI\-\-ssl\-reqd\fP, \fI-k, \-\-insecure\fP and \fI\-\-ciphers\fP.
  3695. .IP "\-2, \-\-sslv2"
  3696. (SSL) This option previously asked curl to use SSLv2, but is now ignored
  3697. (added in 7.77.0). SSLv2 is widely considered insecure (see RFC 6176).
  3698. Providing \fI\-2, \-\-sslv2\fP multiple times has no extra effect.
  3699. Example:
  3700. .nf
  3701. curl \-\-sslv2 https://example.com
  3702. .fi
  3703. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP. \fI-2, \-\-sslv2\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI-3, \-\-sslv3\fP and \fI-1, \-\-tlsv1\fP and \fI\-\-tlsv1.1\fP and \fI\-\-tlsv1.2\fP.
  3704. .IP "\-3, \-\-sslv3"
  3705. (SSL) This option previously asked curl to use SSLv3, but is now ignored
  3706. (added in 7.77.0). SSLv3 is widely considered insecure (see RFC 7568).
  3707. Providing \fI\-3, \-\-sslv3\fP multiple times has no extra effect.
  3708. Example:
  3709. .nf
  3710. curl \-\-sslv3 https://example.com
  3711. .fi
  3712. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP. \fI-3, \-\-sslv3\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI-2, \-\-sslv2\fP and \fI-1, \-\-tlsv1\fP and \fI\-\-tlsv1.1\fP and \fI\-\-tlsv1.2\fP.
  3713. .IP "\-\-stderr <file>"
  3714. Redirect all writes to stderr to the specified file instead. If the file name
  3715. is a plain \(aq\-\(aq, it is instead written to stdout.
  3716. This option is global and does not need to be specified for each use of --next.
  3717. If \fI\-\-stderr\fP is provided several times, the last set value is used.
  3718. Example:
  3719. .nf
  3720. curl \-\-stderr output.txt https://example.com
  3721. .fi
  3722. See also \fI-v, \-\-verbose\fP and \fI-s, \-\-silent\fP.
  3723. .IP "\-\-styled\-output"
  3724. Enables the automatic use of bold font styles when writing HTTP headers to the
  3725. terminal. Use \--no\-styled\-output to switch them off.
  3726. Styled output requires a terminal that supports bold fonts. This feature is
  3727. not present on curl for Windows due to lack of this capability.
  3728. This option is global and does not need to be specified for each use of --next.
  3729. Providing \fI\-\-styled\-output\fP multiple times has no extra effect.
  3730. Disable it again with \-\-no\-styled\-output.
  3731. Example:
  3732. .nf
  3733. curl \-\-styled\-output \-I https://example.com
  3734. .fi
  3735. See also \fI-I, \-\-head\fP and \fI-v, \-\-verbose\fP. Added in 7.61.0.
  3736. .IP "\-\-suppress\-connect\-headers"
  3737. When \fI\-p, \-\-proxytunnel\fP is used and a CONNECT request is made do not output proxy
  3738. CONNECT response headers. This option is meant to be used with \fI\-D, \-\-dump\-header\fP or
  3739. \fI\-i, \-\-include\fP which are used to show protocol headers in the output. It has no
  3740. effect on debug options such as \fI\-v, \-\-verbose\fP or \fI\-\-trace\fP, or any statistics.
  3741. Providing \fI\-\-suppress\-connect\-headers\fP multiple times has no extra effect.
  3742. Disable it again with \-\-no\-suppress\-connect\-headers.
  3743. Example:
  3744. .nf
  3745. curl \-\-suppress\-connect\-headers \-\-include \-x proxy https://example.com
  3746. .fi
  3747. See also \fI-D, \-\-dump\-header\fP, \fI-i, \-\-include\fP and \fI-p, \-\-proxytunnel\fP. Added in 7.54.0.
  3748. .IP "\-\-tcp\-fastopen"
  3749. Enable use of TCP Fast Open (RFC 7413). TCP Fast Open is a TCP extension that
  3750. allows data to get sent earlier over the connection (before the final
  3751. handshake ACK) if the client and server have been connected previously.
  3752. Providing \fI\-\-tcp\-fastopen\fP multiple times has no extra effect.
  3753. Disable it again with \-\-no\-tcp\-fastopen.
  3754. Example:
  3755. .nf
  3756. curl \-\-tcp\-fastopen https://example.com
  3757. .fi
  3758. See also \fI\-\-false\-start\fP.
  3759. .IP "\-\-tcp\-nodelay"
  3760. Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
  3761. details about this option.
  3762. curl sets this option by default and you need to explicitly switch it off if
  3763. you do not want it on (added in 7.50.2).
  3764. Providing \fI\-\-tcp\-nodelay\fP multiple times has no extra effect.
  3765. Disable it again with \-\-no\-tcp\-nodelay.
  3766. Example:
  3767. .nf
  3768. curl \-\-tcp\-nodelay https://example.com
  3769. .fi
  3770. See also \fI-N, \-\-no\-buffer\fP.
  3771. .IP "\-t, \-\-telnet\-option <opt=val>"
  3772. Pass options to the telnet protocol. Supported options are:
  3773. .RS
  3774. .TP 15
  3775. \fBTTYPE\fP=<term> Sets the terminal type.
  3776. .TP
  3777. \fBXDISPLOC\fP=<X display> Sets the X display location.
  3778. .TP
  3779. \fBNEW_ENV\fP=<var,val> Sets an environment variable.
  3780. .RE
  3781. .IP
  3782. \fI\-t, \-\-telnet\-option\fP can be used several times in a command line
  3783. Example:
  3784. .nf
  3785. curl \-t TTYPE=vt100 telnet://example.com/
  3786. .fi
  3787. See also \fI-K, \-\-config\fP.
  3788. .IP "\-\-tftp\-blksize <value>"
  3789. (TFTP) Set the TFTP \fBBLKSIZE\fP option (must be >512). This is the block size that
  3790. curl tries to use when transferring data to or from a TFTP server. By
  3791. default 512 bytes are used.
  3792. If \fI\-\-tftp\-blksize\fP is provided several times, the last set value is used.
  3793. Example:
  3794. .nf
  3795. curl \-\-tftp\-blksize 1024 tftp://example.com/file
  3796. .fi
  3797. See also \fI\-\-tftp\-no\-options\fP.
  3798. .IP "\-\-tftp\-no\-options"
  3799. (TFTP) Tells curl not to send TFTP options requests.
  3800. This option improves interop with some legacy servers that do not acknowledge
  3801. or properly implement TFTP options. When this option is used \fI\-\-tftp\-blksize\fP is
  3802. ignored.
  3803. Providing \fI\-\-tftp\-no\-options\fP multiple times has no extra effect.
  3804. Disable it again with \-\-no\-tftp\-no\-options.
  3805. Example:
  3806. .nf
  3807. curl \-\-tftp\-no\-options tftp://192.168.0.1/
  3808. .fi
  3809. See also \fI\-\-tftp\-blksize\fP.
  3810. .IP "\-z, \-\-time\-cond <time>"
  3811. (HTTP FTP) Request a file that has been modified later than the given time and date, or
  3812. one that has been modified before that time. The <date expression> can be all
  3813. sorts of date strings or if it does not match any internal ones, it is taken as
  3814. a filename and tries to get the modification date (mtime) from <file>
  3815. instead. See the \fIcurl_getdate(3)\fP man pages for date expression details.
  3816. Start the date expression with a dash (\-) to make it request for a document
  3817. that is older than the given date/time, default is a document that is newer
  3818. than the specified date/time.
  3819. If provided a non\-existing file, curl outputs a warning about that fact and
  3820. proceeds to do the transfer without a time condition.
  3821. If \fI\-z, \-\-time\-cond\fP is provided several times, the last set value is used.
  3822. Examples:
  3823. .nf
  3824. curl \-z "Wed 01 Sep 2021 12:18:00" https://example.com
  3825. curl \-z "\-Wed 01 Sep 2021 12:18:00" https://example.com
  3826. curl \-z file https://example.com
  3827. .fi
  3828. See also \fI\-\-etag\-compare\fP and \fI-R, \-\-remote\-time\fP.
  3829. .IP "\-\-tls\-max <VERSION>"
  3830. (TLS) VERSION defines maximum supported TLS version. The minimum acceptable version
  3831. is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3.
  3832. If the connection is done without TLS, this option has no effect. This
  3833. includes QUIC\-using (HTTP/3) transfers.
  3834. .RS
  3835. .IP "default"
  3836. Use up to recommended TLS version.
  3837. .IP "1.0"
  3838. Use up to TLSv1.0.
  3839. .IP "1.1"
  3840. Use up to TLSv1.1.
  3841. .IP "1.2"
  3842. Use up to TLSv1.2.
  3843. .IP "1.3"
  3844. Use up to TLSv1.3.
  3845. .RE
  3846. .IP
  3847. If \fI\-\-tls\-max\fP is provided several times, the last set value is used.
  3848. Examples:
  3849. .nf
  3850. curl \-\-tls\-max 1.2 https://example.com
  3851. curl \-\-tls\-max 1.3 \-\-tlsv1.2 https://example.com
  3852. .fi
  3853. See also \fI\-\-tlsv1.0\fP, \fI\-\-tlsv1.1\fP, \fI\-\-tlsv1.2\fP and \fI\-\-tlsv1.3\fP. \fI\-\-tls\-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0.
  3854. .IP "\-\-tls13\-ciphers <ciphersuite list>"
  3855. (TLS) Specifies which cipher suites to use in the connection if it negotiates TLS
  3856. 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3
  3857. cipher suite details on this URL:
  3858. https://curl.se/docs/ssl\-ciphers.html
  3859. This option is currently used only when curl is built to use OpenSSL 1.1.1 or
  3860. later, or Schannel. If you are using a different SSL backend you can try
  3861. setting TLS 1.3 cipher suites by using the \fI\-\-ciphers\fP option.
  3862. If \fI\-\-tls13\-ciphers\fP is provided several times, the last set value is used.
  3863. Example:
  3864. .nf
  3865. curl \-\-tls13\-ciphers TLS_AES_128_GCM_SHA256 https://example.com
  3866. .fi
  3867. See also \fI\-\-ciphers\fP, \fI\-\-curves\fP and \fI\-\-proxy\-tls13\-ciphers\fP. Added in 7.61.0.
  3868. .IP "\-\-tlsauthtype <type>"
  3869. Set TLS authentication type. Currently, the only supported option is "SRP",
  3870. for TLS\-SRP (RFC 5054). If \fI\-\-tlsuser\fP and \fI\-\-tlspassword\fP are specified but
  3871. \fI\-\-tlsauthtype\fP is not, then this option defaults to "SRP". This option works
  3872. only if the underlying libcurl is built with TLS\-SRP support, which requires
  3873. OpenSSL or GnuTLS with TLS\-SRP support.
  3874. If \fI\-\-tlsauthtype\fP is provided several times, the last set value is used.
  3875. Example:
  3876. .nf
  3877. curl \-\-tlsauthtype SRP https://example.com
  3878. .fi
  3879. See also \fI\-\-tlsuser\fP.
  3880. .IP "\-\-tlspassword <string>"
  3881. Set password for use with the TLS authentication method specified with
  3882. \fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlsuser\fP also be set.
  3883. This option does not work with TLS 1.3.
  3884. If \fI\-\-tlspassword\fP is provided several times, the last set value is used.
  3885. Example:
  3886. .nf
  3887. curl \-\-tlspassword pwd \-\-tlsuser user https://example.com
  3888. .fi
  3889. See also \fI\-\-tlsuser\fP.
  3890. .IP "\-\-tlsuser <name>"
  3891. Set username for use with the TLS authentication method specified with
  3892. \fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlspassword\fP also is set.
  3893. This option does not work with TLS 1.3.
  3894. If \fI\-\-tlsuser\fP is provided several times, the last set value is used.
  3895. Example:
  3896. .nf
  3897. curl \-\-tlspassword pwd \-\-tlsuser user https://example.com
  3898. .fi
  3899. See also \fI\-\-tlspassword\fP.
  3900. .IP "\-\-tlsv1.0"
  3901. (TLS) Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
  3902. In old versions of curl this option was documented to allow _only_ TLS 1.0.
  3903. That behavior was inconsistent depending on the TLS library. Use \fI\-\-tls\-max\fP if
  3904. you want to set a maximum TLS version.
  3905. Providing \fI\-\-tlsv1.0\fP multiple times has no extra effect.
  3906. Example:
  3907. .nf
  3908. curl \-\-tlsv1.0 https://example.com
  3909. .fi
  3910. See also \fI\-\-tlsv1.3\fP.
  3911. .IP "\-\-tlsv1.1"
  3912. (TLS) Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server.
  3913. In old versions of curl this option was documented to allow _only_ TLS 1.1.
  3914. That behavior was inconsistent depending on the TLS library. Use \fI\-\-tls\-max\fP if
  3915. you want to set a maximum TLS version.
  3916. Providing \fI\-\-tlsv1.1\fP multiple times has no extra effect.
  3917. Example:
  3918. .nf
  3919. curl \-\-tlsv1.1 https://example.com
  3920. .fi
  3921. See also \fI\-\-tlsv1.3\fP and \fI\-\-tls\-max\fP.
  3922. .IP "\-\-tlsv1.2"
  3923. (TLS) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server.
  3924. In old versions of curl this option was documented to allow _only_ TLS 1.2.
  3925. That behavior was inconsistent depending on the TLS library. Use \fI\-\-tls\-max\fP if
  3926. you want to set a maximum TLS version.
  3927. Providing \fI\-\-tlsv1.2\fP multiple times has no extra effect.
  3928. Example:
  3929. .nf
  3930. curl \-\-tlsv1.2 https://example.com
  3931. .fi
  3932. See also \fI\-\-tlsv1.3\fP and \fI\-\-tls\-max\fP.
  3933. .IP "\-\-tlsv1.3"
  3934. (TLS) Forces curl to use TLS version 1.3 or later when connecting to a remote TLS
  3935. server.
  3936. If the connection is done without TLS, this option has no effect. This
  3937. includes QUIC\-using (HTTP/3) transfers.
  3938. Note that TLS 1.3 is not supported by all TLS backends.
  3939. Providing \fI\-\-tlsv1.3\fP multiple times has no extra effect.
  3940. Example:
  3941. .nf
  3942. curl \-\-tlsv1.3 https://example.com
  3943. .fi
  3944. See also \fI\-\-tlsv1.2\fP and \fI\-\-tls\-max\fP. Added in 7.52.0.
  3945. .IP "\-1, \-\-tlsv1"
  3946. (TLS) Tells curl to use at least TLS version 1.x when negotiating with a remote TLS
  3947. server. That means TLS version 1.0 or higher
  3948. Providing \fI\-1, \-\-tlsv1\fP multiple times has no extra effect.
  3949. Example:
  3950. .nf
  3951. curl \-\-tlsv1 https://example.com
  3952. .fi
  3953. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP. \fI-1, \-\-tlsv1\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI\-\-tlsv1.1\fP and \fI\-\-tlsv1.2\fP and \fI\-\-tlsv1.3\fP.
  3954. .IP "\-\-tr\-encoding"
  3955. (HTTP) Request a compressed Transfer\-Encoding response using one of the algorithms
  3956. curl supports, and uncompress the data while receiving it.
  3957. Providing \fI\-\-tr\-encoding\fP multiple times has no extra effect.
  3958. Disable it again with \-\-no\-tr\-encoding.
  3959. Example:
  3960. .nf
  3961. curl \-\-tr\-encoding https://example.com
  3962. .fi
  3963. See also \fI\-\-compressed\fP.
  3964. .IP "\-\-trace\-ascii <file>"
  3965. Enables a full trace dump of all incoming and outgoing data, including
  3966. descriptive information, to the given output file. Use "\-" as filename to have
  3967. the output sent to stdout.
  3968. This is similar to \fI\-\-trace\fP, but leaves out the hex part and only shows the
  3969. ASCII part of the dump. It makes smaller output that might be easier to read
  3970. for untrained humans.
  3971. Note that verbose output of curl activities and network traffic might contain
  3972. sensitive data, including user names, credentials or secret data content. Be
  3973. aware and be careful when sharing trace logs with others.
  3974. This option is global and does not need to be specified for each use of --next.
  3975. If \fI\-\-trace\-ascii\fP is provided several times, the last set value is used.
  3976. Example:
  3977. .nf
  3978. curl \-\-trace\-ascii log.txt https://example.com
  3979. .fi
  3980. See also \fI-v, \-\-verbose\fP and \fI\-\-trace\fP. This option is mutually exclusive to \fI\-\-trace\fP and \fI-v, \-\-verbose\fP.
  3981. .IP "\-\-trace\-config <string>"
  3982. Set configuration for trace output. A comma\-separated list of components where
  3983. detailed output can be made available from. Names are case\-insensitive.
  3984. Specify \(aqall\(aq to enable all trace components.
  3985. In addition to trace component names, specify "ids" and "time" to
  3986. avoid extra \fI\-\-trace\-ids\fP or \fI\-\-trace\-time\fP parameters.
  3987. See the \fIcurl_global_trace(3)\fP man page for more details.
  3988. This option is global and does not need to be specified for each use of --next.
  3989. \fI\-\-trace\-config\fP can be used several times in a command line
  3990. Example:
  3991. .nf
  3992. curl \-\-trace\-config ids,http/2 https://example.com
  3993. .fi
  3994. See also \fI-v, \-\-verbose\fP and \fI\-\-trace\fP. This option is mutually exclusive to \fI\-\-trace\fP and \fI-v, \-\-verbose\fP. Added in 8.3.0.
  3995. .IP "\-\-trace\-ids"
  3996. Prepends the transfer and connection identifiers to each trace or verbose line that curl displays.
  3997. This option is global and does not need to be specified for each use of --next.
  3998. Providing \fI\-\-trace\-ids\fP multiple times has no extra effect.
  3999. Disable it again with \-\-no\-trace\-ids.
  4000. Example:
  4001. .nf
  4002. curl \-\-trace\-ids \-\-trace\-ascii output https://example.com
  4003. .fi
  4004. See also \fI\-\-trace\fP and \fI-v, \-\-verbose\fP. Added in 8.2.0.
  4005. .IP "\-\-trace\-time"
  4006. Prepends a time stamp to each trace or verbose line that curl displays.
  4007. This option is global and does not need to be specified for each use of --next.
  4008. Providing \fI\-\-trace\-time\fP multiple times has no extra effect.
  4009. Disable it again with \-\-no\-trace\-time.
  4010. Example:
  4011. .nf
  4012. curl \-\-trace\-time \-\-trace\-ascii output https://example.com
  4013. .fi
  4014. See also \fI\-\-trace\fP and \fI-v, \-\-verbose\fP.
  4015. .IP "\-\-trace <file>"
  4016. Enables a full trace dump of all incoming and outgoing data, including
  4017. descriptive information, to the given output file. Use "\-" as filename to have
  4018. the output sent to stdout. Use "%" as filename to have the output sent to
  4019. stderr.
  4020. Note that verbose output of curl activities and network traffic might contain
  4021. sensitive data, including user names, credentials or secret data content. Be
  4022. aware and be careful when sharing trace logs with others.
  4023. This option is global and does not need to be specified for each use of --next.
  4024. If \fI\-\-trace\fP is provided several times, the last set value is used.
  4025. Example:
  4026. .nf
  4027. curl \-\-trace log.txt https://example.com
  4028. .fi
  4029. See also \fI\-\-trace\-ascii\fP, \fI\-\-trace\-config\fP, \fI\-\-trace\-ids\fP and \fI\-\-trace\-time\fP. This option is mutually exclusive to \fI-v, \-\-verbose\fP and \fI\-\-trace\-ascii\fP.
  4030. .IP "\-\-unix\-socket <path>"
  4031. (HTTP) Connect through this Unix domain socket, instead of using the network.
  4032. If \fI\-\-unix\-socket\fP is provided several times, the last set value is used.
  4033. Example:
  4034. .nf
  4035. curl \-\-unix\-socket socket\-path https://example.com
  4036. .fi
  4037. See also \fI\-\-abstract\-unix\-socket\fP.
  4038. .IP "\-T, \-\-upload\-file <file>"
  4039. This transfers the specified local file to the remote URL.
  4040. If there is no file part in the specified URL, curl appends the local file
  4041. name to the end of the URL before the operation starts. You must use a
  4042. trailing slash (/) on the last directory to prove to curl that there is no
  4043. file name or curl thinks that your last directory name is the remote file name
  4044. to use.
  4045. When putting the local file name at the end of the URL, curl ignores what is
  4046. on the left side of any slash (/) or backslash (\\) used in the file name and
  4047. only appends what is on the right side of the rightmost such character.
  4048. Use the file name "\-" (a single dash) to use stdin instead of a given file.
  4049. Alternately, the file name "." (a single period) may be specified instead of
  4050. \(dq\-" to use stdin in non\-blocking mode to allow reading server output while
  4051. stdin is being uploaded.
  4052. If this option is used with a HTTP(S) URL, the PUT method is used.
  4053. You can specify one \fI\-T, \-\-upload\-file\fP for each URL on the command line. Each
  4054. \fI\-T, \-\-upload\-file\fP + URL pair specifies what to upload and to where. curl also
  4055. supports "globbing" of the \fI\-T, \-\-upload\-file\fP argument, meaning that you can upload
  4056. multiple files to a single URL by using the same URL globbing style supported
  4057. in the URL.
  4058. When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322
  4059. formatted. It has to feature the necessary set of headers and mail body
  4060. formatted correctly by the user as curl does not transcode nor encode it
  4061. further in any way.
  4062. \fI\-T, \-\-upload\-file\fP can be used several times in a command line
  4063. Examples:
  4064. .nf
  4065. curl \-T file https://example.com
  4066. curl \-T "img[1\-1000].png" ftp://ftp.example.com/
  4067. curl \-\-upload\-file "{file1,file2}" https://example.com
  4068. .fi
  4069. See also \fI-G, \-\-get\fP, \fI-I, \-\-head\fP, \fI-X, \-\-request\fP and \fI-d, \-\-data\fP.
  4070. .IP "\-\-url\-query <data>"
  4071. (all) This option adds a piece of data, usually a name + value pair, to the end of
  4072. the URL query part. The syntax is identical to that used for \fI\-\-data\-urlencode\fP
  4073. with one extension:
  4074. If the argument starts with a \(aq+\(aq (plus), the rest of the string is provided
  4075. as\-is unencoded.
  4076. The query part of a URL is the one following the question mark on the right
  4077. end.
  4078. \fI\-\-url\-query\fP can be used several times in a command line
  4079. Examples:
  4080. .nf
  4081. curl \-\-url\-query name=val https://example.com
  4082. curl \-\-url\-query =encodethis http://example.net/foo
  4083. curl \-\-url\-query name@file https://example.com
  4084. curl \-\-url\-query @fileonly https://example.com
  4085. curl \-\-url\-query "+name=%20foo" https://example.com
  4086. .fi
  4087. See also \fI\-\-data\-urlencode\fP and \fI-G, \-\-get\fP. Added in 7.87.0.
  4088. .IP "\-\-url <url>"
  4089. Specify a URL to fetch. This option is mostly handy when you want to specify
  4090. URL(s) in a config file.
  4091. If the given URL is missing a scheme name (such as "http://" or "ftp://" etc)
  4092. then curl makes a guess based on the host. If the outermost subdomain name
  4093. matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol is used,
  4094. otherwise HTTP is used. Guessing can be avoided by providing a full URL
  4095. including the scheme, or disabled by setting a default protocol (added in
  4096. 7.45.0), see \fI\-\-proto\-default\fP for details.
  4097. To control where this URL is written, use the \fI\-o, \-\-output\fP or the \fI\-O, \-\-remote\-name\fP
  4098. options.
  4099. \fBWARNING\fP: On Windows, particular file:// accesses can be converted to
  4100. network accesses by the operating system. Beware!
  4101. \fI\-\-url\fP can be used several times in a command line
  4102. Example:
  4103. .nf
  4104. curl \-\-url https://example.com
  4105. .fi
  4106. See also \fI-:, \-\-next\fP and \fI-K, \-\-config\fP.
  4107. .IP "\-B, \-\-use\-ascii"
  4108. (FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that
  4109. ends with ";type=A". This option causes data sent to stdout to be in text mode
  4110. for win32 systems.
  4111. Providing \fI\-B, \-\-use\-ascii\fP multiple times has no extra effect.
  4112. Disable it again with \-\-no\-use\-ascii.
  4113. Example:
  4114. .nf
  4115. curl \-B ftp://example.com/README
  4116. .fi
  4117. See also \fI\-\-crlf\fP and \fI\-\-data\-ascii\fP.
  4118. .IP "\-A, \-\-user\-agent <name>"
  4119. (HTTP) Specify the User\-Agent string to send to the HTTP server. To encode blanks in
  4120. the string, surround the string with single quote marks. This header can also
  4121. be set with the \fI\-H, \-\-header\fP or the \fI\-\-proxy\-header\fP options.
  4122. If you give an empty argument to \fI\-A, \-\-user\-agent\fP (""), it removes the header
  4123. completely from the request. If you prefer a blank header, you can set it to a
  4124. single space (" ").
  4125. If \fI\-A, \-\-user\-agent\fP is provided several times, the last set value is used.
  4126. Example:
  4127. .nf
  4128. curl \-A "Agent 007" https://example.com
  4129. .fi
  4130. See also \fI-H, \-\-header\fP and \fI\-\-proxy\-header\fP.
  4131. .IP "\-u, \-\-user <user:password>"
  4132. Specify the user name and password to use for server authentication. Overrides
  4133. \fI\-n, \-\-netrc\fP and \fI\-\-netrc\-optional\fP.
  4134. If you simply specify the user name, curl prompts for a password.
  4135. The user name and passwords are split up on the first colon, which makes it
  4136. impossible to use a colon in the user name with this option. The password can,
  4137. still.
  4138. On systems where it works, curl hides the given option argument from process
  4139. listings. This is not enough to protect credentials from possibly getting seen
  4140. by other users on the same system as they still are visible for a brief moment
  4141. before cleared. Such sensitive data should be retrieved from a file instead or
  4142. similar and never used in clear text in a command line.
  4143. When using Kerberos V5 with a Windows based server you should include the
  4144. Windows domain name in the user name, in order for the server to successfully
  4145. obtain a Kerberos Ticket. If you do not, then the initial authentication
  4146. handshake may fail.
  4147. When using NTLM, the user name can be specified simply as the user name,
  4148. without the domain, if there is a single domain and forest in your setup
  4149. for example.
  4150. To specify the domain name use either Down\-Level Logon Name or UPN (User
  4151. Principal Name) formats. For example, EXAMPLE\\user and user@example.com
  4152. respectively.
  4153. If you use a Windows SSPI\-enabled curl binary and perform Kerberos V5,
  4154. Negotiate, NTLM or Digest authentication then you can tell curl to select
  4155. the user name and password from your environment by specifying a single colon
  4156. with this option: "\-u :".
  4157. If \fI\-u, \-\-user\fP is provided several times, the last set value is used.
  4158. Example:
  4159. .nf
  4160. curl \-u user:secret https://example.com
  4161. .fi
  4162. See also \fI-n, \-\-netrc\fP and \fI-K, \-\-config\fP.
  4163. .IP "\-\-variable <[%]name=text/@file>"
  4164. Set a variable with "name=content" or "name@file" (where "file" can be stdin
  4165. if set to a single dash (\-)). The name is a case sensitive identifier that
  4166. must consist of no other letters than a\-z, A\-Z, 0\-9 or underscore. The
  4167. specified content is then associated with this identifier.
  4168. Setting the same variable name again overwrites the old contents with the new.
  4169. The contents of a variable can be referenced in a later command line option
  4170. when that option name is prefixed with "\--expand\-", and the name is used as
  4171. \(dq{{name}}" (without the quotes).
  4172. \fI\-\-variable\fP can import environment variables into the name space. Opt to either
  4173. require the environment variable to be set or provide a default value for the
  4174. variable in case it is not already set.
  4175. \fI\-\-variable\fP %name imports the variable called \(aqname\(aq but exits with an error if
  4176. that environment variable is not already set. To provide a default value if
  4177. the environment variable is not set, use \fI\-\-variable\fP %name=content or
  4178. \fI\-\-variable\fP %name@content. Note that on some systems \- but not all \-
  4179. environment variables are case insensitive.
  4180. When expanding variables, curl supports a set of functions that can make the
  4181. variable contents more convenient to use. You apply a function to a variable
  4182. expansion by adding a colon and then list the desired functions in a
  4183. comma\-separated list that is evaluated in a left\-to\-right order. Variable
  4184. content holding null bytes that are not encoded when expanded, causes an
  4185. error.
  4186. Available functions:
  4187. .RS
  4188. .TP 15
  4189. \fBtrim\fP
  4190. removes all leading and trailing white space.
  4191. .TP
  4192. \fBjson\fP
  4193. outputs the content using JSON string quoting rules.
  4194. .TP
  4195. \fBurl\fP
  4196. shows the content URL (percent) encoded.
  4197. .TP
  4198. \fBb64\fP
  4199. expands the variable base64 encoded
  4200. .RE
  4201. .IP
  4202. \fI\-\-variable\fP can be used several times in a command line
  4203. Example:
  4204. .nf
  4205. curl \-\-variable name=smith https://example.com
  4206. .fi
  4207. See also \fI-K, \-\-config\fP. Added in 8.3.0.
  4208. .IP "\-v, \-\-verbose"
  4209. Makes curl verbose during the operation. Useful for debugging and seeing
  4210. what\(aqs going on "under the hood". A line starting with \(aq>\(aq means "header data"
  4211. sent by curl, \(aq<\(aq means "header data" received by curl that is hidden in
  4212. normal cases, and a line starting with \(aq*\(aq means additional info provided by
  4213. curl.
  4214. If you only want HTTP headers in the output, \fI\-i, \-\-include\fP or \fI\-D, \-\-dump\-header\fP might
  4215. be more suitable options.
  4216. If you think this option still does not give you enough details, consider using
  4217. \fI\-\-trace\fP or \fI\-\-trace\-ascii\fP instead.
  4218. Note that verbose output of curl activities and network traffic might contain
  4219. sensitive data, including user names, credentials or secret data content. Be
  4220. aware and be careful when sharing trace logs with others.
  4221. This option is global and does not need to be specified for each use of --next.
  4222. Providing \fI\-v, \-\-verbose\fP multiple times has no extra effect.
  4223. Disable it again with \-\-no\-verbose.
  4224. Example:
  4225. .nf
  4226. curl \-\-verbose https://example.com
  4227. .fi
  4228. See also \fI-i, \-\-include\fP, \fI-s, \-\-silent\fP, \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP. This option is mutually exclusive to \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP.
  4229. .IP "\-V, \-\-version"
  4230. Displays information about curl and the libcurl version it uses.
  4231. The first line includes the full version of curl, libcurl and other 3rd party
  4232. libraries linked with the executable.
  4233. The second line (starts with "Release\-Date:") shows the release date.
  4234. The third line (starts with "Protocols:") shows all protocols that libcurl
  4235. reports to support.
  4236. The fourth line (starts with "Features:") shows specific features libcurl
  4237. reports to offer. Available features include:
  4238. .RS
  4239. .IP "alt\-svc"
  4240. Support for the Alt\-Svc: header is provided.
  4241. .IP "AsynchDNS"
  4242. This curl uses asynchronous name resolves. Asynchronous name resolves can be
  4243. done using either the c\-ares or the threaded resolver backends.
  4244. .IP "brotli"
  4245. Support for automatic brotli compression over HTTP(S).
  4246. .IP "CharConv"
  4247. curl was built with support for character set conversions (like EBCDIC)
  4248. .IP "Debug"
  4249. This curl uses a libcurl built with Debug. This enables more error\-tracking
  4250. and memory debugging etc. For curl\-developers only!
  4251. .IP "gsasl"
  4252. The built\-in SASL authentication includes extensions to support SCRAM because
  4253. libcurl was built with libgsasl.
  4254. .IP "GSS\-API"
  4255. GSS\-API is supported.
  4256. .IP "HSTS"
  4257. HSTS support is present.
  4258. .IP "HTTP2"
  4259. HTTP/2 support has been built\-in.
  4260. .IP "HTTP3"
  4261. HTTP/3 support has been built\-in.
  4262. .IP "HTTPS\-proxy"
  4263. This curl is built to support HTTPS proxy.
  4264. .IP "IDN"
  4265. This curl supports IDN \- international domain names.
  4266. .IP "IPv6"
  4267. You can use IPv6 with this.
  4268. .IP "Kerberos"
  4269. Kerberos V5 authentication is supported.
  4270. .IP "Largefile"
  4271. This curl supports transfers of large files, files larger than 2GB.
  4272. .IP "libz"
  4273. Automatic decompression (via gzip, deflate) of compressed files over HTTP is
  4274. supported.
  4275. .IP "MultiSSL"
  4276. This curl supports multiple TLS backends.
  4277. .IP "NTLM"
  4278. NTLM authentication is supported.
  4279. .IP "NTLM_WB"
  4280. NTLM delegation to winbind helper is supported.
  4281. .IP "PSL"
  4282. PSL is short for Public Suffix List and means that this curl has been built
  4283. with knowledge about "public suffixes".
  4284. .IP "SPNEGO"
  4285. SPNEGO authentication is supported.
  4286. .IP "SSL"
  4287. SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S
  4288. and so on.
  4289. .IP "SSPI"
  4290. SSPI is supported.
  4291. .IP "TLS\-SRP"
  4292. SRP (Secure Remote Password) authentication is supported for TLS.
  4293. .IP "TrackMemory"
  4294. Debug memory tracking is supported.
  4295. .IP "Unicode"
  4296. Unicode support on Windows.
  4297. .IP "UnixSockets"
  4298. Unix sockets support is provided.
  4299. .IP "zstd"
  4300. Automatic decompression (via zstd) of compressed files over HTTP is supported.
  4301. .RE
  4302. .IP
  4303. Example:
  4304. .nf
  4305. curl \-\-version
  4306. .fi
  4307. See also \fI-h, \-\-help\fP and \fI-M, \-\-manual\fP.
  4308. .IP "\-w, \-\-write\-out <format>"
  4309. Make curl display information on stdout after a completed transfer. The format
  4310. is a string that may contain plain text mixed with any number of
  4311. variables. The format can be specified as a literal "string", or you can have
  4312. curl read the format from a file with "@filename" and to tell curl to read the
  4313. format from stdin you write "@\-".
  4314. The variables present in the output format are substituted by the value or
  4315. text that curl thinks fit, as described below. All variables are specified as
  4316. %{variable_name} and to output a normal % you just write them as %%. You can
  4317. output a newline by using \\n, a carriage return with \\r and a tab space with
  4318. \\t.
  4319. The output is by default written to standard output, but can be changed with
  4320. %{stderr} and %output{}.
  4321. Output HTTP headers from the most recent request by using \fI%header{name}\fP
  4322. where \fIname\fP is the case insensitive name of the header (without the trailing
  4323. colon). The header contents are exactly as sent over the network, with leading
  4324. and trailing whitespace trimmed (added in 7.84.0).
  4325. Select a specific target destination file to write the output to, by using
  4326. \fI%output{name}\fP (added in curl 8.3.0) where \fIname\fP is the full file name. The
  4327. output following that instruction is then written to that file. More than one
  4328. \fI%output{}\fP instruction can be specified in the same write\-out argument. If
  4329. the file name cannot be created, curl leaves the output destination to the one
  4330. used prior to the \fI%output{}\fP instruction. Use \fI%output{>>name}\fP to append
  4331. data to an existing file.
  4332. \fBNOTE:\fP
  4333. In Windows the %\-symbol is a special symbol used to expand environment
  4334. variables. In batch files all occurrences of % must be doubled when using this
  4335. option to properly escape. If this option is used at the command prompt then
  4336. the % cannot be escaped and unintended expansion is possible.
  4337. The variables available are:
  4338. .RS
  4339. .TP 15
  4340. \fBcerts\fP
  4341. Output the certificate chain with details. Supported only by the OpenSSL,
  4342. GnuTLS, Schannel and Secure Transport backends. (Added in 7.88.0)
  4343. .TP
  4344. \fBcontent_type\fP
  4345. The Content\-Type of the requested document, if there was any.
  4346. .TP
  4347. \fBerrormsg\fP
  4348. The error message. (Added in 7.75.0)
  4349. .TP
  4350. \fBexitcode\fP
  4351. The numerical exit code of the transfer. (Added in 7.75.0)
  4352. .TP
  4353. \fBfilename_effective\fP
  4354. The ultimate filename that curl writes out to. This is only meaningful if curl
  4355. is told to write to a file with the \fI\-O, \-\-remote\-name\fP or \fI\-o, \-\-output\fP
  4356. option. It\(aqs most useful in combination with the \fI\-J, \-\-remote\-header\-name\fP
  4357. option.
  4358. .TP
  4359. \fBftp_entry_path\fP
  4360. The initial path curl ended up in when logging on to the remote FTP
  4361. server.
  4362. .TP
  4363. \fBheader_json\fP
  4364. A JSON object with all HTTP response headers from the recent transfer. Values
  4365. are provided as arrays, since in the case of multiple headers there can be
  4366. multiple values. (Added in 7.83.0)
  4367. The header names provided in lowercase, listed in order of appearance over the
  4368. wire. Except for duplicated headers. They are grouped on the first occurrence
  4369. of that header, each value is presented in the JSON array.
  4370. .TP
  4371. \fBhttp_code\fP
  4372. The numerical response code that was found in the last retrieved HTTP(S) or
  4373. FTP(s) transfer.
  4374. .TP
  4375. \fBhttp_connect\fP
  4376. The numerical code that was found in the last response (from a proxy) to a
  4377. curl CONNECT request.
  4378. .TP
  4379. \fBhttp_version\fP
  4380. The http version that was effectively used. (Added in 7.50.0)
  4381. .TP
  4382. \fBjson\fP
  4383. A JSON object with all available keys. (Added in 7.70.0)
  4384. .TP
  4385. \fBlocal_ip\fP
  4386. The IP address of the local end of the most recently done connection \- can be
  4387. either IPv4 or IPv6.
  4388. .TP
  4389. \fBlocal_port\fP
  4390. The local port number of the most recently done connection.
  4391. .TP
  4392. \fBmethod\fP
  4393. The http method used in the most recent HTTP request. (Added in 7.72.0)
  4394. .TP
  4395. \fBnum_certs\fP
  4396. Number of server certificates received in the TLS handshake. Supported only by
  4397. the OpenSSL, GnuTLS, Schannel and Secure Transport backends.
  4398. (Added in 7.88.0)
  4399. .TP
  4400. \fBnum_connects\fP
  4401. Number of new connects made in the recent transfer.
  4402. .TP
  4403. \fBnum_headers\fP
  4404. The number of response headers in the most recent request (restarted at each
  4405. redirect). Note that the status line IS NOT a header. (Added in 7.73.0)
  4406. .TP
  4407. \fBnum_redirects\fP
  4408. Number of redirects that were followed in the request.
  4409. .TP
  4410. \fBonerror\fP
  4411. The rest of the output is only shown if the transfer returned a non\-zero error.
  4412. (Added in 7.75.0)
  4413. .TP
  4414. \fBproxy_ssl_verify_result\fP
  4415. The result of the HTTPS proxy\(aqs SSL peer certificate verification that was
  4416. requested. 0 means the verification was successful. (Added in 7.52.0)
  4417. .TP
  4418. \fBredirect_url\fP
  4419. When an HTTP request was made without \fI\-L, \-\-location\fP to follow redirects (or when
  4420. \fI\-\-max\-redirs\fP is met), this variable shows the actual URL a redirect
  4421. \fIwould\fP have gone to.
  4422. .TP
  4423. \fBreferer\fP
  4424. The Referer: header, if there was any. (Added in 7.76.0)
  4425. .TP
  4426. \fBremote_ip\fP
  4427. The remote IP address of the most recently done connection \- can be either
  4428. IPv4 or IPv6.
  4429. .TP
  4430. \fBremote_port\fP
  4431. The remote port number of the most recently done connection.
  4432. .TP
  4433. \fBresponse_code\fP
  4434. The numerical response code that was found in the last transfer (formerly
  4435. known as "http_code").
  4436. .TP
  4437. \fBscheme\fP
  4438. The URL scheme (sometimes called protocol) that was effectively used. (Added in 7.52.0)
  4439. .TP
  4440. \fBsize_download\fP
  4441. The total amount of bytes that were downloaded. This is the size of the
  4442. body/data that was transferred, excluding headers.
  4443. .TP
  4444. \fBsize_header\fP
  4445. The total amount of bytes of the downloaded headers.
  4446. .TP
  4447. \fBsize_request\fP
  4448. The total amount of bytes that were sent in the HTTP request.
  4449. .TP
  4450. \fBsize_upload\fP
  4451. The total amount of bytes that were uploaded. This is the size of the
  4452. body/data that was transferred, excluding headers.
  4453. .TP
  4454. \fBspeed_download\fP
  4455. The average download speed that curl measured for the complete download. Bytes
  4456. per second.
  4457. .TP
  4458. \fBspeed_upload\fP
  4459. The average upload speed that curl measured for the complete upload. Bytes per
  4460. second.
  4461. .TP
  4462. \fBssl_verify_result\fP
  4463. The result of the SSL peer certificate verification that was requested. 0
  4464. means the verification was successful.
  4465. .TP
  4466. \fBstderr\fP
  4467. From this point on, the \fI\-w, \-\-write\-out\fP output is written to standard
  4468. error. (Added in 7.63.0)
  4469. .TP
  4470. \fBstdout\fP
  4471. From this point on, the \fI\-w, \-\-write\-out\fP output is written to standard output.
  4472. This is the default, but can be used to switch back after switching to stderr.
  4473. (Added in 7.63.0)
  4474. .TP
  4475. \fBtime_appconnect\fP
  4476. The time, in seconds, it took from the start until the SSL/SSH/etc
  4477. connect/handshake to the remote host was completed.
  4478. .TP
  4479. \fBtime_connect\fP
  4480. The time, in seconds, it took from the start until the TCP connect to the
  4481. remote host (or proxy) was completed.
  4482. .TP
  4483. \fBtime_namelookup\fP
  4484. The time, in seconds, it took from the start until the name resolving was
  4485. completed.
  4486. .TP
  4487. \fBtime_pretransfer\fP
  4488. The time, in seconds, it took from the start until the file transfer was just
  4489. about to begin. This includes all pre\-transfer commands and negotiations that
  4490. are specific to the particular protocol(s) involved.
  4491. .TP
  4492. \fBtime_redirect\fP
  4493. The time, in seconds, it took for all redirection steps including name lookup,
  4494. connect, pretransfer and transfer before the final transaction was
  4495. started. time_redirect shows the complete execution time for multiple
  4496. redirections.
  4497. .TP
  4498. \fBtime_starttransfer\fP
  4499. The time, in seconds, it took from the start until the first byte is received.
  4500. This includes time_pretransfer and also the time the server needed to calculate
  4501. the result.
  4502. .TP
  4503. \fBtime_total\fP
  4504. The total time, in seconds, that the full operation lasted.
  4505. .TP
  4506. \fBurl\fP
  4507. The URL that was fetched. (Added in 7.75.0)
  4508. .TP
  4509. \fBurl.scheme\fP
  4510. The scheme part of the URL that was fetched. (Added in 8.1.0)
  4511. .TP
  4512. \fBurl.user\fP
  4513. The user part of the URL that was fetched. (Added in 8.1.0)
  4514. .TP
  4515. \fBurl.password\fP
  4516. The password part of the URL that was fetched. (Added in 8.1.0)
  4517. .TP
  4518. \fBurl.options\fP
  4519. The options part of the URL that was fetched. (Added in 8.1.0)
  4520. .TP
  4521. \fBurl.host\fP
  4522. The host part of the URL that was fetched. (Added in 8.1.0)
  4523. .TP
  4524. \fBurl.port\fP
  4525. The port number of the URL that was fetched. If no port number was specified,
  4526. but the URL scheme is known, that scheme\(aqs default port number is
  4527. shown. (Added in 8.1.0)
  4528. .TP
  4529. \fBurl.path\fP
  4530. The path part of the URL that was fetched. (Added in 8.1.0)
  4531. .TP
  4532. \fBurl.query\fP
  4533. The query part of the URL that was fetched. (Added in 8.1.0)
  4534. .TP
  4535. \fBurl.fragment\fP
  4536. The fragment part of the URL that was fetched. (Added in 8.1.0)
  4537. .TP
  4538. \fBurl.zoneid\fP
  4539. The zone id part of the URL that was fetched. (Added in 8.1.0)
  4540. .TP
  4541. \fBurle.scheme\fP
  4542. The scheme part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4543. .TP
  4544. \fBurle.user\fP
  4545. The user part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4546. .TP
  4547. \fBurle.password\fP
  4548. The password part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4549. .TP
  4550. \fBurle.options\fP
  4551. The options part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4552. .TP
  4553. \fBurle.host\fP
  4554. The host part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4555. .TP
  4556. \fBurle.port\fP
  4557. The port number of the effective (last) URL that was fetched. If no port
  4558. number was specified, but the URL scheme is known, that scheme\(aqs default port
  4559. number is shown. (Added in 8.1.0)
  4560. .TP
  4561. \fBurle.path\fP
  4562. The path part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4563. .TP
  4564. \fBurle.query\fP
  4565. The query part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4566. .TP
  4567. \fBurle.fragment\fP
  4568. The fragment part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4569. .TP
  4570. \fBurle.zoneid\fP
  4571. The zone id part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4572. .TP
  4573. \fBurlnum\fP
  4574. The URL index number of this transfer, 0\-indexed. Unglobbed URLs share the
  4575. same index number as the origin globbed URL. (Added in 7.75.0)
  4576. .TP
  4577. \fBurl_effective\fP
  4578. The URL that was fetched last. This is most meaningful if you have told curl
  4579. to follow location: headers.
  4580. .RE
  4581. .IP
  4582. If \fI\-w, \-\-write\-out\fP is provided several times, the last set value is used.
  4583. Example:
  4584. .nf
  4585. curl \-w \(aq%{response_code}\\n\(aq https://example.com
  4586. .fi
  4587. See also \fI-v, \-\-verbose\fP and \fI-I, \-\-head\fP.
  4588. .IP "\-\-xattr"
  4589. When saving output to a file, this option tells curl to store certain file
  4590. metadata in extended file attributes. Currently, the URL is stored in the
  4591. xdg.origin.url attribute and, for HTTP, the content type is stored in
  4592. the mime_type attribute. If the file system does not support extended
  4593. attributes, a warning is issued.
  4594. Providing \fI\-\-xattr\fP multiple times has no extra effect.
  4595. Disable it again with \-\-no\-xattr.
  4596. Example:
  4597. .nf
  4598. curl \-\-xattr \-o storage https://example.com
  4599. .fi
  4600. See also \fI-R, \-\-remote\-time\fP, \fI-w, \-\-write\-out\fP and \fI-v, \-\-verbose\fP.
  4601. .SH FILES
  4602. .I ~/.curlrc
  4603. .RS
  4604. Default config file, see \fI\-K, \-\-config\fP for details.
  4605. .SH ENVIRONMENT
  4606. The environment variables can be specified in lower case or upper case. The
  4607. lower case version has precedence. http_proxy is an exception as it is only
  4608. available in lower case.
  4609. Using an environment variable to set the proxy has the same effect as using
  4610. the \fI\-x, \-\-proxy\fP option.
  4611. .IP "http_proxy [protocol://]<host>[:port]"
  4612. Sets the proxy server to use for HTTP.
  4613. .IP "HTTPS_PROXY [protocol://]<host>[:port]"
  4614. Sets the proxy server to use for HTTPS.
  4615. .IP "[url\-protocol]_PROXY [protocol://]<host>[:port]"
  4616. Sets the proxy server to use for [url\-protocol], where the protocol is a
  4617. protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
  4618. SMTP, LDAP, etc.
  4619. .IP "ALL_PROXY [protocol://]<host>[:port]"
  4620. Sets the proxy server to use if no protocol\-specific proxy is set.
  4621. .IP "NO_PROXY <comma\-separated list of hosts/domains>"
  4622. list of host names that should not go through any proxy. If set to an asterisk
  4623. \(aq*\(aq only, it matches all hosts. Each name in this list is matched as either
  4624. a domain name which contains the hostname, or the hostname itself.
  4625. This environment variable disables use of the proxy even when specified with
  4626. the \fI\-x, \-\-proxy\fP option. That is
  4627. .B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
  4628. .B http://direct.example.com
  4629. accesses the target URL directly, and
  4630. .B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
  4631. .B http://somewhere.example.com
  4632. accesses the target URL through the proxy.
  4633. The list of host names can also be include numerical IP addresses, and IPv6
  4634. versions should then be given without enclosing brackets.
  4635. IP addresses can be specified using CIDR notation: an appended slash and
  4636. number specifies the number of "network bits" out of the address to use in the
  4637. comparison (added in 7.86.0). For example "192.168.0.0/16" would match all
  4638. addresses starting with "192.168".
  4639. .IP "APPDATA <dir>"
  4640. On Windows, this variable is used when trying to find the home directory. If
  4641. the primary home variable are all unset.
  4642. .IP "COLUMNS <terminal width>"
  4643. If set, the specified number of characters is used as the terminal width when
  4644. the alternative progress\-bar is shown. If not set, curl tries to figure it out
  4645. using other ways.
  4646. .IP "CURL_CA_BUNDLE <file>"
  4647. If set, it is used as the \fI\-\-cacert\fP value.
  4648. .IP "CURL_HOME <dir>"
  4649. If set, is the first variable curl checks when trying to find its home
  4650. directory. If not set, it continues to check \fIXDG_CONFIG_HOME\fP
  4651. .IP "CURL_SSL_BACKEND <TLS backend>"
  4652. If curl was built with support for "MultiSSL", meaning that it has built\-in
  4653. support for more than one TLS backend, this environment variable can be set to
  4654. the case insensitive name of the particular backend to use when curl is
  4655. invoked. Setting a name that is not a built\-in alternative makes curl stay
  4656. with the default.
  4657. SSL backend names (case\-insensitive): \fBbearssl\fP, \fBgnutls\fP, \fBmbedtls\fP,
  4658. \fBopenssl\fP, \fBrustls\fP, \fBschannel\fP, \fBsecure\-transport\fP, \fBwolfssl\fP
  4659. .IP "HOME <dir>"
  4660. If set, this is used to find the home directory when that is needed. Like when
  4661. looking for the default .curlrc. \fICURL_HOME\fP and \fIXDG_CONFIG_HOME\fP
  4662. have preference.
  4663. .IP "QLOGDIR <directory name>"
  4664. If curl was built with HTTP/3 support, setting this environment variable to a
  4665. local directory makes curl produce \fBqlogs\fP in that directory, using file
  4666. names named after the destination connection id (in hex). Do note that these
  4667. files can become rather large. Works with the ngtcp2 and quiche QUIC backends.
  4668. .IP SHELL
  4669. Used on VMS when trying to detect if using a \fBDCL\fP or a \fBunix\fP shell.
  4670. .IP "SSL_CERT_DIR <dir>"
  4671. If set, it is used as the \fI\-\-capath\fP value.
  4672. .IP "SSL_CERT_FILE <path>"
  4673. If set, it is used as the \fI\-\-cacert\fP value.
  4674. .IP "SSLKEYLOGFILE <file name>"
  4675. If you set this environment variable to a file name, curl stores TLS secrets
  4676. from its connections in that file when invoked to enable you to analyze the
  4677. TLS traffic in real time using network analyzing tools such as Wireshark. This
  4678. works with the following TLS backends: OpenSSL, libressl, BoringSSL, GnuTLS
  4679. and wolfSSL.
  4680. .IP "USERPROFILE <dir>"
  4681. On Windows, this variable is used when trying to find the home directory. If
  4682. the other, primary, variable are all unset. If set, curl uses the path
  4683. \fI\fP"$USERPROFILE\\Application Data"\fI\fP.
  4684. .IP "XDG_CONFIG_HOME <dir>"
  4685. If \fICURL_HOME\fP is not set, this variable is checked when looking for a
  4686. default .curlrc file.
  4687. .SH "PROXY PROTOCOL PREFIXES"
  4688. The proxy string may be specified with a protocol:// prefix to specify
  4689. alternative proxy protocols.
  4690. If no protocol is specified in the proxy string or if the string does not
  4691. match a supported one, the proxy is treated as an HTTP proxy.
  4692. The supported proxy protocol prefixes are as follows:
  4693. .IP "http://"
  4694. Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
  4695. .IP "https://"
  4696. Makes it treated as an \fBHTTPS\fP proxy.
  4697. .IP "socks4://"
  4698. Makes it the equivalent of \fI\-\-socks4\fP
  4699. .IP "socks4a://"
  4700. Makes it the equivalent of \fI\-\-socks4a\fP
  4701. .IP "socks5://"
  4702. Makes it the equivalent of \fI\-\-socks5\fP
  4703. .IP "socks5h://"
  4704. Makes it the equivalent of \fI\-\-socks5\-hostname\fP
  4705. .SH EXIT CODES
  4706. There are a bunch of different error codes and their corresponding error
  4707. messages that may appear under error conditions. At the time of this writing,
  4708. the exit codes are:
  4709. .IP 0
  4710. Success. The operation completed successfully according to the instructions.
  4711. .IP 1
  4712. Unsupported protocol. This build of curl has no support for this protocol.
  4713. .IP 2
  4714. Failed to initialize.
  4715. .IP 3
  4716. URL malformed. The syntax was not correct.
  4717. .IP 4
  4718. A feature or option that was needed to perform the desired request was not
  4719. enabled or was explicitly disabled at build\-time. To make curl able to do
  4720. this, you probably need another build of libcurl.
  4721. .IP 5
  4722. Could not resolve proxy. The given proxy host could not be resolved.
  4723. .IP 6
  4724. Could not resolve host. The given remote host could not be resolved.
  4725. .IP 7
  4726. Failed to connect to host.
  4727. .IP 8
  4728. Weird server reply. The server sent data curl could not parse.
  4729. .IP 9
  4730. FTP access denied. The server denied login or denied access to the particular
  4731. resource or directory you wanted to reach. Most often you tried to change to a
  4732. directory that does not exist on the server.
  4733. .IP 10
  4734. FTP accept failed. While waiting for the server to connect back when an active
  4735. FTP session is used, an error code was sent over the control connection or
  4736. similar.
  4737. .IP 11
  4738. FTP weird PASS reply. Curl could not parse the reply sent to the PASS request.
  4739. .IP 12
  4740. During an active FTP session while waiting for the server to connect back to
  4741. curl, the timeout expired.
  4742. .IP 13
  4743. FTP weird PASV reply, Curl could not parse the reply sent to the PASV request.
  4744. .IP 14
  4745. FTP weird 227 format. Curl could not parse the 227\-line the server sent.
  4746. .IP 15
  4747. FTP cannot use host. Could not resolve the host IP we got in the 227\-line.
  4748. .IP 16
  4749. HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is
  4750. somewhat generic and can be one out of several problems, see the error message
  4751. for details.
  4752. .IP 17
  4753. FTP could not set binary. Could not change transfer method to binary.
  4754. .IP 18
  4755. Partial file. Only a part of the file was transferred.
  4756. .IP 19
  4757. FTP could not download/access the given file, the RETR (or similar) command
  4758. failed.
  4759. .IP 21
  4760. FTP quote error. A quote command returned error from the server.
  4761. .IP 22
  4762. HTTP page not retrieved. The requested URL was not found or returned another
  4763. error with the HTTP error code being 400 or above. This return code only
  4764. appears if \fI\-f, \-\-fail\fP is used.
  4765. .IP 23
  4766. Write error. Curl could not write data to a local filesystem or similar.
  4767. .IP 25
  4768. Failed starting the upload. For FTP, the server typically denied the STOR
  4769. command.
  4770. .IP 26
  4771. Read error. Various reading problems.
  4772. .IP 27
  4773. Out of memory. A memory allocation request failed.
  4774. .IP 28
  4775. Operation timeout. The specified time\-out period was reached according to the
  4776. conditions.
  4777. .IP 30
  4778. FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
  4779. command, try doing a transfer using PASV instead!
  4780. .IP 31
  4781. FTP could not use REST. The REST command failed. This command is used for
  4782. resumed FTP transfers.
  4783. .IP 33
  4784. HTTP range error. The range "command" did not work.
  4785. .IP 34
  4786. HTTP post error. Internal post\-request generation error.
  4787. .IP 35
  4788. SSL connect error. The SSL handshaking failed.
  4789. .IP 36
  4790. Bad download resume. Could not continue an earlier aborted download.
  4791. .IP 37
  4792. FILE could not read file. Failed to open the file. Permissions?
  4793. .IP 38
  4794. LDAP cannot bind. LDAP bind operation failed.
  4795. .IP 39
  4796. LDAP search failed.
  4797. .IP 41
  4798. Function not found. A required LDAP function was not found.
  4799. .IP 42
  4800. Aborted by callback. An application told curl to abort the operation.
  4801. .IP 43
  4802. Internal error. A function was called with a bad parameter.
  4803. .IP 45
  4804. Interface error. A specified outgoing interface could not be used.
  4805. .IP 47
  4806. Too many redirects. When following redirects, curl hit the maximum amount.
  4807. .IP 48
  4808. Unknown option specified to libcurl. This indicates that you passed a weird
  4809. option to curl that was passed on to libcurl and rejected. Read up in the
  4810. manual!
  4811. .IP 49
  4812. Malformed telnet option.
  4813. .IP 52
  4814. The server did not reply anything, which here is considered an error.
  4815. .IP 53
  4816. SSL crypto engine not found.
  4817. .IP 54
  4818. Cannot set SSL crypto engine as default.
  4819. .IP 55
  4820. Failed sending network data.
  4821. .IP 56
  4822. Failure in receiving network data.
  4823. .IP 58
  4824. Problem with the local certificate.
  4825. .IP 59
  4826. Could not use specified SSL cipher.
  4827. .IP 60
  4828. Peer certificate cannot be authenticated with known CA certificates.
  4829. .IP 61
  4830. Unrecognized transfer encoding.
  4831. .IP 63
  4832. Maximum file size exceeded.
  4833. .IP 64
  4834. Requested FTP SSL level failed.
  4835. .IP 65
  4836. Sending the data requires a rewind that failed.
  4837. .IP 66
  4838. Failed to initialize SSL Engine.
  4839. .IP 67
  4840. The user name, password, or similar was not accepted and curl failed to log in.
  4841. .IP 68
  4842. File not found on TFTP server.
  4843. .IP 69
  4844. Permission problem on TFTP server.
  4845. .IP 70
  4846. Out of disk space on TFTP server.
  4847. .IP 71
  4848. Illegal TFTP operation.
  4849. .IP 72
  4850. Unknown TFTP transfer ID.
  4851. .IP 73
  4852. File already exists (TFTP).
  4853. .IP 74
  4854. No such user (TFTP).
  4855. .IP 77
  4856. Problem reading the SSL CA cert (path? access rights?).
  4857. .IP 78
  4858. The resource referenced in the URL does not exist.
  4859. .IP 79
  4860. An unspecified error occurred during the SSH session.
  4861. .IP 80
  4862. Failed to shut down the SSL connection.
  4863. .IP 82
  4864. Could not load CRL file, missing or wrong format.
  4865. .IP 83
  4866. Issuer check failed.
  4867. .IP 84
  4868. The FTP PRET command failed.
  4869. .IP 85
  4870. Mismatch of RTSP CSeq numbers.
  4871. .IP 86
  4872. Mismatch of RTSP Session Identifiers.
  4873. .IP 87
  4874. Unable to parse FTP file list.
  4875. .IP 88
  4876. FTP chunk callback reported error.
  4877. .IP 89
  4878. No connection available, the session is queued.
  4879. .IP 90
  4880. SSL public key does not matched pinned public key.
  4881. .IP 91
  4882. Invalid SSL certificate status.
  4883. .IP 92
  4884. Stream error in HTTP/2 framing layer.
  4885. .IP 93
  4886. An API function was called from inside a callback.
  4887. .IP 94
  4888. An authentication function returned an error.
  4889. .IP 95
  4890. A problem was detected in the HTTP/3 layer. This is somewhat generic and can
  4891. be one out of several problems, see the error message for details.
  4892. .IP 96
  4893. QUIC connection error. This error may be caused by an SSL library error. QUIC
  4894. is the protocol used for HTTP/3 transfers.
  4895. .IP 97
  4896. Proxy handshake error.
  4897. .IP 98
  4898. A client\-side certificate is required to complete the TLS handshake.
  4899. .IP 99
  4900. Poll or select returned fatal error.
  4901. .IP XX
  4902. More error codes might appear here in future releases. The existing ones are
  4903. meant to never change.
  4904. .SH BUGS
  4905. If you experience any problems with curl, submit an issue in the project\(aqs bug
  4906. tracker on GitHub: https://github.com/curl/curl/issues
  4907. .SH AUTHORS / CONTRIBUTORS
  4908. Daniel Stenberg is the main author, but the whole list of contributors is
  4909. found in the separate THANKS file.
  4910. .SH WWW
  4911. https://curl.se
  4912. .SH "SEE ALSO"
  4913. .BR ftp (1),
  4914. .BR wget (1)