curl.1 207 KB

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