curl.1 182 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 \- 2022, Daniel Stenberg, <[email protected]>, 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 https://curl.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. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
  26. .\"
  27. .TH curl 1 "August 30 2022" "curl 7.85.0" "curl Manual"
  28. .SH NAME
  29. curl \- transfer a URL
  30. .SH SYNOPSIS
  31. .B curl [options / URLs]
  32. .SH DESCRIPTION
  33. \fBcurl\fP is a tool for transferring data from or to a server. It supports these
  34. protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS,
  35. LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP,
  36. SMTPS, TELNET or TFTP. The command is designed to work without user
  37. interaction.
  38. curl offers a busload of useful tricks like proxy support, user
  39. authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
  40. resume and more. As you will see below, the number of features will make your
  41. head spin.
  42. curl is powered by libcurl for all transfer-related features. See
  43. \fIlibcurl(3)\fP for details.
  44. .SH URL
  45. The URL syntax is protocol-dependent. You find a detailed description in
  46. RFC 3986.
  47. You can specify multiple URLs or parts of URLs by writing part sets within
  48. braces and quoting the URL as in:
  49. .nf
  50. \(dqhttp://site.{one,two,three}.com"
  51. .fi
  52. or you can get sequences of alphanumeric series by using [] as in:
  53. .nf
  54. \(dqftp://ftp.example.com/file[1-100].txt"
  55. .fi
  56. .nf
  57. \(dqftp://ftp.example.com/file[001-100].txt" (with leading zeros)
  58. .fi
  59. .nf
  60. \(dqftp://ftp.example.com/file[a-z].txt"
  61. .fi
  62. Nested sequences are not supported, but you can use several ones next to each
  63. other:
  64. .nf
  65. \(dqhttp://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html"
  66. .fi
  67. You can specify any amount of URLs on the command line. They will be fetched
  68. in a sequential manner in the specified order. You can specify command line
  69. options and URLs mixed and in any order on the command line.
  70. You can specify a step counter for the ranges to get every Nth number or
  71. letter:
  72. .nf
  73. \(dqhttp://example.com/file[1-100:10].txt"
  74. .fi
  75. .nf
  76. \(dqhttp://example.com/file[a-z:2].txt"
  77. .fi
  78. When using [] or {} sequences when invoked from a command line prompt, you
  79. probably have to put the full URL within double quotes to avoid the shell from
  80. interfering with it. This also goes for other characters treated special, like
  81. for example '&', '?' and '*'.
  82. Provide the IPv6 zone index in the URL with an escaped percentage sign and the
  83. interface name. Like in
  84. .nf
  85. \(dqhttp://[fe80::3%25eth0]/"
  86. .fi
  87. If you specify URL without protocol:// prefix, curl will attempt to guess what
  88. protocol you might want. It will then default to HTTP but try other protocols
  89. based on often-used host name prefixes. For example, for host names starting
  90. with "ftp." curl will assume you want to speak FTP.
  91. curl will do its best to use what you pass to it as a URL. It is not trying to
  92. validate it as a syntactically correct URL by any means but is fairly liberal
  93. with what it accepts.
  94. curl will attempt to re-use connections for multiple file transfers, so that
  95. getting many files from the same server will not do multiple connects /
  96. handshakes. This improves speed. Of course this is only done on files
  97. specified on a single command line and cannot be used between separate curl
  98. invocations.
  99. .SH OUTPUT
  100. If not told otherwise, curl writes the received data to stdout. It can be
  101. instructed to instead save that data into a local file, using the \-\-output or
  102. \-\-remote-name options. If curl is given multiple URLs to transfer on the
  103. command line, it similarly needs multiple options for where to save them.
  104. curl does not parse or otherwise "understand" the content it gets or writes as
  105. output. It does no encoding or decoding, unless explicitly asked to with
  106. dedicated command line options.
  107. .SH PROTOCOLS
  108. curl supports numerous protocols, or put in URL terms: schemes. Your
  109. particular build may not support them all.
  110. .IP DICT
  111. Lets you lookup words using online dictionaries.
  112. .IP FILE
  113. Read or write local files. curl does not support accessing file:// URL
  114. remotely, but when running on Microsoft Windows using the native UNC approach
  115. will work.
  116. .IP FTP(S)
  117. curl supports the File Transfer Protocol with a lot of tweaks and levers. With
  118. or without using TLS.
  119. .IP GOPHER(S)
  120. Retrieve files.
  121. .IP HTTP(S)
  122. curl supports HTTP with numerous options and variations. It can speak HTTP
  123. version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
  124. command line options.
  125. .IP IMAP(S)
  126. Using the mail reading protocol, curl can "download" emails for you. With or
  127. without using TLS.
  128. .IP LDAP(S)
  129. curl can do directory lookups for you, with or without TLS.
  130. .IP MQTT
  131. curl supports MQTT version 3. Downloading over MQTT equals "subscribe" to a
  132. topic while uploading/posting equals "publish" on a topic. MQTT over TLS is
  133. not supported (yet).
  134. .IP POP3(S)
  135. Downloading from a pop3 server means getting a mail. With or without using
  136. TLS.
  137. .IP RTMP(S)
  138. The Realtime Messaging Protocol is primarily used to server streaming media
  139. and curl can download it.
  140. .IP RTSP
  141. curl supports RTSP 1.0 downloads.
  142. .IP SCP
  143. curl supports SSH version 2 scp transfers.
  144. .IP SFTP
  145. curl supports SFTP (draft 5) done over SSH version 2.
  146. .IP SMB(S)
  147. curl supports SMB version 1 for upload and download.
  148. .IP SMTP(S)
  149. Uploading contents to an SMTP server means sending an email. With or without
  150. TLS.
  151. .IP TELNET
  152. Telling curl to fetch a telnet URL starts an interactive session where it
  153. sends what it reads on stdin and outputs what the server sends it.
  154. .IP TFTP
  155. curl can do TFTP downloads and uploads.
  156. .SH "PROGRESS METER"
  157. curl normally displays a progress meter during operations, indicating the
  158. amount of transferred data, transfer speeds and estimated time left, etc. The
  159. progress meter displays number of bytes and the speeds are in bytes per
  160. second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024
  161. bytes. 1M is 1048576 bytes.
  162. curl displays this data to the terminal by default, so if you invoke curl to
  163. do an operation and it is about to write data to the terminal, it
  164. \fIdisables\fP the progress meter as otherwise it would mess up the output
  165. mixing progress meter and response data.
  166. If you want a progress meter for HTTP POST or PUT requests, you need to
  167. redirect the response output to a file, using shell redirect (>), \-\-output or
  168. similar.
  169. This does not apply to FTP upload as that operation does not spit out any
  170. response data to the terminal.
  171. If you prefer a progress "bar" instead of the regular meter, \-\-progress-bar is
  172. your friend. You can also disable the progress meter completely with the
  173. \-\-silent option.
  174. .SH OPTIONS
  175. Options start with one or two dashes. Many of the options require an
  176. additional value next to them.
  177. The short "single-dash" form of the options, \-d for example, may be used with
  178. or without a space between it and its value, although a space is a recommended
  179. separator. The long "double-dash" form, \-\-data for example, requires a space
  180. between it and its value.
  181. Short version options that do not need any additional values can be used
  182. immediately next to each other, like for example you can specify all the
  183. options \-O, \-L and \-v at once as \-OLv.
  184. In general, all boolean options are enabled with \-\-\fBoption\fP and yet again
  185. disabled with \-\-\fBno-\fPoption. That is, you use the same option name but
  186. prefix it with "no-". However, in this list we mostly only list and show the
  187. \-\-option version of them.
  188. .IP "\-\-abstract-unix-socket <path>"
  189. (HTTP) Connect through an abstract Unix domain socket, instead of using the network.
  190. Note: netstat shows the path of an abstract socket prefixed with '@', however
  191. the <path> argument should not have this leading character.
  192. Example:
  193. .nf
  194. curl --abstract-unix-socket socketpath https://example.com
  195. .fi
  196. See also \fI--unix-socket\fP. Added in 7.53.0.
  197. .IP "\-\-alt-svc <file name>"
  198. (HTTPS) This option enables the alt-svc parser in curl. If the file name points to an
  199. existing alt-svc cache file, that will be used. After a completed transfer,
  200. the cache will be saved to the file name again if it has been modified.
  201. Specify a "" file name (zero length) to avoid loading/saving and make curl
  202. just handle the cache in memory.
  203. If this option is used several times, curl will load contents from all the
  204. files but the last one will be used for saving.
  205. Example:
  206. .nf
  207. curl --alt-svc svc.txt https://example.com
  208. .fi
  209. See also \fI--resolve\fP and \fI--connect-to\fP. Added in 7.64.1.
  210. .IP "\-\-anyauth"
  211. (HTTP) Tells curl to figure out authentication method by itself, and use the most
  212. secure one the remote site claims to support. This is done by first doing a
  213. request and checking the response-headers, thus possibly inducing an extra
  214. network round-trip. This is used instead of setting a specific authentication
  215. method, which you can do with \fI\-\-basic\fP, \fI\-\-digest\fP, \fI\-\-ntlm\fP, and \fI\-\-negotiate\fP.
  216. Using \-\-anyauth is not recommended if you do uploads from stdin, since it may
  217. require data to be sent twice and then the client must be able to rewind. If
  218. the need should arise when uploading from stdin, the upload operation will
  219. fail.
  220. Used together with \fI\-u, \-\-user\fP.
  221. Example:
  222. .nf
  223. curl --anyauth --user me:pwd https://example.com
  224. .fi
  225. See also \fI--proxy-anyauth\fP, \fI--basic\fP and \fI--digest\fP.
  226. .IP "\-a, \-\-append"
  227. (FTP SFTP) When used in an upload, this makes curl append to the target file instead of
  228. overwriting it. If the remote file does not exist, it will be created. Note
  229. that this flag is ignored by some SFTP servers (including OpenSSH).
  230. Example:
  231. .nf
  232. curl --upload-file local --append ftp://example.com/
  233. .fi
  234. See also \fI-r, --range\fP and \fI-C, --continue-at\fP.
  235. .IP "\-\-aws-sigv4 <provider1[:provider2[:region[:service]]]>"
  236. Use AWS V4 signature authentication in the transfer.
  237. The provider argument is a string that is used by the algorithm when creating
  238. outgoing authentication headers.
  239. The region argument is a string that points to a geographic area of
  240. a resources collection (region-code) when the region name is omitted from
  241. the endpoint.
  242. The service argument is a string that points to a function provided by a cloud
  243. (service-code) when the service name is omitted from the endpoint.
  244. Example:
  245. .nf
  246. curl --aws-sigv4 "aws:amz:east-2:es" --user "key:secret" https://example.com
  247. .fi
  248. See also \fI--basic\fP and \fI-u, --user\fP. Added in 7.75.0.
  249. .IP "\-\-basic"
  250. (HTTP) Tells curl to use HTTP Basic authentication with the remote host. This is the
  251. default and this option is usually pointless, unless you use it to override a
  252. previously set option that sets a different authentication method (such as
  253. \fI\-\-ntlm\fP, \fI\-\-digest\fP, or \fI\-\-negotiate\fP).
  254. Used together with \fI\-u, \-\-user\fP.
  255. Example:
  256. .nf
  257. curl -u name:password --basic https://example.com
  258. .fi
  259. See also \fI--proxy-basic\fP.
  260. .IP "\-\-cacert <file>"
  261. (TLS) Tells curl to use the specified certificate file to verify the peer. The file
  262. may contain multiple CA certificates. The certificate(s) must be in PEM
  263. format. Normally curl is built to use a default file for this, so this option
  264. is typically used to alter that default file.
  265. curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
  266. set, and uses the given path as a path to a CA cert bundle. This option
  267. overrides that variable.
  268. The windows version of curl will automatically look for a CA certs file named
  269. \(aqcurl-ca-bundle.crt', either in the same directory as curl.exe, or in the
  270. Current Working Directory, or in any folder along your PATH.
  271. If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
  272. (libnsspem.so) needs to be available for this option to work properly.
  273. (iOS and macOS only) If curl is built against Secure Transport, then this
  274. option is supported for backward compatibility with other SSL engines, but it
  275. should not be set. If the option is not set, then curl will use the
  276. certificates in the system and user Keychain to verify the peer, which is the
  277. preferred method of verifying the peer's certificate chain.
  278. (Schannel only) This option is supported for Schannel in Windows 7 or later
  279. with libcurl 7.60 or later. This option is supported for backward
  280. compatibility with other SSL engines; instead it is recommended to use
  281. Windows' store of root certificates (the default for Schannel).
  282. If this option is used several times, the last one will be used.
  283. Example:
  284. .nf
  285. curl --cacert CA-file.txt https://example.com
  286. .fi
  287. See also \fI--capath\fP and \fI-k, --insecure\fP.
  288. .IP "\-\-capath <dir>"
  289. (TLS) Tells curl to use the specified certificate directory to verify the
  290. peer. Multiple paths can be provided by separating them with ":" (e.g.
  291. \(dqpath1:path2:path3"). The certificates must be in PEM format, and if curl is
  292. built against OpenSSL, the directory must have been processed using the
  293. c_rehash utility supplied with OpenSSL. Using \-\-capath can allow
  294. OpenSSL-powered curl to make SSL-connections much more efficiently than using
  295. \-\-cacert if the \-\-cacert file contains many CA certificates.
  296. If this option is set, the default capath value will be ignored, and if it is
  297. used several times, the last one will be used.
  298. Example:
  299. .nf
  300. curl --capath /local/directory https://example.com
  301. .fi
  302. See also \fI--cacert\fP and \fI-k, --insecure\fP.
  303. .IP "\-\-cert-status"
  304. (TLS) Tells curl to verify the status of the server certificate by using the
  305. Certificate Status Request (aka. OCSP stapling) TLS extension.
  306. If this option is enabled and the server sends an invalid (e.g. expired)
  307. response, if the response suggests that the server certificate has been revoked,
  308. or no response at all is received, the verification fails.
  309. This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
  310. Example:
  311. .nf
  312. curl --cert-status https://example.com
  313. .fi
  314. See also \fI--pinnedpubkey\fP. Added in 7.41.0.
  315. .IP "\-\-cert-type <type>"
  316. (TLS) Tells curl what type the provided client certificate is using. PEM, DER, ENG
  317. and P12 are recognized types.
  318. The default type depends on the TLS backend and is usually PEM, however for
  319. Secure Transport and Schannel it is P12. If \-\-cert is a pkcs11: URI then ENG is
  320. the default type.
  321. If this option is used several times, the last one will be used.
  322. Example:
  323. .nf
  324. curl --cert-type PEM --cert file https://example.com
  325. .fi
  326. See also \fI-E, --cert\fP, \fI--key\fP and \fI--key-type\fP.
  327. .IP "\-E, \-\-cert <certificate[:password]>"
  328. (TLS) Tells curl to use the specified client certificate file when getting a file
  329. with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
  330. PKCS#12 format if using Secure Transport, or PEM format if using any other
  331. engine. If the optional password is not specified, it will be queried for on
  332. the terminal. Note that this option assumes a certificate file that is the
  333. private key and the client certificate concatenated. See \-\-cert and \-\-key to
  334. specify them independently.
  335. In the <certificate> portion of the argument, you must escape the character ":"
  336. as "\\:" so that it is not recognized as the password delimiter. Similarly, you
  337. must escape the character "\\" as "\\\\" so that it is not recognized as an
  338. escape character.
  339. If curl is built against the NSS SSL library then this option can tell
  340. curl the nickname of the certificate to use within the NSS database defined
  341. by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
  342. NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
  343. loaded.
  344. If you provide a path relative to the current directory, you must prefix the
  345. path with "./" in order to avoid confusion with an NSS database nickname.
  346. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  347. then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
  348. a PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
  349. PKCS#11 URI. If a PKCS#11 URI is provided, then the \-\-engine option will be set
  350. as "pkcs11" if none was provided and the \-\-cert-type option will be set as
  351. \(dqENG" if none was provided.
  352. (iOS and macOS only) If curl is built against Secure Transport, then the
  353. certificate string can either be the name of a certificate/private key in the
  354. system or user keychain, or the path to a PKCS#12-encoded certificate and
  355. private key. If you want to use a file from the current directory, please
  356. precede it with "./" prefix, in order to avoid confusion with a nickname.
  357. (Schannel only) Client certificates must be specified by a path
  358. expression to a certificate store. (Loading PFX is not supported; you can
  359. import it to a store first). You can use
  360. \(dq<store location>\\<store name>\\<thumbprint>" to refer to a certificate
  361. in the system certificates store, for example,
  362. \(dqCurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is
  363. usually a SHA-1 hex string which you can see in certificate details. Following
  364. store locations are supported: CurrentUser, LocalMachine, CurrentService,
  365. Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy,
  366. LocalMachineEnterprise.
  367. If this option is used several times, the last one will be used.
  368. Example:
  369. .nf
  370. curl --cert certfile --key keyfile https://example.com
  371. .fi
  372. See also \fI--cert-type\fP, \fI--key\fP and \fI--key-type\fP.
  373. .IP "\-\-ciphers <list of ciphers>"
  374. (TLS) Specifies which ciphers to use in the connection. The list of ciphers must
  375. specify valid ciphers. Read up on SSL cipher list details on this URL:
  376. .nf
  377. https://curl.se/docs/ssl-ciphers.html
  378. .fi
  379. If this option is used several times, the last one will be used.
  380. Example:
  381. .nf
  382. curl --ciphers ECDHE-ECDSA-AES256-CCM8 https://example.com
  383. .fi
  384. See also \fI--tlsv1.3\fP.
  385. .IP "\-\-compressed-ssh"
  386. (SCP SFTP) Enables built-in SSH compression.
  387. This is a request, not an order; the server may or may not do it.
  388. Example:
  389. .nf
  390. curl --compressed-ssh sftp://example.com/
  391. .fi
  392. See also \fI--compressed\fP. Added in 7.56.0.
  393. .IP "\-\-compressed"
  394. (HTTP) Request a compressed response using one of the algorithms curl supports, and
  395. automatically decompress the content. Headers are not modified.
  396. If this option is used and the server sends an unsupported encoding, curl will
  397. report an error. This is a request, not an order; the server may or may not
  398. deliver data compressed.
  399. Example:
  400. .nf
  401. curl --compressed https://example.com
  402. .fi
  403. See also \fI--compressed-ssh\fP.
  404. .IP "\-K, \-\-config <file>"
  405. Specify a text file to read curl arguments from. The command line arguments
  406. found in the text file will be used as if they were provided on the command
  407. line.
  408. Options and their parameters must be specified on the same line in the file,
  409. separated by whitespace, colon, or the equals sign. Long option names can
  410. optionally be given in the config file without the initial double dashes and
  411. if so, the colon or equals characters can be used as separators. If the option
  412. is specified with one or two dashes, there can be no colon or equals character
  413. between the option and its parameter.
  414. If the parameter contains whitespace (or starts with : or =), the parameter
  415. must be enclosed within quotes. Within double quotes, the following escape
  416. sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash
  417. preceding any other letter is ignored.
  418. If the first column of a config line is a '#' character, the rest of the line
  419. will be treated as a comment.
  420. Only write one option per physical line in the config file.
  421. Specify the filename to \-\-config as '-' to make curl read the file from stdin.
  422. Note that to be able to specify a URL in the config file, you need to specify
  423. it using the \-\-url option, and not by simply writing the URL on its own
  424. line. So, it could look similar to this:
  425. url = "https://curl.se/docs/"
  426. .nf
  427. # \-\-\- Example file \-\-\-
  428. # this is a comment
  429. url = "example.com"
  430. output = "curlhere.html"
  431. user-agent = "superagent/1.0"
  432. .fi
  433. .nf
  434. # and fetch another URL too
  435. url = "example.com/docs/manpage.html"
  436. \-O
  437. referer = "http://nowhereatall.example.com/"
  438. # \-\-\- End of example file \-\-\-
  439. .fi
  440. When curl is invoked, it (unless \-\-disable is used) checks for a default
  441. config file and uses it if found, even when \-\-config is used. The default
  442. config file is checked for in the following places in this order:
  443. 1) "$CURL_HOME/.curlrc"
  444. 2) "$XDG_CONFIG_HOME/.curlrc" (Added in 7.73.0)
  445. 3) "$HOME/.curlrc"
  446. 4) Windows: "%USERPROFILE%\\.curlrc"
  447. 5) Windows: "%APPDATA%\\.curlrc"
  448. 6) Windows: "%USERPROFILE%\\Application Data\\.curlrc"
  449. 7) Non-Windows: use getpwuid to find the home directory
  450. 8) On Windows, if it finds no .curlrc file in the sequence described above, it
  451. checks for one in the same dir the curl executable is placed.
  452. On Windows two filenames are checked per location: .curlrc and _curlrc,
  453. preferring the former. Older versions on Windows checked for _curlrc only.
  454. This option can be used multiple times to load multiple config files.
  455. Example:
  456. .nf
  457. curl --config file.txt https://example.com
  458. .fi
  459. See also \fI-q, --disable\fP.
  460. .IP "\-\-connect-timeout <fractional seconds>"
  461. Maximum time in seconds that you allow curl's connection to take. This only
  462. limits the connection phase, so if curl connects within the given period it
  463. will continue \- if not it will exit. Since version 7.32.0, this option
  464. accepts decimal values.
  465. If this option is used several times, the last one will be used.
  466. Examples:
  467. .nf
  468. curl --connect-timeout 20 https://example.com
  469. curl --connect-timeout 3.14 https://example.com
  470. .fi
  471. See also \fI-m, --max-time\fP.
  472. .IP "\-\-connect-to <HOST1:PORT1:HOST2:PORT2>"
  473. For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead.
  474. This option is suitable to direct requests at a specific server, e.g. at a
  475. specific cluster node in a cluster of servers. This option is only used to
  476. establish the network connection. It does NOT affect the hostname/port that is
  477. used for TLS/SSL (e.g. SNI, certificate verification) or for the application
  478. protocols. "HOST1" and "PORT1" may be the empty string, meaning "any
  479. host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the
  480. request's original host/port".
  481. A "host" specified to this option is compared as a string, so it needs to
  482. match the name used in request URL. It can be either numerical such as
  483. \(dq127.0.0.1" or the full host name such as "example.org".
  484. This option can be used many times to add many connect rules.
  485. Example:
  486. .nf
  487. curl --connect-to example.com:443:example.net:8443 https://example.com
  488. .fi
  489. See also \fI--resolve\fP and \fI-H, --header\fP. Added in 7.49.0.
  490. .IP "\-C, \-\-continue-at <offset>"
  491. Continue/Resume a previous file transfer at the given offset. The given offset
  492. is the exact number of bytes that will be skipped, counting from the beginning
  493. of the source file before it is transferred to the destination. If used with
  494. uploads, the FTP server command SIZE will not be used by curl.
  495. Use "-C \-" to tell curl to automatically find out where/how to resume the
  496. transfer. It then uses the given output/input files to figure that out.
  497. If this option is used several times, the last one will be used.
  498. Examples:
  499. .nf
  500. curl -C - https://example.com
  501. curl -C 400 https://example.com
  502. .fi
  503. See also \fI-r, --range\fP.
  504. .IP "\-c, \-\-cookie-jar <filename>"
  505. (HTTP) Specify to which file you want curl to write all cookies after a completed
  506. operation. Curl writes all cookies from its in-memory cookie storage to the
  507. given file at the end of operations. If no cookies are known, no data will be
  508. written. The file will be written using the Netscape cookie file format. If
  509. you set the file name to a single dash, "-", the cookies will be written to
  510. stdout.
  511. This command line option will activate the cookie engine that makes curl
  512. record and use cookies. Another way to activate it is to use the \-\-cookie
  513. option.
  514. If the cookie jar cannot be created or written to, the whole curl operation
  515. will not fail or even report an error clearly. Using \-\-verbose will get a
  516. warning displayed, but that is the only visible feedback you get about this
  517. possibly lethal situation.
  518. If this option is used several times, the last specified file name will be
  519. used.
  520. Examples:
  521. .nf
  522. curl -c store-here.txt https://example.com
  523. curl -c store-here.txt -b read-these https://example.com
  524. .fi
  525. See also \fI-b, --cookie\fP.
  526. .IP "\-b, \-\-cookie <data|filename>"
  527. (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly the
  528. data previously received from the server in a "Set-Cookie:" line. The data
  529. should be in the format "NAME1=VALUE1; NAME2=VALUE2". This makes curl use the
  530. cookie header with this content explicitly in all outgoing request(s). If
  531. multiple requests are done due to authentication, followed redirects or
  532. similar, they will all get this cookie passed on.
  533. If no '=' symbol is used in the argument, it is instead treated as a filename
  534. to read previously stored cookie from. This option also activates the cookie
  535. engine which will make curl record incoming cookies, which may be handy if
  536. you are using this in combination with the \-\-location option or do multiple URL
  537. transfers on the same invoke. If the file name is exactly a minus ("-"), curl
  538. will instead read the contents from stdin.
  539. The file format of the file to read cookies from should be plain HTTP headers
  540. (Set-Cookie style) or the Netscape/Mozilla cookie file format.
  541. The file specified with \-\-cookie is only used as input. No cookies will be
  542. written to the file. To store cookies, use the \-\-cookie-jar option.
  543. If you use the Set-Cookie file format and do not specify a domain then the
  544. cookie is not sent since the domain will never match. To address this, set a
  545. domain in Set-Cookie line (doing that will include sub-domains) or preferably:
  546. use the Netscape format.
  547. This option can be used multiple times.
  548. Users often want to both read cookies from a file and write updated cookies
  549. back to a file, so using both \-\-cookie and \-\-cookie-jar in the same command
  550. line is common.
  551. Examples:
  552. .nf
  553. curl -b cookiefile https://example.com
  554. curl -b cookiefile -c cookiefile https://example.com
  555. .fi
  556. See also \fI-c, --cookie-jar\fP and \fI-j, --junk-session-cookies\fP.
  557. .IP "\-\-create-dirs"
  558. When used in conjunction with the \-\-output option, curl will create the
  559. necessary local directory hierarchy as needed. This option creates the
  560. directories mentioned with the \-\-output option, nothing else. If the \-\-output
  561. file name uses no directory, or if the directories it mentions already exist,
  562. no directories will be created.
  563. Created dirs are made with mode 0750 on unix style file systems.
  564. To create remote directories when using FTP or SFTP, try \fI\-\-ftp-create-dirs\fP.
  565. Example:
  566. .nf
  567. curl --create-dirs --output local/dir/file https://example.com
  568. .fi
  569. See also \fI--ftp-create-dirs\fP and \fI--output-dir\fP.
  570. .IP "\-\-create-file-mode <mode>"
  571. (SFTP SCP FILE) When curl is used to create files remotely using one of the supported
  572. protocols, this option allows the user to set which 'mode' to set on the file
  573. at creation time, instead of the default 0644.
  574. This option takes an octal number as argument.
  575. If this option is used several times, the last one will be used.
  576. Example:
  577. .nf
  578. curl --create-file-mode 0777 -T localfile sftp://example.com/new
  579. .fi
  580. See also \fI--ftp-create-dirs\fP. Added in 7.75.0.
  581. .IP "\-\-crlf"
  582. (FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
  583. (SMTP added in 7.40.0)
  584. Example:
  585. .nf
  586. curl --crlf -T file ftp://example.com/
  587. .fi
  588. See also \fI-B, --use-ascii\fP.
  589. .IP "\-\-crlfile <file>"
  590. (TLS) Provide a file using PEM format with a Certificate Revocation List that may
  591. specify peer certificates that are to be considered revoked.
  592. If this option is used several times, the last one will be used.
  593. Example:
  594. .nf
  595. curl --crlfile rejects.txt https://example.com
  596. .fi
  597. See also \fI--cacert\fP and \fI--capath\fP.
  598. .IP "\-\-curves <algorithm list>"
  599. (TLS) Tells curl to request specific curves to use during SSL session establishment
  600. according to RFC 8422, 5.1. Multiple algorithms can be provided by separating
  601. them with ":" (e.g. "X25519:P-521"). The parameter is available identically
  602. in the "openssl s_client/s_server" utilities.
  603. \-\-curves allows a OpenSSL powered curl to make SSL-connections with exactly
  604. the (EC) curve requested by the client, avoiding nontransparent client/server
  605. negotiations.
  606. If this option is set, the default curves list built into openssl will be
  607. ignored.
  608. Example:
  609. .nf
  610. curl --curves X25519 https://example.com
  611. .fi
  612. See also \fI--ciphers\fP. Added in 7.73.0.
  613. .IP "\-\-data-ascii <data>"
  614. (HTTP) This is just an alias for \fI\-d, \-\-data\fP.
  615. Example:
  616. .nf
  617. curl --data-ascii @file https://example.com
  618. .fi
  619. See also \fI--data-binary\fP, \fI--data-raw\fP and \fI--data-urlencode\fP.
  620. .IP "\-\-data-binary <data>"
  621. (HTTP) This posts data exactly as specified with no extra processing whatsoever.
  622. If you start the data with the letter @, the rest should be a filename. Data
  623. is posted in a similar manner as \-\-data does, except that newlines and
  624. carriage returns are preserved and conversions are never done.
  625. Like \-\-data the default content-type sent to the server is
  626. application/x-www-form-urlencoded. If you want the data to be treated as
  627. arbitrary binary data by the server then set the content-type to octet-stream:
  628. \-H "Content-Type: application/octet-stream".
  629. If this option is used several times, the ones following the first will append
  630. data as described in \fI\-d, \-\-data\fP.
  631. Example:
  632. .nf
  633. curl --data-binary @filename https://example.com
  634. .fi
  635. See also \fI--data-ascii\fP.
  636. .IP "\-\-data-raw <data>"
  637. (HTTP) This posts data similarly to \-\-data but without the special
  638. interpretation of the @ character.
  639. Examples:
  640. .nf
  641. curl --data-raw "hello" https://example.com
  642. curl --data-raw "@at@at@" https://example.com
  643. .fi
  644. See also \fI-d, --data\fP. Added in 7.43.0.
  645. .IP "\-\-data-urlencode <data>"
  646. (HTTP) This posts data, similar to the other \-\-data options with the exception
  647. that this performs URL-encoding.
  648. To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
  649. by a separator and a content specification. The <data> part can be passed to
  650. curl using one of the following syntaxes:
  651. .RS
  652. .IP "content"
  653. This will make curl URL-encode the content and pass that on. Just be careful
  654. so that the content does not contain any = or @ symbols, as that will then make
  655. the syntax match one of the other cases below!
  656. .IP "=content"
  657. This will make curl URL-encode the content and pass that on. The preceding =
  658. symbol is not included in the data.
  659. .IP "name=content"
  660. This will make curl URL-encode the content part and pass that on. Note that
  661. the name part is expected to be URL-encoded already.
  662. .IP "@filename"
  663. This will make curl load data from the given file (including any newlines),
  664. URL-encode that data and pass it on in the POST.
  665. .IP "name@filename"
  666. This will make curl load data from the given file (including any newlines),
  667. URL-encode that data and pass it on in the POST. The name part gets an equal
  668. sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
  669. name is expected to be URL-encoded already.
  670. .RE
  671. Examples:
  672. .nf
  673. curl --data-urlencode name=val https://example.com
  674. curl --data-urlencode =encodethis https://example.com
  675. curl --data-urlencode name@file https://example.com
  676. curl --data-urlencode @fileonly https://example.com
  677. .fi
  678. See also \fI-d, --data\fP and \fI--data-raw\fP.
  679. .IP "\-d, \-\-data <data>"
  680. (HTTP MQTT) Sends the specified data in a POST request to the HTTP server, in the same way
  681. that a browser does when a user has filled in an HTML form and presses the
  682. submit button. This will cause curl to pass the data to the server using the
  683. content-type application/x-www-form-urlencoded. Compare to \fI\-F, \-\-form\fP.
  684. \-\-data-raw is almost the same but does not have a special interpretation of
  685. the @ character. To post data purely binary, you should instead use the
  686. \-\-data-binary option. To URL-encode the value of a form field you may use
  687. \fI\-\-data-urlencode\fP.
  688. If any of these options is used more than once on the same command line, the
  689. data pieces specified will be merged with a separating &-symbol. Thus, using
  690. \(aq-d name=daniel \-d skill=lousy' would generate a post chunk that looks like
  691. \(aqname=daniel&skill=lousy'.
  692. If you start the data with the letter @, the rest should be a file name to
  693. read the data from, or \- if you want curl to read the data from stdin. Posting
  694. data from a file named 'foobar' would thus be done with \fI\-d, \-\-data\fP @foobar. When
  695. \-\-data is told to read from a file like that, carriage returns and newlines
  696. will be stripped out. If you do not want the @ character to have a special
  697. interpretation use \-\-data-raw instead.
  698. Examples:
  699. .nf
  700. curl -d "name=curl" https://example.com
  701. curl -d "name=curl" -d "tool=cmdline" https://example.com
  702. curl -d @filename https://example.com
  703. .fi
  704. See also \fI--data-binary\fP, \fI--data-urlencode\fP and \fI--data-raw\fP. This option is mutually exclusive to \fI-F, --form\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP.
  705. .IP "\-\-delegation <LEVEL>"
  706. (GSS/kerberos) Set LEVEL to tell the server what it is allowed to delegate when it
  707. comes to user credentials.
  708. .RS
  709. .IP "none"
  710. Do not allow any delegation.
  711. .IP "policy"
  712. Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
  713. service ticket, which is a matter of realm policy.
  714. .IP "always"
  715. Unconditionally allow the server to delegate.
  716. .RE
  717. If this option is used several times, the last one will be used.
  718. Example:
  719. .nf
  720. curl --delegation "none" https://example.com
  721. .fi
  722. See also \fI-k, --insecure\fP and \fI--ssl\fP.
  723. .IP "\-\-digest"
  724. (HTTP) Enables HTTP Digest authentication. This is an authentication scheme that
  725. prevents the password from being sent over the wire in clear text. Use this in
  726. combination with the normal \-\-user option to set user name and password.
  727. If this option is used several times, only the first one is used.
  728. Example:
  729. .nf
  730. curl -u name:password --digest https://example.com
  731. .fi
  732. See also \fI-u, --user\fP, \fI--proxy-digest\fP and \fI--anyauth\fP. This option is mutually exclusive to \fI--basic\fP and \fI--ntlm\fP and \fI--negotiate\fP.
  733. .IP "\-\-disable-eprt"
  734. (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active
  735. FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT
  736. before using PORT, but with this option, it will use PORT right away. EPRT and
  737. LPRT are extensions to the original FTP protocol, and may not work on all
  738. servers, but they enable more functionality in a better way than the
  739. traditional PORT command.
  740. \-\-eprt can be used to explicitly enable EPRT again and \-\-no-eprt is an alias
  741. for \fI\-\-disable-eprt\fP.
  742. If the server is accessed using IPv6, this option will have no effect as EPRT
  743. is necessary then.
  744. Disabling EPRT only changes the active behavior. If you want to switch to
  745. passive mode you need to not use \-\-ftp-port or force it with \fI\-\-ftp-pasv\fP.
  746. Example:
  747. .nf
  748. curl --disable-eprt ftp://example.com/
  749. .fi
  750. See also \fI--disable-epsv\fP and \fI-P, --ftp-port\fP.
  751. .IP "\-\-disable-epsv"
  752. (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
  753. transfers. Curl will normally always first attempt to use EPSV before
  754. PASV, but with this option, it will not try using EPSV.
  755. \-\-epsv can be used to explicitly enable EPSV again and \-\-no-epsv is an alias
  756. for \fI\-\-disable-epsv\fP.
  757. If the server is an IPv6 host, this option will have no effect as EPSV is
  758. necessary then.
  759. Disabling EPSV only changes the passive behavior. If you want to switch to
  760. active mode you need to use \fI\-P, \-\-ftp-port\fP.
  761. Example:
  762. .nf
  763. curl --disable-epsv ftp://example.com/
  764. .fi
  765. See also \fI--disable-eprt\fP and \fI-P, --ftp-port\fP.
  766. .IP "\-q, \-\-disable"
  767. If used as the first parameter on the command line, the \fIcurlrc\fP config
  768. file will not be read and used. See the \-\-config for details on the default
  769. config file search path.
  770. Example:
  771. .nf
  772. curl -q https://example.com
  773. .fi
  774. See also \fI-K, --config\fP.
  775. .IP "\-\-disallow-username-in-url"
  776. (HTTP) This tells curl to exit if passed a URL containing a username. This is probably
  777. most useful when the URL is being provided at runtime or similar.
  778. Example:
  779. .nf
  780. curl --disallow-username-in-url https://example.com
  781. .fi
  782. See also \fI--proto\fP. Added in 7.61.0.
  783. .IP "\-\-dns-interface <interface>"
  784. (DNS) Tell curl to send outgoing DNS requests through <interface>. This option is a
  785. counterpart to \fI\-\-interface\fP (which does not affect DNS). The supplied string
  786. must be an interface name (not an address).
  787. Example:
  788. .nf
  789. curl --dns-interface eth0 https://example.com
  790. .fi
  791. See also \fI--dns-ipv4-addr\fP and \fI--dns-ipv6-addr\fP. \fI--dns-interface\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
  792. .IP "\-\-dns-ipv4-addr <address>"
  793. (DNS) Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
  794. the DNS requests originate from this address. The argument should be a
  795. single IPv4 address.
  796. If this option is used several times, the last one will be used.
  797. Example:
  798. .nf
  799. curl --dns-ipv4-addr 10.1.2.3 https://example.com
  800. .fi
  801. See also \fI--dns-interface\fP and \fI--dns-ipv6-addr\fP. \fI--dns-ipv4-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
  802. .IP "\-\-dns-ipv6-addr <address>"
  803. (DNS) Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
  804. the DNS requests originate from this address. The argument should be a
  805. single IPv6 address.
  806. If this option is used several times, the last one will be used.
  807. Example:
  808. .nf
  809. curl --dns-ipv6-addr 2a04:4e42::561 https://example.com
  810. .fi
  811. See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-ipv6-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
  812. .IP "\-\-dns-servers <addresses>"
  813. Set the list of DNS servers to be used instead of the system default.
  814. The list of IP addresses should be separated with commas. Port numbers
  815. may also optionally be given as \fI:<port-number>\fP after each IP
  816. address.
  817. If this option is used several times, the last one will be used.
  818. Example:
  819. .nf
  820. curl --dns-servers 192.168.0.1,192.168.0.2 https://example.com
  821. .fi
  822. See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-servers\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
  823. .IP "\-\-doh-cert-status"
  824. Same as \-\-cert-status but used for DoH (DNS-over-HTTPS).
  825. Example:
  826. .nf
  827. curl --doh-cert-status --doh-url https://doh.example https://example.com
  828. .fi
  829. See also \fI--doh-insecure\fP. Added in 7.76.0.
  830. .IP "\-\-doh-insecure"
  831. Same as \-\-insecure but used for DoH (DNS-over-HTTPS).
  832. Example:
  833. .nf
  834. curl --doh-insecure --doh-url https://doh.example https://example.com
  835. .fi
  836. See also \fI--doh-url\fP. Added in 7.76.0.
  837. .IP "\-\-doh-url <URL>"
  838. Specifies which DNS-over-HTTPS (DoH) server to use to resolve hostnames,
  839. instead of using the default name resolver mechanism. The URL must be HTTPS.
  840. Some SSL options that you set for your transfer will apply to DoH since the
  841. name lookups take place over SSL. However, the certificate verification
  842. settings are not inherited and can be controlled separately via
  843. \-\-doh-insecure and \fI\-\-doh-cert-status\fP.
  844. This option is unset if an empty string "" is used as the URL. (Added in
  845. 7.85.0)
  846. If this option is used several times, the last one will be used.
  847. Example:
  848. .nf
  849. curl --doh-url https://doh.example https://example.com
  850. .fi
  851. See also \fI--doh-insecure\fP. Added in 7.62.0.
  852. .IP "\-D, \-\-dump-header <filename>"
  853. (HTTP FTP) Write the received protocol headers to the specified file. If no headers are
  854. received, the use of this option will create an empty file.
  855. When used in FTP, the FTP server response lines are considered being "headers"
  856. and thus are saved there.
  857. If this option is used several times, the last one will be used.
  858. Example:
  859. .nf
  860. curl --dump-header store.txt https://example.com
  861. .fi
  862. See also \fI-o, --output\fP.
  863. .IP "\-\-egd-file <file>"
  864. (TLS) Deprecated option. This option is ignored by curl since 7.84.0. Prior to that
  865. it only had an effect on curl if built to use old versions of OpenSSL.
  866. Specify the path name to the Entropy Gathering Daemon socket. The socket is
  867. used to seed the random engine for SSL connections.
  868. Example:
  869. .nf
  870. curl --egd-file /random/here https://example.com
  871. .fi
  872. See also \fI--random-file\fP.
  873. .IP "\-\-engine <name>"
  874. (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \-\-engine
  875. list to print a list of build-time supported engines. Note that not all (and
  876. possibly none) of the engines may be available at runtime.
  877. Example:
  878. .nf
  879. curl --engine flavor https://example.com
  880. .fi
  881. See also \fI--ciphers\fP and \fI--curves\fP.
  882. .IP "\-\-etag-compare <file>"
  883. (HTTP) This option makes a conditional HTTP request for the specific ETag read
  884. from the given file by sending a custom If-None-Match header using the
  885. stored ETag.
  886. For correct results, make sure that the specified file contains only a
  887. single line with the desired ETag. An empty file is parsed as an empty
  888. ETag.
  889. Use the option \-\-etag-save to first save the ETag from a response, and
  890. then use this option to compare against the saved ETag in a subsequent
  891. request.
  892. Example:
  893. .nf
  894. curl --etag-compare etag.txt https://example.com
  895. .fi
  896. See also \fI--etag-save\fP and \fI-z, --time-cond\fP. Added in 7.68.0.
  897. .IP "\-\-etag-save <file>"
  898. (HTTP) This option saves an HTTP ETag to the specified file. An ETag is a
  899. caching related header, usually returned in a response.
  900. If no ETag is sent by the server, an empty file is created.
  901. Example:
  902. .nf
  903. curl --etag-save storetag.txt https://example.com
  904. .fi
  905. See also \fI--etag-compare\fP. Added in 7.68.0.
  906. .IP "\-\-expect100-timeout <seconds>"
  907. (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue
  908. response when curl emits an Expects: 100-continue header in its request. By
  909. default curl will wait one second. This option accepts decimal values! When
  910. curl stops waiting, it will continue as if the response has been received.
  911. Example:
  912. .nf
  913. curl --expect100-timeout 2.5 -T file https://example.com
  914. .fi
  915. See also \fI--connect-timeout\fP. Added in 7.47.0.
  916. .IP "\-\-fail-early"
  917. Fail and exit on the first detected transfer error.
  918. When curl is used to do multiple transfers on the command line, it will
  919. attempt to operate on each given URL, one by one. By default, it will ignore
  920. errors if there are more URLs given and the last URL's success will determine
  921. the error code curl returns. So early failures will be "hidden" by subsequent
  922. successful transfers.
  923. Using this option, curl will instead return an error on the first transfer
  924. that fails, independent of the amount of URLs that are given on the command
  925. line. This way, no transfer failures go undetected by scripts and similar.
  926. This option is global and does not need to be specified for each use of \fI\-:, \-\-next\fP.
  927. This option does not imply \fI\-f, \-\-fail\fP, which causes transfers to fail due to the
  928. server's HTTP status code. You can combine the two options, however note \-\-fail
  929. is not global and is therefore contained by \fI\-:, \-\-next\fP.
  930. Example:
  931. .nf
  932. curl --fail-early https://example.com https://two.example
  933. .fi
  934. See also \fI-f, --fail\fP and \fI--fail-with-body\fP. Added in 7.52.0.
  935. .IP "\-\-fail-with-body"
  936. (HTTP) Return an error on server errors where the HTTP response code is 400 or
  937. greater). In normal cases when an HTTP server fails to deliver a document, it
  938. returns an HTML document stating so (which often also describes why and
  939. more). This flag will still allow curl to output and save that content but
  940. also to return error 22.
  941. This is an alternative option to \-\-fail which makes curl fail for the same
  942. circumstances but without saving the content.
  943. Example:
  944. .nf
  945. curl --fail-with-body https://example.com
  946. .fi
  947. See also \fI-f, --fail\fP. This option is mutually exclusive to \fI-f, --fail\fP. Added in 7.76.0.
  948. .IP "\-f, \-\-fail"
  949. (HTTP) Fail fast with no output at all on server errors. This is useful to enable
  950. scripts and users to better deal with failed attempts. In normal cases when an
  951. HTTP server fails to deliver a document, it returns an HTML document stating
  952. so (which often also describes why and more). This flag will prevent curl from
  953. outputting that and return error 22.
  954. This method is not fail-safe and there are occasions where non-successful
  955. response codes will slip through, especially when authentication is involved
  956. (response codes 401 and 407).
  957. Example:
  958. .nf
  959. curl --fail https://example.com
  960. .fi
  961. See also \fI--fail-with-body\fP. This option is mutually exclusive to \fI--fail-with-body\fP.
  962. .IP "\-\-false-start"
  963. (TLS) Tells curl to use false start during the TLS handshake. False start is a mode
  964. where a TLS client will start sending application data before verifying the
  965. server's Finished message, thus saving a round trip when performing a full
  966. handshake.
  967. This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
  968. or later, or OS X 10.9 or later) backends.
  969. Example:
  970. .nf
  971. curl --false-start https://example.com
  972. .fi
  973. See also \fI--tcp-fastopen\fP. Added in 7.42.0.
  974. .IP "\-\-form-escape"
  975. (HTTP) Tells curl to pass on names of multipart form fields and files using
  976. backslash-escaping instead of percent-encoding.
  977. Example:
  978. .nf
  979. curl --form-escape -F 'field\\name=curl' -F 'file=@load"this' https://example.com
  980. .fi
  981. See also \fI-F, --form\fP. Added in 7.81.0.
  982. .IP "\-\-form-string <name=string>"
  983. (HTTP SMTP IMAP) Similar to \-\-form except that the value string for the named parameter is used
  984. literally. Leading '@' and '<' characters, and the ';type=' string in
  985. the value have no special meaning. Use this in preference to \-\-form if
  986. there's any possibility that the string value may accidentally trigger the
  987. \(aq@' or '<' features of \fI\-F, \-\-form\fP.
  988. Example:
  989. .nf
  990. curl --form-string "data" https://example.com
  991. .fi
  992. See also \fI-F, --form\fP.
  993. .IP "\-F, \-\-form <name=content>"
  994. (HTTP SMTP IMAP) For HTTP protocol family, this lets curl emulate a filled-in form in which a
  995. user has pressed the submit button. This causes curl to POST data using the
  996. Content-Type multipart/form-data according to RFC 2388.
  997. For SMTP and IMAP protocols, this is the means to compose a multipart mail
  998. message to transmit.
  999. This enables uploading of binary files etc. To force the 'content' part to be
  1000. a file, prefix the file name with an @ sign. To just get the content part from
  1001. a file, prefix the file name with the symbol <. The difference between @ and <
  1002. is then that @ makes a file get attached in the post as a file upload, while
  1003. the < makes a text field and just get the contents for that text field from a
  1004. file.
  1005. Tell curl to read content from stdin instead of a file by using \- as
  1006. filename. This goes for both @ and < constructs. When stdin is used, the
  1007. contents is buffered in memory first by curl to determine its size and allow a
  1008. possible resend. Defining a part's data from a named non-regular file (such
  1009. as a named pipe or similar) is unfortunately not subject to buffering and will
  1010. be effectively read at transmission time; since the full size is unknown
  1011. before the transfer starts, such data is sent as chunks by HTTP and rejected
  1012. by IMAP.
  1013. Example: send an image to an HTTP server, where 'profile' is the name of the
  1014. form-field to which the file portrait.jpg will be the input:
  1015. .nf
  1016. curl \-F [email protected] https://example.com/upload.cgi
  1017. .fi
  1018. Example: send your name and shoe size in two text fields to the server:
  1019. .nf
  1020. curl \-F name=John \-F shoesize=11 https://example.com/
  1021. .fi
  1022. Example: send your essay in a text field to the server. Send it as a plain
  1023. text field, but get the contents for it from a local file:
  1024. .nf
  1025. curl \-F "story=<hugefile.txt" https://example.com/
  1026. .fi
  1027. You can also tell curl what Content-Type to use by using 'type=', in a manner
  1028. similar to:
  1029. .nf
  1030. curl \-F "[email protected];type=text/html" example.com
  1031. .fi
  1032. or
  1033. .nf
  1034. curl \-F "name=daniel;type=text/foo" example.com
  1035. .fi
  1036. You can also explicitly change the name field of a file upload part by setting
  1037. filename=, like this:
  1038. .nf
  1039. curl \-F "file=@localfile;filename=nameinpost" example.com
  1040. .fi
  1041. If filename/path contains ',' or ';', it must be quoted by double-quotes like:
  1042. .nf
  1043. curl \-F "file=@\\"local,file\\";filename=\\"name;in;post\\"" example.com
  1044. .fi
  1045. or
  1046. .nf
  1047. curl \-F 'file=@"local,file";filename="name;in;post"' example.com
  1048. .fi
  1049. Note that if a filename/path is quoted by double-quotes, any double-quote
  1050. or backslash within the filename must be escaped by backslash.
  1051. Quoting must also be applied to non-file data if it contains semicolons,
  1052. leading/trailing spaces or leading double quotes:
  1053. .nf
  1054. curl \-F 'colors="red; green; blue";type=text/x-myapp' example.com
  1055. .fi
  1056. You can add custom headers to the field by setting headers=, like
  1057. .nf
  1058. curl \-F "submit=OK;headers=\\"X-submit-type: OK\\"" example.com
  1059. .fi
  1060. or
  1061. .nf
  1062. curl \-F "submit=OK;headers=@headerfile" example.com
  1063. .fi
  1064. The headers= keyword may appear more that once and above notes about quoting
  1065. apply. When headers are read from a file, Empty lines and lines starting
  1066. with '#' are comments and ignored; each header can be folded by splitting
  1067. between two words and starting the continuation line with a space; embedded
  1068. carriage-returns and trailing spaces are stripped.
  1069. Here is an example of a header file contents:
  1070. .nf
  1071. # This file contain two headers.
  1072. X-header-1: this is a header
  1073. .fi
  1074. .nf
  1075. # The following header is folded.
  1076. X-header-2: this is
  1077. another header
  1078. .fi
  1079. To support sending multipart mail messages, the syntax is extended as follows:
  1080. .br
  1081. \- name can be omitted: the equal sign is the first character of the argument,
  1082. .br
  1083. \- if data starts with '(', this signals to start a new multipart: it can be
  1084. followed by a content type specification.
  1085. .br
  1086. \- a multipart can be terminated with a '=)' argument.
  1087. Example: the following command sends an SMTP mime email consisting in an
  1088. inline part in two alternative formats: plain text and HTML. It attaches a
  1089. text file:
  1090. .nf
  1091. curl \-F '=(;type=multipart/alternative' \\
  1092. \-F '=plain text message' \\
  1093. \-F '= <body>HTML message</body>;type=text/html' \\
  1094. \-F '=)' \-F '[email protected]' ... smtp://example.com
  1095. .fi
  1096. Data can be encoded for transfer using encoder=. Available encodings are
  1097. \fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding
  1098. Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters
  1099. with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes data
  1100. according to the corresponding schemes, limiting lines length to 76
  1101. characters.
  1102. Example: send multipart mail with a quoted-printable text message and a
  1103. base64 attached file:
  1104. .nf
  1105. curl \-F '=text message;encoder=quoted-printable' \\
  1106. \-F '=@localfile;encoder=base64' ... smtp://example.com
  1107. .fi
  1108. See further examples and details in the MANUAL.
  1109. This option can be used multiple times.
  1110. Example:
  1111. .nf
  1112. curl --form "name=curl" --form "file=@loadthis" https://example.com
  1113. .fi
  1114. See also \fI-d, --data\fP, \fI--form-string\fP and \fI--form-escape\fP. This option is mutually exclusive to \fI-d, --data\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP.
  1115. .IP "\-\-ftp-account <data>"
  1116. (FTP) When an FTP server asks for "account data" after user name and password has
  1117. been provided, this data is sent off using the ACCT command.
  1118. If this option is used several times, the last one will be used.
  1119. Example:
  1120. .nf
  1121. curl --ftp-account "mr.robot" ftp://example.com/
  1122. .fi
  1123. See also \fI-u, --user\fP.
  1124. .IP "\-\-ftp-alternative-to-user <command>"
  1125. (FTP) If authenticating with the USER and PASS commands fails, send this command.
  1126. When connecting to Tumbleweed's Secure Transport server over FTPS using a
  1127. client certificate, using "SITE AUTH" will tell the server to retrieve the
  1128. username from the certificate.
  1129. Example:
  1130. .nf
  1131. curl --ftp-alternative-to-user "U53r" ftp://example.com
  1132. .fi
  1133. See also \fI--ftp-account\fP and \fI-u, --user\fP.
  1134. .IP "\-\-ftp-create-dirs"
  1135. (FTP SFTP) When an FTP or SFTP URL/operation uses a path that does not currently exist on
  1136. the server, the standard behavior of curl is to fail. Using this option, curl
  1137. will instead attempt to create missing directories.
  1138. Example:
  1139. .nf
  1140. curl --ftp-create-dirs -T file ftp://example.com/remote/path/file
  1141. .fi
  1142. See also \fI--create-dirs\fP.
  1143. .IP "\-\-ftp-method <method>"
  1144. (FTP) Control what method curl should use to reach a file on an FTP(S)
  1145. server. The method argument should be one of the following alternatives:
  1146. .RS
  1147. .IP multicwd
  1148. curl does a single CWD operation for each path part in the given URL. For deep
  1149. hierarchies this means many commands. This is how RFC 1738 says it should
  1150. be done. This is the default but the slowest behavior.
  1151. .IP nocwd
  1152. curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
  1153. path to the server for all these commands. This is the fastest behavior.
  1154. .IP singlecwd
  1155. curl does one CWD with the full target directory and then operates on the file
  1156. \(dqnormally" (like in the multicwd case). This is somewhat more standards
  1157. compliant than 'nocwd' but without the full penalty of 'multicwd'.
  1158. .RE
  1159. Examples:
  1160. .nf
  1161. curl --ftp-method multicwd ftp://example.com/dir1/dir2/file
  1162. curl --ftp-method nocwd ftp://example.com/dir1/dir2/file
  1163. curl --ftp-method singlecwd ftp://example.com/dir1/dir2/file
  1164. .fi
  1165. See also \fI-l, --list-only\fP.
  1166. .IP "\-\-ftp-pasv"
  1167. (FTP) Use passive mode for the data connection. Passive is the internal default
  1168. behavior, but using this option can be used to override a previous \-\-ftp-port
  1169. option.
  1170. If this option is used several times, only the first one is used. Undoing an
  1171. enforced passive really is not doable but you must then instead enforce the
  1172. correct \-\-ftp-port again.
  1173. Passive mode means that curl will try the EPSV command first and then PASV,
  1174. unless \-\-disable-epsv is used.
  1175. Example:
  1176. .nf
  1177. curl --ftp-pasv ftp://example.com/
  1178. .fi
  1179. See also \fI--disable-epsv\fP.
  1180. .IP "\-P, \-\-ftp-port <address>"
  1181. (FTP) Reverses the default initiator/listener roles when connecting with FTP. This
  1182. option makes curl use active mode. curl then tells the server to connect back
  1183. to the client's specified address and port, while passive mode asks the server
  1184. to setup an IP address and port for it to connect to. <address> should be one
  1185. of:
  1186. .RS
  1187. .IP interface
  1188. e.g. "eth0" to specify which interface's IP address you want to use (Unix only)
  1189. .IP "IP address"
  1190. e.g. "192.168.10.1" to specify the exact IP address
  1191. .IP "host name"
  1192. e.g. "my.host.domain" to specify the machine
  1193. .IP "-"
  1194. make curl pick the same IP address that is already used for the control
  1195. connection
  1196. .RE
  1197. If this option is used several times, the last one will be used. Disable the
  1198. use of PORT with \fI\-\-ftp-pasv\fP. Disable the attempt to use the EPRT command
  1199. instead of PORT by using \fI\-\-disable-eprt\fP. EPRT is really PORT++.
  1200. You can also append ":[start]-[end]\&" to the right of the address, to tell
  1201. curl what TCP port range to use. That means you specify a port range, from a
  1202. lower to a higher number. A single number works as well, but do note that it
  1203. increases the risk of failure since the port may not be available.
  1204. Examples:
  1205. .nf
  1206. curl -P - ftp:/example.com
  1207. curl -P eth0 ftp:/example.com
  1208. curl -P 192.168.0.2 ftp:/example.com
  1209. .fi
  1210. See also \fI--ftp-pasv\fP and \fI--disable-eprt\fP.
  1211. .IP "\-\-ftp-pret"
  1212. (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers,
  1213. mainly drftpd, require this non-standard command for directory listings as
  1214. well as up and downloads in PASV mode.
  1215. Example:
  1216. .nf
  1217. curl --ftp-pret ftp://example.com/
  1218. .fi
  1219. See also \fI-P, --ftp-port\fP and \fI--ftp-pasv\fP.
  1220. .IP "\-\-ftp-skip-pasv-ip"
  1221. (FTP) Tell curl to not use the IP address the server suggests in its response
  1222. to curl's PASV command when curl connects the data connection. Instead curl
  1223. will re-use the same IP address it already uses for the control
  1224. connection.
  1225. Since curl 7.74.0 this option is enabled by default.
  1226. This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
  1227. Example:
  1228. .nf
  1229. curl --ftp-skip-pasv-ip ftp://example.com/
  1230. .fi
  1231. See also \fI--ftp-pasv\fP.
  1232. .IP "\-\-ftp-ssl-ccc-mode <active/passive>"
  1233. (FTP) Sets the CCC mode. The passive mode will not initiate the shutdown, but
  1234. instead wait for the server to do it, and will not reply to the shutdown from
  1235. the server. The active mode initiates the shutdown and waits for a reply from
  1236. the server.
  1237. Example:
  1238. .nf
  1239. curl --ftp-ssl-ccc-mode active --ftp-ssl-ccc ftps://example.com/
  1240. .fi
  1241. See also \fI--ftp-ssl-ccc\fP.
  1242. .IP "\-\-ftp-ssl-ccc"
  1243. (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after
  1244. authenticating. The rest of the control channel communication will be
  1245. unencrypted. This allows NAT routers to follow the FTP transaction. The
  1246. default mode is passive.
  1247. Example:
  1248. .nf
  1249. curl --ftp-ssl-ccc ftps://example.com/
  1250. .fi
  1251. See also \fI--ssl\fP and \fI--ftp-ssl-ccc-mode\fP.
  1252. .IP "\-\-ftp-ssl-control"
  1253. (FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
  1254. authentication, but non-encrypted data transfers for efficiency. Fails the
  1255. transfer if the server does not support SSL/TLS.
  1256. Example:
  1257. .nf
  1258. curl --ftp-ssl-control ftp://example.com
  1259. .fi
  1260. See also \fI--ssl\fP.
  1261. .IP "\-G, \-\-get"
  1262. When used, this option will make all data specified with \fI\-d, \-\-data\fP, \-\-data-binary
  1263. or \-\-data-urlencode to be used in an HTTP GET request instead of the POST
  1264. request that otherwise would be used. The data will be appended to the URL
  1265. with a '?' separator.
  1266. If used in combination with \fI\-I, \-\-head\fP, the POST data will instead be appended to
  1267. the URL with a HEAD request.
  1268. If this option is used several times, only the first one is used. This is
  1269. because undoing a GET does not make sense, but you should then instead enforce
  1270. the alternative method you prefer.
  1271. Examples:
  1272. .nf
  1273. curl --get https://example.com
  1274. curl --get -d "tool=curl" -d "age=old" https://example.com
  1275. curl --get -I -d "tool=curl" https://example.com
  1276. .fi
  1277. See also \fI-d, --data\fP and \fI-X, --request\fP.
  1278. .IP "\-g, \-\-globoff"
  1279. This option switches off the "URL globbing parser". When you set this option,
  1280. you can specify URLs that contain the letters {}[] without having curl itself
  1281. interpret them. Note that these letters are not normal legal URL contents but
  1282. they should be encoded according to the URI standard.
  1283. Example:
  1284. .nf
  1285. curl -g "https://example.com/{[]}}}}"
  1286. .fi
  1287. See also \fI-K, --config\fP and \fI-q, --disable\fP.
  1288. .IP "\-\-happy-eyeballs-timeout-ms <milliseconds>"
  1289. Happy Eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6
  1290. addresses for dual-stack hosts, giving IPv6 a head-start of the specified
  1291. number of milliseconds. If the IPv6 address cannot be connected to within that
  1292. time, then a connection attempt is made to the IPv4 address in parallel. The
  1293. first connection to be established is the one that is used.
  1294. The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says
  1295. \(dqIt is RECOMMENDED that connection attempts be paced 150-250 ms apart to
  1296. balance human factors against network load." libcurl currently defaults to
  1297. 200 ms. Firefox and Chrome currently default to 300 ms.
  1298. If this option is used several times, the last one will be used.
  1299. Example:
  1300. .nf
  1301. curl --happy-eyeballs-timeout-ms 500 https://example.com
  1302. .fi
  1303. See also \fI-m, --max-time\fP and \fI--connect-timeout\fP. Added in 7.59.0.
  1304. .IP "\-\-haproxy-protocol"
  1305. (HTTP) Send a HAProxy PROXY protocol v1 header at the beginning of the
  1306. connection. This is used by some load balancers and reverse proxies to
  1307. indicate the client's true IP address and port.
  1308. This option is primarily useful when sending test requests to a service that
  1309. expects this header.
  1310. Example:
  1311. .nf
  1312. curl --haproxy-protocol https://example.com
  1313. .fi
  1314. See also \fI-x, --proxy\fP. Added in 7.60.0.
  1315. .IP "\-I, \-\-head"
  1316. (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses
  1317. to get nothing but the header of a document. When used on an FTP or FILE file,
  1318. curl displays the file size and last modification time only.
  1319. Example:
  1320. .nf
  1321. curl -I https://example.com
  1322. .fi
  1323. See also \fI-G, --get\fP, \fI-v, --verbose\fP and \fI--trace-ascii\fP.
  1324. .IP "\-H, \-\-header <header/@file>"
  1325. (HTTP) Extra header to include in the request when sending HTTP to a server. You may
  1326. specify any number of extra headers. Note that if you should add a custom
  1327. header that has the same name as one of the internal ones curl would use, your
  1328. externally set header will be used instead of the internal one. This allows
  1329. you to make even trickier stuff than curl would normally do. You should not
  1330. replace internally set headers without knowing perfectly well what you are
  1331. doing. Remove an internal header by giving a replacement without content on
  1332. the right side of the colon, as in: \-H "Host:". If you send the custom
  1333. header with no-value then its header must be terminated with a semicolon, such
  1334. as \-H "X-Custom-Header;" to send "X-Custom-Header:".
  1335. curl will make sure that each header you add/replace is sent with the proper
  1336. end-of-line marker, you should thus \fBnot\fP add that as a part of the header
  1337. content: do not add newlines or carriage returns, they will only mess things
  1338. up for you.
  1339. This option can take an argument in @filename style, which then adds a header
  1340. for each line in the input file. Using @- will make curl read the header file
  1341. from stdin. Added in 7.55.0.
  1342. You need \-\-proxy-header to send custom headers intended for an HTTP
  1343. proxy. Added in 7.37.0.
  1344. Passing on a "Transfer-Encoding: chunked" header when doing an HTTP request
  1345. with a request body, will make curl send the data using chunked encoding.
  1346. \fBWARNING\fP: headers set with this option will be set in all requests \- even
  1347. after redirects are followed, like when told with \fI\-L, \-\-location\fP. This can lead to
  1348. the header being sent to other hosts than the original host, so sensitive
  1349. headers should be used with caution combined with following redirects.
  1350. This option can be used multiple times to add/replace/remove multiple headers.
  1351. Examples:
  1352. .nf
  1353. curl -H "X-First-Name: Joe" https://example.com
  1354. curl -H "User-Agent: yes-please/2000" https://example.com
  1355. curl -H "Host:" https://example.com
  1356. .fi
  1357. See also \fI-A, --user-agent\fP and \fI-e, --referer\fP.
  1358. .IP "\-h, \-\-help <category>"
  1359. Usage help. This lists all commands of the <category>.
  1360. If no arg was provided, curl will display the most important
  1361. command line arguments.
  1362. If the argument "all" was provided, curl will display all options available.
  1363. If the argument "category" was provided, curl will display all categories and
  1364. their meanings.
  1365. Example:
  1366. .nf
  1367. curl --help all
  1368. .fi
  1369. See also \fI-v, --verbose\fP.
  1370. .IP "\-\-hostpubmd5 <md5>"
  1371. (SFTP SCP) Pass a string containing 32 hexadecimal digits. The string should
  1372. be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
  1373. the connection with the host unless the md5sums match.
  1374. Example:
  1375. .nf
  1376. curl --hostpubmd5 e5c1c49020640a5ab0f2034854c321a8 sftp://example.com/
  1377. .fi
  1378. See also \fI--hostpubsha256\fP.
  1379. .IP "\-\-hostpubsha256 <sha256>"
  1380. (SFTP SCP) Pass a string containing a Base64-encoded SHA256 hash of the remote
  1381. host's public key. Curl will refuse the connection with the host
  1382. unless the hashes match.
  1383. Example:
  1384. .nf
  1385. curl --hostpubsha256 NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ= sftp://example.com/
  1386. .fi
  1387. See also \fI--hostpubmd5\fP. Added in 7.80.0.
  1388. .IP "\-\-hsts <file name>"
  1389. (HTTPS) This option enables HSTS for the transfer. If the file name points to an
  1390. existing HSTS cache file, that will be used. After a completed transfer, the
  1391. cache will be saved to the file name again if it has been modified.
  1392. Specify a "" file name (zero length) to avoid loading/saving and make curl
  1393. just handle HSTS in memory.
  1394. If this option is used several times, curl will load contents from all the
  1395. files but the last one will be used for saving.
  1396. Example:
  1397. .nf
  1398. curl --hsts cache.txt https://example.com
  1399. .fi
  1400. See also \fI--proto\fP. Added in 7.74.0.
  1401. .IP "\-\-http0.9"
  1402. (HTTP) Tells curl to be fine with HTTP version 0.9 response.
  1403. HTTP/0.9 is a completely headerless response and therefore you can also
  1404. connect with this to non-HTTP servers and still get a response since curl will
  1405. simply transparently downgrade \- if allowed.
  1406. Since curl 7.66.0, HTTP/0.9 is disabled by default.
  1407. Example:
  1408. .nf
  1409. curl --http0.9 https://example.com
  1410. .fi
  1411. See also \fI--http1.1\fP, \fI--http2\fP and \fI--http3\fP. Added in 7.64.0.
  1412. .IP "\-0, \-\-http1.0"
  1413. (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred
  1414. HTTP version.
  1415. Example:
  1416. .nf
  1417. curl --http1.0 https://example.com
  1418. .fi
  1419. See also \fI--http0.9\fP and \fI--http1.1\fP. This option is mutually exclusive to \fI--http1.1\fP and \fI--http2\fP and \fI--http2-prior-knowledge\fP and \fI--http3\fP.
  1420. .IP "\-\-http1.1"
  1421. (HTTP) Tells curl to use HTTP version 1.1.
  1422. Example:
  1423. .nf
  1424. curl --http1.1 https://example.com
  1425. .fi
  1426. See also \fI-0, --http1.0\fP and \fI--http0.9\fP. This option is mutually exclusive to \fI-0, --http1.0\fP and \fI--http2\fP and \fI--http2-prior-knowledge\fP and \fI--http3\fP. Added in 7.33.0.
  1427. .IP "\-\-http2-prior-knowledge"
  1428. (HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1
  1429. Upgrade. It requires prior knowledge that the server supports HTTP/2 straight
  1430. away. HTTPS requests will still do HTTP/2 the standard way with negotiated
  1431. protocol version in the TLS handshake.
  1432. Example:
  1433. .nf
  1434. curl --http2-prior-knowledge https://example.com
  1435. .fi
  1436. See also \fI--http2\fP and \fI--http3\fP. \fI--http2-prior-knowledge\fP requires that the underlying libcurl was built to support HTTP/2. This option is mutually exclusive to \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2\fP and \fI--http3\fP. Added in 7.49.0.
  1437. .IP "\-\-http2"
  1438. (HTTP) Tells curl to use HTTP version 2.
  1439. For HTTPS, this means curl will attempt to negotiate HTTP/2 in the TLS
  1440. handshake. curl does this by default.
  1441. For HTTP, this means curl will attempt to upgrade the request to HTTP/2 using
  1442. the Upgrade: request header.
  1443. When curl uses HTTP/2 over HTTPS, it does not itself insist on TLS 1.2 or
  1444. higher even though that is required by the specification. A user can add this
  1445. version requirement with \fI\-\-tlsv1.2\fP.
  1446. Example:
  1447. .nf
  1448. curl --http2 https://example.com
  1449. .fi
  1450. See also \fI--http1.1\fP and \fI--http3\fP. \fI--http2\fP requires that the underlying libcurl was built to support HTTP/2. This option is mutually exclusive to \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2-prior-knowledge\fP and \fI--http3\fP. Added in 7.33.0.
  1451. .IP "\-\-http3"
  1452. (HTTP) \fBWARNING\fP: this option is experimental. Do not use in production.
  1453. Tells curl to use HTTP version 3 directly to the host and port number used in
  1454. the URL. A normal HTTP/3 transaction will be done to a host and then get
  1455. redirected via Alt-Svc, but this option allows a user to circumvent that when
  1456. you know that the target speaks HTTP/3 on the given host and port.
  1457. This option will make curl fail if a QUIC connection cannot be established, it
  1458. cannot fall back to a lower HTTP version on its own.
  1459. Example:
  1460. .nf
  1461. curl --http3 https://example.com
  1462. .fi
  1463. See also \fI--http1.1\fP and \fI--http2\fP. \fI--http3\fP requires that the underlying libcurl was built to support HTTP/3. This option is mutually exclusive to \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2\fP and \fI--http2-prior-knowledge\fP. Added in 7.66.0.
  1464. .IP "\-\-ignore-content-length"
  1465. (FTP HTTP) For HTTP, Ignore the Content-Length header. This is particularly useful for
  1466. servers running Apache 1.x, which will report incorrect Content-Length for
  1467. files larger than 2 gigabytes.
  1468. For FTP (since 7.46.0), skip the RETR command to figure out the size before
  1469. downloading a file.
  1470. This option does not work for HTTP if libcurl was built to use hyper.
  1471. Example:
  1472. .nf
  1473. curl --ignore-content-length https://example.com
  1474. .fi
  1475. See also \fI--ftp-skip-pasv-ip\fP.
  1476. .IP "\-i, \-\-include"
  1477. Include the HTTP response headers in the output. The HTTP response headers can
  1478. include things like server name, cookies, date of the document, HTTP version
  1479. and more...
  1480. To view the request headers, consider the \-\-verbose option.
  1481. Example:
  1482. .nf
  1483. curl -i https://example.com
  1484. .fi
  1485. See also \fI-v, --verbose\fP.
  1486. .IP "\-k, \-\-insecure"
  1487. (TLS SFTP SCP) By default, every secure connection curl makes is verified to be secure before
  1488. the transfer takes place. This option makes curl skip the verification step
  1489. and proceed without checking.
  1490. When this option is not used for protocols using TLS, curl verifies the
  1491. server's TLS certificate before it continues: that the certificate contains
  1492. the right name which matches the host name used in the URL and that the
  1493. certificate has been signed by a CA certificate present in the cert store.
  1494. See this online resource for further details:
  1495. .nf
  1496. https://curl.se/docs/sslcerts.html
  1497. .fi
  1498. For SFTP and SCP, this option makes curl skip the \fIknown_hosts\fP verification.
  1499. \fIknown_hosts\fP is a file normally stored in the user's home directory in the
  1500. \(dq.ssh" subdirectory, which contains host names and their public keys.
  1501. \fBWARNING\fP: using this option makes the transfer insecure.
  1502. Example:
  1503. .nf
  1504. curl --insecure https://example.com
  1505. .fi
  1506. See also \fI--proxy-insecure\fP, \fI--cacert\fP and \fI--capath\fP.
  1507. .IP "\-\-interface <name>"
  1508. Perform an operation using a specified interface. You can enter interface
  1509. name, IP address or host name. An example could look like:
  1510. .nf
  1511. curl \-\-interface eth0:1 https://www.example.com/
  1512. .fi
  1513. If this option is used several times, the last one will be used.
  1514. On Linux it can be used to specify a VRF, but the binary needs to either
  1515. have CAP_NET_RAW or to be run as root. More information about Linux VRF:
  1516. https://www.kernel.org/doc/Documentation/networking/vrf.txt
  1517. Example:
  1518. .nf
  1519. curl --interface eth0 https://example.com
  1520. .fi
  1521. See also \fI--dns-interface\fP.
  1522. .IP "\-4, \-\-ipv4"
  1523. This option tells curl to use IPv4 addresses only, and not for example try
  1524. IPv6.
  1525. Example:
  1526. .nf
  1527. curl --ipv4 https://example.com
  1528. .fi
  1529. See also \fI--http1.1\fP and \fI--http2\fP. This option is mutually exclusive to \fI-6, --ipv6\fP.
  1530. .IP "\-6, \-\-ipv6"
  1531. This option tells curl to use IPv6 addresses only, and not for example try
  1532. IPv4.
  1533. Example:
  1534. .nf
  1535. curl --ipv6 https://example.com
  1536. .fi
  1537. See also \fI--http1.1\fP and \fI--http2\fP. This option is mutually exclusive to \fI-4, --ipv4\fP.
  1538. .IP "\-\-json <data>"
  1539. (HTTP) Sends the specified JSON data in a POST request to the HTTP server. \-\-json
  1540. works as a shortcut for passing on these three options:
  1541. .nf
  1542. \-\-data [arg]
  1543. \-\-header "Content-Type: application/json"
  1544. \-\-header "Accept: application/json"
  1545. .fi
  1546. There is \fI\fPno verification\fI\fP that the passed in data is actual JSON or that
  1547. the syntax is correct.
  1548. If you start the data with the letter @, the rest should be a file name to
  1549. read the data from, or a single dash (-) if you want curl to read the data
  1550. from stdin. Posting data from a file named 'foobar' would thus be done with
  1551. \fI\-\-json\fP @foobar and to instead read the data from stdin, use \-\-json @-.
  1552. If this option is used more than once on the same command line, the additional
  1553. data pieces will be concatenated to the previous before sending.
  1554. The headers this option sets can be overridden with \-\-header as usual.
  1555. Examples:
  1556. .nf
  1557. curl --json '{ "drink": "coffe" }' https://example.com
  1558. curl --json '{ "drink":' --json ' "coffe" }' https://example.com
  1559. curl --json @prepared https://example.com
  1560. curl --json @- https://example.com < json.txt
  1561. .fi
  1562. See also \fI--data-binary\fP and \fI--data-raw\fP. This option is mutually exclusive to \fI-F, --form\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP. Added in 7.82.0.
  1563. .IP "\-j, \-\-junk-session-cookies"
  1564. (HTTP) When curl is told to read cookies from a given file, this option will make it
  1565. discard all "session cookies". This will basically have the same effect as if
  1566. a new session is started. Typical browsers always discard session cookies when
  1567. they are closed down.
  1568. Example:
  1569. .nf
  1570. curl --junk-session-cookies -b cookies.txt https://example.com
  1571. .fi
  1572. See also \fI-b, --cookie\fP and \fI-c, --cookie-jar\fP.
  1573. .IP "\-\-keepalive-time <seconds>"
  1574. This option sets the time a connection needs to remain idle before sending
  1575. keepalive probes and the time between individual keepalive probes. It is
  1576. currently effective on operating systems offering the TCP_KEEPIDLE and
  1577. TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more).
  1578. Keepalives are used by the TCP stack to detect broken networks on idle
  1579. connections. The number of missed keepalive probes before declaring the
  1580. connection down is OS dependent and is commonly 9 or 10. This option has no
  1581. effect if \-\-no-keepalive is used.
  1582. If this option is used several times, the last one will be used. If
  1583. unspecified, the option defaults to 60 seconds.
  1584. Example:
  1585. .nf
  1586. curl --keepalive-time 20 https://example.com
  1587. .fi
  1588. See also \fI--no-keepalive\fP and \fI-m, --max-time\fP.
  1589. .IP "\-\-key-type <type>"
  1590. (TLS) Private key file type. Specify which type your \-\-key provided private key
  1591. is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
  1592. If this option is used several times, the last one will be used.
  1593. Example:
  1594. .nf
  1595. curl --key-type DER --key here https://example.com
  1596. .fi
  1597. See also \fI--key\fP.
  1598. .IP "\-\-key <key>"
  1599. (TLS SSH) Private key file name. Allows you to provide your private key in this separate
  1600. file. For SSH, if not specified, curl tries the following candidates in order:
  1601. \(aq~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
  1602. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  1603. then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a
  1604. PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
  1605. PKCS#11 URI. If a PKCS#11 URI is provided, then the \-\-engine option will be set
  1606. as "pkcs11" if none was provided and the \-\-key-type option will be set as
  1607. \(dqENG" if none was provided.
  1608. If curl is built against Secure Transport or Schannel then this option is
  1609. ignored for TLS protocols (HTTPS, etc). Those backends expect the private key
  1610. to be already present in the keychain or PKCS#12 file containing the
  1611. certificate.
  1612. If this option is used several times, the last one will be used.
  1613. Example:
  1614. .nf
  1615. curl --cert certificate --key here https://example.com
  1616. .fi
  1617. See also \fI--key-type\fP and \fI-E, --cert\fP.
  1618. .IP "\-\-krb <level>"
  1619. (FTP) Enable Kerberos authentication and use. The level must be entered and should
  1620. be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a
  1621. level that is not one of these, 'private' will instead be used.
  1622. If this option is used several times, the last one will be used.
  1623. Example:
  1624. .nf
  1625. curl --krb clear ftp://example.com/
  1626. .fi
  1627. See also \fI--delegation\fP and \fI--ssl\fP. \fI--krb\fP requires that the underlying libcurl was built to support Kerberos.
  1628. .IP "\-\-libcurl <file>"
  1629. Append this option to any ordinary curl command line, and you will get
  1630. libcurl-using C source code written to the file that does the equivalent
  1631. of what your command-line operation does!
  1632. This option is global and does not need to be specified for each use of
  1633. \fI\-:, \-\-next\fP.
  1634. If this option is used several times, the last given file name will be
  1635. used.
  1636. Example:
  1637. .nf
  1638. curl --libcurl client.c https://example.com
  1639. .fi
  1640. See also \fI-v, --verbose\fP.
  1641. .IP "\-\-limit-rate <speed>"
  1642. Specify the maximum transfer rate you want curl to use \- for both downloads
  1643. and uploads. This feature is useful if you have a limited pipe and you would like
  1644. your transfer not to use your entire bandwidth. To make it slower than it
  1645. otherwise would be.
  1646. The given speed is measured in bytes/second, unless a suffix is appended.
  1647. Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it
  1648. megabytes, while 'g' or 'G' makes it gigabytes. The suffixes (k, M, G, T, P)
  1649. are 1024 based. For example 1k is 1024. Examples: 200K, 3m and 1G.
  1650. The rate limiting logic works on averaging the transfer speed to no more than
  1651. the set threshold over a period of multiple seconds.
  1652. If you also use the \-\-speed-limit option, that option will take precedence and
  1653. might cripple the rate-limiting slightly, to help keeping the speed-limit
  1654. logic working.
  1655. If this option is used several times, the last one will be used.
  1656. Examples:
  1657. .nf
  1658. curl --limit-rate 100K https://example.com
  1659. curl --limit-rate 1000 https://example.com
  1660. curl --limit-rate 10M https://example.com
  1661. .fi
  1662. See also \fI-Y, --speed-limit\fP and \fI-y, --speed-time\fP.
  1663. .IP "\-l, \-\-list-only"
  1664. (FTP POP3) (FTP)
  1665. When listing an FTP directory, this switch forces a name-only view. This is
  1666. especially useful if the user wants to machine-parse the contents of an FTP
  1667. directory since the normal directory view does not use a standard look or
  1668. format. When used like this, the option causes an NLST command to be sent to
  1669. the server instead of LIST.
  1670. Note: Some FTP servers list only files in their response to NLST; they do not
  1671. include sub-directories and symbolic links.
  1672. (POP3)
  1673. When retrieving a specific email from POP3, this switch forces a LIST command
  1674. to be performed instead of RETR. This is particularly useful if the user wants
  1675. to see if a specific message-id exists on the server and what size it is.
  1676. Note: When combined with \fI\-X, \-\-request\fP, this option can be used to send a UIDL
  1677. command instead, so the user may use the email's unique identifier rather than
  1678. its message-id to make the request.
  1679. Example:
  1680. .nf
  1681. curl --list-only ftp://example.com/dir/
  1682. .fi
  1683. See also \fI-Q, --quote\fP and \fI-X, --request\fP.
  1684. .IP "\-\-local-port <num/range>"
  1685. Set a preferred single number or range (FROM-TO) of local port numbers to use
  1686. for the connection(s). Note that port numbers by nature are a scarce resource
  1687. that will be busy at times so setting this range to something too narrow might
  1688. cause unnecessary connection setup failures.
  1689. Example:
  1690. .nf
  1691. curl --local-port 1000-3000 https://example.com
  1692. .fi
  1693. See also \fI-g, --globoff\fP.
  1694. .IP "\-\-location-trusted"
  1695. (HTTP) Like \fI\-L, \-\-location\fP, but will allow sending the name + password to all hosts that
  1696. the site may redirect to. This may or may not introduce a security breach if
  1697. the site redirects you to a site to which you will send your authentication
  1698. info (which is plaintext in the case of HTTP Basic authentication).
  1699. Example:
  1700. .nf
  1701. curl --location-trusted -u user:password https://example.com
  1702. .fi
  1703. See also \fI-u, --user\fP.
  1704. .IP "\-L, \-\-location"
  1705. (HTTP) If the server reports that the requested page has moved to a different
  1706. location (indicated with a Location: header and a 3XX response code), this
  1707. option will make curl redo the request on the new place. If used together with
  1708. \-\-include or \fI\-I, \-\-head\fP, headers from all requested pages will be shown. When
  1709. authentication is used, curl only sends its credentials to the initial
  1710. host. If a redirect takes curl to a different host, it will not be able to
  1711. intercept the user+password. See also \-\-location-trusted on how to change
  1712. this. You can limit the amount of redirects to follow by using the
  1713. \-\-max-redirs option.
  1714. When curl follows a redirect and if the request is a POST, it will send the
  1715. following request with a GET if the HTTP response was 301, 302, or 303. If the
  1716. response code was any other 3xx code, curl will re-send the following request
  1717. using the same unmodified method.
  1718. You can tell curl to not change POST requests to GET after a 30x response by
  1719. using the dedicated options for that: \fI\-\-post301\fP, \-\-post302 and \fI\-\-post303\fP.
  1720. The method set with \-\-request overrides the method curl would otherwise select
  1721. to use.
  1722. Example:
  1723. .nf
  1724. curl -L https://example.com
  1725. .fi
  1726. See also \fI--resolve\fP and \fI--alt-svc\fP.
  1727. .IP "\-\-login-options <options>"
  1728. (IMAP LDAP POP3 SMTP) Specify the login options to use during server authentication.
  1729. You can use login options to specify protocol specific options that may be
  1730. used during authentication. At present only IMAP, POP3 and SMTP support
  1731. login options. For more information about login options please see RFC
  1732. 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
  1733. If this option is used several times, the last one will be used.
  1734. Example:
  1735. .nf
  1736. curl --login-options 'AUTH=*' imap://example.com
  1737. .fi
  1738. See also \fI-u, --user\fP. Added in 7.34.0.
  1739. .IP "\-\-mail-auth <address>"
  1740. (SMTP) Specify a single address. This will be used to specify the authentication
  1741. address (identity) of a submitted message that is being relayed to another
  1742. server.
  1743. Example:
  1744. .nf
  1745. curl --mail-auth [email protected] -T mail smtp://example.com/
  1746. .fi
  1747. See also \fI--mail-rcpt\fP and \fI--mail-from\fP.
  1748. .IP "\-\-mail-from <address>"
  1749. (SMTP) Specify a single address that the given mail should get sent from.
  1750. Example:
  1751. .nf
  1752. curl --mail-from [email protected] -T mail smtp://example.com/
  1753. .fi
  1754. See also \fI--mail-rcpt\fP and \fI--mail-auth\fP.
  1755. .IP "\-\-mail-rcpt-allowfails"
  1756. (SMTP) When sending data to multiple recipients, by default curl will abort SMTP
  1757. conversation if at least one of the recipients causes RCPT TO command to
  1758. return an error.
  1759. The default behavior can be changed by passing \-\-mail-rcpt-allowfails
  1760. command-line option which will make curl ignore errors and proceed with the
  1761. remaining valid recipients.
  1762. If all recipients trigger RCPT TO failures and this flag is specified, curl
  1763. will still abort the SMTP conversation and return the error received from to
  1764. the last RCPT TO command.
  1765. Example:
  1766. .nf
  1767. curl --mail-rcpt-allowfails --mail-rcpt [email protected] smtp://example.com
  1768. .fi
  1769. See also \fI--mail-rcpt\fP. Added in 7.69.0.
  1770. .IP "\-\-mail-rcpt <address>"
  1771. (SMTP) Specify a single email address, user name or mailing list name. Repeat this
  1772. option several times to send to multiple recipients.
  1773. When performing an address verification (VRFY command), the recipient should be
  1774. specified as the user name or user name and domain (as per Section 3.5 of
  1775. RFC5321). (Added in 7.34.0)
  1776. When performing a mailing list expand (EXPN command), the recipient should be
  1777. specified using the mailing list name, such as "Friends" or "London-Office".
  1778. (Added in 7.34.0)
  1779. Example:
  1780. .nf
  1781. curl --mail-rcpt [email protected] smtp://example.com
  1782. .fi
  1783. See also \fI--mail-rcpt-allowfails\fP.
  1784. .IP "\-M, \-\-manual"
  1785. Manual. Display the huge help text.
  1786. Example:
  1787. .nf
  1788. curl --manual
  1789. .fi
  1790. See also \fI-v, --verbose\fP, \fI--libcurl\fP and \fI--trace\fP.
  1791. .IP "\-\-max-filesize <bytes>"
  1792. (FTP HTTP MQTT) Specify the maximum size (in bytes) of a file to download. If the file
  1793. requested is larger than this value, the transfer will not start and curl will
  1794. return with exit code 63.
  1795. A size modifier may be used. For example, Appending 'k' or 'K' will count the
  1796. number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
  1797. gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
  1798. \fBNOTE\fP: The file size is not always known prior to download, and for such
  1799. files this option has no effect even if the file transfer ends up being larger
  1800. than this given limit.
  1801. Example:
  1802. .nf
  1803. curl --max-filesize 100K https://example.com
  1804. .fi
  1805. See also \fI--limit-rate\fP.
  1806. .IP "\-\-max-redirs <num>"
  1807. (HTTP) Set maximum number of redirections to follow. When \-\-location is used, to
  1808. prevent curl from following too many redirects, by default, the limit is
  1809. set to 50 redirects. Set this option to \-1 to make it unlimited.
  1810. If this option is used several times, the last one will be used.
  1811. Example:
  1812. .nf
  1813. curl --max-redirs 3 --location https://example.com
  1814. .fi
  1815. See also \fI-L, --location\fP.
  1816. .IP "\-m, \-\-max-time <fractional seconds>"
  1817. Maximum time in seconds that you allow each transfer to take. This is
  1818. useful for preventing your batch jobs from hanging for hours due to slow
  1819. networks or links going down. Since 7.32.0, this option accepts decimal
  1820. values, but the actual timeout will decrease in accuracy as the specified
  1821. timeout increases in decimal precision.
  1822. If you enable retrying the transfer (\fI\-\-retry\fP) then the maximum time counter is
  1823. reset each time the transfer is retried. You can use \-\-retry-max-time to limit
  1824. the retry time.
  1825. If this option is used several times, the last one will be used.
  1826. Examples:
  1827. .nf
  1828. curl --max-time 10 https://example.com
  1829. curl --max-time 2.92 https://example.com
  1830. .fi
  1831. See also \fI--connect-timeout\fP and \fI--retry-max-time\fP.
  1832. .IP "\-\-metalink"
  1833. This option was previously used to specify a metalink resource. Metalink
  1834. support has been disabled in curl since 7.78.0 for security reasons.
  1835. Example:
  1836. .nf
  1837. curl --metalink file https://example.com
  1838. .fi
  1839. See also \fI-Z, --parallel\fP.
  1840. .IP "\-\-negotiate"
  1841. (HTTP) Enables Negotiate (SPNEGO) authentication.
  1842. This option requires a library built with GSS-API or SSPI support. Use
  1843. \-\-version to see if your curl supports GSS-API/SSPI or SPNEGO.
  1844. When using this option, you must also provide a fake \-\-user option to activate
  1845. the authentication code properly. Sending a '-u :' is enough as the user name
  1846. and password from the \-\-user option are not actually used.
  1847. If this option is used several times, only the first one is used.
  1848. Example:
  1849. .nf
  1850. curl --negotiate -u : https://example.com
  1851. .fi
  1852. See also \fI--basic\fP, \fI--ntlm\fP, \fI--anyauth\fP and \fI--proxy-negotiate\fP.
  1853. .IP "\-\-netrc-file <filename>"
  1854. This option is similar to \fI\-n, \-\-netrc\fP, except that you provide the path (absolute
  1855. or relative) to the netrc file that curl should use. You can only specify one
  1856. netrc file per invocation. If several \-\-netrc-file options are provided,
  1857. the last one will be used.
  1858. It will abide by \-\-netrc-optional if specified.
  1859. Example:
  1860. .nf
  1861. curl --netrc-file netrc https://example.com
  1862. .fi
  1863. See also \fI-n, --netrc\fP, \fI-u, --user\fP and \fI-K, --config\fP. This option is mutually exclusive to \fI-n, --netrc\fP.
  1864. .IP "\-\-netrc-optional"
  1865. Similar to \fI\-n, \-\-netrc\fP, but this option makes the .netrc usage \fBoptional\fP
  1866. and not mandatory as the \-\-netrc option does.
  1867. Example:
  1868. .nf
  1869. curl --netrc-optional https://example.com
  1870. .fi
  1871. See also \fI--netrc-file\fP. This option is mutually exclusive to \fI-n, --netrc\fP.
  1872. .IP "\-n, \-\-netrc"
  1873. Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's home
  1874. directory for login name and password. This is typically used for FTP on
  1875. Unix. If used with HTTP, curl will enable user authentication. See
  1876. \fInetrc(5)\fP and \fIftp(1)\fP for details on the file format. Curl will not
  1877. complain if that file does not have the right permissions (it should be
  1878. neither world- nor group-readable). The environment variable "HOME" is used
  1879. to find the home directory.
  1880. A quick and simple example of how to setup a \fI.netrc\fP to allow curl to FTP to
  1881. the machine host.domain.com with user name 'myself' and password 'secret'
  1882. could look similar to:
  1883. .nf
  1884. machine host.domain.com
  1885. login myself
  1886. password secret
  1887. .fi
  1888. Example:
  1889. .nf
  1890. curl --netrc https://example.com
  1891. .fi
  1892. See also \fI--netrc-file\fP, \fI-K, --config\fP and \fI-u, --user\fP.
  1893. .IP "\-:, \-\-next"
  1894. Tells curl to use a separate operation for the following URL and associated
  1895. options. This allows you to send several URL requests, each with their own
  1896. specific options, for example, such as different user names or custom requests
  1897. for each.
  1898. \-\-next will reset all local options and only global ones will have their
  1899. values survive over to the operation following the \-\-next instruction. Global
  1900. options include \fI\-v, \-\-verbose\fP, \fI\-\-trace\fP, \-\-trace-ascii and \fI\-\-fail-early\fP.
  1901. For example, you can do both a GET and a POST in a single command line:
  1902. .nf
  1903. curl www1.example.com \-\-next \-d postthis www2.example.com
  1904. .fi
  1905. Examples:
  1906. .nf
  1907. curl https://example.com --next -d postthis www2.example.com
  1908. curl -I https://example.com --next https://example.net/
  1909. .fi
  1910. See also \fI-Z, --parallel\fP and \fI-K, --config\fP. Added in 7.36.0.
  1911. .IP "\-\-no-alpn"
  1912. (HTTPS) Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
  1913. with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
  1914. HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
  1915. Example:
  1916. .nf
  1917. curl --no-alpn https://example.com
  1918. .fi
  1919. See also \fI--no-npn\fP and \fI--http2\fP. \fI--no-alpn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0.
  1920. .IP "\-N, \-\-no-buffer"
  1921. Disables the buffering of the output stream. In normal work situations, curl
  1922. will use a standard buffered output stream that will have the effect that it
  1923. will output the data in chunks, not necessarily exactly when the data arrives.
  1924. Using this option will disable that buffering.
  1925. Note that this is the negated option name documented. You can thus use
  1926. \-\-buffer to enforce the buffering.
  1927. Example:
  1928. .nf
  1929. curl --no-buffer https://example.com
  1930. .fi
  1931. See also \fI-#, --progress-bar\fP.
  1932. .IP "\-\-no-clobber"
  1933. When used in conjunction with the \fI\-o, \-\-output\fP, \fI\-J, \-\-remote-header-name\fP,
  1934. \fI\-O, \-\-remote-name\fP, or \-\-remote-name-all options, curl avoids overwriting files
  1935. that already exist. Instead, a dot and a number gets appended to the name
  1936. of the file that would be created, up to filename.100 after which it will not
  1937. create any file.
  1938. Note that this is the negated option name documented. You can thus use
  1939. \-\-clobber to enforce the clobbering, even if \-\-remote-header-name or \-J is
  1940. specified.
  1941. Example:
  1942. .nf
  1943. curl --no-clobber --output local/dir/file https://example.com
  1944. .fi
  1945. See also \fI-o, --output\fP and \fI-O, --remote-name\fP. Added in 7.83.0.
  1946. .IP "\-\-no-keepalive"
  1947. Disables the use of keepalive messages on the TCP connection. curl otherwise
  1948. enables them by default.
  1949. Note that this is the negated option name documented. You can thus use
  1950. \-\-keepalive to enforce keepalive.
  1951. Example:
  1952. .nf
  1953. curl --no-keepalive https://example.com
  1954. .fi
  1955. See also \fI--keepalive-time\fP.
  1956. .IP "\-\-no-npn"
  1957. (HTTPS) Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
  1958. with an SSL library that supports NPN. NPN is used by a libcurl that supports
  1959. HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
  1960. Example:
  1961. .nf
  1962. curl --no-npn https://example.com
  1963. .fi
  1964. See also \fI--no-alpn\fP and \fI--http2\fP. \fI--no-npn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0.
  1965. .IP "\-\-no-progress-meter"
  1966. Option to switch off the progress meter output without muting or otherwise
  1967. affecting warning and informational messages like \-\-silent does.
  1968. Note that this is the negated option name documented. You can thus use
  1969. \-\-progress-meter to enable the progress meter again.
  1970. Example:
  1971. .nf
  1972. curl --no-progress-meter -o store https://example.com
  1973. .fi
  1974. See also \fI-v, --verbose\fP and \fI-s, --silent\fP. Added in 7.67.0.
  1975. .IP "\-\-no-sessionid"
  1976. (TLS) Disable curl's use of SSL session-ID caching. By default all transfers are
  1977. done using the cache. Note that while nothing should ever get hurt by
  1978. attempting to reuse SSL session-IDs, there seem to be broken SSL
  1979. implementations in the wild that may require you to disable this in order for
  1980. you to succeed.
  1981. Note that this is the negated option name documented. You can thus use
  1982. \-\-sessionid to enforce session-ID caching.
  1983. Example:
  1984. .nf
  1985. curl --no-sessionid https://example.com
  1986. .fi
  1987. See also \fI-k, --insecure\fP.
  1988. .IP "\-\-noproxy <no-proxy-list>"
  1989. Comma-separated list of hosts for which not to use a proxy, if one is
  1990. specified. The only wildcard is a single * character, which matches all hosts,
  1991. and effectively disables the proxy. Each name in this list is matched as
  1992. either a domain which contains the hostname, or the hostname itself. For
  1993. example, local.com would match local.com, local.com:80, and www.local.com, but
  1994. not www.notlocal.com.
  1995. Since 7.53.0, This option overrides the environment variables that disable the
  1996. proxy ('no_proxy' and 'NO_PROXY'). If there's an environment variable
  1997. disabling a proxy, you can set the noproxy list to "" to override it.
  1998. Example:
  1999. .nf
  2000. curl --noproxy "www.example" https://example.com
  2001. .fi
  2002. See also \fI-x, --proxy\fP.
  2003. .IP "\-\-ntlm-wb"
  2004. (HTTP) Enables NTLM much in the style \-\-ntlm does, but hand over the authentication
  2005. to the separate binary ntlmauth application that is executed when needed.
  2006. Example:
  2007. .nf
  2008. curl --ntlm-wb -u user:password https://example.com
  2009. .fi
  2010. See also \fI--ntlm\fP and \fI--proxy-ntlm\fP.
  2011. .IP "\-\-ntlm"
  2012. (HTTP) Enables NTLM authentication. The NTLM authentication method was designed by
  2013. Microsoft and is used by IIS web servers. It is a proprietary protocol,
  2014. reverse-engineered by clever people and implemented in curl based on their
  2015. efforts. This kind of behavior should not be endorsed, you should encourage
  2016. everyone who uses NTLM to switch to a public and documented authentication
  2017. method instead, such as Digest.
  2018. If you want to enable NTLM for your proxy authentication, then use
  2019. \fI\-\-proxy-ntlm\fP.
  2020. If this option is used several times, only the first one is used.
  2021. Example:
  2022. .nf
  2023. curl --ntlm -u user:password https://example.com
  2024. .fi
  2025. See also \fI--proxy-ntlm\fP. \fI--ntlm\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI--basic\fP and \fI--negotiate\fP and \fI--digest\fP and \fI--anyauth\fP.
  2026. .IP "\-\-oauth2-bearer <token>"
  2027. (IMAP LDAP POP3 SMTP HTTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
  2028. is used in conjunction with the user name which can be specified as part of
  2029. the \-\-url or \-\-user options.
  2030. The Bearer Token and user name are formatted according to RFC 6750.
  2031. If this option is used several times, the last one will be used.
  2032. Example:
  2033. .nf
  2034. curl --oauth2-bearer "mF_9.B5f-4.1JqM" https://example.com
  2035. .fi
  2036. See also \fI--basic\fP, \fI--ntlm\fP and \fI--digest\fP. Added in 7.33.0.
  2037. .IP "\-\-output-dir <dir>"
  2038. This option specifies the directory in which files should be stored, when
  2039. \-\-remote-name or \-\-output are used.
  2040. The given output directory is used for all URLs and output options on the
  2041. command line, up until the first \fI\-:, \-\-next\fP.
  2042. If the specified target directory does not exist, the operation will fail
  2043. unless \-\-create-dirs is also used.
  2044. If this option is used multiple times, the last specified directory will be
  2045. used.
  2046. Example:
  2047. .nf
  2048. curl --output-dir "tmp" -O https://example.com
  2049. .fi
  2050. See also \fI-O, --remote-name\fP and \fI-J, --remote-header-name\fP. Added in 7.73.0.
  2051. .IP "\-o, \-\-output <file>"
  2052. Write output to <file> instead of stdout. If you are using {} or [] to fetch
  2053. multiple documents, you should quote the URL and you can use '#' followed by a
  2054. number in the <file> specifier. That variable will be replaced with the current
  2055. string for the URL being fetched. Like in:
  2056. .nf
  2057. curl "http://{one,two}.example.com" \-o "file_#1.txt"
  2058. .fi
  2059. or use several variables like:
  2060. .nf
  2061. curl "http://{site,host}.host[1-5].com" \-o "#1_#2"
  2062. .fi
  2063. You may use this option as many times as the number of URLs you have. For
  2064. example, if you specify two URLs on the same command line, you can use it like
  2065. this:
  2066. .nf
  2067. curl \-o aa example.com \-o bb example.net
  2068. .fi
  2069. and the order of the \-o options and the URLs does not matter, just that the
  2070. first \-o is for the first URL and so on, so the above command line can also be
  2071. written as
  2072. .nf
  2073. curl example.com example.net \-o aa \-o bb
  2074. .fi
  2075. See also the \-\-create-dirs option to create the local directories
  2076. dynamically. Specifying the output as '-' (a single dash) will force the
  2077. output to be done to stdout.
  2078. To suppress response bodies, you can redirect output to /dev/null:
  2079. .nf
  2080. curl example.com \-o /dev/null
  2081. .fi
  2082. Or for Windows use nul:
  2083. .nf
  2084. curl example.com \-o nul
  2085. .fi
  2086. Examples:
  2087. .nf
  2088. curl -o file https://example.com
  2089. curl "http://{one,two}.example.com" -o "file_#1.txt"
  2090. curl "http://{site,host}.host[1-5].com" -o "#1_#2"
  2091. curl -o file https://example.com -o file2 https://example.net
  2092. .fi
  2093. See also \fI-O, --remote-name\fP, \fI--remote-name-all\fP and \fI-J, --remote-header-name\fP.
  2094. .IP "\-\-parallel-immediate"
  2095. When doing parallel transfers, this option will instruct curl that it should
  2096. rather prefer opening up more connections in parallel at once rather than
  2097. waiting to see if new transfers can be added as multiplexed streams on another
  2098. connection.
  2099. This option is global and does not need to be specified for each use of
  2100. \fI\-:, \-\-next\fP.
  2101. Example:
  2102. .nf
  2103. curl --parallel-immediate -Z https://example.com -o file1 https://example.com -o file2
  2104. .fi
  2105. See also \fI-Z, --parallel\fP and \fI--parallel-max\fP. Added in 7.68.0.
  2106. .IP "\-\-parallel-max <num>"
  2107. When asked to do parallel transfers, using \fI\-Z, \-\-parallel\fP, this option controls
  2108. the maximum amount of transfers to do simultaneously.
  2109. This option is global and does not need to be specified for each use of
  2110. \fI\-:, \-\-next\fP.
  2111. The default is 50.
  2112. Example:
  2113. .nf
  2114. curl --parallel-max 100 -Z https://example.com ftp://example.com/
  2115. .fi
  2116. See also \fI-Z, --parallel\fP. Added in 7.66.0.
  2117. .IP "\-Z, \-\-parallel"
  2118. Makes curl perform its transfers in parallel as compared to the regular serial
  2119. manner.
  2120. This option is global and does not need to be specified for each use of
  2121. \fI\-:, \-\-next\fP.
  2122. Example:
  2123. .nf
  2124. curl --parallel https://example.com -o file1 https://example.com -o file2
  2125. .fi
  2126. See also \fI-:, --next\fP and \fI-v, --verbose\fP. Added in 7.66.0.
  2127. .IP "\-\-pass <phrase>"
  2128. (SSH TLS) Passphrase for the private key.
  2129. If this option is used several times, the last one will be used.
  2130. Example:
  2131. .nf
  2132. curl --pass secret --key file https://example.com
  2133. .fi
  2134. See also \fI--key\fP and \fI-u, --user\fP.
  2135. .IP "\-\-path-as-is"
  2136. Tell curl to not handle sequences of /../ or /./ in the given URL
  2137. path. Normally curl will squash or merge them according to standards but with
  2138. this option set you tell it not to do that.
  2139. Example:
  2140. .nf
  2141. curl --path-as-is https://example.com/../../etc/passwd
  2142. .fi
  2143. See also \fI--request-target\fP. Added in 7.42.0.
  2144. .IP "\-\-pinnedpubkey <hashes>"
  2145. (TLS) Tells curl to use the specified public key file (or hashes) to verify the
  2146. peer. This can be a path to a file which contains a single public key in PEM
  2147. or DER format, or any number of base64 encoded sha256 hashes preceded by
  2148. \(aqsha256//' and separated by ';'.
  2149. When negotiating a TLS or SSL connection, the server sends a certificate
  2150. indicating its identity. A public key is extracted from this certificate and
  2151. if it does not exactly match the public key provided to this option, curl will
  2152. abort the connection before sending or receiving any data.
  2153. PEM/DER support:
  2154. 7.39.0: OpenSSL, GnuTLS and GSKit
  2155. 7.43.0: NSS and wolfSSL
  2156. 7.47.0: mbedtls
  2157. sha256 support:
  2158. 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
  2159. 7.47.0: mbedtls
  2160. Other SSL backends not supported.
  2161. If this option is used several times, the last one will be used.
  2162. Examples:
  2163. .nf
  2164. curl --pinnedpubkey keyfile https://example.com
  2165. curl --pinnedpubkey 'sha256//ce118b51897f4452dc' https://example.com
  2166. .fi
  2167. See also \fI--hostpubsha256\fP. Added in 7.39.0.
  2168. .IP "\-\-post301"
  2169. (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET
  2170. requests when following a 301 redirection. The non-RFC behavior is ubiquitous
  2171. in web browsers, so curl does the conversion by default to maintain
  2172. consistency. However, a server may require a POST to remain a POST after such
  2173. a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
  2174. Example:
  2175. .nf
  2176. curl --post301 --location -d "data" https://example.com
  2177. .fi
  2178. See also \fI--post302\fP, \fI--post303\fP and \fI-L, --location\fP.
  2179. .IP "\-\-post302"
  2180. (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET
  2181. requests when following a 302 redirection. The non-RFC behavior is ubiquitous
  2182. in web browsers, so curl does the conversion by default to maintain
  2183. consistency. However, a server may require a POST to remain a POST after such
  2184. a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
  2185. Example:
  2186. .nf
  2187. curl --post302 --location -d "data" https://example.com
  2188. .fi
  2189. See also \fI--post301\fP, \fI--post303\fP and \fI-L, --location\fP.
  2190. .IP "\-\-post303"
  2191. (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST requests into GET
  2192. requests when following 303 redirections. A server may require a POST to
  2193. remain a POST after a 303 redirection. This option is meaningful only when
  2194. using \fI\-L, \-\-location\fP.
  2195. Example:
  2196. .nf
  2197. curl --post303 --location -d "data" https://example.com
  2198. .fi
  2199. See also \fI--post302\fP, \fI--post301\fP and \fI-L, --location\fP.
  2200. .IP "\-\-preproxy [protocol://]host[:port]"
  2201. Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI\-x, \-\-proxy\fP. In
  2202. such a case curl first connects to the SOCKS proxy and then connects (through
  2203. SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy.
  2204. The pre proxy string should be specified with a protocol:// prefix to specify
  2205. alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
  2206. socks5h:// to request the specific SOCKS version to be used. No protocol
  2207. specified will make curl default to SOCKS4.
  2208. If the port number is not specified in the proxy string, it is assumed to be
  2209. 1080.
  2210. User and password that might be provided in the proxy string are URL decoded
  2211. by curl. This allows you to pass in special characters such as @ by using %40
  2212. or pass in a colon with %3a.
  2213. If this option is used several times, the last one will be used.
  2214. Example:
  2215. .nf
  2216. curl --preproxy socks5://proxy.example -x http://http.example https://example.com
  2217. .fi
  2218. See also \fI-x, --proxy\fP and \fI--socks5\fP. Added in 7.52.0.
  2219. .IP "\-#, \-\-progress-bar"
  2220. Make curl display transfer progress as a simple progress bar instead of the
  2221. standard, more informational, meter.
  2222. This progress bar draws a single line of '#' characters across the screen and
  2223. shows a percentage if the transfer size is known. For transfers without a
  2224. known size, there will be space ship (-=o=-) that moves back and forth but
  2225. only while data is being transferred, with a set of flying hash sign symbols on
  2226. top.
  2227. This option is global and does not need to be specified for each use of
  2228. \fI\-:, \-\-next\fP.
  2229. Example:
  2230. .nf
  2231. curl -# -O https://example.com
  2232. .fi
  2233. See also \fI--styled-output\fP.
  2234. .IP "\-\-proto-default <protocol>"
  2235. Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
  2236. An unknown or unsupported protocol causes error
  2237. \fICURLE_UNSUPPORTED_PROTOCOL\fP (1).
  2238. This option does not change the default proxy protocol (http).
  2239. Without this option set, curl guesses protocol based on the host name, see
  2240. \-\-url for details.
  2241. Example:
  2242. .nf
  2243. curl --proto-default https ftp.example.com
  2244. .fi
  2245. See also \fI--proto\fP and \fI--proto-redir\fP. Added in 7.45.0.
  2246. .IP "\-\-proto-redir <protocols>"
  2247. Tells curl to limit what protocols it may use on redirect. Protocols denied by
  2248. \-\-proto are not overridden by this option. See \-\-proto for how protocols are
  2249. represented.
  2250. Example, allow only HTTP and HTTPS on redirect:
  2251. .nf
  2252. curl \-\-proto-redir \-all,http,https http://example.com
  2253. .fi
  2254. By default curl will only allow HTTP, HTTPS, FTP and FTPS on redirect (since
  2255. 7.65.2). Specifying \fIall\fP or \fI+all\fP enables all protocols on redirects, which
  2256. is not good for security.
  2257. Example:
  2258. .nf
  2259. curl --proto-redir =http,https https://example.com
  2260. .fi
  2261. See also \fI--proto\fP.
  2262. .IP "\-\-proto <protocols>"
  2263. Tells curl to limit what protocols it may use for transfers. Protocols are
  2264. evaluated left to right, are comma separated, and are each a protocol name or
  2265. \(aqall', optionally prefixed by zero or more modifiers. Available modifiers are:
  2266. .RS
  2267. .TP 3
  2268. .B +
  2269. Permit this protocol in addition to protocols already permitted (this is
  2270. the default if no modifier is used).
  2271. .TP
  2272. .B \-
  2273. Deny this protocol, removing it from the list of protocols already permitted.
  2274. .TP
  2275. .B =
  2276. Permit only this protocol (ignoring the list already permitted), though
  2277. subject to later modification by subsequent entries in the comma separated
  2278. list.
  2279. .RE
  2280. .IP
  2281. For example:
  2282. .RS
  2283. .TP 15
  2284. .B \fI\-\-proto\fP \-ftps
  2285. uses the default protocols, but disables ftps
  2286. .TP
  2287. .B \fI\-\-proto\fP \-all,https,+http
  2288. only enables http and https
  2289. .TP
  2290. .B \fI\-\-proto\fP =http,https
  2291. also only enables http and https
  2292. .RE
  2293. .IP
  2294. Unknown protocols produce a warning. This allows scripts to safely rely on
  2295. being able to disable potentially dangerous protocols, without relying upon
  2296. support for that protocol being built into curl to avoid an error.
  2297. This option can be used multiple times, in which case the effect is the same
  2298. as concatenating the protocols into one instance of the option.
  2299. Example:
  2300. .nf
  2301. curl --proto =http,https,sftp https://example.com
  2302. .fi
  2303. See also \fI--proto-redir\fP and \fI--proto-default\fP.
  2304. .IP "\-\-proxy-anyauth"
  2305. Tells curl to pick a suitable authentication method when communicating with
  2306. the given HTTP proxy. This might cause an extra request/response round-trip.
  2307. Example:
  2308. .nf
  2309. curl --proxy-anyauth --proxy-user user:passwd -x proxy https://example.com
  2310. .fi
  2311. See also \fI-x, --proxy\fP, \fI--proxy-basic\fP and \fI--proxy-digest\fP.
  2312. .IP "\-\-proxy-basic"
  2313. Tells curl to use HTTP Basic authentication when communicating with the given
  2314. proxy. Use \-\-basic for enabling HTTP Basic with a remote host. Basic is the
  2315. default authentication method curl uses with proxies.
  2316. Example:
  2317. .nf
  2318. curl --proxy-basic --proxy-user user:passwd -x proxy https://example.com
  2319. .fi
  2320. See also \fI-x, --proxy\fP, \fI--proxy-anyauth\fP and \fI--proxy-digest\fP.
  2321. .IP "\-\-proxy-cacert <file>"
  2322. Same as \-\-cacert but used in HTTPS proxy context.
  2323. Example:
  2324. .nf
  2325. curl --proxy-cacert CA-file.txt -x https://proxy https://example.com
  2326. .fi
  2327. See also \fI--proxy-capath\fP, \fI--cacert\fP, \fI--capath\fP and \fI-x, --proxy\fP. Added in 7.52.0.
  2328. .IP "\-\-proxy-capath <dir>"
  2329. Same as \-\-capath but used in HTTPS proxy context.
  2330. Example:
  2331. .nf
  2332. curl --proxy-capath /local/directory -x https://proxy https://example.com
  2333. .fi
  2334. See also \fI--proxy-cacert\fP, \fI-x, --proxy\fP and \fI--capath\fP. Added in 7.52.0.
  2335. .IP "\-\-proxy-cert-type <type>"
  2336. Same as \-\-cert-type but used in HTTPS proxy context.
  2337. Example:
  2338. .nf
  2339. curl --proxy-cert-type PEM --proxy-cert file -x https://proxy https://example.com
  2340. .fi
  2341. See also \fI--proxy-cert\fP. Added in 7.52.0.
  2342. .IP "\-\-proxy-cert <cert[:passwd]>"
  2343. Same as \-\-cert but used in HTTPS proxy context.
  2344. Example:
  2345. .nf
  2346. curl --proxy-cert file -x https://proxy https://example.com
  2347. .fi
  2348. See also \fI--proxy-cert-type\fP. Added in 7.52.0.
  2349. .IP "\-\-proxy-ciphers <list>"
  2350. Same as \-\-ciphers but used in HTTPS proxy context.
  2351. Example:
  2352. .nf
  2353. curl --proxy-ciphers ECDHE-ECDSA-AES256-CCM8 -x https://proxy https://example.com
  2354. .fi
  2355. See also \fI--ciphers\fP, \fI--curves\fP and \fI-x, --proxy\fP. Added in 7.52.0.
  2356. .IP "\-\-proxy-crlfile <file>"
  2357. Same as \-\-crlfile but used in HTTPS proxy context.
  2358. Example:
  2359. .nf
  2360. curl --proxy-crlfile rejects.txt -x https://proxy https://example.com
  2361. .fi
  2362. See also \fI--crlfile\fP and \fI-x, --proxy\fP. Added in 7.52.0.
  2363. .IP "\-\-proxy-digest"
  2364. Tells curl to use HTTP Digest authentication when communicating with the given
  2365. proxy. Use \-\-digest for enabling HTTP Digest with a remote host.
  2366. Example:
  2367. .nf
  2368. curl --proxy-digest --proxy-user user:passwd -x proxy https://example.com
  2369. .fi
  2370. See also \fI-x, --proxy\fP, \fI--proxy-anyauth\fP and \fI--proxy-basic\fP.
  2371. .IP "\-\-proxy-header <header/@file>"
  2372. (HTTP) Extra header to include in the request when sending HTTP to a proxy. You may
  2373. specify any number of extra headers. This is the equivalent option to \-\-header
  2374. but is for proxy communication only like in CONNECT requests when you want a
  2375. separate header sent to the proxy to what is sent to the actual remote host.
  2376. curl will make sure that each header you add/replace is sent with the proper
  2377. end-of-line marker, you should thus \fBnot\fP add that as a part of the header
  2378. content: do not add newlines or carriage returns, they will only mess things
  2379. up for you.
  2380. Headers specified with this option will not be included in requests that curl
  2381. knows will not be sent to a proxy.
  2382. Starting in 7.55.0, this option can take an argument in @filename style, which
  2383. then adds a header for each line in the input file. Using @- will make curl
  2384. read the header file from stdin.
  2385. This option can be used multiple times to add/replace/remove multiple headers.
  2386. Examples:
  2387. .nf
  2388. curl --proxy-header "X-First-Name: Joe" -x http://proxy https://example.com
  2389. curl --proxy-header "User-Agent: surprise" -x http://proxy https://example.com
  2390. curl --proxy-header "Host:" -x http://proxy https://example.com
  2391. .fi
  2392. See also \fI-x, --proxy\fP. Added in 7.37.0.
  2393. .IP "\-\-proxy-insecure"
  2394. Same as \-\-insecure but used in HTTPS proxy context.
  2395. Example:
  2396. .nf
  2397. curl --proxy-insecure -x https://proxy https://example.com
  2398. .fi
  2399. See also \fI-x, --proxy\fP and \fI-k, --insecure\fP. Added in 7.52.0.
  2400. .IP "\-\-proxy-key-type <type>"
  2401. Same as \-\-key-type but used in HTTPS proxy context.
  2402. Example:
  2403. .nf
  2404. curl --proxy-key-type DER --proxy-key here -x https://proxy https://example.com
  2405. .fi
  2406. See also \fI--proxy-key\fP and \fI-x, --proxy\fP. Added in 7.52.0.
  2407. .IP "\-\-proxy-key <key>"
  2408. Same as \-\-key but used in HTTPS proxy context.
  2409. Example:
  2410. .nf
  2411. curl --proxy-key here -x https://proxy https://example.com
  2412. .fi
  2413. See also \fI--proxy-key-type\fP and \fI-x, --proxy\fP. Added in 7.52.0.
  2414. .IP "\-\-proxy-negotiate"
  2415. Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
  2416. with the given proxy. Use \-\-negotiate for enabling HTTP Negotiate (SPNEGO)
  2417. with a remote host.
  2418. Example:
  2419. .nf
  2420. curl --proxy-negotiate --proxy-user user:passwd -x proxy https://example.com
  2421. .fi
  2422. See also \fI--proxy-anyauth\fP and \fI--proxy-basic\fP.
  2423. .IP "\-\-proxy-ntlm"
  2424. Tells curl to use HTTP NTLM authentication when communicating with the given
  2425. proxy. Use \-\-ntlm for enabling NTLM with a remote host.
  2426. Example:
  2427. .nf
  2428. curl --proxy-ntlm --proxy-user user:passwd -x http://proxy https://example.com
  2429. .fi
  2430. See also \fI--proxy-negotiate\fP and \fI--proxy-anyauth\fP.
  2431. .IP "\-\-proxy-pass <phrase>"
  2432. Same as \-\-pass but used in HTTPS proxy context.
  2433. Example:
  2434. .nf
  2435. curl --proxy-pass secret --proxy-key here -x https://proxy https://example.com
  2436. .fi
  2437. See also \fI-x, --proxy\fP and \fI--proxy-key\fP. Added in 7.52.0.
  2438. .IP "\-\-proxy-pinnedpubkey <hashes>"
  2439. (TLS) Tells curl to use the specified public key file (or hashes) to verify the
  2440. proxy. This can be a path to a file which contains a single public key in PEM
  2441. or DER format, or any number of base64 encoded sha256 hashes preceded by
  2442. \(aqsha256//' and separated by ';'.
  2443. When negotiating a TLS or SSL connection, the server sends a certificate
  2444. indicating its identity. A public key is extracted from this certificate and
  2445. if it does not exactly match the public key provided to this option, curl will
  2446. abort the connection before sending or receiving any data.
  2447. If this option is used several times, the last one will be used.
  2448. Examples:
  2449. .nf
  2450. curl --proxy-pinnedpubkey keyfile https://example.com
  2451. curl --proxy-pinnedpubkey 'sha256//ce118b51897f4452dc' https://example.com
  2452. .fi
  2453. See also \fI--pinnedpubkey\fP and \fI-x, --proxy\fP. Added in 7.59.0.
  2454. .IP "\-\-proxy-service-name <name>"
  2455. This option allows you to change the service name for proxy negotiation.
  2456. Example:
  2457. .nf
  2458. curl --proxy-service-name "shrubbery" -x proxy https://example.com
  2459. .fi
  2460. See also \fI--service-name\fP and \fI-x, --proxy\fP. Added in 7.43.0.
  2461. .IP "\-\-proxy-ssl-allow-beast"
  2462. Same as \-\-ssl-allow-beast but used in HTTPS proxy context.
  2463. Example:
  2464. .nf
  2465. curl --proxy-ssl-allow-beast -x https://proxy https://example.com
  2466. .fi
  2467. See also \fI--ssl-allow-beast\fP and \fI-x, --proxy\fP. Added in 7.52.0.
  2468. .IP "\-\-proxy-ssl-auto-client-cert"
  2469. Same as \-\-ssl-auto-client-cert but used in HTTPS proxy context.
  2470. Example:
  2471. .nf
  2472. curl --proxy-ssl-auto-client-cert -x https://proxy https://example.com
  2473. .fi
  2474. See also \fI--ssl-auto-client-cert\fP and \fI-x, --proxy\fP. Added in 7.77.0.
  2475. .IP "\-\-proxy-tls13-ciphers <ciphersuite list>"
  2476. (TLS) Specifies which cipher suites to use in the connection to your HTTPS proxy
  2477. when it negotiates TLS 1.3. The list of ciphers suites must specify valid
  2478. ciphers. Read up on TLS 1.3 cipher suite details on this URL:
  2479. .nf
  2480. https://curl.se/docs/ssl-ciphers.html
  2481. .fi
  2482. This option is currently used only when curl is built to use OpenSSL 1.1.1 or
  2483. later. If you are using a different SSL backend you can try setting TLS 1.3
  2484. cipher suites by using the \-\-proxy-ciphers option.
  2485. If this option is used several times, the last one will be used.
  2486. Example:
  2487. .nf
  2488. curl --proxy-tls13-ciphers TLS_AES_128_GCM_SHA256 -x proxy https://example.com
  2489. .fi
  2490. See also \fI--tls13-ciphers\fP and \fI--curves\fP. Added in 7.61.0.
  2491. .IP "\-\-proxy-tlsauthtype <type>"
  2492. Same as \-\-tlsauthtype but used in HTTPS proxy context.
  2493. Example:
  2494. .nf
  2495. curl --proxy-tlsauthtype SRP -x https://proxy https://example.com
  2496. .fi
  2497. See also \fI-x, --proxy\fP and \fI--proxy-tlsuser\fP. Added in 7.52.0.
  2498. .IP "\-\-proxy-tlspassword <string>"
  2499. Same as \-\-tlspassword but used in HTTPS proxy context.
  2500. Example:
  2501. .nf
  2502. curl --proxy-tlspassword passwd -x https://proxy https://example.com
  2503. .fi
  2504. See also \fI-x, --proxy\fP and \fI--proxy-tlsuser\fP. Added in 7.52.0.
  2505. .IP "\-\-proxy-tlsuser <name>"
  2506. Same as \-\-tlsuser but used in HTTPS proxy context.
  2507. Example:
  2508. .nf
  2509. curl --proxy-tlsuser smith -x https://proxy https://example.com
  2510. .fi
  2511. See also \fI-x, --proxy\fP and \fI--proxy-tlspassword\fP. Added in 7.52.0.
  2512. .IP "\-\-proxy-tlsv1"
  2513. Same as \-\-tlsv1 but used in HTTPS proxy context.
  2514. Example:
  2515. .nf
  2516. curl --proxy-tlsv1 -x https://proxy https://example.com
  2517. .fi
  2518. See also \fI-x, --proxy\fP. Added in 7.52.0.
  2519. .IP "\-U, \-\-proxy-user <user:password>"
  2520. Specify the user name and password to use for proxy authentication.
  2521. If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM
  2522. authentication then you can tell curl to select the user name and password
  2523. from your environment by specifying a single colon with this option: "-U :".
  2524. On systems where it works, curl will hide the given option argument from
  2525. process listings. This is not enough to protect credentials from possibly
  2526. getting seen by other users on the same system as they will still be visible
  2527. for a moment before cleared. Such sensitive data should be retrieved from a
  2528. file instead or similar and never used in clear text in a command line.
  2529. If this option is used several times, the last one will be used.
  2530. Example:
  2531. .nf
  2532. curl --proxy-user name:pwd -x proxy https://example.com
  2533. .fi
  2534. See also \fI--proxy-pass\fP.
  2535. .IP "\-x, \-\-proxy [protocol://]host[:port]"
  2536. Use the specified proxy.
  2537. The proxy string can be specified with a protocol:// prefix. No protocol
  2538. specified or http:// will be treated as HTTP proxy. Use socks4://, socks4a://,
  2539. socks5:// or socks5h:// to request a specific SOCKS version to be used.
  2540. Unix domain sockets are supported for socks proxy. Set localhost for the host
  2541. part. e.g. socks5h://localhost/path/to/socket.sock
  2542. HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for
  2543. OpenSSL, GnuTLS and NSS.
  2544. Unrecognized and unsupported proxy protocols cause an error since 7.52.0.
  2545. Prior versions may ignore the protocol and use http:// instead.
  2546. If the port number is not specified in the proxy string, it is assumed to be
  2547. 1080.
  2548. This option overrides existing environment variables that set the proxy to
  2549. use. If there's an environment variable setting a proxy, you can set proxy to
  2550. \(dq" to override it.
  2551. All operations that are performed over an HTTP proxy will transparently be
  2552. converted to HTTP. It means that certain protocol specific operations might
  2553. not be available. This is not the case if you can tunnel through the proxy, as
  2554. one with the \-\-proxytunnel option.
  2555. User and password that might be provided in the proxy string are URL decoded
  2556. by curl. This allows you to pass in special characters such as @ by using %40
  2557. or pass in a colon with %3a.
  2558. The proxy host can be specified the same way as the proxy environment
  2559. variables, including the protocol prefix (http://) and the embedded user +
  2560. password.
  2561. If this option is used several times, the last one will be used.
  2562. Example:
  2563. .nf
  2564. curl --proxy http://proxy.example https://example.com
  2565. .fi
  2566. See also \fI--socks5\fP and \fI--proxy-basic\fP.
  2567. .IP "\-\-proxy1.0 <host[:port]>"
  2568. Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
  2569. assumed at port 1080.
  2570. The only difference between this and the HTTP proxy option \fI\-x, \-\-proxy\fP, is that
  2571. attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol
  2572. instead of the default HTTP 1.1.
  2573. Example:
  2574. .nf
  2575. curl --proxy1.0 -x http://proxy https://example.com
  2576. .fi
  2577. See also \fI-x, --proxy\fP, \fI--socks5\fP and \fI--preproxy\fP.
  2578. .IP "\-p, \-\-proxytunnel"
  2579. When an HTTP proxy is used \fI\-x, \-\-proxy\fP, this option will make curl tunnel through
  2580. the proxy. The tunnel approach is made with the HTTP proxy CONNECT request and
  2581. requires that the proxy allows direct connect to the remote port number curl
  2582. wants to tunnel through to.
  2583. To suppress proxy CONNECT response headers when curl is set to output headers
  2584. use \fI\-\-suppress-connect-headers\fP.
  2585. Example:
  2586. .nf
  2587. curl --proxytunnel -x http://proxy https://example.com
  2588. .fi
  2589. See also \fI-x, --proxy\fP.
  2590. .IP "\-\-pubkey <key>"
  2591. (SFTP SCP) Public key file name. Allows you to provide your public key in this separate
  2592. file.
  2593. If this option is used several times, the last one will be used.
  2594. (As of 7.39.0, curl attempts to automatically extract the public key from the
  2595. private key file, so passing this option is generally not required. Note that
  2596. this public key extraction requires libcurl to be linked against a copy of
  2597. libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
  2598. Example:
  2599. .nf
  2600. curl --pubkey file.pub sftp://example.com/
  2601. .fi
  2602. See also \fI--pass\fP.
  2603. .IP "\-Q, \-\-quote <command>"
  2604. (FTP SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are
  2605. sent BEFORE the transfer takes place (just after the initial PWD command in an
  2606. FTP transfer, to be exact). To make commands take place after a successful
  2607. transfer, prefix them with a dash '-'.
  2608. (FTP only) To make commands be sent after curl has changed the working
  2609. directory, just before the file transfer command(s), prefix the command with a
  2610. \(aq+'. This is not performed when a directory listing is performed.
  2611. You may specify any number of commands.
  2612. By default curl will stop at first failure. To make curl continue even if the
  2613. command fails, prefix the command with an asterisk (*). Otherwise, if the
  2614. server returns failure for one of the commands, the entire operation will be
  2615. aborted.
  2616. You must send syntactically correct FTP commands as RFC 959 defines to FTP
  2617. servers, or one of the commands listed below to SFTP servers.
  2618. This option can be used multiple times.
  2619. SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
  2620. itself before sending them to the server. File names may be quoted
  2621. shell-style to embed spaces or special characters. Following is the list of
  2622. all supported SFTP quote commands:
  2623. .RS
  2624. .IP "atime date file"
  2625. The atime command sets the last access time of the file named by the file
  2626. operand. The <date expression> can be all sorts of date strings, see the
  2627. \fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
  2628. .IP "chgrp group file"
  2629. The chgrp command sets the group ID of the file named by the file operand to
  2630. the group ID specified by the group operand. The group operand is a decimal
  2631. integer group ID.
  2632. .IP "chmod mode file"
  2633. The chmod command modifies the file mode bits of the specified file. The
  2634. mode operand is an octal integer mode number.
  2635. .IP "chown user file"
  2636. The chown command sets the owner of the file named by the file operand to the
  2637. user ID specified by the user operand. The user operand is a decimal
  2638. integer user ID.
  2639. .IP "ln source_file target_file"
  2640. The ln and symlink commands create a symbolic link at the target_file location
  2641. pointing to the source_file location.
  2642. .IP "mkdir directory_name"
  2643. The mkdir command creates the directory named by the directory_name operand.
  2644. .IP "mtime date file"
  2645. The mtime command sets the last modification time of the file named by the
  2646. file operand. The <date expression> can be all sorts of date strings, see the
  2647. \fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
  2648. .IP "pwd"
  2649. The pwd command returns the absolute pathname of the current working directory.
  2650. .IP "rename source target"
  2651. The rename command renames the file or directory named by the source
  2652. operand to the destination path named by the target operand.
  2653. .IP "rm file"
  2654. The rm command removes the file specified by the file operand.
  2655. .IP "rmdir directory"
  2656. The rmdir command removes the directory entry specified by the directory
  2657. operand, provided it is empty.
  2658. .IP "symlink source_file target_file"
  2659. See ln.
  2660. .RE
  2661. Example:
  2662. .nf
  2663. curl --quote "DELE file" ftp://example.com/foo
  2664. .fi
  2665. See also \fI-X, --request\fP.
  2666. .IP "\-\-random-file <file>"
  2667. Deprecated option. This option is ignored by curl since 7.84.0. Prior to that
  2668. it only had an effect on curl if built to use old versions of OpenSSL.
  2669. Specify the path name to file containing what will be considered as random
  2670. data. The data may be used to seed the random engine for SSL connections.
  2671. Example:
  2672. .nf
  2673. curl --random-file rubbish https://example.com
  2674. .fi
  2675. See also \fI--egd-file\fP.
  2676. .IP "\-r, \-\-range <range>"
  2677. (HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
  2678. server or a local FILE. Ranges can be specified in a number of ways.
  2679. .RS
  2680. .TP 10
  2681. .B 0-499
  2682. specifies the first 500 bytes
  2683. .TP
  2684. .B 500-999
  2685. specifies the second 500 bytes
  2686. .TP
  2687. .B \-500
  2688. specifies the last 500 bytes
  2689. .TP
  2690. .B 9500-
  2691. specifies the bytes from offset 9500 and forward
  2692. .TP
  2693. .B 0-0,-1
  2694. specifies the first and last byte only(*)(HTTP)
  2695. .TP
  2696. .B 100-199,500-599
  2697. specifies two separate 100-byte ranges(*) (HTTP)
  2698. .RE
  2699. .IP
  2700. (*) = NOTE that this will cause the server to reply with a multipart
  2701. response, which will be returned as-is by curl! Parsing or otherwise
  2702. transforming this response is the responsibility of the caller.
  2703. Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
  2704. \(aqstart-stop' range syntax. If a non-digit character is given in the range,
  2705. the server's response will be unspecified, depending on the server's
  2706. configuration.
  2707. You should also be aware that many HTTP/1.1 servers do not have this feature
  2708. enabled, so that when you attempt to get a range, you will instead get the
  2709. whole document.
  2710. FTP and SFTP range downloads only support the simple 'start-stop' syntax
  2711. (optionally with one of the numbers omitted). FTP use depends on the extended
  2712. FTP command SIZE.
  2713. If this option is used several times, the last one will be used.
  2714. Example:
  2715. .nf
  2716. curl --range 22-44 https://example.com
  2717. .fi
  2718. See also \fI-C, --continue-at\fP and \fI-a, --append\fP.
  2719. .IP "\-\-rate <max request rate>"
  2720. Specify the maximum transfer frequency you allow curl to use \- in number of
  2721. transfer starts per time unit (sometimes called request rate). Without this
  2722. option, curl will start the next transfer as fast as possible.
  2723. If given several URLs and a transfer completes faster than the allowed rate,
  2724. curl will wait until the next transfer is started to maintain the requested
  2725. rate. This option has no effect when \-\-parallel is used.
  2726. The request rate is provided as "N/U" where N is an integer number and U is a
  2727. time unit. Supported units are 's' (second), 'm' (minute), 'h' (hour) and 'd'
  2728. /(day, as in a 24 hour unit). The default time unit, if no "/U" is provided,
  2729. is number of transfers per hour.
  2730. If curl is told to allow 10 requests per minute, it will not start the next
  2731. request until 6 seconds have elapsed since the previous transfer was started.
  2732. This function uses millisecond resolution. If the allowed frequency is set
  2733. more than 1000 per second, it will instead run unrestricted.
  2734. When retrying transfers, enabled with \fI\-\-retry\fP, the separate retry delay logic
  2735. is used and not this setting.
  2736. If this option is used several times, the last one will be used.
  2737. Examples:
  2738. .nf
  2739. curl --rate 2/s https://example.com
  2740. curl --rate 3/h https://example.com
  2741. curl --rate 14/m https://example.com
  2742. .fi
  2743. See also \fI--limit-rate\fP and \fI--retry-delay\fP. Added in 7.84.0.
  2744. .IP "\-\-raw"
  2745. (HTTP) When used, it disables all internal HTTP decoding of content or transfer
  2746. encodings and instead makes them passed on unaltered, raw.
  2747. Example:
  2748. .nf
  2749. curl --raw https://example.com
  2750. .fi
  2751. See also \fI--tr-encoding\fP.
  2752. .IP "\-e, \-\-referer <URL>"
  2753. (HTTP) Sends the "Referrer Page" information to the HTTP server. This can also be set
  2754. with the \-\-header flag of course. When used with \-\-location you can append
  2755. \(dq;auto" to the \-\-referer URL to make curl automatically set the previous URL
  2756. when it follows a Location: header. The ";auto" string can be used alone,
  2757. even if you do not set an initial \fI\-e, \-\-referer\fP.
  2758. If this option is used several times, the last one will be used.
  2759. Examples:
  2760. .nf
  2761. curl --referer "https://fake.example" https://example.com
  2762. curl --referer "https://fake.example;auto" -L https://example.com
  2763. curl --referer ";auto" -L https://example.com
  2764. .fi
  2765. See also \fI-A, --user-agent\fP and \fI-H, --header\fP.
  2766. .IP "\-J, \-\-remote-header-name"
  2767. (HTTP) This option tells the \-\-remote-name option to use the server-specified
  2768. Content-Disposition filename instead of extracting a filename from the URL. If
  2769. the server-provided file name contains a path, that will be stripped off
  2770. before the file name is used.
  2771. The file is saved in the current directory, or in the directory specified with
  2772. \fI\-\-output-dir\fP.
  2773. If the server specifies a file name and a file with that name already exists
  2774. in the destination directory, it will not be overwritten and an error will
  2775. occur. If the server does not specify a file name then this option has no
  2776. effect.
  2777. There's no attempt to decode %-sequences (yet) in the provided file name, so
  2778. this option may provide you with rather unexpected file names.
  2779. \fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A
  2780. rogue server could send you the name of a DLL or other file that could be
  2781. loaded automatically by Windows or some third party software.
  2782. Example:
  2783. .nf
  2784. curl -OJ https://example.com/file
  2785. .fi
  2786. See also \fI-O, --remote-name\fP.
  2787. .IP "\-\-remote-name-all"
  2788. This option changes the default action for all given URLs to be dealt with as
  2789. if \-\-remote-name were used for each one. So if you want to disable that for a
  2790. specific URL after \-\-remote-name-all has been used, you must use "-o \-" or
  2791. \-\-no-remote-name.
  2792. Example:
  2793. .nf
  2794. curl --remote-name-all ftp://example.com/file1 ftp://example.com/file2
  2795. .fi
  2796. See also \fI-O, --remote-name\fP.
  2797. .IP "\-O, \-\-remote-name"
  2798. Write output to a local file named like the remote file we get. (Only the file
  2799. part of the remote file is used, the path is cut off.)
  2800. The file will be saved in the current working directory. If you want the file
  2801. saved in a different directory, make sure you change the current working
  2802. directory before invoking curl with this option or use \fI\-\-output-dir\fP.
  2803. The remote file name to use for saving is extracted from the given URL,
  2804. nothing else, and if it already exists it will be overwritten. If you want the
  2805. server to be able to choose the file name refer to \-\-remote-header-name which
  2806. can be used in addition to this option. If the server chooses a file name and
  2807. that name already exists it will not be overwritten.
  2808. There is no URL decoding done on the file name. If it has %20 or other URL
  2809. encoded parts of the name, they will end up as-is as file name.
  2810. You may use this option as many times as the number of URLs you have.
  2811. Example:
  2812. .nf
  2813. curl -O https://example.com/filename
  2814. .fi
  2815. See also \fI--remote-name-all\fP, \fI--output-dir\fP and \fI-J, --remote-header-name\fP.
  2816. .IP "\-R, \-\-remote-time"
  2817. When used, this will make curl attempt to figure out the timestamp of the
  2818. remote file, and if that is available make the local file get that same
  2819. timestamp.
  2820. Example:
  2821. .nf
  2822. curl --remote-time -o foo https://example.com
  2823. .fi
  2824. See also \fI-O, --remote-name\fP and \fI-z, --time-cond\fP.
  2825. .IP "\-\-remove-on-error"
  2826. When curl returns an error when told to save output in a local file, this
  2827. option removes that saved file before exiting. This prevents curl from
  2828. leaving a partial file in the case of an error during transfer.
  2829. If the output is not a file, this option has no effect.
  2830. Example:
  2831. .nf
  2832. curl --remove-on-error -o output https://example.com
  2833. .fi
  2834. See also \fI-f, --fail\fP. Added in 7.83.0.
  2835. .IP "\-\-request-target <path>"
  2836. (HTTP) Tells curl to use an alternative "target" (path) instead of using the path as
  2837. provided in the URL. Particularly useful when wanting to issue HTTP requests
  2838. without leading slash or other data that does not follow the regular URL
  2839. pattern, like "OPTIONS *".
  2840. Example:
  2841. .nf
  2842. curl --request-target "*" -X OPTIONS https://example.com
  2843. .fi
  2844. See also \fI-X, --request\fP. Added in 7.55.0.
  2845. .IP "\-X, \-\-request <method>"
  2846. (HTTP) Specifies a custom request method to use when communicating with the
  2847. HTTP server. The specified request method will be used instead of the method
  2848. otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
  2849. details and explanations. Common additional HTTP requests include PUT and
  2850. DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
  2851. more.
  2852. Normally you do not need this option. All sorts of GET, HEAD, POST and PUT
  2853. requests are rather invoked by using dedicated command line options.
  2854. This option only changes the actual word used in the HTTP request, it does not
  2855. alter the way curl behaves. So for example if you want to make a proper HEAD
  2856. request, using \-X HEAD will not suffice. You need to use the \-\-head option.
  2857. The method string you set with \-\-request will be used for all requests, which
  2858. if you for example use \-\-location may cause unintended side-effects when curl
  2859. does not change request method according to the HTTP 30x response codes \- and
  2860. similar.
  2861. (FTP)
  2862. Specifies a custom FTP command to use instead of LIST when doing file lists
  2863. with FTP.
  2864. (POP3)
  2865. Specifies a custom POP3 command to use instead of LIST or RETR.
  2866. (IMAP)
  2867. Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
  2868. (SMTP)
  2869. Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
  2870. If this option is used several times, the last one will be used.
  2871. Examples:
  2872. .nf
  2873. curl -X "DELETE" https://example.com
  2874. curl -X NLST ftp://example.com/
  2875. .fi
  2876. See also \fI--request-target\fP.
  2877. .IP "\-\-resolve <[+]host:port:addr[,addr]...>"
  2878. Provide a custom address for a specific host and port pair. Using this, you
  2879. can make the curl requests(s) use a specified address and prevent the
  2880. otherwise normally resolved address to be used. Consider it a sort of
  2881. /etc/hosts alternative provided on the command line. The port number should be
  2882. the number used for the specific protocol the host will be used for. It means
  2883. you need several entries if you want to provide address for the same host but
  2884. different ports.
  2885. By specifying '*' as host you can tell curl to resolve any host and specific
  2886. port pair to the specified address. Wildcard is resolved last so any \-\-resolve
  2887. with a specific host and port will be used first.
  2888. The provided address set by this option will be used even if \-\-ipv4 or \-\-ipv6
  2889. is set to make curl use another IP version.
  2890. By prefixing the host with a '+' you can make the entry time out after curl's
  2891. default timeout (1 minute). Note that this will only make sense for long
  2892. running parallel transfers with a lot of files. In such cases, if this option
  2893. is used curl will try to resolve the host as it normally would once the
  2894. timeout has expired.
  2895. Support for providing the IP address within [brackets] was added in 7.57.0.
  2896. Support for providing multiple IP addresses per entry was added in 7.59.0.
  2897. Support for resolving with wildcard was added in 7.64.0.
  2898. Support for the '+' prefix was was added in 7.75.0.
  2899. This option can be used many times to add many host names to resolve.
  2900. Example:
  2901. .nf
  2902. curl --resolve example.com:443:127.0.0.1 https://example.com
  2903. .fi
  2904. See also \fI--connect-to\fP and \fI--alt-svc\fP.
  2905. .IP "\-\-retry-all-errors"
  2906. Retry on any error. This option is used together with \fI\-\-retry\fP.
  2907. This option is the "sledgehammer" of retrying. Do not use this option by
  2908. default (eg in curlrc), there may be unintended consequences such as sending or
  2909. receiving duplicate data. Do not use with redirected input or output. You'd be
  2910. much better off handling your unique problems in shell script. Please read the
  2911. example below.
  2912. \fBWARNING\fP: For server compatibility curl attempts to retry failed flaky
  2913. transfers as close as possible to how they were started, but this is not
  2914. possible with redirected input or output. For example, before retrying it
  2915. removes output data from a failed partial transfer that was written to an
  2916. output file. However this is not true of data redirected to a | pipe or >
  2917. file, which are not reset. We strongly suggest you do not parse or record
  2918. output via redirect in combination with this option, since you may receive
  2919. duplicate data.
  2920. By default curl will not error on an HTTP response code that indicates an HTTP
  2921. error, if the transfer was successful. For example, if a server replies 404
  2922. Not Found and the reply is fully received then that is not an error. When
  2923. \-\-retry is used then curl will retry on some HTTP response codes that indicate
  2924. transient HTTP errors, but that does not include most 4xx response codes such
  2925. as 404. If you want to retry on all response codes that indicate HTTP errors
  2926. (4xx and 5xx) then combine with \fI\-f, \-\-fail\fP.
  2927. Example:
  2928. .nf
  2929. curl --retry 5 --retry-all-errors https://example.com
  2930. .fi
  2931. See also \fI--retry\fP. Added in 7.71.0.
  2932. .IP "\-\-retry-connrefused"
  2933. In addition to the other conditions, consider ECONNREFUSED as a transient
  2934. error too for \fI\-\-retry\fP. This option is used together with \-\-retry.
  2935. Example:
  2936. .nf
  2937. curl --retry-connrefused --retry https://example.com
  2938. .fi
  2939. See also \fI--retry\fP and \fI--retry-all-errors\fP. Added in 7.52.0.
  2940. .IP "\-\-retry-delay <seconds>"
  2941. Make curl sleep this amount of time before each retry when a transfer has
  2942. failed with a transient error (it changes the default backoff time algorithm
  2943. between retries). This option is only interesting if \-\-retry is also
  2944. used. Setting this delay to zero will make curl use the default backoff time.
  2945. If this option is used several times, the last one will be used.
  2946. Example:
  2947. .nf
  2948. curl --retry-delay 5 --retry https://example.com
  2949. .fi
  2950. See also \fI--retry\fP.
  2951. .IP "\-\-retry-max-time <seconds>"
  2952. The retry timer is reset before the first transfer attempt. Retries will be
  2953. done as usual (see \fI\-\-retry\fP) as long as the timer has not reached this given
  2954. limit. Notice that if the timer has not reached the limit, the request will be
  2955. made and while performing, it may take longer than this given time period. To
  2956. limit a single request's maximum time, use \fI\-m, \-\-max-time\fP. Set this option to
  2957. zero to not timeout retries.
  2958. If this option is used several times, the last one will be used.
  2959. Example:
  2960. .nf
  2961. curl --retry-max-time 30 --retry 10 https://example.com
  2962. .fi
  2963. See also \fI--retry\fP.
  2964. .IP "\-\-retry <num>"
  2965. If a transient error is returned when curl tries to perform a transfer, it
  2966. will retry this number of times before giving up. Setting the number to 0
  2967. makes curl do no retries (which is the default). Transient error means either:
  2968. a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
  2969. response code.
  2970. When curl is about to retry a transfer, it will first wait one second and then
  2971. for all forthcoming retries it will double the waiting time until it reaches
  2972. 10 minutes which then will be the delay between the rest of the retries. By
  2973. using \-\-retry-delay you disable this exponential backoff algorithm. See also
  2974. \-\-retry-max-time to limit the total time allowed for retries.
  2975. Since curl 7.66.0, curl will comply with the Retry-After: response header if
  2976. one was present to know when to issue the next retry.
  2977. If this option is used several times, the last one will be used.
  2978. Example:
  2979. .nf
  2980. curl --retry 7 https://example.com
  2981. .fi
  2982. See also \fI--retry-max-time\fP.
  2983. .IP "\-\-sasl-authzid <identity>"
  2984. Use this authorization identity (authzid), during SASL PLAIN authentication,
  2985. in addition to the authentication identity (authcid) as specified by \fI\-u, \-\-user\fP.
  2986. If the option is not specified, the server will derive the authzid from the
  2987. authcid, but if specified, and depending on the server implementation, it may
  2988. be used to access another user's inbox, that the user has been granted access
  2989. to, or a shared mailbox for example.
  2990. Example:
  2991. .nf
  2992. curl --sasl-authzid zid imap://example.com/
  2993. .fi
  2994. See also \fI--login-options\fP. Added in 7.66.0.
  2995. .IP "\-\-sasl-ir"
  2996. Enable initial response in SASL authentication.
  2997. Example:
  2998. .nf
  2999. curl --sasl-ir imap://example.com/
  3000. .fi
  3001. See also \fI--sasl-authzid\fP. Added in 7.31.0.
  3002. .IP "\-\-service-name <name>"
  3003. This option allows you to change the service name for SPNEGO.
  3004. Examples: \fI\-\-negotiate\fP \-\-service-name sockd would use sockd/server-name.
  3005. Example:
  3006. .nf
  3007. curl --service-name sockd/server https://example.com
  3008. .fi
  3009. See also \fI--negotiate\fP and \fI--proxy-service-name\fP. Added in 7.43.0.
  3010. .IP "\-S, \-\-show-error"
  3011. When used with \fI\-s, \-\-silent\fP, it makes curl show an error message if it fails.
  3012. This option is global and does not need to be specified for each use of
  3013. \fI\-:, \-\-next\fP.
  3014. Example:
  3015. .nf
  3016. curl --show-error --silent https://example.com
  3017. .fi
  3018. See also \fI--no-progress-meter\fP.
  3019. .IP "\-s, \-\-silent"
  3020. Silent or quiet mode. Do not show progress meter or error messages. Makes Curl
  3021. mute. It will still output the data you ask for, potentially even to the
  3022. terminal/stdout unless you redirect it.
  3023. Use \-\-show-error in addition to this option to disable progress meter but
  3024. still show error messages.
  3025. Example:
  3026. .nf
  3027. curl -s https://example.com
  3028. .fi
  3029. See also \fI-v, --verbose\fP, \fI--stderr\fP and \fI--no-progress-meter\fP.
  3030. .IP "\-\-socks4 <host[:port]>"
  3031. Use the specified SOCKS4 proxy. If the port number is not specified, it is
  3032. assumed at port 1080. Using this socket type make curl resolve the host name
  3033. and passing the address on to the proxy.
  3034. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3035. socks4://localhost/path/to/socket.sock
  3036. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3037. exclusive.
  3038. This option is superfluous since you can specify a socks4 proxy with \-\-proxy
  3039. using a socks4:// protocol prefix.
  3040. Since 7.52.0, \-\-preproxy can be used to specify a SOCKS proxy at the same time
  3041. \-\-proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
  3042. the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
  3043. If this option is used several times, the last one will be used.
  3044. Example:
  3045. .nf
  3046. curl --socks4 hostname:4096 https://example.com
  3047. .fi
  3048. See also \fI--socks4a\fP, \fI--socks5\fP and \fI--socks5-hostname\fP.
  3049. .IP "\-\-socks4a <host[:port]>"
  3050. Use the specified SOCKS4a proxy. If the port number is not specified, it is
  3051. assumed at port 1080. This asks the proxy to resolve the host name.
  3052. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3053. socks4a://localhost/path/to/socket.sock
  3054. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3055. exclusive.
  3056. This option is superfluous since you can specify a socks4a proxy with \-\-proxy
  3057. using a socks4a:// protocol prefix.
  3058. Since 7.52.0, \-\-preproxy can be used to specify a SOCKS proxy at the same time
  3059. \-\-proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
  3060. the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
  3061. If this option is used several times, the last one will be used.
  3062. Example:
  3063. .nf
  3064. curl --socks4a hostname:4096 https://example.com
  3065. .fi
  3066. See also \fI--socks4\fP, \fI--socks5\fP and \fI--socks5-hostname\fP.
  3067. .IP "\-\-socks5-basic"
  3068. Tells curl to use username/password authentication when connecting to a SOCKS5
  3069. proxy. The username/password authentication is enabled by default. Use
  3070. \-\-socks5-gssapi to force GSS-API authentication to SOCKS5 proxies.
  3071. Example:
  3072. .nf
  3073. curl --socks5-basic --socks5 hostname:4096 https://example.com
  3074. .fi
  3075. See also \fI--socks5\fP. Added in 7.55.0.
  3076. .IP "\-\-socks5-gssapi-nec"
  3077. As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
  3078. says in section 4.3/4.4 it should be protected, but the NEC reference
  3079. implementation does not. The option \-\-socks5-gssapi-nec allows the
  3080. unprotected exchange of the protection mode negotiation.
  3081. Example:
  3082. .nf
  3083. curl --socks5-gssapi-nec --socks5 hostname:4096 https://example.com
  3084. .fi
  3085. See also \fI--socks5\fP.
  3086. .IP "\-\-socks5-gssapi-service <name>"
  3087. The default service name for a socks server is rcmd/server-fqdn. This option
  3088. allows you to change it.
  3089. Examples: \-\-socks5 proxy-name \-\-socks5-gssapi-service sockd would use
  3090. sockd/proxy-name \-\-socks5 proxy-name \-\-socks5-gssapi-service sockd/real-name
  3091. would use sockd/real-name for cases where the proxy-name does not match the
  3092. principal name.
  3093. Example:
  3094. .nf
  3095. curl --socks5-gssapi-service sockd --socks5 hostname:4096 https://example.com
  3096. .fi
  3097. See also \fI--socks5\fP.
  3098. .IP "\-\-socks5-gssapi"
  3099. Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy.
  3100. The GSS-API authentication is enabled by default (if curl is compiled with
  3101. GSS-API support). Use \-\-socks5-basic to force username/password authentication
  3102. to SOCKS5 proxies.
  3103. Example:
  3104. .nf
  3105. curl --socks5-gssapi --socks5 hostname:4096 https://example.com
  3106. .fi
  3107. See also \fI--socks5\fP. Added in 7.55.0.
  3108. .IP "\-\-socks5-hostname <host[:port]>"
  3109. Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
  3110. the port number is not specified, it is assumed at port 1080.
  3111. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3112. socks5h://localhost/path/to/socket.sock
  3113. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3114. exclusive.
  3115. This option is superfluous since you can specify a socks5 hostname proxy with
  3116. \-\-proxy using a socks5h:// protocol prefix.
  3117. Since 7.52.0, \-\-preproxy can be used to specify a SOCKS proxy at the same time
  3118. \-\-proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
  3119. the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
  3120. If this option is used several times, the last one will be used.
  3121. Example:
  3122. .nf
  3123. curl --socks5-hostname proxy.example:7000 https://example.com
  3124. .fi
  3125. See also \fI--socks5\fP and \fI--socks4a\fP.
  3126. .IP "\-\-socks5 <host[:port]>"
  3127. Use the specified SOCKS5 proxy \- but resolve the host name locally. If the
  3128. port number is not specified, it is assumed at port 1080.
  3129. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3130. socks5://localhost/path/to/socket.sock
  3131. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3132. exclusive.
  3133. This option is superfluous since you can specify a socks5 proxy with \-\-proxy
  3134. using a socks5:// protocol prefix.
  3135. Since 7.52.0, \-\-preproxy can be used to specify a SOCKS proxy at the same time
  3136. \-\-proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
  3137. the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
  3138. If this option is used several times, the last one will be used.
  3139. This option (as well as \fI\-\-socks4\fP) does not work with IPV6, FTPS or LDAP.
  3140. Example:
  3141. .nf
  3142. curl --socks5 proxy.example:7000 https://example.com
  3143. .fi
  3144. See also \fI--socks5-hostname\fP and \fI--socks4a\fP.
  3145. .IP "\-Y, \-\-speed-limit <speed>"
  3146. If a transfer is slower than this given speed (in bytes per second) for
  3147. speed-time seconds it gets aborted. speed-time is set with \-\-speed-time and is
  3148. 30 if not set.
  3149. If this option is used several times, the last one will be used.
  3150. Example:
  3151. .nf
  3152. curl --speed-limit 300 --speed-time 10 https://example.com
  3153. .fi
  3154. See also \fI-y, --speed-time\fP, \fI--limit-rate\fP and \fI-m, --max-time\fP.
  3155. .IP "\-y, \-\-speed-time <seconds>"
  3156. If a transfer runs slower than speed-limit bytes per second during a speed-time
  3157. period, the transfer is aborted. If speed-time is used, the default
  3158. speed-limit will be 1 unless set with \fI\-Y, \-\-speed-limit\fP.
  3159. This option controls transfers (in both directions) but will not affect slow
  3160. connects etc. If this is a concern for you, try the \-\-connect-timeout option.
  3161. If this option is used several times, the last one will be used.
  3162. Example:
  3163. .nf
  3164. curl --speed-limit 300 --speed-time 10 https://example.com
  3165. .fi
  3166. See also \fI-Y, --speed-limit\fP and \fI--limit-rate\fP.
  3167. .IP "\-\-ssl-allow-beast"
  3168. This option tells curl to not work around a security flaw in the SSL3 and
  3169. TLS1.0 protocols known as BEAST. If this option is not used, the SSL layer
  3170. may use workarounds known to cause interoperability problems with some older
  3171. SSL implementations.
  3172. \fBWARNING\fP: this option loosens the SSL security, and by using this flag you
  3173. ask for exactly that.
  3174. Example:
  3175. .nf
  3176. curl --ssl-allow-beast https://example.com
  3177. .fi
  3178. See also \fI--proxy-ssl-allow-beast\fP and \fI-k, --insecure\fP.
  3179. .IP "\-\-ssl-auto-client-cert"
  3180. Tell libcurl to automatically locate and use a client certificate for
  3181. authentication, when requested by the server. This option is only supported
  3182. for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
  3183. default behavior in libcurl with Schannel. Since the server can request any
  3184. certificate that supports client authentication in the OS certificate store it
  3185. could be a privacy violation and unexpected.
  3186. Example:
  3187. .nf
  3188. curl --ssl-auto-client-cert https://example.com
  3189. .fi
  3190. See also \fI--proxy-ssl-auto-client-cert\fP. Added in 7.77.0.
  3191. .IP "\-\-ssl-no-revoke"
  3192. (Schannel) This option tells curl to disable certificate revocation checks.
  3193. WARNING: this option loosens the SSL security, and by using this flag you ask
  3194. for exactly that.
  3195. Example:
  3196. .nf
  3197. curl --ssl-no-revoke https://example.com
  3198. .fi
  3199. See also \fI--crlfile\fP. Added in 7.44.0.
  3200. .IP "\-\-ssl-reqd"
  3201. (FTP IMAP POP3 SMTP LDAP) Require SSL/TLS for the connection. Terminates the connection if the server
  3202. does not support SSL/TLS.
  3203. This option is handled in LDAP since version 7.81.0. It is fully supported
  3204. by the openldap backend and rejected by the generic ldap backend if explicit
  3205. TLS is required.
  3206. This option was formerly known as \-\-ftp-ssl-reqd.
  3207. Example:
  3208. .nf
  3209. curl --ssl-reqd ftp://example.com
  3210. .fi
  3211. See also \fI--ssl\fP and \fI-k, --insecure\fP.
  3212. .IP "\-\-ssl-revoke-best-effort"
  3213. (Schannel) This option tells curl to ignore certificate revocation checks when
  3214. they failed due to missing/offline distribution points for the revocation check
  3215. lists.
  3216. Example:
  3217. .nf
  3218. curl --ssl-revoke-best-effort https://example.com
  3219. .fi
  3220. See also \fI--crlfile\fP and \fI-k, --insecure\fP. Added in 7.70.0.
  3221. .IP "\-\-ssl"
  3222. (FTP IMAP POP3 SMTP LDAP) Try to use SSL/TLS for the connection. Reverts to a non-secure connection if
  3223. the server does not support SSL/TLS. See also \-\-ftp-ssl-control and \-\-ssl-reqd
  3224. for different levels of encryption required.
  3225. This option is handled in LDAP since version 7.81.0. It is fully supported
  3226. by the openldap backend and ignored by the generic ldap backend.
  3227. Please note that a server may close the connection if the negotiation does
  3228. not succeed.
  3229. This option was formerly known as \-\-ftp-ssl. That option
  3230. name can still be used but will be removed in a future version.
  3231. Example:
  3232. .nf
  3233. curl --ssl pop3://example.com/
  3234. .fi
  3235. See also \fI-k, --insecure\fP and \fI--ciphers\fP.
  3236. .IP "\-2, \-\-sslv2"
  3237. (SSL) This option previously asked curl to use SSLv2, but starting in curl 7.77.0
  3238. this instruction is ignored. SSLv2 is widely considered insecure (see RFC
  3239. 6176).
  3240. Example:
  3241. .nf
  3242. curl --sslv2 https://example.com
  3243. .fi
  3244. See also \fI--http1.1\fP and \fI--http2\fP. \fI-2, --sslv2\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI-3, --sslv3\fP and \fI-1, --tlsv1\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP.
  3245. .IP "\-3, \-\-sslv3"
  3246. (SSL) This option previously asked curl to use SSLv3, but starting in curl 7.77.0
  3247. this instruction is ignored. SSLv3 is widely considered insecure (see RFC
  3248. 7568).
  3249. Example:
  3250. .nf
  3251. curl --sslv3 https://example.com
  3252. .fi
  3253. See also \fI--http1.1\fP and \fI--http2\fP. \fI-3, --sslv3\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI-2, --sslv2\fP and \fI-1, --tlsv1\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP.
  3254. .IP "\-\-stderr <file>"
  3255. Redirect all writes to stderr to the specified file instead. If the file name
  3256. is a plain '-', it is instead written to stdout.
  3257. This option is global and does not need to be specified for each use of
  3258. \fI\-:, \-\-next\fP.
  3259. If this option is used several times, the last one will be used.
  3260. Example:
  3261. .nf
  3262. curl --stderr output.txt https://example.com
  3263. .fi
  3264. See also \fI-v, --verbose\fP and \fI-s, --silent\fP.
  3265. .IP "\-\-styled-output"
  3266. Enables the automatic use of bold font styles when writing HTTP headers to the
  3267. terminal. Use \-\-no-styled-output to switch them off.
  3268. This option is global and does not need to be specified for each use of
  3269. \fI\-:, \-\-next\fP.
  3270. Example:
  3271. .nf
  3272. curl --styled-output -I https://example.com
  3273. .fi
  3274. See also \fI-I, --head\fP and \fI-v, --verbose\fP. Added in 7.61.0.
  3275. .IP "\-\-suppress-connect-headers"
  3276. When \-\-proxytunnel is used and a CONNECT request is made do not output proxy
  3277. CONNECT response headers. This option is meant to be used with \-\-dump-header or
  3278. \-\-include which are used to show protocol headers in the output. It has no
  3279. effect on debug options such as \-\-verbose or \fI\-\-trace\fP, or any statistics.
  3280. Example:
  3281. .nf
  3282. curl --suppress-connect-headers --include -x proxy https://example.com
  3283. .fi
  3284. See also \fI-D, --dump-header\fP, \fI-i, --include\fP and \fI-p, --proxytunnel\fP. Added in 7.54.0.
  3285. .IP "\-\-tcp-fastopen"
  3286. Enable use of TCP Fast Open (RFC7413).
  3287. Example:
  3288. .nf
  3289. curl --tcp-fastopen https://example.com
  3290. .fi
  3291. See also \fI--false-start\fP. Added in 7.49.0.
  3292. .IP "\-\-tcp-nodelay"
  3293. Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
  3294. details about this option.
  3295. Since 7.50.2, curl sets this option by default and you need to explicitly
  3296. switch it off if you do not want it on.
  3297. Example:
  3298. .nf
  3299. curl --tcp-nodelay https://example.com
  3300. .fi
  3301. See also \fI-N, --no-buffer\fP.
  3302. .IP "\-t, \-\-telnet-option <opt=val>"
  3303. Pass options to the telnet protocol. Supported options are:
  3304. TTYPE=<term> Sets the terminal type.
  3305. XDISPLOC=<X display> Sets the X display location.
  3306. NEW_ENV=<var,val> Sets an environment variable.
  3307. Example:
  3308. .nf
  3309. curl -t TTYPE=vt100 telnet://example.com/
  3310. .fi
  3311. See also \fI-K, --config\fP.
  3312. .IP "\-\-tftp-blksize <value>"
  3313. (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that curl will
  3314. try to use when transferring data to or from a TFTP server. By default 512
  3315. bytes will be used.
  3316. If this option is used several times, the last one will be used.
  3317. Example:
  3318. .nf
  3319. curl --tftp-blksize 1024 tftp://example.com/file
  3320. .fi
  3321. See also \fI--tftp-no-options\fP.
  3322. .IP "\-\-tftp-no-options"
  3323. (TFTP) Tells curl not to send TFTP options requests.
  3324. This option improves interop with some legacy servers that do not acknowledge
  3325. or properly implement TFTP options. When this option is used \-\-tftp-blksize is
  3326. ignored.
  3327. Example:
  3328. .nf
  3329. curl --tftp-no-options tftp://192.168.0.1/
  3330. .fi
  3331. See also \fI--tftp-blksize\fP. Added in 7.48.0.
  3332. .IP "\-z, \-\-time-cond <time>"
  3333. (HTTP FTP) Request a file that has been modified later than the given time and date, or
  3334. one that has been modified before that time. The <date expression> can be all
  3335. sorts of date strings or if it does not match any internal ones, it is taken as
  3336. a filename and tries to get the modification date (mtime) from <file>
  3337. instead. See the \fIcurl_getdate(3)\fP man pages for date expression details.
  3338. Start the date expression with a dash (-) to make it request for a document
  3339. that is older than the given date/time, default is a document that is newer
  3340. than the specified date/time.
  3341. If this option is used several times, the last one will be used.
  3342. Examples:
  3343. .nf
  3344. curl -z "Wed 01 Sep 2021 12:18:00" https://example.com
  3345. curl -z "-Wed 01 Sep 2021 12:18:00" https://example.com
  3346. curl -z file https://example.com
  3347. .fi
  3348. See also \fI--etag-compare\fP and \fI-R, --remote-time\fP.
  3349. .IP "\-\-tls-max <VERSION>"
  3350. (SSL) VERSION defines maximum supported TLS version. The minimum acceptable version
  3351. is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3.
  3352. If the connection is done without TLS, this option has no effect. This
  3353. includes QUIC-using (HTTP/3) transfers.
  3354. .RS
  3355. .IP "default"
  3356. Use up to recommended TLS version.
  3357. .IP "1.0"
  3358. Use up to TLSv1.0.
  3359. .IP "1.1"
  3360. Use up to TLSv1.1.
  3361. .IP "1.2"
  3362. Use up to TLSv1.2.
  3363. .IP "1.3"
  3364. Use up to TLSv1.3.
  3365. .RE
  3366. Examples:
  3367. .nf
  3368. curl --tls-max 1.2 https://example.com
  3369. curl --tls-max 1.3 --tlsv1.2 https://example.com
  3370. .fi
  3371. See also \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, \fI--tlsv1.2\fP and \fI--tlsv1.3\fP. \fI--tls-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0.
  3372. .IP "\-\-tls13-ciphers <ciphersuite list>"
  3373. (TLS) Specifies which cipher suites to use in the connection if it negotiates TLS
  3374. 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3
  3375. cipher suite details on this URL:
  3376. .nf
  3377. https://curl.se/docs/ssl-ciphers.html
  3378. .fi
  3379. This option is currently used only when curl is built to use OpenSSL 1.1.1 or
  3380. later. If you are using a different SSL backend you can try setting TLS 1.3
  3381. cipher suites by using the \-\-ciphers option.
  3382. If this option is used several times, the last one will be used.
  3383. Example:
  3384. .nf
  3385. curl --tls13-ciphers TLS_AES_128_GCM_SHA256 https://example.com
  3386. .fi
  3387. See also \fI--ciphers\fP and \fI--curves\fP. Added in 7.61.0.
  3388. .IP "\-\-tlsauthtype <type>"
  3389. Set TLS authentication type. Currently, the only supported option is "SRP",
  3390. for TLS-SRP (RFC 5054). If \-\-tlsuser and \-\-tlspassword are specified but
  3391. \-\-tlsauthtype is not, then this option defaults to "SRP". This option works
  3392. only if the underlying libcurl is built with TLS-SRP support, which requires
  3393. OpenSSL or GnuTLS with TLS-SRP support.
  3394. Example:
  3395. .nf
  3396. curl --tlsauthtype SRP https://example.com
  3397. .fi
  3398. See also \fI--tlsuser\fP.
  3399. .IP "\-\-tlspassword <string>"
  3400. Set password for use with the TLS authentication method specified with
  3401. \fI\-\-tlsauthtype\fP. Requires that \-\-tlsuser also be set.
  3402. This option does not work with TLS 1.3.
  3403. Example:
  3404. .nf
  3405. curl --tlspassword pwd --tlsuser user https://example.com
  3406. .fi
  3407. See also \fI--tlsuser\fP.
  3408. .IP "\-\-tlsuser <name>"
  3409. Set username for use with the TLS authentication method specified with
  3410. \fI\-\-tlsauthtype\fP. Requires that \-\-tlspassword also is set.
  3411. This option does not work with TLS 1.3.
  3412. Example:
  3413. .nf
  3414. curl --tlspassword pwd --tlsuser user https://example.com
  3415. .fi
  3416. See also \fI--tlspassword\fP.
  3417. .IP "\-\-tlsv1.0"
  3418. (TLS) Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
  3419. In old versions of curl this option was documented to allow _only_ TLS 1.0.
  3420. That behavior was inconsistent depending on the TLS library. Use \-\-tls-max if
  3421. you want to set a maximum TLS version.
  3422. Example:
  3423. .nf
  3424. curl --tlsv1.0 https://example.com
  3425. .fi
  3426. See also \fI--tlsv1.3\fP. Added in 7.34.0.
  3427. .IP "\-\-tlsv1.1"
  3428. (TLS) Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server.
  3429. In old versions of curl this option was documented to allow _only_ TLS 1.1.
  3430. That behavior was inconsistent depending on the TLS library. Use \-\-tls-max if
  3431. you want to set a maximum TLS version.
  3432. Example:
  3433. .nf
  3434. curl --tlsv1.1 https://example.com
  3435. .fi
  3436. See also \fI--tlsv1.3\fP and \fI--tls-max\fP. Added in 7.34.0.
  3437. .IP "\-\-tlsv1.2"
  3438. (TLS) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server.
  3439. In old versions of curl this option was documented to allow _only_ TLS 1.2.
  3440. That behavior was inconsistent depending on the TLS library. Use \-\-tls-max if
  3441. you want to set a maximum TLS version.
  3442. Example:
  3443. .nf
  3444. curl --tlsv1.2 https://example.com
  3445. .fi
  3446. See also \fI--tlsv1.3\fP and \fI--tls-max\fP. Added in 7.34.0.
  3447. .IP "\-\-tlsv1.3"
  3448. (TLS) Forces curl to use TLS version 1.3 or later when connecting to a remote TLS
  3449. server.
  3450. If the connection is done without TLS, this option has no effect. This
  3451. includes QUIC-using (HTTP/3) transfers.
  3452. Note that TLS 1.3 is not supported by all TLS backends.
  3453. Example:
  3454. .nf
  3455. curl --tlsv1.3 https://example.com
  3456. .fi
  3457. See also \fI--tlsv1.2\fP and \fI--tls-max\fP. Added in 7.52.0.
  3458. .IP "\-1, \-\-tlsv1"
  3459. (SSL) Tells curl to use at least TLS version 1.x when negotiating with a remote TLS
  3460. server. That means TLS version 1.0 or higher
  3461. Example:
  3462. .nf
  3463. curl --tlsv1 https://example.com
  3464. .fi
  3465. See also \fI--http1.1\fP and \fI--http2\fP. \fI-1, --tlsv1\fP requires that the underlying libcurl was built to support TLS. This option is mutually exclusive to \fI--tlsv1.1\fP and \fI--tlsv1.2\fP and \fI--tlsv1.3\fP.
  3466. .IP "\-\-tr-encoding"
  3467. (HTTP) Request a compressed Transfer-Encoding response using one of the algorithms
  3468. curl supports, and uncompress the data while receiving it.
  3469. Example:
  3470. .nf
  3471. curl --tr-encoding https://example.com
  3472. .fi
  3473. See also \fI--compressed\fP.
  3474. .IP "\-\-trace-ascii <file>"
  3475. Enables a full trace dump of all incoming and outgoing data, including
  3476. descriptive information, to the given output file. Use "-" as filename to have
  3477. the output sent to stdout.
  3478. This is similar to \fI\-\-trace\fP, but leaves out the hex part and only shows the
  3479. ASCII part of the dump. It makes smaller output that might be easier to read
  3480. for untrained humans.
  3481. This option is global and does not need to be specified for each use of
  3482. \fI\-:, \-\-next\fP.
  3483. If this option is used several times, the last one will be used.
  3484. Example:
  3485. .nf
  3486. curl --trace-ascii log.txt https://example.com
  3487. .fi
  3488. See also \fI-v, --verbose\fP and \fI--trace\fP. This option is mutually exclusive to \fI--trace\fP and \fI-v, --verbose\fP.
  3489. .IP "\-\-trace-time"
  3490. Prepends a time stamp to each trace or verbose line that curl displays.
  3491. This option is global and does not need to be specified for each use of
  3492. \fI\-:, \-\-next\fP.
  3493. Example:
  3494. .nf
  3495. curl --trace-time --trace-ascii output https://example.com
  3496. .fi
  3497. See also \fI--trace\fP and \fI-v, --verbose\fP.
  3498. .IP "\-\-trace <file>"
  3499. Enables a full trace dump of all incoming and outgoing data, including
  3500. descriptive information, to the given output file. Use "-" as filename to have
  3501. the output sent to stdout. Use "%" as filename to have the output sent to
  3502. stderr.
  3503. This option is global and does not need to be specified for each use of
  3504. \fI\-:, \-\-next\fP.
  3505. If this option is used several times, the last one will be used.
  3506. Example:
  3507. .nf
  3508. curl --trace log.txt https://example.com
  3509. .fi
  3510. See also \fI--trace-ascii\fP and \fI--trace-time\fP. This option is mutually exclusive to \fI-v, --verbose\fP and \fI--trace-ascii\fP.
  3511. .IP "\-\-unix-socket <path>"
  3512. (HTTP) Connect through this Unix domain socket, instead of using the network.
  3513. Example:
  3514. .nf
  3515. curl --unix-socket socket-path https://example.com
  3516. .fi
  3517. See also \fI--abstract-unix-socket\fP. Added in 7.40.0.
  3518. .IP "\-T, \-\-upload-file <file>"
  3519. This transfers the specified local file to the remote URL. If there is no file
  3520. part in the specified URL, curl will append the local file name. NOTE that you
  3521. must use a trailing / on the last directory to really prove to Curl that there
  3522. is no file name or curl will think that your last directory name is the remote
  3523. file name to use. That will most likely cause the upload operation to fail. If
  3524. this is used on an HTTP(S) server, the PUT command will be used.
  3525. Use the file name "-" (a single dash) to use stdin instead of a given file.
  3526. Alternately, the file name "." (a single period) may be specified instead of
  3527. \(dq-" to use stdin in non-blocking mode to allow reading server output while
  3528. stdin is being uploaded.
  3529. You can specify one \-\-upload-file for each URL on the command line. Each
  3530. \fI\-T, \-\-upload-file\fP + URL pair specifies what to upload and to where. curl also
  3531. supports "globbing" of the \-\-upload-file argument, meaning that you can upload
  3532. multiple files to a single URL by using the same URL globbing style supported
  3533. in the URL.
  3534. When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322
  3535. formatted. It has to feature the necessary set of headers and mail body
  3536. formatted correctly by the user as curl will not transcode nor encode it
  3537. further in any way.
  3538. Examples:
  3539. .nf
  3540. curl -T file https://example.com
  3541. curl -T "img[1-1000].png" ftp://ftp.example.com/
  3542. curl --upload-file "{file1,file2}" https://example.com
  3543. .fi
  3544. See also \fI-G, --get\fP and \fI-I, --head\fP.
  3545. .IP "\-\-url <url>"
  3546. Specify a URL to fetch. This option is mostly handy when you want to specify
  3547. URL(s) in a config file.
  3548. If the given URL is missing a scheme name (such as "http://" or "ftp://" etc)
  3549. then curl will make a guess based on the host. If the outermost sub-domain
  3550. name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol will be
  3551. used, otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by
  3552. setting a default protocol, see \-\-proto-default for details.
  3553. This option may be used any number of times. To control where this URL is
  3554. written, use the \-\-output or the \-\-remote-name options.
  3555. \fBWARNING\fP: On Windows, particular file:// accesses can be converted to
  3556. network accesses by the operating system. Beware!
  3557. Example:
  3558. .nf
  3559. curl --url https://example.com
  3560. .fi
  3561. See also \fI-:, --next\fP and \fI-K, --config\fP.
  3562. .IP "\-B, \-\-use-ascii"
  3563. (FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that
  3564. ends with ";type=A". This option causes data sent to stdout to be in text mode
  3565. for win32 systems.
  3566. Example:
  3567. .nf
  3568. curl -B ftp://example.com/README
  3569. .fi
  3570. See also \fI--crlf\fP and \fI--data-ascii\fP.
  3571. .IP "\-A, \-\-user-agent <name>"
  3572. (HTTP) Specify the User-Agent string to send to the HTTP server. To encode blanks in
  3573. the string, surround the string with single quote marks. This header can also
  3574. be set with the \-\-header or the \-\-proxy-header options.
  3575. If you give an empty argument to \fI\-A, \-\-user-agent\fP (""), it will remove the header
  3576. completely from the request. If you prefer a blank header, you can set it to a
  3577. single space (" ").
  3578. If this option is used several times, the last one will be used.
  3579. Example:
  3580. .nf
  3581. curl -A "Agent 007" https://example.com
  3582. .fi
  3583. See also \fI-H, --header\fP and \fI--proxy-header\fP.
  3584. .IP "\-u, \-\-user <user:password>"
  3585. Specify the user name and password to use for server authentication. Overrides
  3586. \-\-netrc and \fI\-\-netrc-optional\fP.
  3587. If you simply specify the user name, curl will prompt for a password.
  3588. The user name and passwords are split up on the first colon, which makes it
  3589. impossible to use a colon in the user name with this option. The password can,
  3590. still.
  3591. On systems where it works, curl will hide the given option argument from
  3592. process listings. This is not enough to protect credentials from possibly
  3593. getting seen by other users on the same system as they will still be visible
  3594. for a moment before cleared. Such sensitive data should be retrieved from a
  3595. file instead or similar and never used in clear text in a command line.
  3596. When using Kerberos V5 with a Windows based server you should include the
  3597. Windows domain name in the user name, in order for the server to successfully
  3598. obtain a Kerberos Ticket. If you do not, then the initial authentication
  3599. handshake may fail.
  3600. When using NTLM, the user name can be specified simply as the user name,
  3601. without the domain, if there is a single domain and forest in your setup
  3602. for example.
  3603. To specify the domain name use either Down-Level Logon Name or UPN (User
  3604. Principal Name) formats. For example, EXAMPLE\\user and [email protected]
  3605. respectively.
  3606. If you use a Windows SSPI-enabled curl binary and perform Kerberos V5,
  3607. Negotiate, NTLM or Digest authentication then you can tell curl to select
  3608. the user name and password from your environment by specifying a single colon
  3609. with this option: "-u :".
  3610. If this option is used several times, the last one will be used.
  3611. Example:
  3612. .nf
  3613. curl -u user:secret https://example.com
  3614. .fi
  3615. See also \fI-n, --netrc\fP and \fI-K, --config\fP.
  3616. .IP "\-v, \-\-verbose"
  3617. Makes curl verbose during the operation. Useful for debugging and seeing
  3618. what's going on "under the hood". A line starting with '>' means "header data"
  3619. sent by curl, '<' means "header data" received by curl that is hidden in
  3620. normal cases, and a line starting with '*' means additional info provided by
  3621. curl.
  3622. If you only want HTTP headers in the output, \-\-include might be the option
  3623. you are looking for.
  3624. If you think this option still does not give you enough details, consider using
  3625. \-\-trace or \-\-trace-ascii instead.
  3626. This option is global and does not need to be specified for each use of
  3627. \fI\-:, \-\-next\fP.
  3628. Use \-\-silent to make curl really quiet.
  3629. Example:
  3630. .nf
  3631. curl --verbose https://example.com
  3632. .fi
  3633. See also \fI-i, --include\fP. This option is mutually exclusive to \fI--trace\fP and \fI--trace-ascii\fP.
  3634. .IP "\-V, \-\-version"
  3635. Displays information about curl and the libcurl version it uses.
  3636. The first line includes the full version of curl, libcurl and other 3rd party
  3637. libraries linked with the executable.
  3638. The second line (starts with "Protocols:") shows all protocols that libcurl
  3639. reports to support.
  3640. The third line (starts with "Features:") shows specific features libcurl
  3641. reports to offer. Available features include:
  3642. .RS
  3643. .IP "alt-svc"
  3644. Support for the Alt-Svc: header is provided.
  3645. .IP "AsynchDNS"
  3646. This curl uses asynchronous name resolves. Asynchronous name resolves can be
  3647. done using either the c-ares or the threaded resolver backends.
  3648. .IP "brotli"
  3649. Support for automatic brotli compression over HTTP(S).
  3650. .IP "CharConv"
  3651. curl was built with support for character set conversions (like EBCDIC)
  3652. .IP "Debug"
  3653. This curl uses a libcurl built with Debug. This enables more error-tracking
  3654. and memory debugging etc. For curl-developers only!
  3655. .IP "gsasl"
  3656. The built-in SASL authentication includes extensions to support SCRAM because
  3657. libcurl was built with libgsasl.
  3658. .IP "GSS-API"
  3659. GSS-API is supported.
  3660. .IP "HSTS"
  3661. HSTS support is present.
  3662. .IP "HTTP2"
  3663. HTTP/2 support has been built-in.
  3664. .IP "HTTP3"
  3665. HTTP/3 support has been built-in.
  3666. .IP "HTTPS-proxy"
  3667. This curl is built to support HTTPS proxy.
  3668. .IP "IDN"
  3669. This curl supports IDN \- international domain names.
  3670. .IP "IPv6"
  3671. You can use IPv6 with this.
  3672. .IP "Kerberos"
  3673. Kerberos V5 authentication is supported.
  3674. .IP "Largefile"
  3675. This curl supports transfers of large files, files larger than 2GB.
  3676. .IP "libz"
  3677. Automatic decompression (via gzip, deflate) of compressed files over HTTP is
  3678. supported.
  3679. .IP "MultiSSL"
  3680. This curl supports multiple TLS backends.
  3681. .IP "NTLM"
  3682. NTLM authentication is supported.
  3683. .IP "NTLM_WB"
  3684. NTLM delegation to winbind helper is supported.
  3685. .IP "PSL"
  3686. PSL is short for Public Suffix List and means that this curl has been built
  3687. with knowledge about "public suffixes".
  3688. .IP "SPNEGO"
  3689. SPNEGO authentication is supported.
  3690. .IP "SSL"
  3691. SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S
  3692. and so on.
  3693. .IP "SSPI"
  3694. SSPI is supported.
  3695. .IP "TLS-SRP"
  3696. SRP (Secure Remote Password) authentication is supported for TLS.
  3697. .IP "TrackMemory"
  3698. Debug memory tracking is supported.
  3699. .IP "Unicode"
  3700. Unicode support on Windows.
  3701. .IP "UnixSockets"
  3702. Unix sockets support is provided.
  3703. .IP "zstd"
  3704. Automatic decompression (via zstd) of compressed files over HTTP is supported.
  3705. .RE
  3706. Example:
  3707. .nf
  3708. curl --version
  3709. .fi
  3710. See also \fI-h, --help\fP and \fI-M, --manual\fP.
  3711. .IP "\-w, \-\-write-out <format>"
  3712. Make curl display information on stdout after a completed transfer. The format
  3713. is a string that may contain plain text mixed with any number of
  3714. variables. The format can be specified as a literal "string", or you can have
  3715. curl read the format from a file with "@filename" and to tell curl to read the
  3716. format from stdin you write "@-".
  3717. The variables present in the output format will be substituted by the value or
  3718. text that curl thinks fit, as described below. All variables are specified as
  3719. %{variable_name} and to output a normal % you just write them as %%. You can
  3720. output a newline by using \\n, a carriage return with \\r and a tab space with
  3721. \\t.
  3722. The output will be written to standard output, but this can be switched to
  3723. standard error by using %{stderr}.
  3724. Output HTTP headers from the most recent request by using \fB%header{name}\fP
  3725. where \fBname\fP is the case insensitive name of the header (without the
  3726. trailing colon). The header contents are exactly as sent over the network,
  3727. with leading and trailing whitespace trimmed. Added in curl 7.84.0.
  3728. .B NOTE:
  3729. The %-symbol is a special symbol in the win32-environment, where all
  3730. occurrences of % must be doubled when using this option.
  3731. The variables available are:
  3732. .RS
  3733. .TP 15
  3734. .B content_type
  3735. The Content-Type of the requested document, if there was any.
  3736. .TP
  3737. .B errormsg
  3738. The error message. (Added in 7.75.0)
  3739. .TP
  3740. .B exitcode
  3741. The numerical exitcode of the transfer. (Added in 7.75.0)
  3742. .TP
  3743. .B filename_effective
  3744. The ultimate filename that curl writes out to. This is only meaningful if curl
  3745. is told to write to a file with the \-\-remote-name or \-\-output
  3746. option. It's most useful in combination with the \-\-remote-header-name
  3747. option.
  3748. .TP
  3749. .B ftp_entry_path
  3750. The initial path curl ended up in when logging on to the remote FTP
  3751. server.
  3752. .TP
  3753. .B header_json
  3754. A JSON object with all HTTP response headers from the recent transfer. Values
  3755. are provided as arrays, since in the case of multiple headers there can be
  3756. multiple values.
  3757. The header names provided in lowercase, listed in order of appearance over the
  3758. wire. Except for duplicated headers. They are grouped on the first occurrence
  3759. of that header, each value is presented in the JSON array.
  3760. .TP
  3761. .B http_code
  3762. The numerical response code that was found in the last retrieved HTTP(S) or
  3763. FTP(s) transfer.
  3764. .TP
  3765. .B http_connect
  3766. The numerical code that was found in the last response (from a proxy) to a
  3767. curl CONNECT request.
  3768. .TP
  3769. .B http_version
  3770. The http version that was effectively used. (Added in 7.50.0)
  3771. .TP
  3772. .B json
  3773. A JSON object with all available keys.
  3774. .TP
  3775. .B local_ip
  3776. The IP address of the local end of the most recently done connection \- can be
  3777. either IPv4 or IPv6.
  3778. .TP
  3779. .B local_port
  3780. The local port number of the most recently done connection.
  3781. .TP
  3782. .B method
  3783. The http method used in the most recent HTTP request. (Added in 7.72.0)
  3784. .TP
  3785. .B num_connects
  3786. Number of new connects made in the recent transfer.
  3787. .TP
  3788. .B num_headers
  3789. The number of response headers in the most recent request (restarted at each
  3790. redirect). Note that the status line IS NOT a header. (Added in 7.73.0)
  3791. .TP
  3792. .B num_redirects
  3793. Number of redirects that were followed in the request.
  3794. .TP
  3795. .B onerror
  3796. The rest of the output is only shown if the transfer returned a non-zero error
  3797. (Added in 7.75.0)
  3798. .TP
  3799. .B proxy_ssl_verify_result
  3800. The result of the HTTPS proxy's SSL peer certificate verification that was
  3801. requested. 0 means the verification was successful. (Added in 7.52.0)
  3802. .TP
  3803. .B redirect_url
  3804. When an HTTP request was made without \-\-location to follow redirects (or when
  3805. \-\-max-redirs is met), this variable will show the actual URL a redirect
  3806. \fIwould\fP have gone to.
  3807. .TP
  3808. .B referer
  3809. The Referer: header, if there was any. (Added in 7.76.0)
  3810. .TP
  3811. .B remote_ip
  3812. The remote IP address of the most recently done connection \- can be either
  3813. IPv4 or IPv6.
  3814. .TP
  3815. .B remote_port
  3816. The remote port number of the most recently done connection.
  3817. .TP
  3818. .B response_code
  3819. The numerical response code that was found in the last transfer (formerly
  3820. known as "http_code").
  3821. .TP
  3822. .B scheme
  3823. The URL scheme (sometimes called protocol) that was effectively used. (Added in 7.52.0)
  3824. .TP
  3825. .B size_download
  3826. The total amount of bytes that were downloaded. This is the size of the
  3827. body/data that was transferred, excluding headers.
  3828. .TP
  3829. .B size_header
  3830. The total amount of bytes of the downloaded headers.
  3831. .TP
  3832. .B size_request
  3833. The total amount of bytes that were sent in the HTTP request.
  3834. .TP
  3835. .B size_upload
  3836. The total amount of bytes that were uploaded. This is the size of the
  3837. body/data that was transferred, excluding headers.
  3838. .TP
  3839. .B speed_download
  3840. The average download speed that curl measured for the complete download. Bytes
  3841. per second.
  3842. .TP
  3843. .B speed_upload
  3844. The average upload speed that curl measured for the complete upload. Bytes per
  3845. second.
  3846. .TP
  3847. .B ssl_verify_result
  3848. The result of the SSL peer certificate verification that was requested. 0
  3849. means the verification was successful.
  3850. .TP
  3851. .B stderr
  3852. From this point on, the \-\-write-out output will be written to standard
  3853. error. (Added in 7.63.0)
  3854. .TP
  3855. .B stdout
  3856. From this point on, the \-\-write-out output will be written to standard output.
  3857. This is the default, but can be used to switch back after switching to stderr.
  3858. (Added in 7.63.0)
  3859. .TP
  3860. .B time_appconnect
  3861. The time, in seconds, it took from the start until the SSL/SSH/etc
  3862. connect/handshake to the remote host was completed.
  3863. .TP
  3864. .B time_connect
  3865. The time, in seconds, it took from the start until the TCP connect to the
  3866. remote host (or proxy) was completed.
  3867. .TP
  3868. .B time_namelookup
  3869. The time, in seconds, it took from the start until the name resolving was
  3870. completed.
  3871. .TP
  3872. .B time_pretransfer
  3873. The time, in seconds, it took from the start until the file transfer was just
  3874. about to begin. This includes all pre-transfer commands and negotiations that
  3875. are specific to the particular protocol(s) involved.
  3876. .TP
  3877. .B time_redirect
  3878. The time, in seconds, it took for all redirection steps including name lookup,
  3879. connect, pretransfer and transfer before the final transaction was
  3880. started. time_redirect shows the complete execution time for multiple
  3881. redirections.
  3882. .TP
  3883. .B time_starttransfer
  3884. The time, in seconds, it took from the start until the first byte was just
  3885. about to be transferred. This includes time_pretransfer and also the time the
  3886. server needed to calculate the result.
  3887. .TP
  3888. .B time_total
  3889. The total time, in seconds, that the full operation lasted.
  3890. .TP
  3891. .B url
  3892. The URL that was fetched. (Added in 7.75.0)
  3893. .TP
  3894. .B urlnum
  3895. The URL index number of this transfer, 0-indexed. De-globbed URLs share the
  3896. same index number as the origin globbed URL. (Added in 7.75.0)
  3897. .TP
  3898. .B url_effective
  3899. The URL that was fetched last. This is most meaningful if you have told curl
  3900. to follow location: headers.
  3901. .RE
  3902. .IP
  3903. If this option is used several times, the last one will be used.
  3904. Example:
  3905. .nf
  3906. curl -w '%{http_code}\\n' https://example.com
  3907. .fi
  3908. See also \fI-v, --verbose\fP and \fI-I, --head\fP.
  3909. .IP "\-\-xattr"
  3910. When saving output to a file, this option tells curl to store certain file
  3911. metadata in extended file attributes. Currently, the URL is stored in the
  3912. xdg.origin.url attribute and, for HTTP, the content type is stored in
  3913. the mime_type attribute. If the file system does not support extended
  3914. attributes, a warning is issued.
  3915. Example:
  3916. .nf
  3917. curl --xattr -o storage https://example.com
  3918. .fi
  3919. See also \fI-R, --remote-time\fP, \fI-w, --write-out\fP and \fI-v, --verbose\fP.
  3920. .SH FILES
  3921. .I ~/.curlrc
  3922. .RS
  3923. Default config file, see \-\-config for details.
  3924. .SH ENVIRONMENT
  3925. The environment variables can be specified in lower case or upper case. The
  3926. lower case version has precedence. http_proxy is an exception as it is only
  3927. available in lower case.
  3928. Using an environment variable to set the proxy has the same effect as using
  3929. the \-\-proxy option.
  3930. .IP "http_proxy [protocol://]<host>[:port]"
  3931. Sets the proxy server to use for HTTP.
  3932. .IP "HTTPS_PROXY [protocol://]<host>[:port]"
  3933. Sets the proxy server to use for HTTPS.
  3934. .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
  3935. Sets the proxy server to use for [url-protocol], where the protocol is a
  3936. protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
  3937. SMTP, LDAP, etc.
  3938. .IP "ALL_PROXY [protocol://]<host>[:port]"
  3939. Sets the proxy server to use if no protocol-specific proxy is set.
  3940. .IP "NO_PROXY <comma-separated list of hosts/domains>"
  3941. list of host names that should not go through any proxy. If set to an asterisk
  3942. \(aq*' only, it matches all hosts. Each name in this list is matched as either
  3943. a domain name which contains the hostname, or the hostname itself.
  3944. This environment variable disables use of the proxy even when specified with
  3945. the \-\-proxy option. That is
  3946. .B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
  3947. .B http://direct.example.com
  3948. accesses the target URL directly, and
  3949. .B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
  3950. .B http://somewhere.example.com
  3951. accesses the target URL through the proxy.
  3952. The list of host names can also be include numerical IP addresses, and IPv6
  3953. versions should then be given without enclosing brackets.
  3954. IPv6 numerical addresses are compared as strings, so they will only match if
  3955. the representations are the same: "::1" is the same as "::0:1" but they do not
  3956. match.
  3957. .IP "APPDATA <dir>"
  3958. On Windows, this variable is used when trying to find the home directory. If
  3959. the primary home variable are all unset.
  3960. .IP "COLUMNS <terminal width>"
  3961. If set, the specified number of characters will be used as the terminal width
  3962. when the alternative progress-bar is shown. If not set, curl will try to
  3963. figure it out using other ways.
  3964. .IP "CURL_CA_BUNDLE <file>"
  3965. If set, will be used as the \fI\-\-cacert\fP value.
  3966. .IP "CURL_HOME <dir>"
  3967. If set, is the first variable curl checks when trying to find its home
  3968. directory. If not set, it continues to check \fBXDG_CONFIG_HOME\fP.
  3969. .IP "CURL_SSL_BACKEND <TLS backend>"
  3970. If curl was built with support for "MultiSSL", meaning that it has built-in
  3971. support for more than one TLS backend, this environment variable can be set to
  3972. the case insensitive name of the particular backend to use when curl is
  3973. invoked. Setting a name that is not a built-in alternative will make curl
  3974. stay with the default.
  3975. SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
  3976. nss, openssl, rustls, schannel, secure-transport, wolfssl
  3977. .IP "HOME <dir>"
  3978. If set, this is used to find the home directory when that is needed. Like when
  3979. looking for the default .curlrc. \fBCURL_HOME\fP and \fBXDG_CONFIG_HOME\fP
  3980. have preference.
  3981. .IP "QLOGDIR <directory name>"
  3982. If curl was built with HTTP/3 support, setting this environment variable to a
  3983. local directory will make curl produce qlogs in that directory, using file
  3984. names named after the destination connection id (in hex). Do note that these
  3985. files can become rather large. Works with both QUIC backends.
  3986. .IP SHELL
  3987. Used on VMS when trying to detect if using a DCL or a "unix" shell.
  3988. .IP "SSL_CERT_DIR <dir>"
  3989. If set, will be used as the \fI\-\-capath\fP value.
  3990. .IP "SSL_CERT_FILE <path>"
  3991. If set, will be used as the \fI\-\-cacert\fP value.
  3992. .IP "SSLKEYLOGFILE <file name>"
  3993. If you set this environment variable to a file name, curl will store TLS
  3994. secrets from its connections in that file when invoked to enable you to
  3995. analyze the TLS traffic in real time using network analyzing tools such as
  3996. Wireshark. This works with the following TLS backends: OpenSSL, libressl,
  3997. BoringSSL, GnuTLS, NSS and wolfSSL.
  3998. .IP "USERPROFILE <dir>"
  3999. On Windows, this variable is used when trying to find the home directory. If
  4000. the other, primary, variable are all unset. If set, curl will use the path
  4001. \(dq$USERPROFILE\\Application Data".
  4002. .IP "XDG_CONFIG_HOME <dir>"
  4003. If \fBCURL_HOME\fP is not set, this variable is checked when looking for a
  4004. default .curlrc file.
  4005. .SH "PROXY PROTOCOL PREFIXES"
  4006. The proxy string may be specified with a protocol:// prefix to specify
  4007. alternative proxy protocols.
  4008. If no protocol is specified in the proxy string or if the string does not match
  4009. a supported one, the proxy will be treated as an HTTP proxy.
  4010. The supported proxy protocol prefixes are as follows:
  4011. .IP "http://"
  4012. Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
  4013. .IP "https://"
  4014. Makes it treated as an \fBHTTPS\fP proxy.
  4015. .IP "socks4://"
  4016. Makes it the equivalent of \-\-socks4
  4017. .IP "socks4a://"
  4018. Makes it the equivalent of \-\-socks4a
  4019. .IP "socks5://"
  4020. Makes it the equivalent of \-\-socks5
  4021. .IP "socks5h://"
  4022. Makes it the equivalent of \-\-socks5-hostname
  4023. .SH EXIT CODES
  4024. There are a bunch of different error codes and their corresponding error
  4025. messages that may appear under error conditions. At the time of this writing,
  4026. the exit codes are:
  4027. .IP 0
  4028. Success. The operation completed successfully according to the instructions.
  4029. .IP 1
  4030. Unsupported protocol. This build of curl has no support for this protocol.
  4031. .IP 2
  4032. Failed to initialize.
  4033. .IP 3
  4034. URL malformed. The syntax was not correct.
  4035. .IP 4
  4036. A feature or option that was needed to perform the desired request was not
  4037. enabled or was explicitly disabled at build-time. To make curl able to do
  4038. this, you probably need another build of libcurl.
  4039. .IP 5
  4040. Could not resolve proxy. The given proxy host could not be resolved.
  4041. .IP 6
  4042. Could not resolve host. The given remote host could not be resolved.
  4043. .IP 7
  4044. Failed to connect to host.
  4045. .IP 8
  4046. Weird server reply. The server sent data curl could not parse.
  4047. .IP 9
  4048. FTP access denied. The server denied login or denied access to the particular
  4049. resource or directory you wanted to reach. Most often you tried to change to a
  4050. directory that does not exist on the server.
  4051. .IP 10
  4052. FTP accept failed. While waiting for the server to connect back when an active
  4053. FTP session is used, an error code was sent over the control connection or
  4054. similar.
  4055. .IP 11
  4056. FTP weird PASS reply. Curl could not parse the reply sent to the PASS request.
  4057. .IP 12
  4058. During an active FTP session while waiting for the server to connect back to
  4059. curl, the timeout expired.
  4060. .IP 13
  4061. FTP weird PASV reply, Curl could not parse the reply sent to the PASV request.
  4062. .IP 14
  4063. FTP weird 227 format. Curl could not parse the 227-line the server sent.
  4064. .IP 15
  4065. FTP cannot use host. Could not resolve the host IP we got in the 227-line.
  4066. .IP 16
  4067. HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is
  4068. somewhat generic and can be one out of several problems, see the error message
  4069. for details.
  4070. .IP 17
  4071. FTP could not set binary. Could not change transfer method to binary.
  4072. .IP 18
  4073. Partial file. Only a part of the file was transferred.
  4074. .IP 19
  4075. FTP could not download/access the given file, the RETR (or similar) command
  4076. failed.
  4077. .IP 21
  4078. FTP quote error. A quote command returned error from the server.
  4079. .IP 22
  4080. HTTP page not retrieved. The requested URL was not found or returned another
  4081. error with the HTTP error code being 400 or above. This return code only
  4082. appears if \-\-fail is used.
  4083. .IP 23
  4084. Write error. Curl could not write data to a local filesystem or similar.
  4085. .IP 25
  4086. FTP could not STOR file. The server denied the STOR operation, used for FTP
  4087. uploading.
  4088. .IP 26
  4089. Read error. Various reading problems.
  4090. .IP 27
  4091. Out of memory. A memory allocation request failed.
  4092. .IP 28
  4093. Operation timeout. The specified time-out period was reached according to the
  4094. conditions.
  4095. .IP 30
  4096. FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
  4097. command, try doing a transfer using PASV instead!
  4098. .IP 31
  4099. FTP could not use REST. The REST command failed. This command is used for
  4100. resumed FTP transfers.
  4101. .IP 33
  4102. HTTP range error. The range "command" did not work.
  4103. .IP 34
  4104. HTTP post error. Internal post-request generation error.
  4105. .IP 35
  4106. SSL connect error. The SSL handshaking failed.
  4107. .IP 36
  4108. Bad download resume. Could not continue an earlier aborted download.
  4109. .IP 37
  4110. FILE could not read file. Failed to open the file. Permissions?
  4111. .IP 38
  4112. LDAP cannot bind. LDAP bind operation failed.
  4113. .IP 39
  4114. LDAP search failed.
  4115. .IP 41
  4116. Function not found. A required LDAP function was not found.
  4117. .IP 42
  4118. Aborted by callback. An application told curl to abort the operation.
  4119. .IP 43
  4120. Internal error. A function was called with a bad parameter.
  4121. .IP 45
  4122. Interface error. A specified outgoing interface could not be used.
  4123. .IP 47
  4124. Too many redirects. When following redirects, curl hit the maximum amount.
  4125. .IP 48
  4126. Unknown option specified to libcurl. This indicates that you passed a weird
  4127. option to curl that was passed on to libcurl and rejected. Read up in the
  4128. manual!
  4129. .IP 49
  4130. Malformed telnet option.
  4131. .IP 52
  4132. The server did not reply anything, which here is considered an error.
  4133. .IP 53
  4134. SSL crypto engine not found.
  4135. .IP 54
  4136. Cannot set SSL crypto engine as default.
  4137. .IP 55
  4138. Failed sending network data.
  4139. .IP 56
  4140. Failure in receiving network data.
  4141. .IP 58
  4142. Problem with the local certificate.
  4143. .IP 59
  4144. Could not use specified SSL cipher.
  4145. .IP 60
  4146. Peer certificate cannot be authenticated with known CA certificates.
  4147. .IP 61
  4148. Unrecognized transfer encoding.
  4149. .IP 63
  4150. Maximum file size exceeded.
  4151. .IP 64
  4152. Requested FTP SSL level failed.
  4153. .IP 65
  4154. Sending the data requires a rewind that failed.
  4155. .IP 66
  4156. Failed to initialise SSL Engine.
  4157. .IP 67
  4158. The user name, password, or similar was not accepted and curl failed to log in.
  4159. .IP 68
  4160. File not found on TFTP server.
  4161. .IP 69
  4162. Permission problem on TFTP server.
  4163. .IP 70
  4164. Out of disk space on TFTP server.
  4165. .IP 71
  4166. Illegal TFTP operation.
  4167. .IP 72
  4168. Unknown TFTP transfer ID.
  4169. .IP 73
  4170. File already exists (TFTP).
  4171. .IP 74
  4172. No such user (TFTP).
  4173. .IP 77
  4174. Problem reading the SSL CA cert (path? access rights?).
  4175. .IP 78
  4176. The resource referenced in the URL does not exist.
  4177. .IP 79
  4178. An unspecified error occurred during the SSH session.
  4179. .IP 80
  4180. Failed to shut down the SSL connection.
  4181. .IP 82
  4182. Could not load CRL file, missing or wrong format.
  4183. .IP 83
  4184. Issuer check failed.
  4185. .IP 84
  4186. The FTP PRET command failed.
  4187. .IP 85
  4188. Mismatch of RTSP CSeq numbers.
  4189. .IP 86
  4190. Mismatch of RTSP Session Identifiers.
  4191. .IP 87
  4192. Unable to parse FTP file list.
  4193. .IP 88
  4194. FTP chunk callback reported error.
  4195. .IP 89
  4196. No connection available, the session will be queued.
  4197. .IP 90
  4198. SSL public key does not matched pinned public key.
  4199. .IP 91
  4200. Invalid SSL certificate status.
  4201. .IP 92
  4202. Stream error in HTTP/2 framing layer.
  4203. .IP 93
  4204. An API function was called from inside a callback.
  4205. .IP 94
  4206. An authentication function returned an error.
  4207. .IP 95
  4208. A problem was detected in the HTTP/3 layer. This is somewhat generic and can
  4209. be one out of several problems, see the error message for details.
  4210. .IP 96
  4211. QUIC connection error. This error may be caused by an SSL library error. QUIC
  4212. is the protocol used for HTTP/3 transfers.
  4213. .IP XX
  4214. More error codes will appear here in future releases. The existing ones
  4215. are meant to never change.
  4216. .SH BUGS
  4217. If you experience any problems with curl, submit an issue in the project's bug
  4218. tracker on GitHub: https://github.com/curl/curl/issues
  4219. .SH AUTHORS / CONTRIBUTORS
  4220. Daniel Stenberg is the main author, but the whole list of contributors is
  4221. found in the separate THANKS file.
  4222. .SH WWW
  4223. https://curl.se
  4224. .SH "SEE ALSO"
  4225. .BR ftp (1),
  4226. .BR wget (1)