curl.1 74 KB

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