诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1999 line
86 KiB

  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2013, 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 http://curl.haxx.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .\"
  23. .TH curl 1 "27 July 2012" "Curl 7.27.0" "Curl Manual"
  24. .SH NAME
  25. curl \- transfer a URL
  26. .SH SYNOPSIS
  27. .B curl [options]
  28. .I [URL...]
  29. .SH DESCRIPTION
  30. .B curl
  31. is a tool to transfer data from or to a server, using one of the supported
  32. protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
  33. LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The
  34. command is designed to work without user interaction.
  35. curl offers a busload of useful tricks like proxy support, user
  36. authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
  37. resume, Metalink, and more. As you will see below, the number of features will
  38. make your head spin!
  39. curl is powered by libcurl for all transfer-related features. See
  40. .BR libcurl (3)
  41. for details.
  42. .SH URL
  43. The URL syntax is protocol-dependent. You'll find a detailed description in
  44. RFC 3986.
  45. You can specify multiple URLs or parts of URLs by writing part sets within
  46. braces as in:
  47. http://site.{one,two,three}.com
  48. or you can get sequences of alphanumeric series by using [] as in:
  49. ftp://ftp.numericals.com/file[1-100].txt
  50. ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
  51. ftp://ftp.letters.com/file[a-z].txt
  52. Nested sequences are not supported, but you can use several ones next to each
  53. other:
  54. http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
  55. You can specify any amount of URLs on the command line. They will be fetched
  56. in a sequential manner in the specified order.
  57. You can specify a step counter for the ranges to get every Nth number or
  58. letter:
  59. http://www.numericals.com/file[1-100:10].txt
  60. http://www.letters.com/file[a-z:2].txt
  61. If you specify URL without protocol:// prefix, curl will attempt to guess what
  62. protocol you might want. It will then default to HTTP but try other protocols
  63. based on often-used host name prefixes. For example, for host names starting
  64. with "ftp." curl will assume you want to speak FTP.
  65. curl will do its best to use what you pass to it as a URL. It is not trying to
  66. validate it as a syntactically correct URL by any means but is instead
  67. \fBvery\fP liberal with what it accepts.
  68. curl will attempt to re-use connections for multiple file transfers, so that
  69. getting many files from the same server will not do multiple connects /
  70. handshakes. This improves speed. Of course this is only done on files
  71. specified on a single command line and cannot be used between separate curl
  72. invokes.
  73. .SH "PROGRESS METER"
  74. curl normally displays a progress meter during operations, indicating the
  75. amount of transferred data, transfer speeds and estimated time left, etc.
  76. curl displays this data to the terminal by default, so if you invoke curl to
  77. do an operation and it is about to write data to the terminal, it
  78. \fIdisables\fP the progress meter as otherwise it would mess up the output
  79. mixing progress meter and response data.
  80. If you want a progress meter for HTTP POST or PUT requests, you need to
  81. redirect the response output to a file, using shell redirect (>), -o [file] or
  82. similar.
  83. It is not the same case for FTP upload as that operation does not spit out
  84. any response data to the terminal.
  85. If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
  86. friend.
  87. .SH OPTIONS
  88. In general, all boolean options are enabled with --\fBoption\fP and yet again
  89. disabled with --\fBno-\fPoption. That is, you use the exact same option name
  90. but prefix it with "no-". However, in this list we mostly only list and show
  91. the --option version of them. (This concept with --no options was added in
  92. 7.19.0. Previously most options were toggled on/off on repeated use of the
  93. same command line option.)
  94. .IP "-#, --progress-bar"
  95. Make curl display progress as a simple progress bar instead of the standard,
  96. more informational, meter.
  97. .IP "-0, --http1.0"
  98. (HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
  99. internally preferred: HTTP 1.1.
  100. .IP "-1, --tlsv1"
  101. (SSL)
  102. Forces curl to use TLS version 1 when negotiating with a remote TLS server.
  103. .IP "-2, --sslv2"
  104. (SSL)
  105. Forces curl to use SSL version 2 when negotiating with a remote SSL server.
  106. .IP "-3, --sslv3"
  107. (SSL)
  108. Forces curl to use SSL version 3 when negotiating with a remote SSL server.
  109. .IP "-4, --ipv4"
  110. If curl is capable of resolving an address to multiple IP versions (which it
  111. is if it is IPv6-capable), this option tells curl to resolve names to IPv4
  112. addresses only.
  113. .IP "-6, --ipv6"
  114. If curl is capable of resolving an address to multiple IP versions (which it
  115. is if it is IPv6-capable), this option tells curl to resolve names to IPv6
  116. addresses only.
  117. .IP "-a, --append"
  118. (FTP/SFTP) When used in an upload, this will tell curl to append to the target
  119. file instead of overwriting it. If the file doesn't exist, it will be created.
  120. Note that this flag is ignored by some SSH servers (including OpenSSH).
  121. .IP "-A, --user-agent <agent string>"
  122. (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
  123. done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
  124. the string, surround the string with single quote marks. This can also be set
  125. with the \fI-H, --header\fP option of course.
  126. If this option is used several times, the last one will be used.
  127. .IP "--anyauth"
  128. (HTTP) Tells curl to figure out authentication method by itself, and use the
  129. most secure one the remote site claims to support. This is done by first
  130. doing a request and checking the response-headers, thus possibly inducing an
  131. extra network round-trip. This is used instead of setting a specific
  132. authentication method, which you can do with \fI--basic\fP, \fI--digest\fP,
  133. \fI--ntlm\fP, and \fI--negotiate\fP.
  134. Note that using --anyauth is not recommended if you do uploads from stdin,
  135. since it may require data to be sent twice and then the client must be able to
  136. rewind. If the need should arise when uploading from stdin, the upload
  137. operation will fail.
  138. .IP "-b, --cookie <name=data>"
  139. (HTTP)
  140. Pass the data to the HTTP server as a cookie. It is supposedly the
  141. data previously received from the server in a "Set-Cookie:" line.
  142. The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
  143. If no '=' symbol is used in the line, it is treated as a filename to use to
  144. read previously stored cookie lines from, which should be used in this session
  145. if they match. Using this method also activates the "cookie parser" which will
  146. make curl record incoming cookies too, which may be handy if you're using this
  147. in combination with the \fI-L, --location\fP option. The file format of the
  148. file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
  149. cookie file format.
  150. \fBNOTE\fP that the file specified with \fI-b, --cookie\fP is only used as
  151. input. No cookies will be stored in the file. To store cookies, use the
  152. \fI-c, --cookie-jar\fP option or you could even save the HTTP headers to a file
  153. using \fI-D, --dump-header\fP!
  154. If this option is used several times, the last one will be used.
  155. .IP "-B, --use-ascii"
  156. (FTP/LDAP) Enable ASCII transfer. For FTP, this can also be
  157. enforced by using an URL that ends with ";type=A". This option causes data
  158. sent to stdout to be in text mode for win32 systems.
  159. .IP "--basic"
  160. (HTTP) Tells curl to use HTTP Basic authentication. This is the default and
  161. this option is usually pointless, unless you use it to override a previously
  162. set option that sets a different authentication method (such as \fI--ntlm\fP,
  163. \fI--digest\fP, or \fI--negotiate\fP).
  164. .IP "-c, --cookie-jar <file name>"
  165. (HTTP) Specify to which file you want curl to write all cookies after a
  166. completed operation. Curl writes all cookies previously read from a specified
  167. file as well as all cookies received from remote server(s). If no cookies are
  168. known, no file will be written. The file will be written using the Netscape
  169. cookie file format. If you set the file name to a single dash, "-", the
  170. cookies will be written to stdout.
  171. This command line option will activate the cookie engine that makes curl
  172. record and use cookies. Another way to activate it is to use the \fI-b,
  173. --cookie\fP option.
  174. If the cookie jar can't be created or written to, the whole curl operation
  175. won't fail or even report an error clearly. Using -v will get a warning
  176. displayed, but that is the only visible feedback you get about this possibly
  177. lethal situation.
  178. If this option is used several times, the last specified file name will be
  179. used.
  180. .IP "-C, --continue-at <offset>"
  181. Continue/Resume a previous file transfer at the given offset. The given offset
  182. is the exact number of bytes that will be skipped, counting from the beginning
  183. of the source file before it is transferred to the destination. If used with
  184. uploads, the FTP server command SIZE will not be used by curl.
  185. Use "-C -" to tell curl to automatically find out where/how to resume the
  186. transfer. It then uses the given output/input files to figure that out.
  187. If this option is used several times, the last one will be used.
  188. .IP "--ciphers <list of ciphers>"
  189. (SSL) Specifies which ciphers to use in the connection. The list of ciphers
  190. must specify valid ciphers. Read up on SSL cipher list details on this URL:
  191. \fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
  192. NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
  193. ciphers is in the NSSCipherSuite entry at this URL:
  194. \fIhttp://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
  195. If this option is used several times, the last one will be used.
  196. .IP "--compressed"
  197. (HTTP) Request a compressed response using one of the algorithms curl
  198. supports, and save the uncompressed document. If this option is used and the
  199. server sends an unsupported encoding, curl will report an error.
  200. .IP "--connect-timeout <seconds>"
  201. Maximum time in seconds that you allow the connection to the server to take.
  202. This only limits the connection phase, once curl has connected this option is
  203. of no more use. Since 7.32.0, this option accepts decimal values, but the
  204. actual timeout will decrease in accuracy as the specified timeout increases in
  205. decimal precision. See also the \fI-m, --max-time\fP option.
  206. If this option is used several times, the last one will be used.
  207. .IP "--create-dirs"
  208. When used in conjunction with the \fI-o\fP option, curl will create the
  209. necessary local directory hierarchy as needed. This option creates the dirs
  210. mentioned with the \fI-o\fP option, nothing else. If the \fI-o\fP file name
  211. uses no dir or if the dirs it mentions already exist, no dir will be created.
  212. To create remote directories when using FTP or SFTP, try
  213. \fI--ftp-create-dirs\fP.
  214. .IP "--crlf"
  215. (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
  216. .IP "--crlfile <file>"
  217. (HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
  218. List that may specify peer certificates that are to be considered revoked.
  219. If this option is used several times, the last one will be used.
  220. (Added in 7.19.7)
  221. .IP "-d, --data <data>"
  222. (HTTP) Sends the specified data in a POST request to the HTTP server, in the
  223. same way that a browser does when a user has filled in an HTML form and
  224. presses the submit button. This will cause curl to pass the data to the server
  225. using the content-type application/x-www-form-urlencoded. Compare to
  226. \fI-F, --form\fP.
  227. \fI-d, --data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
  228. you should instead use the \fI--data-binary\fP option. To URL-encode the value
  229. of a form field you may use \fI--data-urlencode\fP.
  230. If any of these options is used more than once on the same command line, the
  231. data pieces specified will be merged together with a separating
  232. &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
  233. chunk that looks like \&'name=daniel&skill=lousy'.
  234. If you start the data with the letter @, the rest should be a file name to
  235. read the data from, or - if you want curl to read the data from stdin. The
  236. contents of the file must already be URL-encoded. Multiple files can also be
  237. specified. Posting data from a file named 'foobar' would thus be done with
  238. \fI--data @foobar\fP.
  239. .IP "-D, --dump-header <file>"
  240. Write the protocol headers to the specified file.
  241. This option is handy to use when you want to store the headers that an HTTP
  242. site sends to you. Cookies from the headers could then be read in a second
  243. curl invocation by using the \fI-b, --cookie\fP option! The
  244. \fI-c, --cookie-jar\fP option is however a better way to store cookies.
  245. When used in FTP, the FTP server response lines are considered being "headers"
  246. and thus are saved there.
  247. If this option is used several times, the last one will be used.
  248. .IP "--data-ascii <data>"
  249. See \fI-d, --data\fP.
  250. .IP "--data-binary <data>"
  251. (HTTP) This posts data exactly as specified with no extra processing
  252. whatsoever.
  253. If you start the data with the letter @, the rest should be a filename. Data
  254. is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
  255. are preserved and conversions are never done.
  256. If this option is used several times, the ones following the first will append
  257. data as described in \fI-d, --data\fP.
  258. .IP "--data-urlencode <data>"
  259. (HTTP) This posts data, similar to the other --data options with the exception
  260. that this performs URL-encoding. (Added in 7.18.0)
  261. To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
  262. by a separator and a content specification. The <data> part can be passed to
  263. curl using one of the following syntaxes:
  264. .RS
  265. .IP "content"
  266. This will make curl URL-encode the content and pass that on. Just be careful
  267. so that the content doesn't contain any = or @ symbols, as that will then make
  268. the syntax match one of the other cases below!
  269. .IP "=content"
  270. This will make curl URL-encode the content and pass that on. The preceding =
  271. symbol is not included in the data.
  272. .IP "name=content"
  273. This will make curl URL-encode the content part and pass that on. Note that
  274. the name part is expected to be URL-encoded already.
  275. .IP "@filename"
  276. This will make curl load data from the given file (including any newlines),
  277. URL-encode that data and pass it on in the POST.
  278. .IP "name@filename"
  279. This will make curl load data from the given file (including any newlines),
  280. URL-encode that data and pass it on in the POST. The name part gets an equal
  281. sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
  282. name is expected to be URL-encoded already.
  283. .RE
  284. .IP "--delegation LEVEL"
  285. Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
  286. comes to user credentials. Used with GSS/kerberos.
  287. .RS
  288. .IP "none"
  289. Don't allow any delegation.
  290. .IP "policy"
  291. Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
  292. service ticket, which is a matter of realm policy.
  293. .IP "always"
  294. Unconditionally allow the server to delegate.
  295. .RE
  296. .IP "--digest"
  297. (HTTP) Enables HTTP Digest authentication. This is an authentication scheme
  298. that prevents the password from being sent over the wire in clear text. Use
  299. this in combination with the normal \fI-u, --user\fP option to set user name
  300. and password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
  301. related options.
  302. If this option is used several times, only the first one is used.
  303. .IP "--disable-eprt"
  304. (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
  305. active FTP transfers. Curl will normally always first attempt to use EPRT,
  306. then LPRT before using PORT, but with this option, it will use PORT right
  307. away. EPRT and LPRT are extensions to the original FTP protocol, and may not
  308. work on all servers, but they enable more functionality in a better way than
  309. the traditional PORT command.
  310. \fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
  311. is an alias for \fB--disable-eprt\fP.
  312. Disabling EPRT only changes the active behavior. If you want to switch to
  313. passive mode you need to not use \fI-P, --ftp-port\fP or force it with
  314. \fI--ftp-pasv\fP.
  315. .IP "--disable-epsv"
  316. (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
  317. transfers. Curl will normally always first attempt to use EPSV before PASV,
  318. but with this option, it will not try using EPSV.
  319. \fB--epsv\fP can be used to explicitly enable EPSV again and \fB--no-epsv\fP
  320. is an alias for \fB--disable-epsv\fP.
  321. Disabling EPSV only changes the passive behavior. If you want to switch to
  322. active mode you need to use \fI-P, --ftp-port\fP.
  323. .IP "-e, --referer <URL>"
  324. (HTTP) Sends the "Referer Page" information to the HTTP server. This can also
  325. be set with the \fI-H, --header\fP flag of course. When used with
  326. \fI-L, --location\fP you can append ";auto" to the --referer URL to make curl
  327. automatically set the previous URL when it follows a Location: header. The
  328. \&";auto" string can be used alone, even if you don't set an initial --referer.
  329. If this option is used several times, the last one will be used.
  330. .IP "-E, --cert <certificate[:password]>"
  331. (SSL) Tells curl to use the specified client certificate file when getting a
  332. file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
  333. in PEM format. If the optional password isn't specified, it will be queried
  334. for on the terminal. Note that this option assumes a \&"certificate" file that
  335. is the private key and the private certificate concatenated! See \fI--cert\fP
  336. and \fI--key\fP to specify them independently.
  337. If curl is built against the NSS SSL library then this option can tell
  338. curl the nickname of the certificate to use within the NSS database defined
  339. by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
  340. NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
  341. loaded. If you want to use a file from the current directory, please precede
  342. it with "./" prefix, in order to avoid confusion with a nickname. If the
  343. nickname contains ":", it needs to be preceded by "\\" so that it is not
  344. recognized as password delimiter. If the nickname contains "\\", it needs to
  345. be escaped as "\\\\" so that it is not recognized as an escape character.
  346. (iOS and Mac OS X only) If curl is built against Secure Transport, then the
  347. certificate string must match the name of a certificate that's in the system or
  348. user keychain. The private key corresponding to the certificate, and
  349. certificate chain (if any), must also be present in the keychain.
  350. If this option is used several times, the last one will be used.
  351. .IP "--engine <name>"
  352. Select the OpenSSL crypto engine to use for cipher
  353. operations. Use \fI--engine list\fP to print a list of build-time supported
  354. engines. Note that not all (or none) of the engines may be available at
  355. run-time.
  356. .IP "--environment"
  357. (RISC OS ONLY) Sets a range of environment variables, using the names the
  358. \fI-w\fP option supports, to allow easier extraction of useful information
  359. after having run curl.
  360. .IP "--egd-file <file>"
  361. (SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
  362. is used to seed the random engine for SSL connections. See also the
  363. \fI--random-file\fP option.
  364. .IP "--cert-type <type>"
  365. (SSL) Tells curl what certificate type the provided certificate is in. PEM,
  366. DER and ENG are recognized types. If not specified, PEM is assumed.
  367. If this option is used several times, the last one will be used.
  368. .IP "--cacert <CA certificate>"
  369. (SSL) Tells curl to use the specified certificate file to verify the peer. The
  370. file may contain multiple CA certificates. The certificate(s) must be in PEM
  371. format. Normally curl is built to use a default file for this, so this option
  372. is typically used to alter that default file.
  373. curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
  374. set, and uses the given path as a path to a CA cert bundle. This option
  375. overrides that variable.
  376. The windows version of curl will automatically look for a CA certs file named
  377. \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
  378. Current Working Directory, or in any folder along your PATH.
  379. If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
  380. (libnsspem.so) needs to be available for this option to work properly.
  381. If this option is used several times, the last one will be used.
  382. .IP "--capath <CA certificate directory>"
  383. (SSL) Tells curl to use the specified certificate directory to verify the
  384. peer. Multiple paths can be provided by separating them with ":" (e.g.
  385. \&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
  386. built against OpenSSL, the directory must have been processed using the
  387. c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
  388. OpenSSL-powered curl to make SSL-connections much more efficiently than using
  389. \fI--cacert\fP if the \fI--cacert\fP file contains many CA certificates.
  390. If this option is set, the default capath value will be ignored, and if it is
  391. used several times, the last one will be used.
  392. .IP "-f, --fail"
  393. (HTTP) Fail silently (no output at all) on server errors. This is mostly done
  394. to better enable scripts etc to better deal with failed attempts. In
  395. normal cases when an HTTP server fails to deliver a document, it returns an
  396. HTML document stating so (which often also describes why and more). This flag
  397. will prevent curl from outputting that and return error 22.
  398. This method is not fail-safe and there are occasions where non-successful
  399. response codes will slip through, especially when authentication is involved
  400. (response codes 401 and 407).
  401. .IP "-F, --form <name=content>"
  402. (HTTP) This lets curl emulate a filled-in form in which a user has pressed the
  403. submit button. This causes curl to POST data using the Content-Type
  404. multipart/form-data according to RFC 2388. This enables uploading of binary
  405. files etc. To force the 'content' part to be a file, prefix the file name
  406. with an @ sign. To just get the content part from a file, prefix the file name
  407. with the symbol <. The difference between @ and < is then that @ makes a file
  408. get attached in the post as a file upload, while the < makes a text field and
  409. just get the contents for that text field from a file.
  410. Example, to send your password file to the server, where
  411. \&'password' is the name of the form-field to which /etc/passwd will be the
  412. input:
  413. \fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
  414. To read content from stdin instead of a file, use - as the filename. This goes
  415. for both @ and < constructs.
  416. You can also tell curl what Content-Type to use by using 'type=', in a manner
  417. similar to:
  418. \fBcurl\fP -F "web=@index.html;type=text/html" url.com
  419. or
  420. \fBcurl\fP -F "name=daniel;type=text/foo" url.com
  421. You can also explicitly change the name field of a file upload part by setting
  422. filename=, like this:
  423. \fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
  424. If filename/path contains ',' or ';', it must be quoted by double-quotes like:
  425. \fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com
  426. or
  427. \fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
  428. Note that if a filename/path is quoted by double-quotes, any double-quote
  429. or backslash within the filename must be escaped by backslash.
  430. See further examples and details in the MANUAL.
  431. This option can be used multiple times.
  432. .IP "--ftp-account [data]"
  433. (FTP) When an FTP server asks for "account data" after user name and password
  434. has been provided, this data is sent off using the ACCT command. (Added in
  435. 7.13.0)
  436. If this option is used several times, the last one will be used.
  437. .IP "--ftp-alternative-to-user <command>"
  438. (FTP) If authenticating with the USER and PASS commands fails, send this
  439. command. When connecting to Tumbleweed's Secure Transport server over FTPS
  440. using a client certificate, using "SITE AUTH" will tell the server to retrieve
  441. the username from the certificate. (Added in 7.15.5)
  442. .IP "--ftp-create-dirs"
  443. (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
  444. currently exist on the server, the standard behavior of curl is to
  445. fail. Using this option, curl will instead attempt to create missing
  446. directories.
  447. .IP "--ftp-method [method]"
  448. (FTP) Control what method curl should use to reach a file on an FTP(S)
  449. server. The method argument should be one of the following alternatives:
  450. .RS
  451. .IP multicwd
  452. curl does a single CWD operation for each path part in the given URL. For deep
  453. hierarchies this means very many commands. This is how RFC 1738 says it should
  454. be done. This is the default but the slowest behavior.
  455. .IP nocwd
  456. curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
  457. path to the server for all these commands. This is the fastest behavior.
  458. .IP singlecwd
  459. curl does one CWD with the full target directory and then operates on the file
  460. \&"normally" (like in the multicwd case). This is somewhat more standards
  461. compliant than 'nocwd' but without the full penalty of 'multicwd'.
  462. .RE
  463. (Added in 7.15.1)
  464. .IP "--ftp-pasv"
  465. (FTP) Use passive mode for the data connection. Passive is the internal default
  466. behavior, but using this option can be used to override a previous
  467. \fI-P/-ftp-port\fP option. (Added in 7.11.0)
  468. If this option is used several times, only the first one is used. Undoing an
  469. enforced passive really isn't doable but you must then instead enforce the
  470. correct \fI-P, --ftp-port\fP again.
  471. Passive mode means that curl will try the EPSV command first and then PASV,
  472. unless \fI--disable-epsv\fP is used.
  473. .IP "--ftp-skip-pasv-ip"
  474. (FTP) Tell curl to not use the IP address the server suggests in its response
  475. to curl's PASV command when curl connects the data connection. Instead curl
  476. will re-use the same IP address it already uses for the control
  477. connection. (Added in 7.14.2)
  478. This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
  479. .IP "--ftp-pret"
  480. (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain
  481. FTP servers, mainly drftpd, require this non-standard command for
  482. directory listings as well as up and downloads in PASV mode.
  483. (Added in 7.20.x)
  484. .IP "--ftp-ssl-ccc"
  485. (FTP) Use CCC (Clear Command Channel)
  486. Shuts down the SSL/TLS layer after authenticating. The rest of the
  487. control channel communication will be unencrypted. This allows
  488. NAT routers to follow the FTP transaction. The default mode is
  489. passive. See \fI--ftp-ssl-ccc-mode\fP for other modes.
  490. (Added in 7.16.1)
  491. .IP "--ftp-ssl-ccc-mode [active/passive]"
  492. (FTP) Use CCC (Clear Command Channel)
  493. Sets the CCC mode. The passive mode will not initiate the shutdown, but
  494. instead wait for the server to do it, and will not reply to the
  495. shutdown from the server. The active mode initiates the shutdown and
  496. waits for a reply from the server.
  497. (Added in 7.16.2)
  498. .IP "--ftp-ssl-control"
  499. (FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
  500. authentication, but non-encrypted data transfers for efficiency. Fails the
  501. transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
  502. that can still be used but will be removed in a future version.
  503. .IP "--form-string <name=string>"
  504. (HTTP) Similar to \fI--form\fP except that the value string for the named
  505. parameter is used literally. Leading \&'@' and \&'<' characters, and the
  506. \&';type=' string in the value have no special meaning. Use this in preference
  507. to \fI--form\fP if there's any possibility that the string value may
  508. accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
  509. .IP "-g, --globoff"
  510. This option switches off the "URL globbing parser". When you set this option,
  511. you can specify URLs that contain the letters {}[] without having them being
  512. interpreted by curl itself. Note that these letters are not normal legal URL
  513. contents but they should be encoded according to the URI standard.
  514. .IP "-G, --get"
  515. When used, this option will make all data specified with \fI-d, --data\fP or
  516. \fI--data-binary\fP to be used in an HTTP GET request instead of the POST
  517. request that otherwise would be used. The data will be appended to the URL
  518. with a '?' separator.
  519. If used in combination with -I, the POST data will instead be appended to the
  520. URL with a HEAD request.
  521. If this option is used several times, only the first one is used. This is
  522. because undoing a GET doesn't make sense, but you should then instead enforce
  523. the alternative method you prefer.
  524. .IP "-H, --header <header>"
  525. (HTTP) Extra header to use when getting a web page. You may specify any number
  526. of extra headers. Note that if you should add a custom header that has the
  527. same name as one of the internal ones curl would use, your externally set
  528. header will be used instead of the internal one. This allows you to make even
  529. trickier stuff than curl would normally do. You should not replace internally
  530. set headers without knowing perfectly well what you're doing. Remove an
  531. internal header by giving a replacement without content on the right side of
  532. the colon, as in: -H \&"Host:". If you send the custom header with no-value
  533. then its header must be terminated with a semicolon, such as \-H
  534. \&"X-Custom-Header;" to send "X-Custom-Header:".
  535. curl will make sure that each header you add/replace is sent with the proper
  536. end-of-line marker, you should thus \fBnot\fP add that as a part of the header
  537. content: do not add newlines or carriage returns, they will only mess things up
  538. for you.
  539. See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
  540. This option can be used multiple times to add/replace/remove multiple headers.
  541. .IP "--hostpubmd5 <md5>"
  542. (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
  543. be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
  544. the connection with the host unless the md5sums match. (Added in 7.17.1)
  545. .IP "--ignore-content-length"
  546. (HTTP)
  547. Ignore the Content-Length header. This is particularly useful for servers
  548. running Apache 1.x, which will report incorrect Content-Length for files
  549. larger than 2 gigabytes.
  550. .IP "-i, --include"
  551. (HTTP) Include the HTTP-header in the output. The HTTP-header includes things
  552. like server-name, date of the document, HTTP-version and more...
  553. .IP "-I, --head"
  554. (HTTP/FTP/FILE)
  555. Fetch the HTTP-header only! HTTP-servers feature the command HEAD
  556. which this uses to get nothing but the header of a document. When used
  557. on an FTP or FILE file, curl displays the file size and last modification
  558. time only.
  559. .IP "--interface <name>"
  560. Perform an operation using a specified interface. You can enter interface
  561. name, IP address or host name. An example could look like:
  562. curl --interface eth0:1 http://www.netscape.com/
  563. If this option is used several times, the last one will be used.
  564. .IP "-j, --junk-session-cookies"
  565. (HTTP) When curl is told to read cookies from a given file, this option will
  566. make it discard all "session cookies". This will basically have the same effect
  567. as if a new session is started. Typical browsers always discard session
  568. cookies when they're closed down.
  569. .IP "-J, --remote-header-name"
  570. (HTTP) This option tells the \fI-O, --remote-name\fP option to use the
  571. server-specified Content-Disposition filename instead of extracting a filename
  572. from the URL.
  573. .IP "-k, --insecure"
  574. (SSL) This option explicitly allows curl to perform "insecure" SSL connections
  575. and transfers. All SSL connections are attempted to be made secure by using
  576. the CA certificate bundle installed by default. This makes all connections
  577. considered "insecure" fail unless \fI-k, --insecure\fP is used.
  578. See this online resource for further details:
  579. \fBhttp://curl.haxx.se/docs/sslcerts.html\fP
  580. .IP "-K, --config <config file>"
  581. Specify which config file to read curl arguments from. The config file is a
  582. text file in which command line arguments can be written which then will be
  583. used as if they were written on the actual command line. Options and their
  584. parameters must be specified on the same config file line, separated by
  585. whitespace, colon, the equals sign or any combination thereof (however,
  586. the preferred separator is the equals sign). If the parameter is to contain
  587. whitespace, the parameter must be enclosed within quotes. Within double
  588. quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
  589. \\r and \\v. A backslash preceding any other letter is ignored. If the
  590. first column of a config line is a '#' character, the rest of the line will be
  591. treated as a comment. Only write one option per physical line in the config
  592. file.
  593. Specify the filename to -K, --config as '-' to make curl read the file from
  594. stdin.
  595. Note that to be able to specify a URL in the config file, you need to specify
  596. it using the \fI--url\fP option, and not by simply writing the URL on its own
  597. line. So, it could look similar to this:
  598. url = "http://curl.haxx.se/docs/"
  599. Long option names can optionally be given in the config file without the
  600. initial double dashes.
  601. When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
  602. config file and uses it if found. The default config file is checked for in
  603. the following places in this order:
  604. 1) curl tries to find the "home dir": It first checks for the CURL_HOME and
  605. then the HOME environment variables. Failing that, it uses getpwuid() on
  606. UNIX-like systems (which returns the home dir given the current user in your
  607. system). On Windows, it then checks for the APPDATA variable, or as a last
  608. resort the '%USERPROFILE%\\Application Data'.
  609. 2) On windows, if there is no _curlrc file in the home dir, it checks for one
  610. in the same dir the curl executable is placed. On UNIX-like systems, it will
  611. simply try to load .curlrc from the determined home dir.
  612. .nf
  613. # --- Example file ---
  614. # this is a comment
  615. url = "curl.haxx.se"
  616. output = "curlhere.html"
  617. user-agent = "superagent/1.0"
  618. # and fetch another URL too
  619. url = "curl.haxx.se/docs/manpage.html"
  620. -O
  621. referer = "http://nowhereatall.com/"
  622. # --- End of example file ---
  623. .fi
  624. This option can be used multiple times to load multiple config files.
  625. .IP "--keepalive-time <seconds>"
  626. This option sets the time a connection needs to remain idle before sending
  627. keepalive probes and the time between individual keepalive probes. It is
  628. currently effective on operating systems offering the TCP_KEEPIDLE and
  629. TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
  630. option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
  631. If this option is used several times, the last one will be used. If
  632. unspecified, the option defaults to 60 seconds.
  633. .IP "--key <key>"
  634. (SSL/SSH) Private key file name. Allows you to provide your private key in this
  635. separate file.
  636. If this option is used several times, the last one will be used.
  637. .IP "--key-type <type>"
  638. (SSL) Private key file type. Specify which type your \fI--key\fP provided
  639. private key is. DER, PEM, and ENG are supported. If not specified, PEM is
  640. assumed.
  641. If this option is used several times, the last one will be used.
  642. .IP "--krb <level>"
  643. (FTP) Enable Kerberos authentication and use. The level must be entered and
  644. should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
  645. a level that is not one of these, 'private' will instead be used.
  646. This option requires a library built with kerberos4 or GSSAPI
  647. (GSS-Negotiate) support. This is not very common. Use \fI-V, --version\fP to
  648. see if your curl supports it.
  649. If this option is used several times, the last one will be used.
  650. .IP "-l, --list-only"
  651. (FTP)
  652. When listing an FTP directory, this switch forces a name-only view.
  653. Especially useful if you want to machine-parse the contents of an FTP
  654. directory since the normal directory view doesn't use a standard look
  655. or format.
  656. This option causes an FTP NLST command to be sent. Some FTP servers
  657. list only files in their response to NLST; they do not include
  658. subdirectories and symbolic links.
  659. .IP "-L, --location"
  660. (HTTP/HTTPS) If the server reports that the requested page has moved to a
  661. different location (indicated with a Location: header and a 3XX response code),
  662. this option will make curl redo the request on the new place. If used together
  663. with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
  664. will be shown. When authentication is used, curl only sends its credentials to
  665. the initial host. If a redirect takes curl to a different host, it won't be
  666. able to intercept the user+password. See also \fI--location-trusted\fP on how
  667. to change this. You can limit the amount of redirects to follow by using the
  668. \fI--max-redirs\fP option.
  669. When curl follows a redirect and the request is not a plain GET (for example
  670. POST or PUT), it will do the following request with a GET if the HTTP response
  671. was 301, 302, or 303. If the response code was any other 3xx code, curl will
  672. re-send the following request using the same unmodified method.
  673. .IP "--libcurl <file>"
  674. Append this option to any ordinary curl command line, and you will get a
  675. libcurl-using C source code written to the file that does the equivalent
  676. of what your command-line operation does!
  677. If this option is used several times, the last given file name will be
  678. used. (Added in 7.16.1)
  679. .IP "--limit-rate <speed>"
  680. Specify the maximum transfer rate you want curl to use. This feature is useful
  681. if you have a limited pipe and you'd like your transfer not to use your entire
  682. bandwidth.
  683. The given speed is measured in bytes/second, unless a suffix is appended.
  684. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
  685. megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
  686. The given rate is the average speed counted during the entire transfer. It
  687. means that curl might use higher transfer speeds in short bursts, but over
  688. time it uses no more than the given rate.
  689. If you also use the \fI-Y, --speed-limit\fP option, that option will take
  690. precedence and might cripple the rate-limiting slightly, to help keeping the
  691. speed-limit logic working.
  692. If this option is used several times, the last one will be used.
  693. .IP "--local-port <num>[-num]"
  694. Set a preferred number or range of local port numbers to use for the
  695. connection(s). Note that port numbers by nature are a scarce resource that
  696. will be busy at times so setting this range to something too narrow might
  697. cause unnecessary connection setup failures. (Added in 7.15.2)
  698. .IP "--location-trusted"
  699. (HTTP/HTTPS) Like \fI-L, --location\fP, but will allow sending the name +
  700. password to all hosts that the site may redirect to. This may or may not
  701. introduce a security breach if the site redirects you to a site to which
  702. you'll send your authentication info (which is plaintext in the case of HTTP
  703. Basic authentication).
  704. .IP "-m, --max-time <seconds>"
  705. Maximum time in seconds that you allow the whole operation to take. This is
  706. useful for preventing your batch jobs from hanging for hours due to slow
  707. networks or links going down. Since 7.32.0, this option accepts decimal
  708. values, but the actual timeout will decrease in accuracy as the specified
  709. timeout increases in decimal precision. See also the \fI--connect-timeout\fP
  710. option.
  711. If this option is used several times, the last one will be used.
  712. .IP "--mail-auth <address>"
  713. (SMTP) Specify a single address. This will be used to specify the
  714. authentication address (identity) of a submitted message that is being relayed
  715. to another server.
  716. (Added in 7.25.0)
  717. .IP "--mail-from <address>"
  718. (SMTP) Specify a single address that the given mail should get sent from.
  719. (Added in 7.20.0)
  720. .IP "--max-filesize <bytes>"
  721. Specify the maximum size (in bytes) of a file to download. If the file
  722. requested is larger than this value, the transfer will not start and curl will
  723. return with exit code 63.
  724. \fBNOTE:\fP The file size is not always known prior to download, and for such
  725. files this option has no effect even if the file transfer ends up being larger
  726. than this given limit. This concerns both FTP and HTTP transfers.
  727. .IP "--mail-rcpt <address>"
  728. (SMTP) Specify a single address that the given mail should get sent to. This
  729. option can be used multiple times to specify many recipients.
  730. (Added in 7.20.0)
  731. .IP "--max-redirs <num>"
  732. Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
  733. is used, this option can be used to prevent curl from following redirections
  734. \&"in absurdum". By default, the limit is set to 50 redirections. Set this
  735. option to -1 to make it limitless.
  736. If this option is used several times, the last one will be used.
  737. .IP "--metalink"
  738. This option can tell curl to parse and process a given URI as Metalink file
  739. (both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
  740. listed within for failover if there are errors (such as the file or server not
  741. being available). It will also verify the hash of the file after the download
  742. completes. The Metalink file itself is downloaded and processed in memory and
  743. not stored in the local file system.
  744. Example to use a remote Metalink file:
  745. \fBcurl\fP --metalink http://www.example.com/example.metalink
  746. To use a Metalink file in the local file system, use FILE protocol
  747. (file://):
  748. \fBcurl\fP --metalink file://example.metalink
  749. Please note that if FILE protocol is disabled, there is no way to use
  750. a local Metalink file at the time of this writing. Also note that if
  751. \fI--metalink\fP and \fI--include\fP are used together, \fI--include\fP will be
  752. ignored. This is because including headers in the response will break
  753. Metalink parser and if the headers are included in the file described
  754. in Metalink file, hash check will fail.
  755. (Added in 7.27.0, if built against the libmetalink library.)
  756. .IP "-n, --netrc"
  757. Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
  758. home directory for login name and password. This is typically used for FTP on
  759. UNIX. If used with HTTP, curl will enable user authentication. See
  760. .BR netrc(4)
  761. or
  762. .BR ftp(1)
  763. for details on the file format. Curl will not complain if that file
  764. doesn't have the right permissions (it should not be either world- or
  765. group-readable). The environment variable "HOME" is used to find the home
  766. directory.
  767. A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
  768. to FTP to the machine host.domain.com with user name \&'myself' and password
  769. \&'secret' should look similar to:
  770. .B "machine host.domain.com login myself password secret"
  771. .IP "-N, --no-buffer"
  772. Disables the buffering of the output stream. In normal work situations, curl
  773. will use a standard buffered output stream that will have the effect that it
  774. will output the data in chunks, not necessarily exactly when the data arrives.
  775. Using this option will disable that buffering.
  776. Note that this is the negated option name documented. You can thus use
  777. \fI--buffer\fP to enforce the buffering.
  778. .IP "--netrc-file"
  779. This option is similar to \fI--netrc\fP, except that you provide the path
  780. (absolute or relative) to the netrc file that Curl should use.
  781. You can only specify one netrc file per invocation. If several
  782. \fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
  783. (Added in 7.21.5)
  784. This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
  785. It will also abide by \fI--netrc-optional\fP if specified.
  786. .IP "--netrc-optional"
  787. Very similar to \fI--netrc\fP, but this option makes the .netrc usage
  788. \fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
  789. .IP "--negotiate"
  790. (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
  791. designed by Microsoft and is used in their web applications. It is primarily
  792. meant as a support for Kerberos5 authentication but may be also used along
  793. with another authentication method. For more information see IETF draft
  794. draft-brezak-spnego-http-04.txt.
  795. If you want to enable Negotiate for your proxy authentication, then use
  796. \fI--proxy-negotiate\fP.
  797. This option requires a library built with GSSAPI support. This is
  798. not very common. Use \fI-V, --version\fP to see if your version supports
  799. GSS-Negotiate.
  800. When using this option, you must also provide a fake \fI-u, --user\fP option to
  801. activate the authentication code properly. Sending a '-u :' is enough as the
  802. user name and password from the \fI-u\fP option aren't actually used.
  803. If this option is used several times, only the first one is used.
  804. .IP "--no-keepalive"
  805. Disables the use of keepalive messages on the TCP connection, as by default
  806. curl enables them.
  807. Note that this is the negated option name documented. You can thus use
  808. \fI--keepalive\fP to enforce keepalive.
  809. .IP "--no-sessionid"
  810. (SSL) Disable curl's use of SSL session-ID caching. By default all transfers
  811. are done using the cache. Note that while nothing should ever get hurt by
  812. attempting to reuse SSL session-IDs, there seem to be broken SSL
  813. implementations in the wild that may require you to disable this in order for
  814. you to succeed. (Added in 7.16.0)
  815. Note that this is the negated option name documented. You can thus use
  816. \fI--sessionid\fP to enforce session-ID caching.
  817. .IP "--noproxy <no-proxy-list>"
  818. Comma-separated list of hosts which do not use a proxy, if one is specified.
  819. The only wildcard is a single * character, which matches all hosts, and
  820. effectively disables the proxy. Each name in this list is matched as either
  821. a domain which contains the hostname, or the hostname itself. For example,
  822. local.com would match local.com, local.com:80, and www.local.com, but not
  823. www.notlocal.com. (Added in 7.19.4).
  824. .IP "--ntlm"
  825. (HTTP) Enables NTLM authentication. The NTLM authentication method was
  826. designed by Microsoft and is used by IIS web servers. It is a proprietary
  827. protocol, reverse-engineered by clever people and implemented in curl based
  828. on their efforts. This kind of behavior should not be endorsed, you should
  829. encourage everyone who uses NTLM to switch to a public and documented
  830. authentication method instead, such as Digest.
  831. If you want to enable NTLM for your proxy authentication, then use
  832. \fI--proxy-ntlm\fP.
  833. This option requires a library built with SSL support. Use
  834. \fI-V, --version\fP to see if your curl supports NTLM.
  835. If this option is used several times, only the first one is used.
  836. .IP "-o, --output <file>"
  837. Write output to <file> instead of stdout. If you are using {} or [] to fetch
  838. multiple documents, you can use '#' followed by a number in the <file>
  839. specifier. That variable will be replaced with the current string for the URL
  840. being fetched. Like in:
  841. curl http://{one,two}.site.com -o "file_#1.txt"
  842. or use several variables like:
  843. curl http://{site,host}.host[1-5].com -o "#1_#2"
  844. You may use this option as many times as the number of URLs you have.
  845. See also the \fI--create-dirs\fP option to create the local directories
  846. dynamically. Specifying the output as '-' (a single dash) will force the
  847. output to be done to stdout.
  848. .IP "-O, --remote-name"
  849. Write output to a local file named like the remote file we get. (Only the file
  850. part of the remote file is used, the path is cut off.)
  851. The remote file name to use for saving is extracted from the given URL,
  852. nothing else.
  853. Consequentially, the file will be saved in the current working directory. If
  854. you want the file saved in a different directory, make sure you change current
  855. working directory before you invoke curl with the \fB-O, --remote-name\fP flag!
  856. You may use this option as many times as the number of URLs you have.
  857. .IP "-p, --proxytunnel"
  858. When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
  859. protocols to attempt to tunnel through the proxy instead of merely using it to
  860. do HTTP-like operations. The tunnel approach is made with the HTTP proxy
  861. CONNECT request and requires that the proxy allows direct connect to the
  862. remote port number curl wants to tunnel through to.
  863. .IP "-P, --ftp-port <address>"
  864. (FTP) Reverses the default initiator/listener roles when connecting with
  865. FTP. This switch makes curl use active mode. In practice, curl then tells the
  866. server to connect back to the client's specified address and port, while
  867. passive mode asks the server to setup an IP address and port for it to connect
  868. to. <address> should be one of:
  869. .RS
  870. .IP interface
  871. i.e "eth0" to specify which interface's IP address you want to use (Unix only)
  872. .IP "IP address"
  873. i.e "192.168.10.1" to specify the exact IP address
  874. .IP "host name"
  875. i.e "my.host.domain" to specify the machine
  876. .IP "-"
  877. make curl pick the same IP address that is already used for the control
  878. connection
  879. .RE
  880. If this option is used several times, the last one will be used. Disable the
  881. use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
  882. instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
  883. Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
  884. address, to tell curl what TCP port range to use. That means you specify a
  885. port range, from a lower to a higher number. A single number works as well,
  886. but do note that it increases the risk of failure since the port may not be
  887. available.
  888. .IP "--pass <phrase>"
  889. (SSL/SSH) Passphrase for the private key
  890. If this option is used several times, the last one will be used.
  891. .IP "--post301"
  892. (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
  893. into GET requests when following a 301 redirection. The non-RFC behaviour is
  894. ubiquitous in web browsers, so curl does the conversion by default to maintain
  895. consistency. However, a server may require a POST to remain a POST after such
  896. a redirection. This option is meaningful only when using \fI-L, --location\fP
  897. (Added in 7.17.1)
  898. .IP "--post302"
  899. (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
  900. into GET requests when following a 302 redirection. The non-RFC behaviour is
  901. ubiquitous in web browsers, so curl does the conversion by default to maintain
  902. consistency. However, a server may require a POST to remain a POST after such
  903. a redirection. This option is meaningful only when using \fI-L, --location\fP
  904. (Added in 7.19.1)
  905. .IP "--post303"
  906. (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
  907. into GET requests when following a 303 redirection. The non-RFC behaviour is
  908. ubiquitous in web browsers, so curl does the conversion by default to maintain
  909. consistency. However, a server may require a POST to remain a POST after such
  910. a redirection. This option is meaningful only when using \fI-L, --location\fP
  911. (Added in 7.26.0)
  912. .IP "--proto <protocols>"
  913. Tells curl to use the listed protocols for its initial retrieval. Protocols
  914. are evaluated left to right, are comma separated, and are each a protocol
  915. name or 'all', optionally prefixed by zero or more modifiers. Available
  916. modifiers are:
  917. .RS
  918. .TP 3
  919. .B +
  920. Permit this protocol in addition to protocols already permitted (this is
  921. the default if no modifier is used).
  922. .TP
  923. .B -
  924. Deny this protocol, removing it from the list of protocols already permitted.
  925. .TP
  926. .B =
  927. Permit only this protocol (ignoring the list already permitted), though
  928. subject to later modification by subsequent entries in the comma separated
  929. list.
  930. .RE
  931. .IP
  932. For example:
  933. .RS
  934. .TP 15
  935. .B --proto -ftps
  936. uses the default protocols, but disables ftps
  937. .TP
  938. .B --proto -all,https,+http
  939. only enables http and https
  940. .TP
  941. .B --proto =http,https
  942. also only enables http and https
  943. .RE
  944. .IP
  945. Unknown protocols produce a warning. This allows scripts to safely rely on
  946. being able to disable potentially dangerous protocols, without relying upon
  947. support for that protocol being built into curl to avoid an error.
  948. This option can be used multiple times, in which case the effect is the same
  949. as concatenating the protocols into one instance of the option.
  950. (Added in 7.20.2)
  951. .IP "--proto-redir <protocols>"
  952. Tells curl to use the listed protocols after a redirect. See --proto for
  953. how protocols are represented.
  954. (Added in 7.20.2)
  955. .IP "--proxy-anyauth"
  956. Tells curl to pick a suitable authentication method when communicating with
  957. the given proxy. This might cause an extra request/response round-trip. (Added
  958. in 7.13.2)
  959. .IP "--proxy-basic"
  960. Tells curl to use HTTP Basic authentication when communicating with the given
  961. proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
  962. the default authentication method curl uses with proxies.
  963. .IP "--proxy-digest"
  964. Tells curl to use HTTP Digest authentication when communicating with the given
  965. proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
  966. .IP "--proxy-negotiate"
  967. Tells curl to use HTTP Negotiate authentication when communicating
  968. with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
  969. with a remote host. (Added in 7.17.1)
  970. .IP "--proxy-ntlm"
  971. Tells curl to use HTTP NTLM authentication when communicating with the given
  972. proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
  973. .IP "--proxy1.0 <proxyhost[:port]>"
  974. Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
  975. assumed at port 1080.
  976. The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
  977. is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
  978. protocol instead of the default HTTP 1.1.
  979. .IP "--pubkey <key>"
  980. (SSH) Public key file name. Allows you to provide your public key in this
  981. separate file.
  982. If this option is used several times, the last one will be used.
  983. .IP "-q"
  984. If used as the first parameter on the command line, the \fIcurlrc\fP config
  985. file will not be read and used. See the \fI-K, --config\fP for details on the
  986. default config file search path.
  987. .IP "-Q, --quote <command>"
  988. (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
  989. commands are sent BEFORE the transfer takes place (just after the initial PWD
  990. command in an FTP transfer, to be exact). To make commands take place after a
  991. successful transfer, prefix them with a dash '-'. To make commands be sent
  992. after curl has changed the working directory, just before the transfer
  993. command(s), prefix the command with a '+' (this is only supported for
  994. FTP). You may specify any number of commands. If the server returns failure
  995. for one of the commands, the entire operation will be aborted. You must send
  996. syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
  997. of the commands listed below to SFTP servers. This option can be used
  998. multiple times. When speaking to an FTP server, prefix the command with an
  999. asterisk (*) to make curl continue even if the command fails as by default
  1000. curl will stop at first failure.
  1001. SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
  1002. itself before sending them to the server. File names may be quoted
  1003. shell-style to embed spaces or special characters. Following is the list of
  1004. all supported SFTP quote commands:
  1005. .RS
  1006. .IP "chgrp group file"
  1007. The chgrp command sets the group ID of the file named by the file operand to
  1008. the group ID specified by the group operand. The group operand is a decimal
  1009. integer group ID.
  1010. .IP "chmod mode file"
  1011. The chmod command modifies the file mode bits of the specified file. The
  1012. mode operand is an octal integer mode number.
  1013. .IP "chown user file"
  1014. The chown command sets the owner of the file named by the file operand to the
  1015. user ID specified by the user operand. The user operand is a decimal
  1016. integer user ID.
  1017. .IP "ln source_file target_file"
  1018. The ln and symlink commands create a symbolic link at the target_file location
  1019. pointing to the source_file location.
  1020. .IP "mkdir directory_name"
  1021. The mkdir command creates the directory named by the directory_name operand.
  1022. .IP "pwd"
  1023. The pwd command returns the absolute pathname of the current working directory.
  1024. .IP "rename source target"
  1025. The rename command renames the file or directory named by the source
  1026. operand to the destination path named by the target operand.
  1027. .IP "rm file"
  1028. The rm command removes the file specified by the file operand.
  1029. .IP "rmdir directory"
  1030. The rmdir command removes the directory entry specified by the directory
  1031. operand, provided it is empty.
  1032. .IP "symlink source_file target_file"
  1033. See ln.
  1034. .RE
  1035. .IP "-r, --range <range>"
  1036. (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
  1037. HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
  1038. in a number of ways.
  1039. .RS
  1040. .TP 10
  1041. .B 0-499
  1042. specifies the first 500 bytes
  1043. .TP
  1044. .B 500-999
  1045. specifies the second 500 bytes
  1046. .TP
  1047. .B -500
  1048. specifies the last 500 bytes
  1049. .TP
  1050. .B 9500-
  1051. specifies the bytes from offset 9500 and forward
  1052. .TP
  1053. .B 0-0,-1
  1054. specifies the first and last byte only(*)(H)
  1055. .TP
  1056. .B 500-700,600-799
  1057. specifies 300 bytes from offset 500(H)
  1058. .TP
  1059. .B 100-199,500-599
  1060. specifies two separate 100-byte ranges(*)(H)
  1061. .RE
  1062. (*) = NOTE that this will cause the server to reply with a multipart
  1063. response!
  1064. Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
  1065. \&'start-stop' range syntax. If a non-digit character is given in the range,
  1066. the server's response will be unspecified, depending on the server's
  1067. configuration.
  1068. You should also be aware that many HTTP/1.1 servers do not have this feature
  1069. enabled, so that when you attempt to get a range, you'll instead get the whole
  1070. document.
  1071. FTP and SFTP range downloads only support the simple 'start-stop' syntax
  1072. (optionally with one of the numbers omitted). FTP use depends on the extended
  1073. FTP command SIZE.
  1074. If this option is used several times, the last one will be used.
  1075. .IP "-R, --remote-time"
  1076. When used, this will make curl attempt to figure out the timestamp of the
  1077. remote file, and if that is available make the local file get that same
  1078. timestamp.
  1079. .IP "--random-file <file>"
  1080. (SSL) Specify the path name to file containing what will be considered as
  1081. random data. The data is used to seed the random engine for SSL connections.
  1082. See also the \fI--egd-file\fP option.
  1083. .IP "--raw"
  1084. (HTTP) When used, it disables all internal HTTP decoding of content or transfer
  1085. encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
  1086. .IP "--remote-name-all"
  1087. This option changes the default action for all given URLs to be dealt with as
  1088. if \fI-O, --remote-name\fP were used for each one. So if you want to disable
  1089. that for a specific URL after \fI--remote-name-all\fP has been used, you must
  1090. use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
  1091. .IP "--resolve <host:port:address>"
  1092. Provide a custom address for a specific host and port pair. Using this, you
  1093. can make the curl requests(s) use a specified address and prevent the
  1094. otherwise normally resolved address to be used. Consider it a sort of
  1095. /etc/hosts alternative provided on the command line. The port number should be
  1096. the number used for the specific protocol the host will be used for. It means
  1097. you need several entries if you want to provide address for the same host but
  1098. different ports.
  1099. This option can be used many times to add many host names to resolve.
  1100. (Added in 7.21.3)
  1101. .IP "--retry <num>"
  1102. If a transient error is returned when curl tries to perform a transfer, it
  1103. will retry this number of times before giving up. Setting the number to 0
  1104. makes curl do no retries (which is the default). Transient error means either:
  1105. a timeout, an FTP 4xx response code or an HTTP 5xx response code.
  1106. When curl is about to retry a transfer, it will first wait one second and then
  1107. for all forthcoming retries it will double the waiting time until it reaches
  1108. 10 minutes which then will be the delay between the rest of the retries. By
  1109. using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
  1110. also \fI--retry-max-time\fP to limit the total time allowed for
  1111. retries. (Added in 7.12.3)
  1112. If this option is used several times, the last one will be used.
  1113. .IP "--retry-delay <seconds>"
  1114. Make curl sleep this amount of time before each retry when a transfer has
  1115. failed with a transient error (it changes the default backoff time algorithm
  1116. between retries). This option is only interesting if \fI--retry\fP is also
  1117. used. Setting this delay to zero will make curl use the default backoff time.
  1118. (Added in 7.12.3)
  1119. If this option is used several times, the last one will be used.
  1120. .IP "--retry-max-time <seconds>"
  1121. The retry timer is reset before the first transfer attempt. Retries will be
  1122. done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
  1123. given limit. Notice that if the timer hasn't reached the limit, the request
  1124. will be made and while performing, it may take longer than this given time
  1125. period. To limit a single request\'s maximum time, use \fI-m, --max-time\fP.
  1126. Set this option to zero to not timeout retries. (Added in 7.12.3)
  1127. If this option is used several times, the last one will be used.
  1128. .IP "-s, --silent"
  1129. Silent or quiet mode. Don't show progress meter or error messages. Makes Curl
  1130. mute. It will still output the data you ask for, potentially even to the
  1131. terminal/stdout unless you redirect it.
  1132. .IP "--sasl-ir"
  1133. Enable initial response in SASL authentication.
  1134. (Added in 7.31.0)
  1135. .IP "-S, --show-error"
  1136. When used with \fI-s\fP it makes curl show an error message if it fails.
  1137. .IP "--ssl"
  1138. (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a
  1139. non-secure connection if the server doesn't support SSL/TLS. See also
  1140. \fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
  1141. encryption required. (Added in 7.20.0)
  1142. This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
  1143. option name can still be used but will be removed in a future version.
  1144. .IP "--ssl-reqd"
  1145. (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
  1146. connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
  1147. This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
  1148. option name can still be used but will be removed in a future version.
  1149. .IP "--ssl-allow-beast"
  1150. (SSL) This option tells curl to not work around a security flaw in the SSL3
  1151. and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer
  1152. may use work-arounds known to cause interoperability problems with some older
  1153. SSL implementations. WARNING: this option loosens the SSL security, and by
  1154. using this flag you ask for exactly that. (Added in 7.25.0)
  1155. .IP "--socks4 <host[:port]>"
  1156. Use the specified SOCKS4 proxy. If the port number is not specified, it is
  1157. assumed at port 1080. (Added in 7.15.2)
  1158. This option overrides any previous use of \fI-x, --proxy\fP, as they are
  1159. mutually exclusive.
  1160. Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
  1161. with \fI-x, --proxy\fP using a socks4:// protocol prefix.
  1162. If this option is used several times, the last one will be used.
  1163. .IP "--socks4a <host[:port]>"
  1164. Use the specified SOCKS4a proxy. If the port number is not specified, it is
  1165. assumed at port 1080. (Added in 7.18.0)
  1166. This option overrides any previous use of \fI-x, --proxy\fP, as they are
  1167. mutually exclusive.
  1168. Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
  1169. with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
  1170. If this option is used several times, the last one will be used.
  1171. .IP "--socks5-hostname <host[:port]>"
  1172. Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
  1173. the port number is not specified, it is assumed at port 1080. (Added in
  1174. 7.18.0)
  1175. This option overrides any previous use of \fI-x, --proxy\fP, as they are
  1176. mutually exclusive.
  1177. Since 7.21.7, this option is superfluous since you can specify a socks5
  1178. hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
  1179. If this option is used several times, the last one will be used. (This option
  1180. was previously wrongly documented and used as --socks without the number
  1181. appended.)
  1182. .IP "--socks5 <host[:port]>"
  1183. Use the specified SOCKS5 proxy - but resolve the host name locally. If the
  1184. port number is not specified, it is assumed at port 1080.
  1185. This option overrides any previous use of \fI-x, --proxy\fP, as they are
  1186. mutually exclusive.
  1187. Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
  1188. with \fI-x, --proxy\fP using a socks5:// protocol prefix.
  1189. If this option is used several times, the last one will be used. (This option
  1190. was previously wrongly documented and used as --socks without the number
  1191. appended.)
  1192. This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
  1193. .IP "--socks5-gssapi-service <servicename>"
  1194. The default service name for a socks server is rcmd/server-fqdn. This option
  1195. allows you to change it.
  1196. Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
  1197. sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
  1198. sockd/real-name would use sockd/real-name for cases where the proxy-name does
  1199. not match the principal name. (Added in 7.19.4).
  1200. .IP "--socks5-gssapi-nec"
  1201. As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
  1202. says in section 4.3/4.4 it should be protected, but the NEC reference
  1203. implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
  1204. unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
  1205. .IP "--stderr <file>"
  1206. Redirect all writes to stderr to the specified file instead. If the file name
  1207. is a plain '-', it is instead written to stdout.
  1208. If this option is used several times, the last one will be used.
  1209. .IP "-t, --telnet-option <OPT=val>"
  1210. Pass options to the telnet protocol. Supported options are:
  1211. TTYPE=<term> Sets the terminal type.
  1212. XDISPLOC=<X display> Sets the X display location.
  1213. NEW_ENV=<var,val> Sets an environment variable.
  1214. .IP "-T, --upload-file <file>"
  1215. This transfers the specified local file to the remote URL. If there is no file
  1216. part in the specified URL, Curl will append the local file name. NOTE that you
  1217. must use a trailing / on the last directory to really prove to Curl that there
  1218. is no file name or curl will think that your last directory name is the remote
  1219. file name to use. That will most likely cause the upload operation to fail. If
  1220. this is used on an HTTP(S) server, the PUT command will be used.
  1221. Use the file name "-" (a single dash) to use stdin instead of a given file.
  1222. Alternately, the file name "." (a single period) may be specified instead
  1223. of "-" to use stdin in non-blocking mode to allow reading server output
  1224. while stdin is being uploaded.
  1225. You can specify one -T for each URL on the command line. Each -T + URL pair
  1226. specifies what to upload and to where. curl also supports "globbing" of the -T
  1227. argument, meaning that you can upload multiple files to a single URL by using
  1228. the same URL globbing style supported in the URL, like this:
  1229. curl -T "{file1,file2}" http://www.uploadtothissite.com
  1230. or even
  1231. curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
  1232. .IP "--tcp-nodelay"
  1233. Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
  1234. details about this option. (Added in 7.11.2)
  1235. .IP "--tftp-blksize <value>"
  1236. (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
  1237. curl will try to use when transferring data to or from a TFTP server. By
  1238. default 512 bytes will be used.
  1239. If this option is used several times, the last one will be used.
  1240. (Added in 7.20.0)
  1241. .IP "--tlsauthtype <authtype>"
  1242. Set TLS authentication type. Currently, the only supported option is "SRP",
  1243. for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
  1244. specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
  1245. (Added in 7.21.4)
  1246. .IP "--tlsuser <user>"
  1247. Set username for use with the TLS authentication method specified with
  1248. \fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set. (Added in
  1249. 7.21.4)
  1250. .IP "--tlspassword <password>"
  1251. Set password for use with the TLS authentication method specified with
  1252. \fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. (Added in
  1253. 7.21.4)
  1254. .IP "--tr-encoding"
  1255. (HTTP) Request a compressed Transfer-Encoding response using one of the
  1256. algorithms curl supports, and uncompress the data while receiving it.
  1257. (Added in 7.21.6)
  1258. .IP "--trace <file>"
  1259. Enables a full trace dump of all incoming and outgoing data, including
  1260. descriptive information, to the given output file. Use "-" as filename to have
  1261. the output sent to stdout.
  1262. This option overrides previous uses of \fI-v, --verbose\fP or
  1263. \fI--trace-ascii\fP.
  1264. If this option is used several times, the last one will be used.
  1265. .IP "--trace-ascii <file>"
  1266. Enables a full trace dump of all incoming and outgoing data, including
  1267. descriptive information, to the given output file. Use "-" as filename to have
  1268. the output sent to stdout.
  1269. This is very similar to \fI--trace\fP, but leaves out the hex part and only
  1270. shows the ASCII part of the dump. It makes smaller output that might be easier
  1271. to read for untrained humans.
  1272. This option overrides previous uses of \fI-v, --verbose\fP or \fI--trace\fP.
  1273. If this option is used several times, the last one will be used.
  1274. .IP "--trace-time"
  1275. Prepends a time stamp to each trace or verbose line that curl displays.
  1276. (Added in 7.14.0)
  1277. .IP "-u, --user <user:password>"
  1278. Specify the user name and password to use for server authentication. Overrides
  1279. \fI-n, --netrc\fP and \fI--netrc-optional\fP.
  1280. If you just give the user name (without entering a colon) curl will prompt for
  1281. a password.
  1282. If you use an SSPI-enabled curl binary and do NTLM authentication, you can
  1283. force curl to pick up the user name and password from your environment by
  1284. simply specifying a single colon with this option: "-u :".
  1285. If this option is used several times, the last one will be used.
  1286. .IP "-U, --proxy-user <user:password>"
  1287. Specify the user name and password to use for proxy authentication.
  1288. If you use an SSPI-enabled curl binary and do NTLM authentication, you can
  1289. force curl to pick up the user name and password from your environment by
  1290. simply specifying a single colon with this option: "-U :".
  1291. If this option is used several times, the last one will be used.
  1292. .IP "--url <URL>"
  1293. Specify a URL to fetch. This option is mostly handy when you want to specify
  1294. URL(s) in a config file.
  1295. This option may be used any number of times. To control where this URL is
  1296. written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
  1297. .IP "-v, --verbose"
  1298. Makes the fetching more verbose/talkative. Mostly useful for debugging. A line
  1299. starting with '>' means "header data" sent by curl, '<' means "header data"
  1300. received by curl that is hidden in normal cases, and a line starting with '*'
  1301. means additional info provided by curl.
  1302. Note that if you only want HTTP headers in the output, \fI-i, --include\fP
  1303. might be the option you're looking for.
  1304. If you think this option still doesn't give you enough details, consider using
  1305. \fI--trace\fP or \fI--trace-ascii\fP instead.
  1306. This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
  1307. Use \fI-s, --silent\fP to make curl quiet.
  1308. .IP "-w, --write-out <format>"
  1309. Defines what to display on stdout after a completed and successful
  1310. operation. The format is a string that may contain plain text mixed with any
  1311. number of variables. The string can be specified as "string", to get read from
  1312. a particular file you specify it "@filename" and to tell curl to read the
  1313. format from stdin you write "@-".
  1314. The variables present in the output format will be substituted by the value or
  1315. text that curl thinks fit, as described below. All variables are specified
  1316. as %{variable_name} and to output a normal % you just write them as
  1317. %%. You can output a newline by using \\n, a carriage return with \\r and a tab
  1318. space with \\t.
  1319. .B NOTE:
  1320. The %-symbol is a special symbol in the win32-environment, where all
  1321. occurrences of % must be doubled when using this option.
  1322. The variables available are:
  1323. .RS
  1324. .TP 15
  1325. .B content_type
  1326. The Content-Type of the requested document, if there was any.
  1327. .TP
  1328. .B filename_effective
  1329. The ultimate filename that curl writes out to. This is only meaningful if curl
  1330. is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
  1331. option. It's most useful in combination with the \fI--remote-header-name\fP
  1332. option. (Added in 7.25.1)
  1333. .TP
  1334. .B ftp_entry_path
  1335. The initial path curl ended up in when logging on to the remote FTP
  1336. server. (Added in 7.15.4)
  1337. .TP
  1338. .B http_code
  1339. The numerical response code that was found in the last retrieved HTTP(S) or
  1340. FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
  1341. same info.
  1342. .TP
  1343. .B http_connect
  1344. The numerical code that was found in the last response (from a proxy) to a
  1345. curl CONNECT request. (Added in 7.12.4)
  1346. .TP
  1347. .B local_ip
  1348. The IP address of the local end of the most recently done connection - can be
  1349. either IPv4 or IPv6 (Added in 7.29.0)
  1350. .TP
  1351. .B local_port
  1352. The local port number of the most recently done connection (Added in 7.29.0)
  1353. .TP
  1354. .B num_connects
  1355. Number of new connects made in the recent transfer. (Added in 7.12.3)
  1356. .TP
  1357. .B num_redirects
  1358. Number of redirects that were followed in the request. (Added in 7.12.3)
  1359. .TP
  1360. .B redirect_url
  1361. When an HTTP request was made without -L to follow redirects, this variable
  1362. will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
  1363. .TP
  1364. .B remote_ip
  1365. The remote IP address of the most recently done connection - can be either
  1366. IPv4 or IPv6 (Added in 7.29.0)
  1367. .TP
  1368. .B remote_port
  1369. The remote port number of the most recently done connection (Added in 7.29.0)
  1370. .TP
  1371. .B size_download
  1372. The total amount of bytes that were downloaded.
  1373. .TP
  1374. .B size_header
  1375. The total amount of bytes of the downloaded headers.
  1376. .TP
  1377. .B size_request
  1378. The total amount of bytes that were sent in the HTTP request.
  1379. .TP
  1380. .B size_upload
  1381. The total amount of bytes that were uploaded.
  1382. .TP
  1383. .B speed_download
  1384. The average download speed that curl measured for the complete download. Bytes
  1385. per second.
  1386. .TP
  1387. .B speed_upload
  1388. The average upload speed that curl measured for the complete upload. Bytes per
  1389. second.
  1390. .TP
  1391. .B ssl_verify_result
  1392. The result of the SSL peer certificate verification that was requested. 0
  1393. means the verification was successful. (Added in 7.19.0)
  1394. .TP
  1395. .B time_appconnect
  1396. The time, in seconds, it took from the start until the SSL/SSH/etc
  1397. connect/handshake to the remote host was completed. (Added in 7.19.0)
  1398. .TP
  1399. .B time_connect
  1400. The time, in seconds, it took from the start until the TCP connect to the
  1401. remote host (or proxy) was completed.
  1402. .TP
  1403. .B time_namelookup
  1404. The time, in seconds, it took from the start until the name resolving was
  1405. completed.
  1406. .TP
  1407. .B time_pretransfer
  1408. The time, in seconds, it took from the start until the file transfer was just
  1409. about to begin. This includes all pre-transfer commands and negotiations that
  1410. are specific to the particular protocol(s) involved.
  1411. .TP
  1412. .B time_redirect
  1413. The time, in seconds, it took for all redirection steps include name lookup,
  1414. connect, pretransfer and transfer before the final transaction was
  1415. started. time_redirect shows the complete execution time for multiple
  1416. redirections. (Added in 7.12.3)
  1417. .TP
  1418. .B time_starttransfer
  1419. The time, in seconds, it took from the start until the first byte was just
  1420. about to be transferred. This includes time_pretransfer and also the time the
  1421. server needed to calculate the result.
  1422. .TP
  1423. .B time_total
  1424. The total time, in seconds, that the full operation lasted. The time will be
  1425. displayed with millisecond resolution.
  1426. .TP
  1427. .B url_effective
  1428. The URL that was fetched last. This is most meaningful if you've told curl
  1429. to follow location: headers.
  1430. .RE
  1431. If this option is used several times, the last one will be used.
  1432. .IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
  1433. Use the specified HTTP proxy. If the port number is not specified, it is
  1434. assumed at port 1080.
  1435. This option overrides existing environment variables that set the proxy to
  1436. use. If there's an environment variable setting a proxy, you can set proxy to
  1437. \&"" to override it.
  1438. All operations that are performed over an HTTP proxy will transparently be
  1439. converted to HTTP. It means that certain protocol specific operations might
  1440. not be available. This is not the case if you can tunnel through the proxy, as
  1441. one with the \fI-p, --proxytunnel\fP option.
  1442. User and password that might be provided in the proxy string are URL decoded
  1443. by curl. This allows you to pass in special characters such as @ by using %40
  1444. or pass in a colon with %3a.
  1445. The proxy host can be specified the exact same way as the proxy environment
  1446. variables, including the protocol prefix (http://) and the embedded user +
  1447. password.
  1448. From 7.21.7, the proxy string may be specified with a protocol:// prefix to
  1449. specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
  1450. socks5h:// to request the specific SOCKS version to be used. No protocol
  1451. specified, http:// and all others will be treated as HTTP proxies.
  1452. If this option is used several times, the last one will be used.
  1453. .IP "-X, --request <command>"
  1454. (HTTP) Specifies a custom request method to use when communicating with the
  1455. HTTP server. The specified request will be used instead of the method
  1456. otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
  1457. details and explanations. Common additional HTTP requests include PUT and
  1458. DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
  1459. more.
  1460. Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
  1461. requests are rather invoked by using dedicated command line options.
  1462. This option only changes the actual word used in the HTTP request, it does not
  1463. alter the way curl behaves. So for example if you want to make a proper HEAD
  1464. request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
  1465. option.
  1466. (FTP)
  1467. Specifies a custom FTP command to use instead of LIST when doing file lists
  1468. with FTP.
  1469. If this option is used several times, the last one will be used.
  1470. .IP "--xattr"
  1471. When saving output to a file, this option tells curl to store certain file
  1472. metadata in extended file attributes. Currently, the URL is stored in the
  1473. xdg.origin.url attribute and, for HTTP, the content type is stored in
  1474. the mime_type attribute. If the file system does not support extended
  1475. attributes, a warning is issued.
  1476. .IP "-y, --speed-time <time>"
  1477. If a download is slower than speed-limit bytes per second during a speed-time
  1478. period, the download gets aborted. If speed-time is used, the default
  1479. speed-limit will be 1 unless set with \fI-Y\fP.
  1480. This option controls transfers and thus will not affect slow connects etc. If
  1481. this is a concern for you, try the \fI--connect-timeout\fP option.
  1482. If this option is used several times, the last one will be used.
  1483. .IP "-Y, --speed-limit <speed>"
  1484. If a download is slower than this given speed (in bytes per second) for
  1485. speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
  1486. if not set.
  1487. If this option is used several times, the last one will be used.
  1488. .IP "-z, --time-cond <date expression>|<file>"
  1489. (HTTP/FTP) Request a file that has been modified later than the given time and
  1490. date, or one that has been modified before that time. The <date expression>
  1491. can be all sorts of date strings or if it doesn't match any internal ones, it
  1492. is taken as a filename and tries to get the modification date (mtime) from
  1493. <file> instead. See the \fIcurl_getdate(3)\fP man pages for date expression
  1494. details.
  1495. Start the date expression with a dash (-) to make it request for a document
  1496. that is older than the given date/time, default is a document that is newer
  1497. than the specified date/time.
  1498. If this option is used several times, the last one will be used.
  1499. .IP "-h, --help"
  1500. Usage help.
  1501. .IP "-M, --manual"
  1502. Manual. Display the huge help text.
  1503. .IP "-V, --version"
  1504. Displays information about curl and the libcurl version it uses.
  1505. The first line includes the full version of curl, libcurl and other 3rd party
  1506. libraries linked with the executable.
  1507. The second line (starts with "Protocols:") shows all protocols that libcurl
  1508. reports to support.
  1509. The third line (starts with "Features:") shows specific features libcurl
  1510. reports to offer. Available features include:
  1511. .RS
  1512. .IP "IPv6"
  1513. You can use IPv6 with this.
  1514. .IP "krb4"
  1515. Krb4 for FTP is supported.
  1516. .IP "SSL"
  1517. HTTPS and FTPS are supported.
  1518. .IP "libz"
  1519. Automatic decompression of compressed files over HTTP is supported.
  1520. .IP "NTLM"
  1521. NTLM authentication is supported.
  1522. .IP "GSS-Negotiate"
  1523. Negotiate authentication and krb5 for FTP is supported.
  1524. .IP "Debug"
  1525. This curl uses a libcurl built with Debug. This enables more error-tracking
  1526. and memory debugging etc. For curl-developers only!
  1527. .IP "AsynchDNS"
  1528. This curl uses asynchronous name resolves.
  1529. .IP "SPNEGO"
  1530. SPNEGO Negotiate authentication is supported.
  1531. .IP "Largefile"
  1532. This curl supports transfers of large files, files larger than 2GB.
  1533. .IP "IDN"
  1534. This curl supports IDN - international domain names.
  1535. .IP "SSPI"
  1536. SSPI is supported. If you use NTLM and set a blank user name, curl will
  1537. authenticate with your current user and password.
  1538. .IP "TLS-SRP"
  1539. SRP (Secure Remote Password) authentication is supported for TLS.
  1540. .IP "Metalink"
  1541. This curl supports Metalink (both version 3 and 4 (RFC 5854)), which
  1542. describes mirrors and hashes. curl will use mirrors for failover if
  1543. there are errors (such as the file or server not being available).
  1544. .RE
  1545. .SH FILES
  1546. .I ~/.curlrc
  1547. .RS
  1548. Default config file, see \fI-K, --config\fP for details.
  1549. .SH ENVIRONMENT
  1550. The environment variables can be specified in lower case or upper case. The
  1551. lower case version has precedence. http_proxy is an exception as it is only
  1552. available in lower case.
  1553. Using an environment variable to set the proxy has the same effect as using
  1554. the \fI--proxy\fP option.
  1555. .IP "http_proxy [protocol://]<host>[:port]"
  1556. Sets the proxy server to use for HTTP.
  1557. .IP "HTTPS_PROXY [protocol://]<host>[:port]"
  1558. Sets the proxy server to use for HTTPS.
  1559. .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
  1560. Sets the proxy server to use for [url-protocol], where the protocol is a
  1561. protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
  1562. SMTP, LDAP etc.
  1563. .IP "ALL_PROXY [protocol://]<host>[:port]"
  1564. Sets the proxy server to use if no protocol-specific proxy is set.
  1565. .IP "NO_PROXY <comma-separated list of hosts>"
  1566. list of host names that shouldn't go through any proxy. If set to a asterisk
  1567. \&'*' only, it matches all hosts.
  1568. .SH "PROXY PROTOCOL PREFIXES"
  1569. Since curl version 7.21.7, the proxy string may be specified with a
  1570. protocol:// prefix to specify alternative proxy protocols.
  1571. If no protocol is specified in the proxy string or if the string doesn't match
  1572. a supported one, the proxy will be treated as an HTTP proxy.
  1573. The supported proxy protocol prefixes are as follows:
  1574. .IP "socks4://"
  1575. Makes it the equivalent of \fI--socks4\fP
  1576. .IP "socks4a://"
  1577. Makes it the equivalent of \fI--socks4a\fP
  1578. .IP "socks5://"
  1579. Makes it the equivalent of \fI--socks5\fP
  1580. .IP "socks5h://"
  1581. Makes it the equivalent of \fI--socks5-hostname\fP
  1582. .SH EXIT CODES
  1583. There are a bunch of different error codes and their corresponding error
  1584. messages that may appear during bad conditions. At the time of this writing,
  1585. the exit codes are:
  1586. .IP 1
  1587. Unsupported protocol. This build of curl has no support for this protocol.
  1588. .IP 2
  1589. Failed to initialize.
  1590. .IP 3
  1591. URL malformed. The syntax was not correct.
  1592. .IP 4
  1593. A feature or option that was needed to perform the desired request was not
  1594. enabled or was explicitly disabled at build-time. To make curl able to do
  1595. this, you probably need another build of libcurl!
  1596. .IP 5
  1597. Couldn't resolve proxy. The given proxy host could not be resolved.
  1598. .IP 6
  1599. Couldn't resolve host. The given remote host was not resolved.
  1600. .IP 7
  1601. Failed to connect to host.
  1602. .IP 8
  1603. FTP weird server reply. The server sent data curl couldn't parse.
  1604. .IP 9
  1605. FTP access denied. The server denied login or denied access to the particular
  1606. resource or directory you wanted to reach. Most often you tried to change to a
  1607. directory that doesn't exist on the server.
  1608. .IP 11
  1609. FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
  1610. .IP 13
  1611. FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
  1612. .IP 14
  1613. FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
  1614. .IP 15
  1615. FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
  1616. .IP 17
  1617. FTP couldn't set binary. Couldn't change transfer method to binary.
  1618. .IP 18
  1619. Partial file. Only a part of the file was transferred.
  1620. .IP 19
  1621. FTP couldn't download/access the given file, the RETR (or similar) command
  1622. failed.
  1623. .IP 21
  1624. FTP quote error. A quote command returned error from the server.
  1625. .IP 22
  1626. HTTP page not retrieved. The requested url was not found or returned another
  1627. error with the HTTP error code being 400 or above. This return code only
  1628. appears if \fI-f, --fail\fP is used.
  1629. .IP 23
  1630. Write error. Curl couldn't write data to a local filesystem or similar.
  1631. .IP 25
  1632. FTP couldn't STOR file. The server denied the STOR operation, used for FTP
  1633. uploading.
  1634. .IP 26
  1635. Read error. Various reading problems.
  1636. .IP 27
  1637. Out of memory. A memory allocation request failed.
  1638. .IP 28
  1639. Operation timeout. The specified time-out period was reached according to the
  1640. conditions.
  1641. .IP 30
  1642. FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
  1643. command, try doing a transfer using PASV instead!
  1644. .IP 31
  1645. FTP couldn't use REST. The REST command failed. This command is used for
  1646. resumed FTP transfers.
  1647. .IP 33
  1648. HTTP range error. The range "command" didn't work.
  1649. .IP 34
  1650. HTTP post error. Internal post-request generation error.
  1651. .IP 35
  1652. SSL connect error. The SSL handshaking failed.
  1653. .IP 36
  1654. FTP bad download resume. Couldn't continue an earlier aborted download.
  1655. .IP 37
  1656. FILE couldn't read file. Failed to open the file. Permissions?
  1657. .IP 38
  1658. LDAP cannot bind. LDAP bind operation failed.
  1659. .IP 39
  1660. LDAP search failed.
  1661. .IP 41
  1662. Function not found. A required LDAP function was not found.
  1663. .IP 42
  1664. Aborted by callback. An application told curl to abort the operation.
  1665. .IP 43
  1666. Internal error. A function was called with a bad parameter.
  1667. .IP 45
  1668. Interface error. A specified outgoing interface could not be used.
  1669. .IP 47
  1670. Too many redirects. When following redirects, curl hit the maximum amount.
  1671. .IP 48
  1672. Unknown option specified to libcurl. This indicates that you passed a weird
  1673. option to curl that was passed on to libcurl and rejected. Read up in the
  1674. manual!
  1675. .IP 49
  1676. Malformed telnet option.
  1677. .IP 51
  1678. The peer's SSL certificate or SSH MD5 fingerprint was not OK.
  1679. .IP 52
  1680. The server didn't reply anything, which here is considered an error.
  1681. .IP 53
  1682. SSL crypto engine not found.
  1683. .IP 54
  1684. Cannot set SSL crypto engine as default.
  1685. .IP 55
  1686. Failed sending network data.
  1687. .IP 56
  1688. Failure in receiving network data.
  1689. .IP 58
  1690. Problem with the local certificate.
  1691. .IP 59
  1692. Couldn't use specified SSL cipher.
  1693. .IP 60
  1694. Peer certificate cannot be authenticated with known CA certificates.
  1695. .IP 61
  1696. Unrecognized transfer encoding.
  1697. .IP 62
  1698. Invalid LDAP URL.
  1699. .IP 63
  1700. Maximum file size exceeded.
  1701. .IP 64
  1702. Requested FTP SSL level failed.
  1703. .IP 65
  1704. Sending the data requires a rewind that failed.
  1705. .IP 66
  1706. Failed to initialise SSL Engine.
  1707. .IP 67
  1708. The user name, password, or similar was not accepted and curl failed to log in.
  1709. .IP 68
  1710. File not found on TFTP server.
  1711. .IP 69
  1712. Permission problem on TFTP server.
  1713. .IP 70
  1714. Out of disk space on TFTP server.
  1715. .IP 71
  1716. Illegal TFTP operation.
  1717. .IP 72
  1718. Unknown TFTP transfer ID.
  1719. .IP 73
  1720. File already exists (TFTP).
  1721. .IP 74
  1722. No such user (TFTP).
  1723. .IP 75
  1724. Character conversion failed.
  1725. .IP 76
  1726. Character conversion functions required.
  1727. .IP 77
  1728. Problem with reading the SSL CA cert (path? access rights?).
  1729. .IP 78
  1730. The resource referenced in the URL does not exist.
  1731. .IP 79
  1732. An unspecified error occurred during the SSH session.
  1733. .IP 80
  1734. Failed to shut down the SSL connection.
  1735. .IP 82
  1736. Could not load CRL file, missing or wrong format (added in 7.19.0).
  1737. .IP 83
  1738. Issuer check failed (added in 7.19.0).
  1739. .IP 84
  1740. The FTP PRET command failed
  1741. .IP 85
  1742. RTSP: mismatch of CSeq numbers
  1743. .IP 86
  1744. RTSP: mismatch of Session Identifiers
  1745. .IP 87
  1746. unable to parse FTP file list
  1747. .IP 88
  1748. FTP chunk callback reported error
  1749. .IP XX
  1750. More error codes will appear here in future releases. The existing ones
  1751. are meant to never change.
  1752. .SH AUTHORS / CONTRIBUTORS
  1753. Daniel Stenberg is the main author, but the whole list of contributors is
  1754. found in the separate THANKS file.
  1755. .SH WWW
  1756. http://curl.haxx.se
  1757. .SH FTP
  1758. ftp://ftp.sunet.se/pub/www/utilities/curl/
  1759. .SH "SEE ALSO"
  1760. .BR ftp (1),
  1761. .BR wget (1)