curl.1 96 KB

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