curl.1 94 KB

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