2
0

curl.1 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2005, 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. .\" * $Id$
  22. .\" **************************************************************************
  23. .\"
  24. .TH curl 1 "12 Aug 2005" "Curl 7.14.1" "Curl Manual"
  25. .SH NAME
  26. curl \- transfer a URL
  27. .SH SYNOPSIS
  28. .B curl [options]
  29. .I [URL...]
  30. .SH DESCRIPTION
  31. .B curl
  32. is a tool to transfer data from or to a server, using one of the supported
  33. protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). 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 (https:) connections, cookies, file
  37. transfer resume and more. As you will see below, the amount 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 2396.
  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. No nesting of the sequences is supported at the moment, but you can use
  53. several ones next to each 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. Curl will attempt to re-use connections for multiple file transfers, so that
  58. getting many files from the same server will not do multiple connects /
  59. handshakes. This improves speed. Of course this is only done on files
  60. specified on a single command line and cannot be used between separate curl
  61. invokes.
  62. .SH OPTIONS
  63. .IP "-a/--append"
  64. (FTP) When used in an FTP upload, this will tell curl to append to the target
  65. file instead of overwriting it. If the file doesn't exist, it will be created.
  66. If this option is used twice, the second one will disable append mode again.
  67. .IP "-A/--user-agent <agent string>"
  68. (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
  69. done CGIs fail if its not set to "Mozilla/4.0". To encode blanks in the
  70. string, surround the string with single quote marks. This can also be set
  71. with the \fI-H/--header\fP option of course.
  72. If this option is set more than once, the last one will be the one that's
  73. used.
  74. .IP "--anyauth"
  75. (HTTP) Tells curl to figure out authentication method by itself, and use the
  76. most secure one the remote site claims it supports. This is done by first
  77. doing a request and checking the response-headers, thus inducing an extra
  78. network round-trip. This is used instead of setting a specific authentication
  79. method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and
  80. \fI--negotiate\fP. (Added in 7.10.6)
  81. Note that using --anyauth is not recommended if you do uploads from stdin,
  82. since it may require data to be sent twice and then the client must be able to
  83. rewind. If the need should arise when uploading from stdin, the upload
  84. operation will fail.
  85. If this option is used several times, the following occurrences make no
  86. difference.
  87. .IP "-b/--cookie <name=data>"
  88. (HTTP)
  89. Pass the data to the HTTP server as a cookie. It is supposedly the
  90. data previously received from the server in a "Set-Cookie:" line.
  91. The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
  92. If no '=' letter is used in the line, it is treated as a filename to use to
  93. read previously stored cookie lines from, which should be used in this session
  94. if they match. Using this method also activates the "cookie parser" which will
  95. make curl record incoming cookies too, which may be handy if you're using this
  96. in combination with the \fI-L/--location\fP option. The file format of the
  97. file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
  98. cookie file format.
  99. \fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as
  100. input. No cookies will be stored in the file. To store cookies, use the
  101. \fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file
  102. using \fI-D/--dump-header\fP!
  103. If this option is set more than once, the last one will be the one that's
  104. used.
  105. .IP "-B/--use-ascii"
  106. Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
  107. enforced by using an URL that ends with ";type=A". This option causes data
  108. sent to stdout to be in text mode for win32 systems.
  109. If this option is used twice, the second one will disable ASCII usage.
  110. .IP "--basic"
  111. (HTTP) Tells curl to use HTTP Basic authentication. This is the default and
  112. this option is usually pointless, unless you use it to override a previously
  113. set option that sets a different authentication method (such as \fI--ntlm\fP,
  114. \fI--digest\fP and \fI--negotiate\fP). (Added in 7.10.6)
  115. If this option is used several times, the following occurrences make no
  116. difference.
  117. .IP "--ciphers <list of ciphers>"
  118. (SSL) Specifies which ciphers to use in the connection. The list of ciphers
  119. must be using valid ciphers. Read up on SSL cipher list details on this URL:
  120. \fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
  121. If this option is used several times, the last one will override the others.
  122. .IP "--compressed"
  123. (HTTP) Request a compressed response using one of the algorithms libcurl
  124. supports, and return the uncompressed document. If this option is used and
  125. the server sends an unsupported encoding, Curl will report an error.
  126. If this option is used several times, each occurrence will toggle it on/off.
  127. .IP "--connect-timeout <seconds>"
  128. Maximum time in seconds that you allow the connection to the server to take.
  129. This only limits the connection phase, once curl has connected this option is
  130. of no more use. See also the \fI-m/--max-time\fP option.
  131. If this option is used several times, the last one will be used.
  132. .IP "-c/--cookie-jar <file name>"
  133. Specify to which file you want curl to write all cookies after a completed
  134. operation. Curl writes all cookies previously read from a specified file as
  135. well as all cookies received from remote server(s). If no cookies are known,
  136. no file will be written. The file will be written using the Netscape cookie
  137. file format. If you set the file name to a single dash, "-", the cookies will
  138. be written to stdout.
  139. .B NOTE
  140. If the cookie jar can't be created or written to, the whole curl operation
  141. won't fail or even report an error clearly. Using -v will get a warning
  142. displayed, but that is the only visible feedback you get about this possibly
  143. lethal situation.
  144. If this option is used several times, the last specified file name will be
  145. used.
  146. .IP "-C/--continue-at <offset>"
  147. Continue/Resume a previous file transfer at the given offset. The given offset
  148. is the exact number of bytes that will be skipped counted from the beginning
  149. of the source file before it is transferred to the destination. If used with
  150. uploads, the ftp server command SIZE will not be used by curl.
  151. Use "-C -" to tell curl to automatically find out where/how to resume the
  152. transfer. It then uses the given output/input files to figure that out.
  153. If this option is used several times, the last one will be used.
  154. .IP "--create-dirs"
  155. When used in conjunction with the -o option, curl will create the necessary
  156. local directory hierarchy as needed. This option creates the dirs mentioned
  157. with the -o option, nothing else. If the -o file name uses no dir or if the
  158. dirs it mentions already exist, no dir will be created.
  159. To create remote directories when using FTP, try \fI--ftp-create-dirs\fP.
  160. .IP "--crlf"
  161. (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
  162. If this option is used twice, the second will again disable crlf converting.
  163. .IP "-d/--data <data>"
  164. (HTTP) Sends the specified data in a POST request to the HTTP server, in a way
  165. that can emulate as if a user has filled in a HTML form and pressed the submit
  166. button. Note that the data is sent exactly as specified with no extra
  167. processing (with all newlines cut off). The data is expected to be
  168. \&"url-encoded". This will cause curl to pass the data to the server using the
  169. content-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. If
  170. this option is used more than once on the same command line, the data pieces
  171. specified will be merged together with a separating &-letter. Thus, using '-d
  172. name=daniel -d skill=lousy' would generate a post chunk that looks like
  173. \&'name=daniel&skill=lousy'.
  174. If you start the data with the letter @, the rest should be a file name to
  175. read the data from, or - if you want curl to read the data from stdin. The
  176. contents of the file must already be url-encoded. Multiple files can also be
  177. specified. Posting data from a file named 'foobar' would thus be done with
  178. \fI--data\fP @foobar".
  179. To post data purely binary, you should instead use the \fI--data-binary\fP
  180. option.
  181. \fI-d/--data\fP is the same as \fI--data-ascii\fP.
  182. If this option is used several times, the ones following the first will
  183. append data.
  184. .IP "--data-ascii <data>"
  185. (HTTP) This is an alias for the \fI-d/--data\fP option.
  186. If this option is used several times, the ones following the first will
  187. append data.
  188. .IP "--data-binary <data>"
  189. (HTTP) This posts data in a similar manner as \fI--data-ascii\fP does,
  190. although when using this option the entire context of the posted data is kept
  191. as-is. If you want to post a binary file without the strip-newlines feature of
  192. the \fI--data-ascii\fP option, this is for you.
  193. If this option is used several times, the ones following the first will
  194. append data.
  195. .IP "--digest"
  196. (HTTP) Enables HTTP Digest authentication. This is a authentication that
  197. prevents the password from being sent over the wire in clear text. Use this in
  198. combination with the normal \fI-u/--user\fP option to set user name and
  199. password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
  200. related options. (Added in curl 7.10.6)
  201. If this option is used several times, the following occurrences make no
  202. difference.
  203. .IP "--disable-eprt"
  204. (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
  205. active FTP transfers. Curl will normally always first attempt to use EPRT,
  206. then LPRT before using PORT, but with this option, it will use PORT right
  207. away. EPRT and LPRT are extensions to the original FTP protocol, may not work
  208. on all servers but enable more functionality in a better way than the
  209. traditional PORT command. (Added in 7.10.5)
  210. If this option is used several times, each occurrence will toggle this on/off.
  211. .IP "--disable-epsv"
  212. (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
  213. transfers. Curl will normally always first attempt to use EPSV before PASV,
  214. but with this option, it will not try using EPSV.
  215. If this option is used several times, each occurrence will toggle this on/off.
  216. .IP "-D/--dump-header <file>"
  217. Write the protocol headers to the specified file.
  218. This option is handy to use when you want to store the headers that a HTTP
  219. site sends to you. Cookies from the headers could then be read in a second
  220. curl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP
  221. option is however a better way to store cookies.
  222. When used on FTP, the ftp server response lines are considered being "headers"
  223. and thus are saved there.
  224. If this option is used several times, the last one will be used.
  225. .IP "-e/--referer <URL>"
  226. (HTTP) Sends the "Referer Page" information to the HTTP server. This can also
  227. be set with the \fI-H/--header\fP flag of course. When used with
  228. \fI-L/--location\fP you can append ";auto" to the referer URL to make curl
  229. automatically set the previous URL when it follows a Location: header. The
  230. \&";auto" string can be used alone, even if you don't set an initial referer.
  231. If this option is used several times, the last one will be used.
  232. .IP "--engine <name>"
  233. Select the OpenSSL crypto engine to use for cipher
  234. operations. Use \fI--engine list\fP to print a list of build-time supported
  235. engines. Note that not all (or none) of the engines may be available at
  236. run-time.
  237. .IP "--environment"
  238. (RISC OS ONLY) Sets a range of environment variables, using the names the -w
  239. option supports, to easier allow extraction of useful information after having
  240. run curl.
  241. If this option is used several times, each occurrence will toggle this on/off.
  242. .IP "--egd-file <file>"
  243. (HTTPS) Specify the path name to the Entropy Gathering Daemon socket. The
  244. socket is used to seed the random engine for SSL connections. See also the
  245. \fI--random-file\fP option.
  246. .IP "-E/--cert <certificate[:password]>"
  247. (HTTPS)
  248. Tells curl to use the specified certificate file when getting a file
  249. with HTTPS. The certificate must be in PEM format.
  250. If the optional password isn't specified, it will be queried for on
  251. the terminal. Note that this certificate is the private key and the private
  252. certificate concatenated!
  253. If this option is used several times, the last one will be used.
  254. .IP "--cert-type <type>"
  255. (SSL) Tells curl what certificate type the provided certificate is in. PEM,
  256. DER and ENG are recognized types.
  257. If this option is used several times, the last one will be used.
  258. .IP "--cacert <CA certificate>"
  259. (HTTPS) Tells curl to use the specified certificate file to verify the
  260. peer. The file may contain multiple CA certificates. The certificate(s) must
  261. be in PEM format.
  262. curl recognizes the environment variable named 'CURL_CA_BUNDLE' if that is
  263. set, and uses the given path as a path to a CA cert bundle. This option
  264. overrides that variable.
  265. The windows version of curl will automatically look for a CA certs file named
  266. \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
  267. Current Working Directory, or in any folder along your PATH.
  268. If this option is used several times, the last one will be used.
  269. .IP "--capath <CA certificate directory>"
  270. (HTTPS) Tells curl to use the specified certificate directory to verify the
  271. peer. The certificates must be in PEM format, and the directory must have been
  272. processed using the c_rehash utility supplied with openssl. Using
  273. \fI--capath\fP can allow curl to make https connections much more efficiently
  274. than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
  275. certificates.
  276. If this option is used several times, the last one will be used.
  277. .IP "-f/--fail"
  278. (HTTP) Fail silently (no output at all) on server errors. This is mostly done
  279. like this to better enable scripts etc to better deal with failed attempts. In
  280. normal cases when a HTTP server fails to deliver a document, it returns a HTML
  281. document stating so (which often also describes why and more). This flag will
  282. prevent curl from outputting that and fail silently instead.
  283. If this option is used twice, the second will again disable silent failure.
  284. .IP "--ftp-account [data]"
  285. (FTP) When an FTP server asks for "account data" after user name and password
  286. has been provided, this data is sent off using the ACCT command. (Added in
  287. 7.13.0)
  288. If this option is used twice, the second will override the previous use.
  289. .IP "--ftp-create-dirs"
  290. (FTP) When an FTP URL/operation uses a path that doesn't currently exist on
  291. the server, the standard behavior of curl is to fail. Using this option, curl
  292. will instead attempt to create missing directories. (Added in 7.10.7)
  293. If this option is used twice, the second will again disable silent failure.
  294. .IP "--ftp-pasv"
  295. (FTP) Use PASV when transferring. PASV is the internal default behavior, but
  296. using this option can be used to override a previous --ftp-port option. (Added
  297. in 7.11.0)
  298. If this option is used twice, the second will again disable silent failure.
  299. .IP "--ftp-ssl"
  300. (FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0)
  301. If this option is used twice, the second will again disable this.
  302. .IP "-F/--form <name=content>"
  303. (HTTP) This lets curl emulate a filled in form in which a user has pressed the
  304. submit button. This causes curl to POST data using the Content-Type
  305. multipart/form-data according to RFC1867. This enables uploading of binary
  306. files etc. To force the 'content' part to be a file, prefix the file name
  307. with an @ sign. To just get the content part from a file, prefix the file name
  308. with the letter <. The difference between @ and < is then that @ makes a file
  309. get attached in the post as a file upload, while the < makes a text field and
  310. just get the contents for that text field from a file.
  311. Example, to send your password file to the server, where
  312. \&'password' is the name of the form-field to which /etc/passwd will be the
  313. input:
  314. \fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
  315. To read the file's content from stdin instead of a file, use - where the file
  316. name should've been. This goes for both @ and < constructs.
  317. You can also tell curl what Content-Type to use by using 'type=', in a manner
  318. similar to:
  319. \fBcurl\fP -F "web=@index.html;type=text/html" url.com
  320. or
  321. \fBcurl\fP -F "name=daniel;type=text/foo" url.com
  322. You can also explicitly change the name field of an file upload part by
  323. setting filename=, like this:
  324. \fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
  325. See further examples and details in the MANUAL.
  326. This option can be used multiple times.
  327. .IP "--form-string <name=string>"
  328. (HTTP) Similar to \fI--form\fP except that the value string for the named
  329. parameter is used literally. Leading \&'@' and \&'<' characters, and the
  330. \&';type=' string in the value have no special meaning. Use this in preference
  331. to \fI--form\fP if there's any possibility that the string value may
  332. accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
  333. .IP "-g/--globoff"
  334. This option switches off the "URL globbing parser". When you set this option,
  335. you can specify URLs that contain the letters {}[] without having them being
  336. interpreted by curl itself. Note that these letters are not normal legal URL
  337. contents but they should be encoded according to the URI standard.
  338. .IP "-G/--get"
  339. When used, this option will make all data specified with \fI-d/--data\fP or
  340. \fI--data-binary\fP to be used in a HTTP GET request instead of the POST
  341. request that otherwise would be used. The data will be appended to the URL
  342. with a '?' separator.
  343. If used in combination with -I, the POST data will instead be appended to the
  344. URL with a HEAD request.
  345. If used multiple times, nothing special happens.
  346. .IP "-h/--help"
  347. Usage help.
  348. .IP "-H/--header <header>"
  349. (HTTP) Extra header to use when getting a web page. You may specify any number
  350. of extra headers. Note that if you should add a custom header that has the
  351. same name as one of the internal ones curl would use, your externally set
  352. header will be used instead of the internal one. This allows you to make even
  353. trickier stuff than curl would normally do. You should not replace internally
  354. set headers without knowing perfectly well what you're doing. Replacing an
  355. internal header with one without content on the right side of the colon will
  356. prevent that header from appearing.
  357. curl will make sure that each header you add/replace get sent with the proper
  358. end of line marker, you should thus \fBnot\fP add that as a part of the header
  359. content: do not add newlines or carriage returns they will only mess things up
  360. for you.
  361. See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
  362. This option can be used multiple times to add/replace/remove multiple headers.
  363. .IP "--ignore-content-length"
  364. (HTTP)
  365. Ignore the Content-Length header. This is particularly useful for servers
  366. running Apache 1.x, which will report incorrect Content-Length for files
  367. larger than 2 gigabytes.
  368. .IP "-i/--include"
  369. (HTTP)
  370. Include the HTTP-header in the output. The HTTP-header includes things
  371. like server-name, date of the document, HTTP-version and more...
  372. If this option is used twice, the second will again disable header include.
  373. .IP "--interface <name>"
  374. Perform an operation using a specified interface. You can enter interface
  375. name, IP address or host name. An example could look like:
  376. curl --interface eth0:1 http://www.netscape.com/
  377. If this option is used several times, the last one will be used.
  378. .IP "-I/--head"
  379. (HTTP/FTP/FILE)
  380. Fetch the HTTP-header only! HTTP-servers feature the command HEAD
  381. which this uses to get nothing but the header of a document. When used
  382. on a FTP or FILE file, curl displays the file size and last modification
  383. time only.
  384. If this option is used twice, the second will again disable header only.
  385. .IP "-j/--junk-session-cookies"
  386. (HTTP) When curl is told to read cookies from a given file, this option will
  387. make it discard all "session cookies". This will basically have the same effect
  388. as if a new session is started. Typical browsers always discard session
  389. cookies when they're closed down. (Added in 7.9.7)
  390. If this option is used several times, each occurrence will toggle this on/off.
  391. .IP "-k/--insecure"
  392. (SSL) This option explicitly allows curl to perform "insecure" SSL connections
  393. and transfers. Starting with curl 7.10, all SSL connections will be attempted
  394. to be made secure by using the CA certificate bundle installed by
  395. default. This makes all connections considered "insecure" to fail unless
  396. \fI-k/--insecure\fP is used.
  397. If this option is used twice, the second time will again disable it.
  398. .IP "--key <key>"
  399. (SSL) Private key file name. Allows you to provide your private key in this
  400. separate file.
  401. If this option is used several times, the last one will be used.
  402. .IP "--key-type <type>"
  403. (SSL) Private key file type. Specify which type your \fI--key\fP provided
  404. private key is. DER, PEM and ENG are supported.
  405. If this option is used several times, the last one will be used.
  406. .IP "--krb4 <level>"
  407. (FTP) Enable kerberos4 authentication and use. The level must be entered and
  408. should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use
  409. a level that is not one of these, 'private' will instead be used.
  410. This option requires that the library was built with kerberos4 support. This
  411. is not very common. Use \fI-V/--version\fP to see if your curl supports it.
  412. If this option is used several times, the last one will be used.
  413. .IP "-K/--config <config file>"
  414. Specify which config file to read curl arguments from. The config file is a
  415. text file in which command line arguments can be written which then will be
  416. used as if they were written on the actual command line. Options and their
  417. parameters must be specified on the same config file line. If the parameter is
  418. to contain white spaces, the parameter must be inclosed within quotes. If the
  419. first column of a config line is a '#' character, the rest of the line will be
  420. treated as a comment.
  421. Specify the filename as '-' to make curl read the file from stdin.
  422. Note that to be able to specify a URL in the config file, you need to specify
  423. it using the \fI--url\fP option, and not by simply writing the URL on its own
  424. line. So, it could look similar to this:
  425. url = "http://curl.haxx.se/docs/"
  426. This option can be used multiple times.
  427. When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
  428. config file and uses it if found. The default config file is checked for in
  429. the following places in this order:
  430. 1) curl tries to find the "home dir": It first checks for the CURL_HOME and
  431. then the HOME environment variables. Failing that, it uses getpwuid() on
  432. unix-like systems (which returns the home dir given the current user in your
  433. system). On Windows, it then checks for the APPDATA variable, or as a last
  434. resort the '%USERPROFILE%\Application Data'.
  435. 2) On windows, if there is no _curlrc file in the home dir, it checks for one
  436. in the same dir the executable curl is placed. On unix-like systems, it will
  437. simply try to load .curlrc from the determined home dir.
  438. .IP "--limit-rate <speed>"
  439. Specify the maximum transfer rate you want curl to use. This feature is useful
  440. if you have a limited pipe and you'd like your transfer not use your entire
  441. bandwidth.
  442. The given speed is measured in bytes/second, unless a suffix is appended.
  443. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
  444. megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
  445. If you are also using the \fI-Y/--speed-limit\fP option, that option will take
  446. precedence and might cripple the rate-limiting slightly, to help keeping the
  447. speed-limit logic working.
  448. This option was introduced in curl 7.10.
  449. If this option is used several times, the last one will be used.
  450. .IP "-l/--list-only"
  451. (FTP)
  452. When listing an FTP directory, this switch forces a name-only view.
  453. Especially useful if you want to machine-parse the contents of an FTP
  454. directory since the normal directory view doesn't use a standard look
  455. or format.
  456. This option causes an FTP NLST command to be sent. Some FTP servers
  457. list only files in their response to NLST; they do not include
  458. subdirectories and symbolic links.
  459. If this option is used twice, the second will again disable list only.
  460. .IP "-L/--location"
  461. (HTTP/HTTPS) If the server reports that the requested page has a different
  462. location (indicated with the header line Location:) this flag will let curl
  463. attempt to reattempt the get on the new place. If used together with
  464. \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages will
  465. be shown. If authentication is used, curl will only send its credentials to
  466. the initial host, so if a redirect takes curl to a different host, it won't
  467. intercept the user+password. See also \fI--location-trusted\fP on how to
  468. change this.
  469. If this option is used twice, the second will again disable location following.
  470. .IP "--location-trusted"
  471. (HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
  472. password to all hosts that the site may redirect to. This may or may not
  473. introduce a security breach if the site redirects you do a site to which
  474. you'll send your authentication info (which is plaintext in the case of HTTP
  475. Basic authentication).
  476. If this option is used twice, the second will again disable location following.
  477. .IP "--max-filesize <bytes>"
  478. Specify the maximum size (in bytes) of a file to download. If the file
  479. requested is larger than this value, the transfer will not start and curl will
  480. return with exit code 63.
  481. NOTE: The file size is not always known prior to download, and for such files
  482. this option has no effect even if the file transfer ends up being larger than
  483. this given limit. This concerns both FTP and HTTP transfers.
  484. .IP "-m/--max-time <seconds>"
  485. Maximum time in seconds that you allow the whole operation to take. This is
  486. useful for preventing your batch jobs from hanging for hours due to slow
  487. networks or links going down. This doesn't work fully in win32 systems. See
  488. also the \fI--connect-timeout\fP option.
  489. If this option is used several times, the last one will be used.
  490. .IP "-M/--manual"
  491. Manual. Display the huge help text.
  492. .IP "-n/--netrc"
  493. Makes curl scan the \fI.netrc\fP file in the user's home directory for login
  494. name and password. This is typically used for ftp on unix. If used with http,
  495. curl will enable user authentication. See
  496. .BR netrc(4)
  497. or
  498. .BR ftp(1)
  499. for details on the file format. Curl will not complain if that file
  500. hasn't the right permissions (it should not be world nor group
  501. readable). The environment variable "HOME" is used to find the home
  502. directory.
  503. A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
  504. to ftp to the machine host.domain.com with user name \&'myself' and password
  505. 'secret' should look similar to:
  506. .B "machine host.domain.com login myself password secret"
  507. If this option is used twice, the second will again disable netrc usage.
  508. .IP "--netrc-optional"
  509. Very similar to \fI--netrc\fP, but this option makes the .netrc usage
  510. \fBoptional\fP and not mandatory as the \fI--netrc\fP does.
  511. .IP "--negotiate"
  512. (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
  513. designed by Microsoft and is used in their web applications. It is primarily
  514. meant as a support for Kerberos5 authentication but may be also used along
  515. with another authentication methods. For more information see IETF draft
  516. draft-brezak-spnego-http-04.txt. (Added in 7.10.6)
  517. This option requires that the library was built with GSSAPI support. This is
  518. not very common. Use \fI-V/--version\fP to see if your version supports
  519. GSS-Negotiate.
  520. If this option is used several times, the following occurrences make no
  521. difference.
  522. .IP "-N/--no-buffer"
  523. Disables the buffering of the output stream. In normal work situations, curl
  524. will use a standard buffered output stream that will have the effect that it
  525. will output the data in chunks, not necessarily exactly when the data arrives.
  526. Using this option will disable that buffering.
  527. If this option is used twice, the second will again switch on buffering.
  528. .IP "--ntlm"
  529. (HTTP) Enables NTLM authentication. The NTLM authentication method was
  530. designed by Microsoft and is used by IIS web servers. It is a proprietary
  531. protocol, reversed engineered by clever people and implemented in curl based
  532. on their efforts. This kind of behavior should not be endorsed, you should
  533. encourage everyone who uses NTLM to switch to a public and documented
  534. authentication method instead. Such as Digest. (Added in 7.10.6)
  535. If you want to enable NTLM for your proxy authentication, then use
  536. \fI--proxy-ntlm\fP.
  537. This option requires that the library was built with SSL support. Use
  538. \fI-V/--version\fP to see if your curl supports NTLM.
  539. If this option is used several times, the following occurrences make no
  540. difference.
  541. .IP "-o/--output <file>"
  542. Write output to <file> instead of stdout. If you are using {} or [] to fetch
  543. multiple documents, you can use '#' followed by a number in the <file>
  544. specifier. That variable will be replaced with the current string for the URL
  545. being fetched. Like in:
  546. curl http://{one,two}.site.com -o "file_#1.txt"
  547. or use several variables like:
  548. curl http://{site,host}.host[1-5].com -o "#1_#2"
  549. You may use this option as many times as you have number of URLs.
  550. See also the \fI--create-dirs\fP option to create the local directories
  551. dynamically.
  552. .IP "-O/--remote-name"
  553. Write output to a local file named like the remote file we get. (Only the file
  554. part of the remote file is used, the path is cut off.)
  555. The remote file name to use for saving is extracted from the given URL.
  556. Nothing else
  557. You may use this option as many times as you have number of URLs.
  558. .IP "--pass <phrase>"
  559. (SSL) Pass phrase for the private key
  560. If this option is used several times, the last one will be used.
  561. .IP "--proxy-anyauth"
  562. Tells curl to pick a suitable authentication method when communicating with
  563. the given proxy. This will cause an extra request/response round-trip. Added
  564. in curl 7.13.2.
  565. If this option is used twice, the second will again disable the proxy use-any
  566. authentication.
  567. .IP "--proxy-basic"
  568. Tells curl to use HTTP Basic authentication when communicating with the given
  569. proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
  570. the default authentication method curl uses with proxies.
  571. If this option is used twice, the second will again disable proxy HTTP Basic
  572. authentication.
  573. .IP "--proxy-digest"
  574. Tells curl to use HTTP Digest authentication when communicating with the given
  575. proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
  576. If this option is used twice, the second will again disable proxy HTTP Digest.
  577. .IP "--proxy-ntlm"
  578. Tells curl to use HTTP NTLM authentication when communicating with the given
  579. proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
  580. If this option is used twice, the second will again disable proxy HTTP NTLM.
  581. .IP "-p/--proxytunnel"
  582. When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
  583. protocols to attempt to tunnel through the proxy instead of merely using it to
  584. do HTTP-like operations. The tunnel approach is made with the HTTP proxy
  585. CONNECT request and requires that the proxy allows direct connect to the
  586. remote port number curl wants to tunnel through to.
  587. If this option is used twice, the second will again disable proxy tunnel.
  588. .IP "-P/--ftp-port <address>"
  589. (FTP) Reverses the initiator/listener roles when connecting with ftp. This
  590. switch makes Curl use the PORT command instead of PASV. In practice, PORT
  591. tells the server to connect to the client's specified address and port, while
  592. PASV asks the server for an ip address and port to connect to. <address>
  593. should be one of:
  594. .RS
  595. .IP interface
  596. i.e "eth0" to specify which interface's IP address you want to use (Unix only)
  597. .IP "IP address"
  598. i.e "192.168.10.1" to specify exact IP number
  599. .IP "host name"
  600. i.e "my.host.domain" to specify machine
  601. .IP "-"
  602. (any single-letter string) to make it pick the machine's default
  603. .RE
  604. If this option is used several times, the last one will be used. Disable the
  605. use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
  606. instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
  607. .IP "-q"
  608. If used as the first parameter on the command line, the \fIcurlrc\fP config
  609. file will not be read and used. See the \fI-K/--config\fP for details on the
  610. default config file search path.
  611. .IP "-Q/--quote <command>"
  612. (FTP) Send an arbitrary command to the remote FTP server. Quote commands are
  613. sent BEFORE the transfer is taking place (just after the initial PWD command
  614. to be exact). To make commands take place after a successful transfer, prefix
  615. them with a dash '-'. To make commands get sent after libcurl has changed
  616. working directory, just before the transfer command(s), prefix the command
  617. with '+'. You may specify any amount of commands. If the server returns
  618. failure for one of the commands, the entire operation will be aborted. You
  619. must send syntactically correct FTP commands as RFC959 defines.
  620. This option can be used multiple times.
  621. .IP "--random-file <file>"
  622. (HTTPS) Specify the path name to file containing what will be considered as
  623. random data. The data is used to seed the random engine for SSL connections.
  624. See also the \fI--egd-file\fP option.
  625. .IP "-r/--range <range>"
  626. (HTTP/FTP)
  627. Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP
  628. server. Ranges can be specified in a number of ways.
  629. .RS
  630. .TP 10
  631. .B 0-499
  632. specifies the first 500 bytes
  633. .TP
  634. .B 500-999
  635. specifies the second 500 bytes
  636. .TP
  637. .B -500
  638. specifies the last 500 bytes
  639. .TP
  640. .B 9500
  641. specifies the bytes from offset 9500 and forward
  642. .TP
  643. .B 0-0,-1
  644. specifies the first and last byte only(*)(H)
  645. .TP
  646. .B 500-700,600-799
  647. specifies 300 bytes from offset 500(H)
  648. .TP
  649. .B 100-199,500-599
  650. specifies two separate 100 bytes ranges(*)(H)
  651. .RE
  652. (*) = NOTE that this will cause the server to reply with a multipart
  653. response!
  654. You should also be aware that many HTTP/1.1 servers do not have this feature
  655. enabled, so that when you attempt to get a range, you'll instead get the whole
  656. document.
  657. FTP range downloads only support the simple syntax 'start-stop' (optionally
  658. with one of the numbers omitted). It depends on the non-RFC command SIZE.
  659. If this option is used several times, the last one will be used.
  660. .IP "-R/--remote-time"
  661. When used, this will make libcurl attempt to figure out the timestamp of the
  662. remote file, and if that is available make the local file get that same
  663. timestamp.
  664. If this option is used twice, the second time disables this again.
  665. .IP "--retry <num>"
  666. If a transient error is returned when curl tries to perform a transfer, it
  667. will retry this number of times before giving up. Setting the number to 0
  668. makes curl do no retries (which is the default). Transient error means either:
  669. a timeout, an FTP 5xx response code or an HTTP 5xx response code.
  670. When curl is about to retry a transfer, it will first wait one second and then
  671. for all forthcoming retries it will double the waiting time until it reaches
  672. 10 minutes which then will be the delay between the rest of the retries. By
  673. using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
  674. also \fI--retry-max-time\fP to limit the total time allowed for
  675. retries. (Option added in 7.12.3)
  676. If this option is used multiple times, the last occurrence decide the amount.
  677. .IP "--retry-delay <seconds>"
  678. Make curl sleep this amount of time between each retry when a transfer has
  679. failed with a transient error (it changes the default backoff time algorithm
  680. between retries). This option is only interesting if \fI--retry\fP is also
  681. used. Setting this delay to zero will make curl use the default backoff time.
  682. (Option added in 7.12.3)
  683. If this option is used multiple times, the last occurrence decide the amount.
  684. .IP "--retry-max-time <seconds>"
  685. The retry timer is reset before the first transfer attempt. Retries will be
  686. done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
  687. given limit. Notice that if the timer hasn't reached the limit, the request
  688. will be made and while performing, it may take longer than this given time
  689. period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
  690. Set this option to zero to not timeout retries. (Option added in 7.12.3)
  691. If this option is used multiple times, the last occurrence decide the amount.
  692. .IP "-s/--silent"
  693. Silent mode. Don't show progress meter or error messages. Makes
  694. Curl mute.
  695. If this option is used twice, the second will again disable mute.
  696. .IP "-S/--show-error"
  697. When used with -s it makes curl show error message if it fails.
  698. If this option is used twice, the second will again disable show error.
  699. .IP "--socks <host[:port]>"
  700. Use the specified SOCKS5 proxy. If the port number is not specified, it is
  701. assumed at port 1080. (Option added in 7.11.1)
  702. This option overrides any previous use of \fI-x/--proxy\fP, as they are
  703. mutually exclusive.
  704. If this option is used several times, the last one will be used.
  705. .IP "--stderr <file>"
  706. Redirect all writes to stderr to the specified file instead. If the file name
  707. is a plain '-', it is instead written to stdout. This option has no point when
  708. you're using a shell with decent redirecting capabilities.
  709. If this option is used several times, the last one will be used.
  710. .IP "--tcp-nodelay"
  711. Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
  712. details about this option. (Added in 7.11.2)
  713. If this option is used several times, each occurrence toggles this on/off.
  714. .IP "-t/--telnet-option <OPT=val>"
  715. Pass options to the telnet protocol. Supported options are:
  716. TTYPE=<term> Sets the terminal type.
  717. XDISPLOC=<X display> Sets the X display location.
  718. NEW_ENV=<var,val> Sets an environment variable.
  719. .IP "-T/--upload-file <file>"
  720. This transfers the specified local file to the remote URL. If there is no file
  721. part in the specified URL, Curl will append the local file name. NOTE that you
  722. must use a trailing / on the last directory to really prove to Curl that there
  723. is no file name or curl will think that your last directory name is the remote
  724. file name to use. That will most likely cause the upload operation to fail. If
  725. this is used on a http(s) server, the PUT command will be used.
  726. Use the file name "-" (a single dash) to use stdin instead of a given file.
  727. Before 7.10.8, when this option was used several times, the last one was used.
  728. In curl 7.10.8 and later, you can specify one -T for each URL on the command
  729. line. Each -T + URL pair specifies what to upload and to where. curl also
  730. supports "globbing" of the -T argument, meaning that you can upload multiple
  731. files to a single URL by using the same URL globbing style supported in the
  732. URL, like this:
  733. curl -T "{file1,file2}" http://www.uploadtothissite.com
  734. or even
  735. curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
  736. .IP "--trace <file>"
  737. Enables a full trace dump of all incoming and outgoing data, including
  738. descriptive information, to the given output file. Use "-" as filename to have
  739. the output sent to stdout.
  740. If this option is used several times, the last one will be used. (Added in
  741. 7.9.7)
  742. .IP "--trace-ascii <file>"
  743. Enables a full trace dump of all incoming and outgoing data, including
  744. descriptive information, to the given output file. Use "-" as filename to have
  745. the output sent to stdout.
  746. This is very similar to \fI--trace\fP, but leaves out the hex part and only
  747. shows the ASCII part of the dump. It makes smaller output that might be easier
  748. to read for untrained humans.
  749. If this option is used several times, the last one will be used. (Added in
  750. 7.9.7)
  751. .IP "--trace-time"
  752. Prepends a time stamp to each trace or verbose line that curl displays.
  753. If this option is used several times, each occurrence will toggle it on/off.
  754. (Added in 7.14.0 )
  755. .IP "-u/--user <user:password>"
  756. Specify user and password to use for server authentication. Overrides
  757. \fI-n/--netrc\fP and \fI--netrc-optional\fP.
  758. If this option is used several times, the last one will be used.
  759. .IP "-U/--proxy-user <user:password>"
  760. Specify user and password to use for proxy authentication.
  761. If this option is used several times, the last one will be used.
  762. .IP "--url <URL>"
  763. Specify a URL to fetch. This option is mostly handy when you want to specify
  764. URL(s) in a config file.
  765. This option may be used any number of times. To control where this URL is
  766. written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
  767. .IP "-v/--verbose"
  768. Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines
  769. starting with '>' means "header data" sent by curl, '<' means "header data"
  770. received by curl that is hidden in normal cases and lines starting with '*'
  771. means additional info provided by curl.
  772. Note that if you only want HTTP headers in the output, \fI-i/--include\fP
  773. might be option you're looking for.
  774. If you think this option still doesn't give you enough details, consider using
  775. \fI--trace\fP or \fI--trace-ascii\fP instead.
  776. If this option is used twice, the second will again disable verbose.
  777. .IP "-V/--version"
  778. Displays information about curl and the libcurl version it uses.
  779. The first line includes the full version of curl, libcurl and other 3rd party
  780. libraries linked with the executable.
  781. The second line (starts with "Protocols:") shows all protocols that libcurl
  782. reports to support.
  783. The third line (starts with "Features:") shows specific features libcurl
  784. reports to offer. Available features include:
  785. .RS
  786. .IP "IPv6"
  787. You can use IPv6 with this.
  788. .IP "krb4"
  789. Krb4 for ftp is supported.
  790. .IP "SSL"
  791. HTTPS and FTPS are supported.
  792. .IP "libz"
  793. Automatic decompression of compressed files over HTTP is supported.
  794. .IP "NTLM"
  795. NTLM authentication is supported.
  796. .IP "GSS-Negotiate"
  797. Negotiate authentication is supported.
  798. .IP "Debug"
  799. This curl uses a libcurl built with Debug. This enables more error-tracking
  800. and memory debugging etc. For curl-developers only!
  801. .IP "AsynchDNS"
  802. This curl uses asynchronous name resolves.
  803. .IP "SPNEGO"
  804. SPNEGO Negotiate authentication is supported.
  805. .IP "Largefile"
  806. This curl supports transfers of large files, files larger than 2GB.
  807. .IP "IDN"
  808. This curl supports IDN - international domain names.
  809. .IP "SSPI"
  810. SSPI is supported. If you use NTLM and set a blank user name, curl will
  811. authenticate with your current user and password.
  812. .RE
  813. .IP "-w/--write-out <format>"
  814. Defines what to display on stdout after a completed and successful
  815. operation. The format is a string that may contain plain text mixed with any
  816. number of variables. The string can be specified as "string", to get read from
  817. a particular file you specify it "@filename" and to tell curl to read the
  818. format from stdin you write "@-".
  819. The variables present in the output format will be substituted by the value or
  820. text that curl thinks fit, as described below. All variables are specified
  821. like %{variable_name} and to output a normal % you just write them like
  822. %%. You can output a newline by using \\n, a carriage return with \\r and a tab
  823. space with \\t.
  824. .B NOTE:
  825. The %-letter is a special letter in the win32-environment, where all
  826. occurrences of % must be doubled when using this option.
  827. Available variables are at this point:
  828. .RS
  829. .TP 15
  830. .B url_effective
  831. The URL that was fetched last. This is mostly meaningful if you've told curl
  832. to follow location: headers.
  833. .TP
  834. .B http_code
  835. The numerical code that was found in the last retrieved HTTP(S) page.
  836. .TP
  837. .B http_connect
  838. The numerical code that was found in the last response (from a proxy) to a
  839. curl CONNECT request. (Added in 7.12.4)
  840. .TP
  841. .B time_total
  842. The total time, in seconds, that the full operation lasted. The time will be
  843. displayed with millisecond resolution.
  844. .TP
  845. .B time_namelookup
  846. The time, in seconds, it took from the start until the name resolving was
  847. completed.
  848. .TP
  849. .B time_connect
  850. The time, in seconds, it took from the start until the connect to the remote
  851. host (or proxy) was completed.
  852. .TP
  853. .B time_pretransfer
  854. The time, in seconds, it took from the start until the file transfer is just
  855. about to begin. This includes all pre-transfer commands and negotiations that
  856. are specific to the particular protocol(s) involved.
  857. .TP
  858. .B time_redirect
  859. The time, in seconds, it took for all redirection steps include name lookup,
  860. connect, pretransfer and transfer before final transaction was
  861. started. time_redirect shows the complete execution time for multiple
  862. redirections. (Added in 7.12.3)
  863. .TP
  864. .B time_starttransfer
  865. The time, in seconds, it took from the start until the first byte is just about
  866. to be transferred. This includes time_pretransfer and also the time the
  867. server needs to calculate the result.
  868. .TP
  869. .B size_download
  870. The total amount of bytes that were downloaded.
  871. .TP
  872. .B size_upload
  873. The total amount of bytes that were uploaded.
  874. .TP
  875. .B size_header
  876. The total amount of bytes of the downloaded headers.
  877. .TP
  878. .B size_request
  879. The total amount of bytes that were sent in the HTTP request.
  880. .TP
  881. .B speed_download
  882. The average download speed that curl measured for the complete download.
  883. .TP
  884. .B speed_upload
  885. The average upload speed that curl measured for the complete upload.
  886. .TP
  887. .B content_type
  888. The Content-Type of the requested document, if there was any. (Added in 7.9.5)
  889. .TP
  890. .B num_connects
  891. Number of new connects made in the recent transfer. (Added in 7.12.3)
  892. .TP
  893. .B num_redirects
  894. Number of redirects that were followed in the request. (Added in 7.12.3)
  895. .RE
  896. If this option is used several times, the last one will be used.
  897. .IP "-x/--proxy <proxyhost[:port]>"
  898. Use specified HTTP proxy. If the port number is not specified, it is assumed
  899. at port 1080.
  900. This option overrides existing environment variables that sets proxy to
  901. use. If there's an environment variable setting a proxy, you can set proxy to
  902. \&"" to override it.
  903. \fBNote\fP that all operations that are performed over a HTTP proxy will
  904. transparently be converted to HTTP. It means that certain protocol specific
  905. operations might not be available. This is not the case if you can tunnel
  906. through the proxy, as done with the \fI-p/--proxytunnel\fP option.
  907. Starting with 7.14.1, the proxy host can be specified the exact same way as
  908. the proxy environment variables, include protocol prefix (http://) and
  909. embedded user + password.
  910. If this option is used several times, the last one will be used.
  911. .IP "-X/--request <command>"
  912. (HTTP) Specifies a custom request method to use when communicating with the
  913. HTTP server. The specified request will be used instead of the method
  914. otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
  915. details and explanations.
  916. (FTP)
  917. Specifies a custom FTP command to use instead of LIST when doing file lists
  918. with ftp.
  919. If this option is used several times, the last one will be used.
  920. .IP "-y/--speed-time <time>"
  921. If a download is slower than speed-limit bytes per second during a speed-time
  922. period, the download gets aborted. If speed-time is used, the default
  923. speed-limit will be 1 unless set with -y.
  924. This option controls transfers and thus will not affect slow connects etc. If
  925. this is a concern for you, try the \fI--connect-timeout\fP option.
  926. If this option is used several times, the last one will be used.
  927. .IP "-Y/--speed-limit <speed>"
  928. If a download is slower than this given speed, in bytes per second, for
  929. speed-time seconds it gets aborted. speed-time is set with -Y and is 30 if
  930. not set.
  931. If this option is used several times, the last one will be used.
  932. .IP "-z/--time-cond <date expression>"
  933. (HTTP) Request a file that has been modified later than the given time and
  934. date, or one that has been modified before that time. The date expression can
  935. be all sorts of date strings or if it doesn't match any internal ones, it
  936. tries to get the time from a given file name instead! See the
  937. \fIcurl_getdate(3)\fP man pages for date expression details.
  938. Start the date expression with a dash (-) to make it request for a document
  939. that is older than the given date/time, default is a document that is newer
  940. than the specified date/time.
  941. If this option is used several times, the last one will be used.
  942. .IP "--max-redirs <num>"
  943. Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
  944. is used, this option can be used to prevent curl from following redirections
  945. \&"in absurdum".
  946. If this option is used several times, the last one will be used.
  947. .IP "-0/--http1.0"
  948. (HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
  949. internally preferred: HTTP 1.1.
  950. .IP "-1/--tlsv1"
  951. (HTTPS)
  952. Forces curl to use TSL version 1 when negotiating with a remote TLS server.
  953. .IP "-2/--sslv2"
  954. (HTTPS)
  955. Forces curl to use SSL version 2 when negotiating with a remote SSL server.
  956. .IP "-3/--sslv3"
  957. (HTTPS)
  958. Forces curl to use SSL version 3 when negotiating with a remote SSL server.
  959. .IP "--3p-quote"
  960. (FTP) Specify arbitrary commands to send to the source server. See the
  961. \fI-Q/--quote\fP option for details. (Added in 7.13.0)
  962. .IP "--3p-url"
  963. (FTP) Activates a FTP 3rd party transfer. Specifies the source URL to get a
  964. file from, while the "normal" URL will be used as target URL, the file that
  965. will be written/created.
  966. Note that not all FTP server allow 3rd party transfers. (Added in 7.13.0)
  967. .IP "--3p-user"
  968. (FTP) Specify user:password for the source URL transfer. (Added in 7.13.0)
  969. .IP "-4/--ipv4"
  970. If libcurl is capable of resolving an address to multiple IP versions (which
  971. it is if it is ipv6-capable), this option tells libcurl to resolve names to
  972. IPv4 addresses only. (Added in 7.10.8)
  973. .IP "-6/--ipv6"
  974. If libcurl is capable of resolving an address to multiple IP versions (which
  975. it is if it is ipv6-capable), this option tells libcurl to resolve names to
  976. IPv6 addresses only. (Added in 7.10.8)
  977. .IP "-#/--progress-bar"
  978. Make curl display progress information as a progress bar instead of the
  979. default statistics.
  980. If this option is used twice, the second will again disable the progress bar.
  981. .SH FILES
  982. .I ~/.curlrc
  983. .RS
  984. Default config file.
  985. .SH ENVIRONMENT
  986. .IP "http_proxy [protocol://]<host>[:port]"
  987. Sets proxy server to use for HTTP.
  988. .IP "HTTPS_PROXY [protocol://]<host>[:port]"
  989. Sets proxy server to use for HTTPS.
  990. .IP "FTP_PROXY [protocol://]<host>[:port]"
  991. Sets proxy server to use for FTP.
  992. .IP "GOPHER_PROXY [protocol://]<host>[:port]"
  993. Sets proxy server to use for GOPHER.
  994. .IP "ALL_PROXY [protocol://]<host>[:port]"
  995. Sets proxy server to use if no protocol-specific proxy is set.
  996. .IP "NO_PROXY <comma-separated list of hosts>"
  997. list of host names that shouldn't go through any proxy. If set to a asterisk
  998. '*' only, it matches all hosts.
  999. .SH EXIT CODES
  1000. There exists a bunch of different error codes and their corresponding error
  1001. messages that may appear during bad conditions. At the time of this writing,
  1002. the exit codes are:
  1003. .IP 1
  1004. Unsupported protocol. This build of curl has no support for this protocol.
  1005. .IP 2
  1006. Failed to initialize.
  1007. .IP 3
  1008. URL malformat. The syntax was not correct.
  1009. .IP 4
  1010. URL user malformatted. The user-part of the URL syntax was not correct.
  1011. .IP 5
  1012. Couldn't resolve proxy. The given proxy host could not be resolved.
  1013. .IP 6
  1014. Couldn't resolve host. The given remote host was not resolved.
  1015. .IP 7
  1016. Failed to connect to host.
  1017. .IP 8
  1018. FTP weird server reply. The server sent data curl couldn't parse.
  1019. .IP 9
  1020. FTP access denied. The server denied login.
  1021. .IP 10
  1022. FTP user/password incorrect. Either one or both were not accepted by the
  1023. server.
  1024. .IP 11
  1025. FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
  1026. .IP 12
  1027. FTP weird USER reply. Curl couldn't parse the reply sent to the USER request.
  1028. .IP 13
  1029. FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
  1030. .IP 14
  1031. FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
  1032. .IP 15
  1033. FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
  1034. .IP 16
  1035. FTP can't reconnect. Couldn't connect to the host we got in the 227-line.
  1036. .IP 17
  1037. FTP couldn't set binary. Couldn't change transfer method to binary.
  1038. .IP 18
  1039. Partial file. Only a part of the file was transferred.
  1040. .IP 19
  1041. FTP couldn't download/access the given file, the RETR (or similar) command
  1042. failed.
  1043. .IP 20
  1044. FTP write error. The transfer was reported bad by the server.
  1045. .IP 21
  1046. FTP quote error. A quote command returned error from the server.
  1047. .IP 22
  1048. HTTP page not retrieved. The requested url was not found or returned another
  1049. error with the HTTP error code being 400 or above. This return code only
  1050. appears if \fI-f/--fail\fP is used.
  1051. .IP 23
  1052. Write error. Curl couldn't write data to a local filesystem or similar.
  1053. .IP 24
  1054. Malformed user. User name badly specified.
  1055. .IP 25
  1056. FTP couldn't STOR file. The server denied the STOR operation, used for FTP
  1057. uploading.
  1058. .IP 26
  1059. Read error. Various reading problems.
  1060. .IP 27
  1061. Out of memory. A memory allocation request failed.
  1062. .IP 28
  1063. Operation timeout. The specified time-out period was reached according to the
  1064. conditions.
  1065. .IP 29
  1066. FTP couldn't set ASCII. The server returned an unknown reply.
  1067. .IP 30
  1068. FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
  1069. command, try doing a transfer using PASV instead!
  1070. .IP 31
  1071. FTP couldn't use REST. The REST command failed. This command is used for
  1072. resumed FTP transfers.
  1073. .IP 32
  1074. FTP couldn't use SIZE. The SIZE command failed. The command is an extension
  1075. to the original FTP spec RFC 959.
  1076. .IP 33
  1077. HTTP range error. The range "command" didn't work.
  1078. .IP 34
  1079. HTTP post error. Internal post-request generation error.
  1080. .IP 35
  1081. SSL connect error. The SSL handshaking failed.
  1082. .IP 36
  1083. FTP bad download resume. Couldn't continue an earlier aborted download.
  1084. .IP 37
  1085. FILE couldn't read file. Failed to open the file. Permissions?
  1086. .IP 38
  1087. LDAP cannot bind. LDAP bind operation failed.
  1088. .IP 39
  1089. LDAP search failed.
  1090. .IP 40
  1091. Library not found. The LDAP library was not found.
  1092. .IP 41
  1093. Function not found. A required LDAP function was not found.
  1094. .IP 42
  1095. Aborted by callback. An application told curl to abort the operation.
  1096. .IP 43
  1097. Internal error. A function was called with a bad parameter.
  1098. .IP 44
  1099. Internal error. A function was called in a bad order.
  1100. .IP 45
  1101. Interface error. A specified outgoing interface could not be used.
  1102. .IP 46
  1103. Bad password entered. An error was signaled when the password was entered.
  1104. .IP 47
  1105. Too many redirects. When following redirects, curl hit the maximum amount.
  1106. .IP 48
  1107. Unknown TELNET option specified.
  1108. .IP 49
  1109. Malformed telnet option.
  1110. .IP 51
  1111. The remote peer's SSL certificate wasn't ok
  1112. .IP 52
  1113. The server didn't reply anything, which here is considered an error.
  1114. .IP 53
  1115. SSL crypto engine not found
  1116. .IP 54
  1117. Cannot set SSL crypto engine as default
  1118. .IP 55
  1119. Failed sending network data
  1120. .IP 56
  1121. Failure in receiving network data
  1122. .IP 57
  1123. Share is in use (internal error)
  1124. .IP 58
  1125. Problem with the local certificate
  1126. .IP 59
  1127. Couldn't use specified SSL cipher
  1128. .IP 60
  1129. Problem with the CA cert (path? permission?)
  1130. .IP 61
  1131. Unrecognized transfer encoding
  1132. .IP 62
  1133. Invalid LDAP URL
  1134. .IP 63
  1135. Maximum file size exceeded
  1136. .IP XX
  1137. There will appear more error codes here in future releases. The existing ones
  1138. are meant to never change.
  1139. .SH AUTHORS / CONTRIBUTORS
  1140. Daniel Stenberg is the main author, but the whole list of contributors is
  1141. found in the separate THANKS file.
  1142. .SH WWW
  1143. http://curl.haxx.se
  1144. .SH FTP
  1145. ftp://ftp.sunet.se/pub/www/utilities/curl/
  1146. .SH "SEE ALSO"
  1147. .BR ftp (1),
  1148. .BR wget (1)