usage.h 207 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434
  1. /* DO NOT EDIT. This file is generated from usage.src.h */
  2. /* vi: set sw=8 ts=8: */
  3. /*
  4. * This file suffers from chronically incorrect tabification
  5. * of messages. Before editing this file:
  6. * 1. Switch you editor to 8-space tab mode.
  7. * 2. Do not use \t in messages, use real tab character.
  8. * 3. Start each source line with message as follows:
  9. * |<7 spaces>"text with tabs"....
  10. * or
  11. * |<5 spaces>"\ntext with tabs"....
  12. */
  13. #ifndef BB_USAGE_H
  14. #define BB_USAGE_H 1
  15. #define NOUSAGE_STR "\b"
  16. #if !ENABLE_USE_BB_CRYPT || ENABLE_USE_BB_CRYPT_SHA
  17. # define CRYPT_METHODS_HELP_STR "des,md5,sha256/512" \
  18. " (default "CONFIG_FEATURE_DEFAULT_PASSWD_ALGO")"
  19. #else
  20. # define CRYPT_METHODS_HELP_STR "des,md5" \
  21. " (default "CONFIG_FEATURE_DEFAULT_PASSWD_ALGO")"
  22. #endif
  23. #define ar_trivial_usage \
  24. "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" \
  25. #define ar_full_usage "\n\n" \
  26. "Extract or list FILES from an ar archive\n" \
  27. "\n -o Preserve original dates" \
  28. "\n -p Extract to stdout" \
  29. "\n -t List" \
  30. "\n -x Extract" \
  31. "\n -v Verbose" \
  32. #define uncompress_trivial_usage \
  33. "[-cf] [FILE]..." \
  34. #define uncompress_full_usage "\n\n" \
  35. "Decompress .Z file[s]\n" \
  36. "\n -c Write to stdout" \
  37. "\n -f Overwrite" \
  38. #define gunzip_trivial_usage \
  39. "[-cfkt] [FILE]..." \
  40. #define gunzip_full_usage "\n\n" \
  41. "Decompress FILEs (or stdin)\n" \
  42. "\n -c Write to stdout" \
  43. "\n -f Force" \
  44. "\n -k Keep input files" \
  45. "\n -t Test file integrity" \
  46. #define gunzip_example_usage \
  47. "$ ls -la /tmp/BusyBox*\n" \
  48. "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
  49. "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
  50. "$ ls -la /tmp/BusyBox*\n" \
  51. "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" \
  52. #define zcat_trivial_usage \
  53. "[FILE]..." \
  54. #define zcat_full_usage "\n\n" \
  55. "Decompress to stdout" \
  56. #define bunzip2_trivial_usage \
  57. "[-cfk] [FILE]..." \
  58. #define bunzip2_full_usage "\n\n" \
  59. "Decompress FILEs (or stdin)\n" \
  60. "\n -c Write to stdout" \
  61. "\n -f Force" \
  62. "\n -k Keep input files" \
  63. #define bzcat_trivial_usage \
  64. "[FILE]..." \
  65. #define bzcat_full_usage "\n\n" \
  66. "Decompress to stdout" \
  67. #define unlzma_trivial_usage \
  68. "[-cfk] [FILE]..." \
  69. #define unlzma_full_usage "\n\n" \
  70. "Decompress FILE (or stdin)\n" \
  71. "\n -c Write to stdout" \
  72. "\n -f Force" \
  73. "\n -k Keep input files" \
  74. #define lzma_trivial_usage \
  75. "-d [-cfk] [FILE]..." \
  76. #define lzma_full_usage "\n\n" \
  77. "Decompress FILE (or stdin)\n" \
  78. "\n -d Decompress" \
  79. "\n -c Write to stdout" \
  80. "\n -f Force" \
  81. "\n -k Keep input files" \
  82. #define lzcat_trivial_usage \
  83. "[FILE]..." \
  84. #define lzcat_full_usage "\n\n" \
  85. "Decompress to stdout" \
  86. #define unxz_trivial_usage \
  87. "[-cfk] [FILE]..." \
  88. #define unxz_full_usage "\n\n" \
  89. "Decompress FILE (or stdin)\n" \
  90. "\n -c Write to stdout" \
  91. "\n -f Force" \
  92. "\n -k Keep input files" \
  93. #define xz_trivial_usage \
  94. "-d [-cfk] [FILE]..." \
  95. #define xz_full_usage "\n\n" \
  96. "Decompress FILE (or stdin)\n" \
  97. "\n -d Decompress" \
  98. "\n -c Write to stdout" \
  99. "\n -f Force" \
  100. "\n -k Keep input files" \
  101. #define xzcat_trivial_usage \
  102. "[FILE]..." \
  103. #define xzcat_full_usage "\n\n" \
  104. "Decompress to stdout" \
  105. #define bzip2_trivial_usage \
  106. "[OPTIONS] [FILE]..." \
  107. #define bzip2_full_usage "\n\n" \
  108. "Compress FILEs (or stdin) with bzip2 algorithm\n" \
  109. "\n -1..9 Compression level" \
  110. IF_FEATURE_BZIP2_DECOMPRESS( \
  111. "\n -d Decompress" \
  112. "\n -t Test file integrity" \
  113. ) \
  114. "\n -c Write to stdout" \
  115. "\n -f Force" \
  116. "\n -k Keep input files" \
  117. #define cpio_trivial_usage \
  118. "[-dmvu] [-F FILE] [-R USER[:GRP]]" IF_FEATURE_CPIO_O(" [-H newc]") \
  119. " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]") \
  120. " [EXTR_FILE]..." \
  121. #define cpio_full_usage "\n\n" \
  122. "Extract (-i) or list (-t) files from a cpio archive" \
  123. IF_FEATURE_CPIO_O(", or" \
  124. "\ntake file list from stdin and create an archive (-o)" \
  125. IF_FEATURE_CPIO_P(" or copy files (-p)") \
  126. ) \
  127. "\n" \
  128. "\nMain operation mode:" \
  129. "\n -t List" \
  130. "\n -i Extract EXTR_FILEs (or all)" \
  131. IF_FEATURE_CPIO_O( \
  132. "\n -o Create (requires -H newc)" \
  133. ) \
  134. IF_FEATURE_CPIO_P( \
  135. "\n -p DIR Copy files to DIR" \
  136. ) \
  137. "\nOptions:" \
  138. "\n -d Make leading directories" \
  139. "\n -m Preserve mtime" \
  140. "\n -v Verbose" \
  141. "\n -u Overwrite" \
  142. "\n -F FILE Input (-t,-i,-p) or output (-o) file" \
  143. "\n -R USER[:GRP] Set owner of created files" \
  144. IF_FEATURE_CPIO_O( \
  145. "\n -H newc Archive format" \
  146. ) \
  147. #define dpkg_trivial_usage \
  148. "[-ilCPru] [-F OPT] PACKAGE" \
  149. #define dpkg_full_usage "\n\n" \
  150. "Install, remove and manage Debian packages\n" \
  151. IF_LONG_OPTS( \
  152. "\n -i,--install Install the package" \
  153. "\n -l,--list List of installed packages" \
  154. "\n --configure Configure an unpackaged package" \
  155. "\n -P,--purge Purge all files of a package" \
  156. "\n -r,--remove Remove all but the configuration files for a package" \
  157. "\n --unpack Unpack a package, but don't configure it" \
  158. "\n --force-depends Ignore dependency problems" \
  159. "\n --force-confnew Overwrite existing config files when installing" \
  160. "\n --force-confold Keep old config files when installing" \
  161. ) \
  162. IF_NOT_LONG_OPTS( \
  163. "\n -i Install the package" \
  164. "\n -l List of installed packages" \
  165. "\n -C Configure an unpackaged package" \
  166. "\n -P Purge all files of a package" \
  167. "\n -r Remove all but the configuration files for a package" \
  168. "\n -u Unpack a package, but don't configure it" \
  169. "\n -F depends Ignore dependency problems" \
  170. "\n -F confnew Overwrite existing config files when installing" \
  171. "\n -F confold Keep old config files when installing" \
  172. ) \
  173. #define dpkg_deb_trivial_usage \
  174. "[-cefxX] FILE [DIR]" \
  175. #define dpkg_deb_full_usage "\n\n" \
  176. "Perform actions on Debian packages (.deb)\n" \
  177. "\n -c List files" \
  178. "\n -f Print control fields" \
  179. "\n -e Extract control files to DIR (default: ./DEBIAN)" \
  180. "\n -x Extract files to DIR (no default)" \
  181. "\n -X Verbose -x" \
  182. #define dpkg_deb_example_usage \
  183. "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" \
  184. #define gzip_trivial_usage \
  185. "[-cfk" IF_FEATURE_GZIP_DECOMPRESS("dt") IF_FEATURE_GZIP_LEVELS("123456789") "] [FILE]..." \
  186. #define gzip_full_usage "\n\n" \
  187. "Compress FILEs (or stdin)\n" \
  188. IF_FEATURE_GZIP_LEVELS( \
  189. "\n -1..9 Compression level" \
  190. ) \
  191. IF_FEATURE_GZIP_DECOMPRESS( \
  192. "\n -d Decompress" \
  193. "\n -t Test file integrity" \
  194. ) \
  195. "\n -c Write to stdout" \
  196. "\n -f Force" \
  197. "\n -k Keep input files" \
  198. #define gzip_example_usage \
  199. "$ ls -la /tmp/busybox*\n" \
  200. "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
  201. "$ gzip /tmp/busybox.tar\n" \
  202. "$ ls -la /tmp/busybox*\n" \
  203. "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" \
  204. #define lzop_trivial_usage \
  205. "[-cfUvd123456789CF] [FILE]..." \
  206. #define lzop_full_usage "\n\n" \
  207. " -1..9 Compression level" \
  208. "\n -d Decompress" \
  209. "\n -c Write to stdout" \
  210. "\n -f Force" \
  211. "\n -U Delete input files" \
  212. "\n -v Verbose" \
  213. "\n -F Don't store or verify checksum" \
  214. "\n -C Also write checksum of compressed block" \
  215. #define lzopcat_trivial_usage \
  216. "[-vF] [FILE]..." \
  217. #define lzopcat_full_usage "\n\n" \
  218. " -v Verbose" \
  219. "\n -F Don't verify checksum" \
  220. #define unlzop_trivial_usage \
  221. "[-cfkvF] [FILE]..." \
  222. #define unlzop_full_usage "\n\n" \
  223. " -c Write to stdout" \
  224. "\n -f Force" \
  225. "\n -U Delete input files" \
  226. "\n -v Verbose" \
  227. "\n -F Don't verify checksum" \
  228. #define rpm_trivial_usage \
  229. "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm" \
  230. #define rpm_full_usage "\n\n" \
  231. "Manipulate RPM packages\n" \
  232. "\nCommands:" \
  233. "\n -i Install package" \
  234. "\n -qp Query package" \
  235. "\n -qpi Show information" \
  236. "\n -qpl List contents" \
  237. "\n -qpd List documents" \
  238. "\n -qpc List config files" \
  239. #define rpm2cpio_trivial_usage \
  240. "PACKAGE.rpm" \
  241. #define rpm2cpio_full_usage "\n\n" \
  242. "Output a cpio archive of the rpm file" \
  243. #define tar_trivial_usage \
  244. IF_FEATURE_TAR_CREATE("c|") "x|t [-" \
  245. IF_FEATURE_SEAMLESS_Z("Z") \
  246. IF_FEATURE_SEAMLESS_GZ("z") \
  247. IF_FEATURE_SEAMLESS_XZ("J") \
  248. IF_FEATURE_SEAMLESS_BZ2("j") \
  249. IF_FEATURE_SEAMLESS_LZMA("a") \
  250. IF_FEATURE_TAR_CREATE("h") \
  251. IF_FEATURE_TAR_NOPRESERVE_TIME("m") \
  252. "vO] " \
  253. "[-f TARFILE] [-C DIR] " \
  254. IF_FEATURE_TAR_FROM("[-T FILE] [-X FILE] "IF_FEATURE_TAR_LONG_OPTIONS("[--exclude PATTERN]... ")) \
  255. "[FILE]..." \
  256. #define tar_full_usage "\n\n" \
  257. IF_FEATURE_TAR_CREATE("Create, extract, ") \
  258. IF_NOT_FEATURE_TAR_CREATE("Extract ") \
  259. "or list files from a tar file\n" \
  260. "\nOperation:" \
  261. IF_FEATURE_TAR_CREATE( \
  262. "\n c Create" \
  263. ) \
  264. "\n x Extract" \
  265. "\n t List" \
  266. "\n -f FILE Name of TARFILE ('-' for stdin/out)" \
  267. "\n -C DIR Change to DIR before operation" \
  268. "\n -v Verbose" \
  269. IF_FEATURE_SEAMLESS_Z( \
  270. "\n -Z (De)compress using compress" \
  271. ) \
  272. IF_FEATURE_SEAMLESS_GZ( \
  273. "\n -z (De)compress using gzip" \
  274. ) \
  275. IF_FEATURE_SEAMLESS_XZ( \
  276. "\n -J (De)compress using xz" \
  277. ) \
  278. IF_FEATURE_SEAMLESS_BZ2( \
  279. "\n -j (De)compress using bzip2" \
  280. ) \
  281. IF_FEATURE_SEAMLESS_LZMA( \
  282. "\n -a (De)compress using lzma" \
  283. ) \
  284. "\n -O Extract to stdout" \
  285. IF_FEATURE_TAR_CREATE( \
  286. "\n -h Follow symlinks" \
  287. ) \
  288. IF_FEATURE_TAR_NOPRESERVE_TIME( \
  289. "\n -m Don't restore mtime" \
  290. ) \
  291. IF_FEATURE_TAR_FROM( \
  292. "\n -T FILE File with names to include" \
  293. "\n -X FILE File with glob patterns to exclude" \
  294. IF_FEATURE_TAR_LONG_OPTIONS( \
  295. "\n --exclude PATTERN Glob pattern to exclude" \
  296. ) \
  297. ) \
  298. #define tar_example_usage \
  299. "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
  300. "$ tar -cf /tmp/tarball.tar /usr/local\n" \
  301. #define unzip_trivial_usage \
  302. "[-lnojpq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]" \
  303. #define unzip_full_usage "\n\n" \
  304. "Extract FILEs from ZIP archive\n" \
  305. "\n -l List contents (with -q for short form)" \
  306. "\n -n Never overwrite files (default: ask)" \
  307. "\n -o Overwrite" \
  308. "\n -j Do not restore paths" \
  309. "\n -p Print to stdout" \
  310. "\n -q Quiet" \
  311. "\n -x FILE Exclude FILEs" \
  312. "\n -d DIR Extract into DIR" \
  313. #define chvt_trivial_usage \
  314. "N" \
  315. #define chvt_full_usage "\n\n" \
  316. "Change the foreground virtual terminal to /dev/ttyN" \
  317. #define clear_trivial_usage \
  318. "" \
  319. #define clear_full_usage "\n\n" \
  320. "Clear screen" \
  321. #define deallocvt_trivial_usage \
  322. "[N]" \
  323. #define deallocvt_full_usage "\n\n" \
  324. "Deallocate unused virtual terminal /dev/ttyN" \
  325. #define dumpkmap_trivial_usage \
  326. "> keymap" \
  327. #define dumpkmap_full_usage "\n\n" \
  328. "Print a binary keyboard translation table to stdout" \
  329. #define dumpkmap_example_usage \
  330. "$ dumpkmap > keymap\n" \
  331. #define fgconsole_trivial_usage \
  332. "" \
  333. #define fgconsole_full_usage "\n\n" \
  334. "Get active console" \
  335. #define kbd_mode_trivial_usage \
  336. "[-a|k|s|u] [-C TTY]" \
  337. #define kbd_mode_full_usage "\n\n" \
  338. "Report or set VT console keyboard mode\n" \
  339. "\n -a Default (ASCII)" \
  340. "\n -k Medium-raw (keycode)" \
  341. "\n -s Raw (scancode)" \
  342. "\n -u Unicode (utf-8)" \
  343. "\n -C TTY Affect TTY" \
  344. #define loadfont_trivial_usage \
  345. "< font" \
  346. #define loadfont_full_usage "\n\n" \
  347. "Load a console font from stdin" \
  348. #define loadfont_example_usage \
  349. "$ loadfont < /etc/i18n/fontname\n" \
  350. #define setfont_trivial_usage \
  351. "FONT [-m MAPFILE] [-C TTY]" \
  352. #define setfont_full_usage "\n\n" \
  353. "Load a console font\n" \
  354. "\n -m MAPFILE Load console screen map" \
  355. "\n -C TTY Affect TTY instead of /dev/tty" \
  356. #define setfont_example_usage \
  357. "$ setfont -m koi8-r /etc/i18n/fontname\n" \
  358. #define loadkmap_trivial_usage \
  359. "< keymap" \
  360. #define loadkmap_full_usage "\n\n" \
  361. "Load a binary keyboard translation table from stdin" \
  362. #define loadkmap_example_usage \
  363. "$ loadkmap < /etc/i18n/lang-keymap\n" \
  364. #define openvt_trivial_usage \
  365. "[-c N] [-sw] [PROG ARGS]" \
  366. #define openvt_full_usage "\n\n" \
  367. "Start PROG on a new virtual terminal\n" \
  368. "\n -c N Use specified VT" \
  369. "\n -s Switch to the VT" \
  370. "\n -w Wait for PROG to exit" \
  371. #define openvt_example_usage \
  372. "openvt 2 /bin/ash\n" \
  373. #define reset_trivial_usage \
  374. "" \
  375. #define reset_full_usage "\n\n" \
  376. "Reset the screen" \
  377. #define resize_trivial_usage \
  378. "" \
  379. #define resize_full_usage "\n\n" \
  380. "Resize the screen" \
  381. #define setconsole_trivial_usage \
  382. "[-r] [DEVICE]" \
  383. #define setconsole_full_usage "\n\n" \
  384. "Make writes to /dev/console appear on DEVICE (default: /dev/tty)." \
  385. "\n""Does not redirect kernel log output or reads from /dev/console." \
  386. "\n" \
  387. "\n"" -r Reset: writes to /dev/console go to kernel log tty(s)" \
  388. #define setkeycodes_trivial_usage \
  389. "{ SCANCODE KEYCODE }..." \
  390. #define setkeycodes_full_usage "\n\n" \
  391. "Modify kernel's scancode-to-keycode map,\n" \
  392. "allowing unusual keyboards to generate usable keycodes.\n\n" \
  393. "SCANCODE is either xx or e0xx (hexadecimal), KEYCODE is decimal." \
  394. #define setkeycodes_example_usage \
  395. "$ setkeycodes e030 127\n" \
  396. #define setlogcons_trivial_usage \
  397. "[N]" \
  398. #define setlogcons_full_usage "\n\n" \
  399. "Pin kernel output to VT console N. Default:0 (do not pin)" \
  400. #define showkey_trivial_usage \
  401. "[-a | -k | -s]" \
  402. #define showkey_full_usage "\n\n" \
  403. "Show keys pressed\n" \
  404. "\n -a Display decimal/octal/hex values of the keys" \
  405. "\n -k Display interpreted keycodes (default)" \
  406. "\n -s Display raw scan-codes" \
  407. #define basename_trivial_usage \
  408. "FILE [SUFFIX]" \
  409. #define basename_full_usage "\n\n" \
  410. "Strip directory path and .SUFFIX from FILE" \
  411. #define basename_example_usage \
  412. "$ basename /usr/local/bin/foo\n" \
  413. "foo\n" \
  414. "$ basename /usr/local/bin/\n" \
  415. "bin\n" \
  416. "$ basename /foo/bar.txt .txt\n" \
  417. "bar" \
  418. #if ENABLE_FEATURE_CATN || ENABLE_FEATURE_CATV \
  419. #define cat_trivial_usage \
  420. "[-" IF_FEATURE_CATN("nb") IF_FEATURE_CATV("vteA") "] [FILE]..." \
  421. #else \
  422. #define cat_trivial_usage \
  423. "[FILE]..." \
  424. #endif \
  425. #define cat_full_usage "\n\n" \
  426. "Print FILEs to stdout\n" \
  427. IF_FEATURE_CATN( \
  428. "\n -n Number output lines" \
  429. "\n -b Number nonempty lines" \
  430. ) \
  431. IF_FEATURE_CATV( \
  432. "\n -v Show nonprinting characters as ^x or M-x" \
  433. "\n -t ...and tabs as ^I" \
  434. "\n -e ...and end lines with $" \
  435. "\n -A Same as -vte" \
  436. ) \
  437. #define cat_example_usage \
  438. "$ cat /proc/uptime\n" \
  439. "110716.72 17.67" \
  440. #define chgrp_trivial_usage \
  441. "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..." \
  442. #define chgrp_full_usage "\n\n" \
  443. "Change the group membership of each FILE to GROUP\n" \
  444. "\n -R Recurse" \
  445. "\n -h Affect symlinks instead of symlink targets" \
  446. "\n -L Traverse all symlinks to directories" \
  447. "\n -H Traverse symlinks on command line only" \
  448. "\n -P Don't traverse symlinks (default)" \
  449. IF_DESKTOP( \
  450. "\n -c List changed files" \
  451. "\n -v Verbose" \
  452. "\n -f Hide errors" \
  453. ) \
  454. #define chgrp_example_usage \
  455. "$ ls -l /tmp/foo\n" \
  456. "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
  457. "$ chgrp root /tmp/foo\n" \
  458. "$ ls -l /tmp/foo\n" \
  459. "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" \
  460. #define chmod_trivial_usage \
  461. "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..." \
  462. #define chmod_full_usage "\n\n" \
  463. "Each MODE is one or more of the letters ugoa, one of the\n" \
  464. "symbols +-= and one or more of the letters rwxst\n" \
  465. "\n -R Recurse" \
  466. IF_DESKTOP( \
  467. "\n -c List changed files" \
  468. "\n -v List all files" \
  469. "\n -f Hide errors" \
  470. ) \
  471. #define chmod_example_usage \
  472. "$ ls -l /tmp/foo\n" \
  473. "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
  474. "$ chmod u+x /tmp/foo\n" \
  475. "$ ls -l /tmp/foo\n" \
  476. "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
  477. "$ chmod 444 /tmp/foo\n" \
  478. "$ ls -l /tmp/foo\n" \
  479. "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
  480. #define chown_trivial_usage \
  481. "[-Rh"IF_DESKTOP("LHPcvf")"]... USER[:[GRP]] FILE..." \
  482. #define chown_full_usage "\n\n" \
  483. "Change the owner and/or group of each FILE to USER and/or GRP\n" \
  484. "\n -R Recurse" \
  485. "\n -h Affect symlinks instead of symlink targets" \
  486. IF_DESKTOP( \
  487. "\n -L Traverse all symlinks to directories" \
  488. "\n -H Traverse symlinks on command line only" \
  489. "\n -P Don't traverse symlinks (default)" \
  490. "\n -c List changed files" \
  491. "\n -v List all files" \
  492. "\n -f Hide errors" \
  493. ) \
  494. #define chown_example_usage \
  495. "$ ls -l /tmp/foo\n" \
  496. "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
  497. "$ chown root /tmp/foo\n" \
  498. "$ ls -l /tmp/foo\n" \
  499. "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
  500. "$ chown root.root /tmp/foo\n" \
  501. "ls -l /tmp/foo\n" \
  502. "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
  503. #define chroot_trivial_usage \
  504. "NEWROOT [PROG ARGS]" \
  505. #define chroot_full_usage "\n\n" \
  506. "Run PROG with root directory set to NEWROOT" \
  507. #define chroot_example_usage \
  508. "$ ls -l /bin/ls\n" \
  509. "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
  510. "# mount /dev/hdc1 /mnt -t minix\n" \
  511. "# chroot /mnt\n" \
  512. "# ls -l /bin/ls\n" \
  513. "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n" \
  514. #define cksum_trivial_usage \
  515. "FILE..." \
  516. #define cksum_full_usage "\n\n" \
  517. "Calculate the CRC32 checksums of FILEs" \
  518. #define comm_trivial_usage \
  519. "[-123] FILE1 FILE2" \
  520. #define comm_full_usage "\n\n" \
  521. "Compare FILE1 with FILE2\n" \
  522. "\n -1 Suppress lines unique to FILE1" \
  523. "\n -2 Suppress lines unique to FILE2" \
  524. "\n -3 Suppress lines common to both files" \
  525. #define cp_trivial_usage \
  526. "[OPTIONS] SOURCE... DEST" \
  527. #define cp_full_usage "\n\n" \
  528. "Copy SOURCE(s) to DEST\n" \
  529. "\n -a Same as -dpR" \
  530. IF_SELINUX( \
  531. "\n -c Preserve security context" \
  532. ) \
  533. "\n -R,-r Recurse" \
  534. "\n -d,-P Preserve symlinks (default if -R)" \
  535. "\n -L Follow all symlinks" \
  536. "\n -H Follow symlinks on command line" \
  537. "\n -p Preserve file attributes if possible" \
  538. "\n -f Overwrite" \
  539. "\n -i Prompt before overwrite" \
  540. "\n -l,-s Create (sym)links" \
  541. "\n -T Treat DEST as a normal file" \
  542. "\n -u Copy only newer files" \
  543. #define cut_trivial_usage \
  544. "[OPTIONS] [FILE]..." \
  545. #define cut_full_usage "\n\n" \
  546. "Print selected fields from each input FILE to stdout\n" \
  547. "\n -b LIST Output only bytes from LIST" \
  548. "\n -c LIST Output only characters from LIST" \
  549. "\n -d CHAR Use CHAR instead of tab as the field delimiter" \
  550. "\n -s Output only the lines containing delimiter" \
  551. "\n -f N Print only these fields" \
  552. "\n -n Ignored" \
  553. #define cut_example_usage \
  554. "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
  555. "Hello\n" \
  556. "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
  557. "world\n" \
  558. #define date_trivial_usage \
  559. "[OPTIONS] [+FMT] [TIME]" \
  560. #define date_full_usage "\n\n" \
  561. "Display time (using +FMT), or set time\n" \
  562. IF_NOT_LONG_OPTS( \
  563. "\n [-s] TIME Set time to TIME" \
  564. "\n -u Work in UTC (don't convert to local time)" \
  565. "\n -R Output RFC-2822 compliant date string" \
  566. ) IF_LONG_OPTS( \
  567. "\n [-s,--set] TIME Set time to TIME" \
  568. "\n -u,--utc Work in UTC (don't convert to local time)" \
  569. "\n -R,--rfc-2822 Output RFC-2822 compliant date string" \
  570. ) \
  571. IF_FEATURE_DATE_ISOFMT( \
  572. "\n -I[SPEC] Output ISO-8601 compliant date string" \
  573. "\n SPEC='date' (default) for date only," \
  574. "\n 'hours', 'minutes', or 'seconds' for date and" \
  575. "\n time to the indicated precision" \
  576. ) \
  577. IF_NOT_LONG_OPTS( \
  578. "\n -r FILE Display last modification time of FILE" \
  579. "\n -d TIME Display TIME, not 'now'" \
  580. ) IF_LONG_OPTS( \
  581. "\n -r,--reference FILE Display last modification time of FILE" \
  582. "\n -d,--date TIME Display TIME, not 'now'" \
  583. ) \
  584. IF_FEATURE_DATE_ISOFMT( \
  585. "\n -D FMT Use FMT for -d TIME conversion" \
  586. ) \
  587. "\n" \
  588. "\nRecognized TIME formats:" \
  589. "\n hh:mm[:ss]" \
  590. "\n [YYYY.]MM.DD-hh:mm[:ss]" \
  591. "\n YYYY-MM-DD hh:mm[:ss]" \
  592. "\n [[[[[YY]YY]MM]DD]hh]mm[.ss]" \
  593. IF_FEATURE_DATE_COMPAT( \
  594. "\n 'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead" \
  595. ) \
  596. #define date_example_usage \
  597. "$ date\n" \
  598. "Wed Apr 12 18:52:41 MDT 2000\n" \
  599. #define dd_trivial_usage \
  600. "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
  601. " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync] [iflag=skip_bytes]") \
  602. #define dd_full_usage "\n\n" \
  603. "Copy a file with converting and formatting\n" \
  604. "\n if=FILE Read from FILE instead of stdin" \
  605. "\n of=FILE Write to FILE instead of stdout" \
  606. "\n bs=N Read and write N bytes at a time" \
  607. IF_FEATURE_DD_IBS_OBS( \
  608. "\n ibs=N Read N bytes at a time" \
  609. ) \
  610. IF_FEATURE_DD_IBS_OBS( \
  611. "\n obs=N Write N bytes at a time" \
  612. ) \
  613. "\n count=N Copy only N input blocks" \
  614. "\n skip=N Skip N input blocks" \
  615. "\n seek=N Skip N output blocks" \
  616. IF_FEATURE_DD_IBS_OBS( \
  617. "\n conv=notrunc Don't truncate output file" \
  618. "\n conv=noerror Continue after read errors" \
  619. "\n conv=sync Pad blocks with zeros" \
  620. "\n conv=fsync Physically write data out before finishing" \
  621. "\n conv=swab Swap every pair of bytes" \
  622. "\n iflag=skip_bytes skip=N is in bytes" \
  623. ) \
  624. IF_FEATURE_DD_STATUS( \
  625. "\n status=noxfer Suppress rate output" \
  626. "\n status=none Suppress all output" \
  627. ) \
  628. "\n" \
  629. "\nN may be suffixed by c (1), w (2), b (512), kB (1000), k (1024), MB, M, GB, G" \
  630. #define dd_example_usage \
  631. "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
  632. "4+0 records in\n" \
  633. "4+0 records out\n" \
  634. #define df_trivial_usage \
  635. "[-Pk" \
  636. IF_FEATURE_HUMAN_READABLE("mh") \
  637. "T" \
  638. IF_FEATURE_DF_FANCY("ai] [-B SIZE") \
  639. "] [FILESYSTEM]..." \
  640. #define df_full_usage "\n\n" \
  641. "Print filesystem usage statistics\n" \
  642. "\n -P POSIX output format" \
  643. "\n -k 1024-byte blocks (default)" \
  644. IF_FEATURE_HUMAN_READABLE( \
  645. "\n -m 1M-byte blocks" \
  646. "\n -h Human readable (e.g. 1K 243M 2G)" \
  647. ) \
  648. "\n -T Print filesystem type" \
  649. IF_FEATURE_DF_FANCY( \
  650. "\n -a Show all filesystems" \
  651. "\n -i Inodes" \
  652. "\n -B SIZE Blocksize" \
  653. ) \
  654. #define df_example_usage \
  655. "$ df\n" \
  656. "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
  657. "/dev/sda3 8690864 8553540 137324 98% /\n" \
  658. "/dev/sda1 64216 36364 27852 57% /boot\n" \
  659. "$ df /dev/sda3\n" \
  660. "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
  661. "/dev/sda3 8690864 8553540 137324 98% /\n" \
  662. "$ POSIXLY_CORRECT=sure df /dev/sda3\n" \
  663. "Filesystem 512B-blocks Used Available Use% Mounted on\n" \
  664. "/dev/sda3 17381728 17107080 274648 98% /\n" \
  665. "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" \
  666. "Filesystem 512-blocks Used Available Capacity Mounted on\n" \
  667. "/dev/sda3 17381728 17107080 274648 98% /\n" \
  668. #define dirname_trivial_usage \
  669. "FILENAME" \
  670. #define dirname_full_usage "\n\n" \
  671. "Strip non-directory suffix from FILENAME" \
  672. #define dirname_example_usage \
  673. "$ dirname /tmp/foo\n" \
  674. "/tmp\n" \
  675. "$ dirname /tmp/foo/\n" \
  676. "/tmp\n" \
  677. #define dos2unix_trivial_usage \
  678. "[-ud] [FILE]" \
  679. #define dos2unix_full_usage "\n\n" \
  680. "Convert FILE in-place from DOS to Unix format.\n" \
  681. "When no file is given, use stdin/stdout.\n" \
  682. "\n -u dos2unix" \
  683. "\n -d unix2dos" \
  684. #define unix2dos_trivial_usage \
  685. "[-ud] [FILE]" \
  686. #define unix2dos_full_usage "\n\n" \
  687. "Convert FILE in-place from Unix to DOS format.\n" \
  688. "When no file is given, use stdin/stdout.\n" \
  689. "\n -u dos2unix" \
  690. "\n -d unix2dos" \
  691. #define du_trivial_usage \
  692. "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..." \
  693. #define du_full_usage "\n\n" \
  694. "Summarize disk space used for each FILE and/or directory\n" \
  695. "\n -a Show file sizes too" \
  696. "\n -L Follow all symlinks" \
  697. "\n -H Follow symlinks on command line" \
  698. "\n -d N Limit output to directories (and files with -a) of depth < N" \
  699. "\n -c Show grand total" \
  700. "\n -l Count sizes many times if hard linked" \
  701. "\n -s Display only a total for each argument" \
  702. "\n -x Skip directories on different filesystems" \
  703. IF_FEATURE_HUMAN_READABLE( \
  704. "\n -h Sizes in human readable format (e.g., 1K 243M 2G)" \
  705. "\n -m Sizes in megabytes" \
  706. ) \
  707. "\n -k Sizes in kilobytes" IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
  708. IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K( \
  709. "\n Default unit is 512 bytes" \
  710. ) \
  711. #define du_example_usage \
  712. "$ du\n" \
  713. "16 ./CVS\n" \
  714. "12 ./kernel-patches/CVS\n" \
  715. "80 ./kernel-patches\n" \
  716. "12 ./tests/CVS\n" \
  717. "36 ./tests\n" \
  718. "12 ./scripts/CVS\n" \
  719. "16 ./scripts\n" \
  720. "12 ./docs/CVS\n" \
  721. "104 ./docs\n" \
  722. "2417 .\n" \
  723. #define echo_trivial_usage \
  724. IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..." \
  725. #define echo_full_usage "\n\n" \
  726. "Print the specified ARGs to stdout" \
  727. IF_FEATURE_FANCY_ECHO( "\n" \
  728. "\n -n Suppress trailing newline" \
  729. "\n -e Interpret backslash escapes (i.e., \\t=tab)" \
  730. "\n -E Don't interpret backslash escapes (default)" \
  731. ) \
  732. #define echo_example_usage \
  733. "$ echo \"Erik is cool\"\n" \
  734. "Erik is cool\n" \
  735. IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
  736. "Erik\n" \
  737. "is\n" \
  738. "cool\n" \
  739. "$ echo \"Erik\\nis\\ncool\"\n" \
  740. "Erik\\nis\\ncool\n") \
  741. #define env_trivial_usage \
  742. "[-iu] [-] [name=value]... [PROG ARGS]" \
  743. #define env_full_usage "\n\n" \
  744. "Print the current environment or run PROG after setting up\n" \
  745. "the specified environment\n" \
  746. "\n -, -i Start with an empty environment" \
  747. "\n -u Remove variable from the environment" \
  748. #define expand_trivial_usage \
  749. "[-i] [-t N] [FILE]..." \
  750. #define expand_full_usage "\n\n" \
  751. "Convert tabs to spaces, writing to stdout\n" \
  752. "\n -i Don't convert tabs after non blanks" \
  753. "\n -t Tabstops every N chars" \
  754. #define unexpand_trivial_usage \
  755. "[-fa][-t N] [FILE]..." \
  756. #define unexpand_full_usage "\n\n" \
  757. "Convert spaces to tabs, writing to stdout\n" \
  758. "\n -a Convert all blanks" \
  759. "\n -f Convert only leading blanks" \
  760. "\n -t N Tabstops every N chars" \
  761. #define expr_trivial_usage \
  762. "EXPRESSION" \
  763. #define expr_full_usage "\n\n" \
  764. "Print the value of EXPRESSION to stdout\n" \
  765. "\n" \
  766. "EXPRESSION may be:\n" \
  767. " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
  768. " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
  769. " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \
  770. " ARG1 <= ARG2\n" \
  771. " ARG1 = ARG2\n" \
  772. " ARG1 != ARG2\n" \
  773. " ARG1 >= ARG2\n" \
  774. " ARG1 > ARG2\n" \
  775. " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \
  776. " ARG1 - ARG2\n" \
  777. " ARG1 * ARG2\n" \
  778. " ARG1 / ARG2\n" \
  779. " ARG1 % ARG2\n" \
  780. " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \
  781. " match STRING REGEXP Same as STRING : REGEXP\n" \
  782. " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \
  783. " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \
  784. " length STRING Length of STRING\n" \
  785. " quote TOKEN Interpret TOKEN as a string, even if\n" \
  786. " it is a keyword like 'match' or an\n" \
  787. " operator like '/'\n" \
  788. " (EXPRESSION) Value of EXPRESSION\n" \
  789. "\n" \
  790. "Beware that many operators need to be escaped or quoted for shells.\n" \
  791. "Comparisons are arithmetic if both ARGs are numbers, else\n" \
  792. "lexicographical. Pattern matches return the string matched between\n" \
  793. "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
  794. "of characters matched or 0." \
  795. #define factor_trivial_usage \
  796. "[NUMBER]..." \
  797. #define factor_full_usage "\n\n" \
  798. "Print prime factors" \
  799. #define false_trivial_usage NOUSAGE_STR \
  800. #define false_full_usage "" \
  801. #define false_example_usage \
  802. "$ false\n" \
  803. "$ echo $?\n" \
  804. "1\n" \
  805. #define fold_trivial_usage \
  806. "[-bs] [-w WIDTH] [FILE]..." \
  807. #define fold_full_usage "\n\n" \
  808. "Wrap input lines in each FILE (or stdin), writing to stdout\n" \
  809. "\n -b Count bytes rather than columns" \
  810. "\n -s Break at spaces" \
  811. "\n -w Use WIDTH columns instead of 80" \
  812. #define fsync_trivial_usage \
  813. "[-d] FILE..." \
  814. #define fsync_full_usage "\n\n" \
  815. "Write files' buffered blocks to disk\n" \
  816. "\n -d Avoid syncing metadata" \
  817. #define head_trivial_usage \
  818. "[OPTIONS] [FILE]..." \
  819. #define head_full_usage "\n\n" \
  820. "Print first 10 lines of each FILE (or stdin) to stdout.\n" \
  821. "With more than one FILE, precede each with a filename header.\n" \
  822. "\n -n N[kbm] Print first N lines" \
  823. IF_FEATURE_FANCY_HEAD( \
  824. "\n -n -N[kbm] Print all except N last lines" \
  825. "\n -c [-]N[kbm] Print first N bytes" \
  826. "\n -q Never print headers" \
  827. "\n -v Always print headers" \
  828. ) \
  829. "\n" \
  830. "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \
  831. #define head_example_usage \
  832. "$ head -n 2 /etc/passwd\n" \
  833. "root:x:0:0:root:/root:/bin/bash\n" \
  834. "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" \
  835. #define hostid_trivial_usage \
  836. "" \
  837. #define hostid_full_usage "\n\n" \
  838. "Print out a unique 32-bit identifier for the machine" \
  839. #define id_trivial_usage \
  840. "[OPTIONS] [USER]" \
  841. #define id_full_usage "\n\n" \
  842. "Print information about USER or the current user\n" \
  843. IF_SELINUX( \
  844. "\n -Z Security context" \
  845. ) \
  846. "\n -u User ID" \
  847. "\n -g Group ID" \
  848. "\n -G Supplementary group IDs" \
  849. "\n -n Print names instead of numbers" \
  850. "\n -r Print real ID instead of effective ID" \
  851. #define id_example_usage \
  852. "$ id\n" \
  853. "uid=1000(andersen) gid=1000(andersen)\n" \
  854. #define groups_trivial_usage \
  855. "[USER]" \
  856. #define groups_full_usage "\n\n" \
  857. "Print the group memberships of USER or for the current process" \
  858. #define groups_example_usage \
  859. "$ groups\n" \
  860. "andersen lp dialout cdrom floppy\n" \
  861. #define install_trivial_usage \
  862. "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST" \
  863. #define install_full_usage "\n\n" \
  864. "Copy files and set attributes\n" \
  865. "\n -c Just copy (default)" \
  866. "\n -d Create directories" \
  867. "\n -D Create leading target directories" \
  868. "\n -s Strip symbol table" \
  869. "\n -p Preserve date" \
  870. "\n -o USER Set ownership" \
  871. "\n -g GRP Set group ownership" \
  872. "\n -m MODE Set permissions" \
  873. "\n -t DIR Install to DIR" \
  874. IF_SELINUX( \
  875. "\n -Z Set security context" \
  876. ) \
  877. #define link_trivial_usage \
  878. "FILE LINK" \
  879. #define link_full_usage "\n\n" \
  880. "Create hard LINK to FILE" \
  881. #define ln_trivial_usage \
  882. "[OPTIONS] TARGET... LINK|DIR" \
  883. #define ln_full_usage "\n\n" \
  884. "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" \
  885. "\n -s Make symlinks instead of hardlinks" \
  886. "\n -f Remove existing destinations" \
  887. "\n -n Don't dereference symlinks - treat like normal file" \
  888. "\n -b Make a backup of the target (if exists) before link operation" \
  889. "\n -S suf Use suffix instead of ~ when making backup files" \
  890. "\n -T 2nd arg must be a DIR" \
  891. "\n -v Verbose" \
  892. #define ln_example_usage \
  893. "$ ln -s BusyBox /tmp/ls\n" \
  894. "$ ls -l /tmp/ls\n" \
  895. "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n" \
  896. #define logname_trivial_usage \
  897. "" \
  898. #define logname_full_usage "\n\n" \
  899. "Print the name of the current user" \
  900. #define logname_example_usage \
  901. "$ logname\n" \
  902. "root\n" \
  903. #define ls_trivial_usage \
  904. "[-1AaCxd" \
  905. IF_FEATURE_LS_FOLLOWLINKS("LH") \
  906. IF_FEATURE_LS_RECURSIVE("R") \
  907. IF_FEATURE_LS_FILETYPES("Fp") "lins" \
  908. IF_FEATURE_HUMAN_READABLE("h") \
  909. IF_FEATURE_LS_SORTFILES("rSXv") \
  910. IF_FEATURE_LS_TIMESTAMPS("ctu") \
  911. IF_SELINUX("kZ") "]" \
  912. IF_FEATURE_LS_WIDTH(" [-w WIDTH]") " [FILE]..." \
  913. #define ls_full_usage "\n\n" \
  914. "List directory contents\n" \
  915. "\n -1 One column output" \
  916. "\n -a Include entries which start with ." \
  917. "\n -A Like -a, but exclude . and .." \
  918. "\n -x List by lines" \
  919. "\n -d List directory entries instead of contents" \
  920. IF_FEATURE_LS_FOLLOWLINKS( \
  921. "\n -L Follow symlinks" \
  922. "\n -H Follow symlinks on command line" \
  923. ) \
  924. IF_FEATURE_LS_RECURSIVE( \
  925. "\n -R Recurse" \
  926. ) \
  927. IF_FEATURE_LS_FILETYPES( \
  928. "\n -p Append / to dir entries" \
  929. "\n -F Append indicator (one of */=@|) to entries" \
  930. ) \
  931. "\n -l Long listing format" \
  932. "\n -i List inode numbers" \
  933. "\n -n List numeric UIDs and GIDs instead of names" \
  934. "\n -s List allocated blocks" \
  935. IF_FEATURE_LS_TIMESTAMPS( \
  936. "\n -lc List ctime" \
  937. "\n -lu List atime" \
  938. ) \
  939. IF_FEATURE_LS_TIMESTAMPS(IF_LONG_OPTS( \
  940. "\n --full-time List full date and time" \
  941. )) \
  942. IF_FEATURE_HUMAN_READABLE( \
  943. "\n -h Human readable sizes (1K 243M 2G)" \
  944. ) \
  945. IF_FEATURE_LS_SORTFILES( \
  946. IF_LONG_OPTS( \
  947. "\n --group-directories-first" \
  948. ) \
  949. "\n -S Sort by size" \
  950. "\n -X Sort by extension" \
  951. "\n -v Sort by version" \
  952. ) \
  953. IF_FEATURE_LS_TIMESTAMPS( \
  954. "\n -t Sort by mtime" \
  955. "\n -tc Sort by ctime" \
  956. "\n -tu Sort by atime" \
  957. ) \
  958. "\n -r Reverse sort order" \
  959. IF_SELINUX( \
  960. "\n -Z List security context and permission" \
  961. ) \
  962. IF_FEATURE_LS_WIDTH( \
  963. "\n -w N Format N columns wide" \
  964. ) \
  965. IF_FEATURE_LS_COLOR( \
  966. "\n --color[={always,never,auto}] Control coloring" \
  967. ) \
  968. #define md5sum_trivial_usage \
  969. IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \
  970. #define md5sum_full_usage "\n\n" \
  971. "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
  972. IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  973. "\n -c Check sums against list in FILEs" \
  974. "\n -s Don't output anything, status code shows success" \
  975. "\n -w Warn about improperly formatted checksum lines" \
  976. ) \
  977. #define md5sum_example_usage \
  978. "$ md5sum < busybox\n" \
  979. "6fd11e98b98a58f64ff3398d7b324003\n" \
  980. "$ md5sum busybox\n" \
  981. "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
  982. "$ md5sum -c -\n" \
  983. "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
  984. "busybox: OK\n" \
  985. "^D\n" \
  986. #define sha1sum_trivial_usage \
  987. IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \
  988. #define sha1sum_full_usage "\n\n" \
  989. "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \
  990. IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  991. "\n -c Check sums against list in FILEs" \
  992. "\n -s Don't output anything, status code shows success" \
  993. "\n -w Warn about improperly formatted checksum lines" \
  994. ) \
  995. #define sha256sum_trivial_usage \
  996. IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \
  997. #define sha256sum_full_usage "\n\n" \
  998. "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \
  999. IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  1000. "\n -c Check sums against list in FILEs" \
  1001. "\n -s Don't output anything, status code shows success" \
  1002. "\n -w Warn about improperly formatted checksum lines" \
  1003. ) \
  1004. #define sha512sum_trivial_usage \
  1005. IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \
  1006. #define sha512sum_full_usage "\n\n" \
  1007. "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \
  1008. IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  1009. "\n -c Check sums against list in FILEs" \
  1010. "\n -s Don't output anything, status code shows success" \
  1011. "\n -w Warn about improperly formatted checksum lines" \
  1012. ) \
  1013. #define sha3sum_trivial_usage \
  1014. IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[-a BITS] [FILE]..." \
  1015. #define sha3sum_full_usage "\n\n" \
  1016. "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA3 checksums" \
  1017. IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  1018. "\n -c Check sums against list in FILEs" \
  1019. "\n -s Don't output anything, status code shows success" \
  1020. "\n -w Warn about improperly formatted checksum lines" \
  1021. "\n -a BITS 224 (default), 256, 384, 512" \
  1022. ) \
  1023. #define mkdir_trivial_usage \
  1024. "[OPTIONS] DIRECTORY..." \
  1025. #define mkdir_full_usage "\n\n" \
  1026. "Create DIRECTORY\n" \
  1027. "\n -m MODE Mode" \
  1028. "\n -p No error if exists; make parent directories as needed" \
  1029. IF_SELINUX( \
  1030. "\n -Z Set security context" \
  1031. ) \
  1032. #define mkdir_example_usage \
  1033. "$ mkdir /tmp/foo\n" \
  1034. "$ mkdir /tmp/foo\n" \
  1035. "/tmp/foo: File exists\n" \
  1036. "$ mkdir /tmp/foo/bar/baz\n" \
  1037. "/tmp/foo/bar/baz: No such file or directory\n" \
  1038. "$ mkdir -p /tmp/foo/bar/baz\n" \
  1039. #define mkfifo_trivial_usage \
  1040. "[-m MODE] " IF_SELINUX("[-Z] ") "NAME" \
  1041. #define mkfifo_full_usage "\n\n" \
  1042. "Create named pipe\n" \
  1043. "\n -m MODE Mode (default a=rw)" \
  1044. IF_SELINUX( \
  1045. "\n -Z Set security context" \
  1046. ) \
  1047. #define mknod_trivial_usage \
  1048. "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR" \
  1049. #define mknod_full_usage "\n\n" \
  1050. "Create a special file (block, character, or pipe)\n" \
  1051. "\n -m MODE Creation mode (default a=rw)" \
  1052. IF_SELINUX( \
  1053. "\n -Z Set security context" \
  1054. ) \
  1055. "\nTYPE:" \
  1056. "\n b Block device" \
  1057. "\n c or u Character device" \
  1058. "\n p Named pipe (MAJOR and MINOR are ignored)" \
  1059. #define mknod_example_usage \
  1060. "$ mknod /dev/fd0 b 2 0\n" \
  1061. "$ mknod -m 644 /tmp/pipe p\n" \
  1062. #define mktemp_trivial_usage \
  1063. "[-dt] [-p DIR] [TEMPLATE]" \
  1064. #define mktemp_full_usage "\n\n" \
  1065. "Create a temporary file with name based on TEMPLATE and print its name.\n" \
  1066. "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" \
  1067. "Without TEMPLATE, -t tmp.XXXXXX is assumed.\n" \
  1068. "\n -d Make directory, not file" \
  1069. "\n -q Fail silently on errors" \
  1070. "\n -t Prepend base directory name to TEMPLATE" \
  1071. "\n -p DIR Use DIR as a base directory (implies -t)" \
  1072. "\n -u Do not create anything; print a name" \
  1073. "\n" \
  1074. "\nBase directory is: -p DIR, else $TMPDIR, else /tmp" \
  1075. #define mktemp_example_usage \
  1076. "$ mktemp /tmp/temp.XXXXXX\n" \
  1077. "/tmp/temp.mWiLjM\n" \
  1078. "$ ls -la /tmp/temp.mWiLjM\n" \
  1079. "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" \
  1080. #define mv_trivial_usage \
  1081. "[-fin] SOURCE DEST\n" \
  1082. "or: mv [-fin] SOURCE... DIRECTORY" \
  1083. #define mv_full_usage "\n\n" \
  1084. "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \
  1085. "\n -f Don't prompt before overwriting" \
  1086. "\n -i Interactive, prompt before overwrite" \
  1087. "\n -n Don't overwrite an existing file" \
  1088. #define mv_example_usage \
  1089. "$ mv /tmp/foo /bin/bar\n" \
  1090. #define nice_trivial_usage \
  1091. "[-n ADJUST] [PROG ARGS]" \
  1092. #define nice_full_usage "\n\n" \
  1093. "Change scheduling priority, run PROG\n" \
  1094. "\n -n ADJUST Adjust priority by ADJUST" \
  1095. #define nl_trivial_usage \
  1096. "[OPTIONS] [FILE]..." \
  1097. #define nl_full_usage "\n\n" \
  1098. "Write FILEs to standard output with line numbers added\n" \
  1099. "\n -b STYLE Which lines to number - a: all, t: nonempty, n: none" \
  1100. "\n -i N Line number increment" \
  1101. "\n -s STRING Use STRING as line number separator" \
  1102. "\n -v N Start from N" \
  1103. "\n -w N Width of line numbers" \
  1104. #define nohup_trivial_usage \
  1105. "PROG ARGS" \
  1106. #define nohup_full_usage "\n\n" \
  1107. "Run PROG immune to hangups, with output to a non-tty" \
  1108. #define nohup_example_usage \
  1109. "$ nohup make &" \
  1110. #define nproc_trivial_usage \
  1111. "" \
  1112. #define nproc_full_usage "\n\n" \
  1113. "Print number of CPUs" \
  1114. #if !ENABLE_DESKTOP \
  1115. #define od_trivial_usage \
  1116. "[-aBbcDdeFfHhIiLlOovXx] [FILE]" \
  1117. #define od_full_usage "\n\n" \
  1118. "Print FILE (or stdin) unambiguously, as octal bytes by default" \
  1119. #endif \
  1120. #if ENABLE_DESKTOP \
  1121. #define od_trivial_usage \
  1122. "[-abcdfhilovxs] [-t TYPE] [-A RADIX] [-N SIZE] [-j SKIP] [-S MINSTR] [-w WIDTH] [FILE]..." \
  1123. #define od_full_usage "\n\n" \
  1124. "Print FILEs (or stdin) unambiguously, as octal bytes by default" \
  1125. #endif \
  1126. #define paste_trivial_usage \
  1127. "[OPTIONS] [FILE]..." \
  1128. #define paste_full_usage "\n\n" \
  1129. "Paste lines from each input file, separated with tab\n" \
  1130. "\n -d LIST Use delimiters from LIST, not tab" \
  1131. "\n -s Serial: one file at a time" \
  1132. #define paste_example_usage \
  1133. "# write out directory in four columns\n" \
  1134. "$ ls | paste - - - -\n" \
  1135. "# combine pairs of lines from a file into single lines\n" \
  1136. "$ paste -s -d '\\t\\n' file\n" \
  1137. #define printenv_trivial_usage \
  1138. "[VARIABLE]..." \
  1139. #define printenv_full_usage "\n\n" \
  1140. "Print environment VARIABLEs.\n" \
  1141. "If no VARIABLE specified, print all." \
  1142. #define printf_trivial_usage \
  1143. "FORMAT [ARG]..." \
  1144. #define printf_full_usage "\n\n" \
  1145. "Format and print ARG(s) according to FORMAT (a-la C printf)" \
  1146. #define printf_example_usage \
  1147. "$ printf \"Val=%d\\n\" 5\n" \
  1148. "Val=5\n" \
  1149. #define pwd_trivial_usage \
  1150. "" \
  1151. #define pwd_full_usage "\n\n" \
  1152. "Print the full filename of the current working directory" \
  1153. #define pwd_example_usage \
  1154. "$ pwd\n" \
  1155. "/root\n" \
  1156. #define readlink_trivial_usage \
  1157. IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE" \
  1158. #define readlink_full_usage "\n\n" \
  1159. "Display the value of a symlink" \
  1160. IF_FEATURE_READLINK_FOLLOW( "\n" \
  1161. "\n -f Canonicalize by following all symlinks" \
  1162. "\n -n Don't add newline" \
  1163. "\n -v Verbose" \
  1164. ) \
  1165. #define realpath_trivial_usage \
  1166. "FILE..." \
  1167. #define realpath_full_usage "\n\n" \
  1168. "Return the absolute pathnames of given FILE" \
  1169. #define rm_trivial_usage \
  1170. "[-irf] FILE..." \
  1171. #define rm_full_usage "\n\n" \
  1172. "Remove (unlink) FILEs\n" \
  1173. "\n -i Always prompt before removing" \
  1174. "\n -f Never prompt" \
  1175. "\n -R,-r Recurse" \
  1176. #define rm_example_usage \
  1177. "$ rm -rf /tmp/foo\n" \
  1178. #define rmdir_trivial_usage \
  1179. "[OPTIONS] DIRECTORY..." \
  1180. #define rmdir_full_usage "\n\n" \
  1181. "Remove DIRECTORY if it is empty\n" \
  1182. "\n -p Include parents" \
  1183. IF_LONG_OPTS( \
  1184. "\n --ignore-fail-on-non-empty" \
  1185. ) \
  1186. #define rmdir_example_usage \
  1187. "# rmdir /tmp/foo\n" \
  1188. #define seq_trivial_usage \
  1189. "[-w] [-s SEP] [FIRST [INC]] LAST" \
  1190. #define seq_full_usage "\n\n" \
  1191. "Print numbers from FIRST to LAST, in steps of INC.\n" \
  1192. "FIRST, INC default to 1.\n" \
  1193. "\n -w Pad to last with leading zeros" \
  1194. "\n -s SEP String separator" \
  1195. #define shred_trivial_usage \
  1196. "FILE..." \
  1197. #define shred_full_usage "\n\n" \
  1198. "Overwrite/delete FILEs\n" \
  1199. "\n -f Chmod to ensure writability" \
  1200. "\n -n N Overwrite N times (default 3)" \
  1201. "\n -z Final overwrite with zeros" \
  1202. "\n -u Remove file" \
  1203. #define shuf_trivial_usage \
  1204. "[-e|-i L-H] [-n NUM] [-o FILE] [-z] [FILE|ARG...]" \
  1205. #define shuf_full_usage "\n\n" \
  1206. "Randomly permute lines\n" \
  1207. "\n -e Treat ARGs as lines" \
  1208. "\n -i L-H Treat numbers L-H as lines" \
  1209. "\n -n NUM Output at most NUM lines" \
  1210. "\n -o FILE Write to FILE, not standard output" \
  1211. "\n -z End lines with zero byte, not newline" \
  1212. #define sleep_trivial_usage \
  1213. IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...") \
  1214. #define sleep_full_usage "\n\n" \
  1215. IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \
  1216. IF_FEATURE_FANCY_SLEEP( \
  1217. "Pause for a time equal to the total of the args given, where each arg can\n" \
  1218. "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays") \
  1219. #define sleep_example_usage \
  1220. "$ sleep 2\n" \
  1221. "[2 second delay results]\n" \
  1222. IF_FEATURE_FANCY_SLEEP( \
  1223. "$ sleep 1d 3h 22m 8s\n" \
  1224. "[98528 second delay results]\n") \
  1225. #define sort_trivial_usage \
  1226. "[-nru" \
  1227. IF_FEATURE_SORT_BIG("gMcszbdfiokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
  1228. "] [FILE]..." \
  1229. #define sort_full_usage "\n\n" \
  1230. "Sort lines of text\n" \
  1231. IF_FEATURE_SORT_BIG( \
  1232. "\n -o FILE Output to FILE" \
  1233. "\n -c Check whether input is sorted" \
  1234. "\n -b Ignore leading blanks" \
  1235. "\n -f Ignore case" \
  1236. "\n -i Ignore unprintable characters" \
  1237. "\n -d Dictionary order (blank or alphanumeric only)" \
  1238. "\n -g General numerical sort" \
  1239. "\n -M Sort month" \
  1240. ) \
  1241. "\n -n Sort numbers" \
  1242. IF_FEATURE_SORT_BIG( \
  1243. "\n -t CHAR Field separator" \
  1244. "\n -k N[,M] Sort by Nth field" \
  1245. ) \
  1246. "\n -r Reverse sort order" \
  1247. IF_FEATURE_SORT_BIG( \
  1248. "\n -s Stable (don't sort ties alphabetically)" \
  1249. ) \
  1250. "\n -u Suppress duplicate lines" \
  1251. IF_FEATURE_SORT_BIG( \
  1252. "\n -z Lines are terminated by NUL, not newline" \
  1253. ) \
  1254. #define sort_example_usage \
  1255. "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
  1256. "a\n" \
  1257. "b\n" \
  1258. "c\n" \
  1259. "d\n" \
  1260. "e\n" \
  1261. "f\n" \
  1262. IF_FEATURE_SORT_BIG( \
  1263. "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
  1264. "d 2\n" \
  1265. "b 2\n" \
  1266. "c 3\n" \
  1267. ) \
  1268. "" \
  1269. #define split_trivial_usage \
  1270. "[OPTIONS] [INPUT [PREFIX]]" \
  1271. #define split_full_usage "\n\n" \
  1272. " -b N[k|m] Split by N (kilo|mega)bytes" \
  1273. "\n -l N Split by N lines" \
  1274. "\n -a N Use N letters as suffix" \
  1275. #define split_example_usage \
  1276. "$ split TODO foo\n" \
  1277. "$ cat TODO | split -a 2 -l 2 TODO_\n" \
  1278. #define stat_trivial_usage \
  1279. "[OPTIONS] FILE..." \
  1280. #define stat_full_usage "\n\n" \
  1281. "Display file" \
  1282. IF_FEATURE_STAT_FILESYSTEM(" (default) or filesystem") \
  1283. " status\n" \
  1284. IF_FEATURE_STAT_FORMAT( \
  1285. "\n -c FMT Use the specified format" \
  1286. ) \
  1287. IF_FEATURE_STAT_FILESYSTEM( \
  1288. "\n -f Display filesystem status" \
  1289. ) \
  1290. "\n -L Follow links" \
  1291. "\n -t Terse display" \
  1292. IF_SELINUX( \
  1293. "\n -Z Print security context" \
  1294. ) \
  1295. IF_FEATURE_STAT_FORMAT( \
  1296. "\n\nFMT sequences"IF_FEATURE_STAT_FILESYSTEM(" for files")":\n" \
  1297. " %a Access rights in octal\n" \
  1298. " %A Access rights in human readable form\n" \
  1299. " %b Number of blocks allocated (see %B)\n" \
  1300. " %B Size in bytes of each block reported by %b\n" \
  1301. " %d Device number in decimal\n" \
  1302. " %D Device number in hex\n" \
  1303. " %f Raw mode in hex\n" \
  1304. " %F File type\n" \
  1305. " %g Group ID\n" \
  1306. " %G Group name\n" \
  1307. " %h Number of hard links\n" \
  1308. " %i Inode number\n" \
  1309. " %n File name\n" \
  1310. " %N File name, with -> TARGET if symlink\n" \
  1311. " %o I/O block size\n" \
  1312. " %s Total size in bytes\n" \
  1313. " %t Major device type in hex\n" \
  1314. " %T Minor device type in hex\n" \
  1315. " %u User ID\n" \
  1316. " %U User name\n" \
  1317. " %x Time of last access\n" \
  1318. " %X Time of last access as seconds since Epoch\n" \
  1319. " %y Time of last modification\n" \
  1320. " %Y Time of last modification as seconds since Epoch\n" \
  1321. " %z Time of last change\n" \
  1322. " %Z Time of last change as seconds since Epoch\n" \
  1323. IF_FEATURE_STAT_FILESYSTEM( \
  1324. "\nFMT sequences for file systems:\n" \
  1325. " %a Free blocks available to non-superuser\n" \
  1326. " %b Total data blocks\n" \
  1327. " %c Total file nodes\n" \
  1328. " %d Free file nodes\n" \
  1329. " %f Free blocks\n" \
  1330. IF_SELINUX( \
  1331. " %C Security context in selinux\n" \
  1332. ) \
  1333. " %i File System ID in hex\n" \
  1334. " %l Maximum length of filenames\n" \
  1335. " %n File name\n" \
  1336. " %s Block size (for faster transfer)\n" \
  1337. " %S Fundamental block size (for block counts)\n" \
  1338. " %t Type in hex\n" \
  1339. " %T Type in human readable form" \
  1340. ) \
  1341. ) \
  1342. #define stty_trivial_usage \
  1343. "[-a|g] [-F DEVICE] [SETTING]..." \
  1344. #define stty_full_usage "\n\n" \
  1345. "Without arguments, prints baud rate, line discipline,\n" \
  1346. "and deviations from stty sane\n" \
  1347. "\n -F DEVICE Open device instead of stdin" \
  1348. "\n -a Print all current settings in human-readable form" \
  1349. "\n -g Print in stty-readable form" \
  1350. "\n [SETTING] See manpage" \
  1351. #define sum_trivial_usage \
  1352. "[-rs] [FILE]..." \
  1353. #define sum_full_usage "\n\n" \
  1354. "Checksum and count the blocks in a file\n" \
  1355. "\n -r Use BSD sum algorithm (1K blocks)" \
  1356. "\n -s Use System V sum algorithm (512byte blocks)" \
  1357. #define sync_trivial_usage \
  1358. ""IF_FEATURE_SYNC_FANCY("[-df] [FILE]...") \
  1359. #define sync_full_usage "\n\n" \
  1360. IF_NOT_FEATURE_SYNC_FANCY( \
  1361. "Write all buffered blocks to disk" \
  1362. ) \
  1363. IF_FEATURE_SYNC_FANCY( \
  1364. "Write all buffered blocks (in FILEs) to disk" \
  1365. "\n -d Avoid syncing metadata" \
  1366. "\n -f Sync filesystems underlying FILEs" \
  1367. ) \
  1368. #define tac_trivial_usage \
  1369. "[FILE]..." \
  1370. #define tac_full_usage "\n\n" \
  1371. "Concatenate FILEs and print them in reverse" \
  1372. #define tail_trivial_usage \
  1373. "[OPTIONS] [FILE]..." \
  1374. #define tail_full_usage "\n\n" \
  1375. "Print last 10 lines of each FILE (or stdin) to stdout.\n" \
  1376. "With more than one FILE, precede each with a filename header.\n" \
  1377. "\n -f Print data as file grows" \
  1378. "\n -c [+]N[kbm] Print last N bytes" \
  1379. "\n -n N[kbm] Print last N lines" \
  1380. "\n -n +N[kbm] Start on Nth line and print the rest" \
  1381. IF_FEATURE_FANCY_TAIL( \
  1382. "\n -q Never print headers" \
  1383. "\n -s SECONDS Wait SECONDS between reads with -f" \
  1384. "\n -v Always print headers" \
  1385. "\n -F Same as -f, but keep retrying" \
  1386. "\n" \
  1387. "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \
  1388. ) \
  1389. #define tail_example_usage \
  1390. "$ tail -n 1 /etc/resolv.conf\n" \
  1391. "nameserver 10.0.0.1\n" \
  1392. #define tee_trivial_usage \
  1393. "[-ai] [FILE]..." \
  1394. #define tee_full_usage "\n\n" \
  1395. "Copy stdin to each FILE, and also to stdout\n" \
  1396. "\n -a Append to the given FILEs, don't overwrite" \
  1397. "\n -i Ignore interrupt signals (SIGINT)" \
  1398. #define tee_example_usage \
  1399. "$ echo \"Hello\" | tee /tmp/foo\n" \
  1400. "$ cat /tmp/foo\n" \
  1401. "Hello\n" \
  1402. #define test_trivial_usage NOUSAGE_STR \
  1403. #define test_full_usage "" \
  1404. #define test_example_usage \
  1405. "$ test 1 -eq 2\n" \
  1406. "$ echo $?\n" \
  1407. "1\n" \
  1408. "$ test 1 -eq 1\n" \
  1409. "$ echo $?\n" \
  1410. "0\n" \
  1411. "$ [ -d /etc ]\n" \
  1412. "$ echo $?\n" \
  1413. "0\n" \
  1414. "$ [ -d /junk ]\n" \
  1415. "$ echo $?\n" \
  1416. "1\n" \
  1417. #define timeout_trivial_usage \
  1418. "[-t SECS] [-s SIG] PROG ARGS" \
  1419. #define timeout_full_usage "\n\n" \
  1420. "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \
  1421. "Defaults: SECS: 10, SIG: TERM." \
  1422. #define touch_trivial_usage \
  1423. "[-c]" IF_FEATURE_TOUCH_SUSV3(" [-d DATE] [-t DATE] [-r FILE]") " FILE..." \
  1424. #define touch_full_usage "\n\n" \
  1425. "Update the last-modified date on the given FILE[s]\n" \
  1426. "\n -c Don't create files" \
  1427. IF_FEATURE_TOUCH_NODEREF( \
  1428. "\n -h Don't follow links" \
  1429. ) \
  1430. IF_FEATURE_TOUCH_SUSV3( \
  1431. "\n -d DT Date/time to use" \
  1432. "\n -t DT Date/time to use" \
  1433. "\n -r FILE Use FILE's date/time" \
  1434. ) \
  1435. #define touch_example_usage \
  1436. "$ ls -l /tmp/foo\n" \
  1437. "/bin/ls: /tmp/foo: No such file or directory\n" \
  1438. "$ touch /tmp/foo\n" \
  1439. "$ ls -l /tmp/foo\n" \
  1440. "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" \
  1441. #define tr_trivial_usage \
  1442. "[-cds] STRING1 [STRING2]" \
  1443. #define tr_full_usage "\n\n" \
  1444. "Translate, squeeze, or delete characters from stdin, writing to stdout\n" \
  1445. "\n -c Take complement of STRING1" \
  1446. "\n -d Delete input characters coded STRING1" \
  1447. "\n -s Squeeze multiple output characters of STRING2 into one character" \
  1448. #define tr_example_usage \
  1449. "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
  1450. "hello world\n" \
  1451. #define true_trivial_usage NOUSAGE_STR \
  1452. #define true_full_usage "" \
  1453. #define true_example_usage \
  1454. "$ true\n" \
  1455. "$ echo $?\n" \
  1456. "0\n" \
  1457. #define truncate_trivial_usage \
  1458. "[-c] -s SIZE FILE..." \
  1459. #define truncate_full_usage "\n\n" \
  1460. "Truncate FILEs to the given size\n" \
  1461. "\n -c Do not create files" \
  1462. "\n -s SIZE Truncate to SIZE" \
  1463. #define truncate_example_usage \
  1464. "$ truncate -s 1G foo" \
  1465. #define tty_trivial_usage \
  1466. "" \
  1467. #define tty_full_usage "\n\n" \
  1468. "Print file name of stdin's terminal" \
  1469. IF_INCLUDE_SUSv2( "\n" \
  1470. "\n -s Print nothing, only return exit status" \
  1471. ) \
  1472. #define tty_example_usage \
  1473. "$ tty\n" \
  1474. "/dev/tty2\n" \
  1475. #define uname_trivial_usage \
  1476. "[-amnrspvio]" \
  1477. #define uname_full_usage "\n\n" \
  1478. "Print system information\n" \
  1479. "\n -a Print all" \
  1480. "\n -m The machine (hardware) type" \
  1481. "\n -n Hostname" \
  1482. "\n -r Kernel release" \
  1483. "\n -s Kernel name (default)" \
  1484. "\n -p Processor type" \
  1485. "\n -v Kernel version" \
  1486. "\n -i The hardware platform" \
  1487. "\n -o OS name" \
  1488. #define uname_example_usage \
  1489. "$ uname -a\n" \
  1490. "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" \
  1491. #define arch_trivial_usage \
  1492. "" \
  1493. #define arch_full_usage "\n\n" \
  1494. "Print system architecture" \
  1495. #define uniq_trivial_usage \
  1496. "[-cdu][-f,s,w N] [INPUT [OUTPUT]]" \
  1497. #define uniq_full_usage "\n\n" \
  1498. "Discard duplicate lines\n" \
  1499. "\n -c Prefix lines by the number of occurrences" \
  1500. "\n -d Only print duplicate lines" \
  1501. "\n -u Only print unique lines" \
  1502. "\n -i Ignore case" \
  1503. "\n -f N Skip first N fields" \
  1504. "\n -s N Skip first N chars (after any skipped fields)" \
  1505. "\n -w N Compare N characters in line" \
  1506. #define uniq_example_usage \
  1507. "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
  1508. "a\n" \
  1509. "b\n" \
  1510. "c\n" \
  1511. #define unlink_trivial_usage \
  1512. "FILE" \
  1513. #define unlink_full_usage "\n\n" \
  1514. "Delete FILE by calling unlink()" \
  1515. #define usleep_trivial_usage \
  1516. "N" \
  1517. #define usleep_full_usage "\n\n" \
  1518. "Pause for N microseconds" \
  1519. #define usleep_example_usage \
  1520. "$ usleep 1000000\n" \
  1521. "[pauses for 1 second]\n" \
  1522. #define uudecode_trivial_usage \
  1523. "[-o OUTFILE] [INFILE]" \
  1524. #define uudecode_full_usage "\n\n" \
  1525. "Uudecode a file\n" \
  1526. "Finds OUTFILE in uuencoded source unless -o is given" \
  1527. #define uudecode_example_usage \
  1528. "$ uudecode -o busybox busybox.uu\n" \
  1529. "$ ls -l busybox\n" \
  1530. "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n" \
  1531. #define base64_trivial_usage \
  1532. "[-d] [FILE]" \
  1533. #define base64_full_usage "\n\n" \
  1534. "Base64 encode or decode FILE to standard output" \
  1535. "\n -d Decode data" \
  1536. #define uuencode_trivial_usage \
  1537. "[-m] [FILE] STORED_FILENAME" \
  1538. #define uuencode_full_usage "\n\n" \
  1539. "Uuencode FILE (or stdin) to stdout\n" \
  1540. "\n -m Use base64 encoding per RFC1521" \
  1541. #define uuencode_example_usage \
  1542. "$ uuencode busybox busybox\n" \
  1543. "begin 755 busybox\n" \
  1544. "<encoded file snipped>\n" \
  1545. "$ uudecode busybox busybox > busybox.uu\n" \
  1546. "$\n" \
  1547. #define wc_trivial_usage \
  1548. "[-c"IF_UNICODE_SUPPORT("m")"lwL] [FILE]..." \
  1549. #define wc_full_usage "\n\n" \
  1550. "Count lines, words, and bytes for each FILE (or stdin)\n" \
  1551. "\n -c Count bytes" \
  1552. IF_UNICODE_SUPPORT( \
  1553. "\n -m Count characters" \
  1554. ) \
  1555. "\n -l Count newlines" \
  1556. "\n -w Count words" \
  1557. "\n -L Print longest line length" \
  1558. #define wc_example_usage \
  1559. "$ wc /etc/passwd\n" \
  1560. " 31 46 1365 /etc/passwd\n" \
  1561. #define users_trivial_usage \
  1562. "" \
  1563. #define users_full_usage "\n\n" \
  1564. "Print the users currently logged on" \
  1565. #define w_trivial_usage \
  1566. "" \
  1567. #define w_full_usage "\n\n" \
  1568. "Show who is logged on" \
  1569. #define who_trivial_usage \
  1570. "[-a]" \
  1571. #define who_full_usage "\n\n" \
  1572. "Show who is logged on\n" \
  1573. "\n -a Show all" \
  1574. "\n -H Print column headers" \
  1575. #define whoami_trivial_usage \
  1576. "" \
  1577. #define whoami_full_usage "\n\n" \
  1578. "Print the user name associated with the current effective user id" \
  1579. #define yes_trivial_usage \
  1580. "[STRING]" \
  1581. #define yes_full_usage "\n\n" \
  1582. "Repeatedly output a line with STRING, or 'y'" \
  1583. #define pipe_progress_trivial_usage NOUSAGE_STR \
  1584. #define pipe_progress_full_usage "" \
  1585. #define run_parts_trivial_usage \
  1586. "[-a ARG]... [-u UMASK] " \
  1587. IF_FEATURE_RUN_PARTS_LONG_OPTIONS("[--reverse] [--test] [--exit-on-error] "IF_FEATURE_RUN_PARTS_FANCY("[--list] ")) \
  1588. "DIRECTORY" \
  1589. #define run_parts_full_usage "\n\n" \
  1590. "Run a bunch of scripts in DIRECTORY\n" \
  1591. "\n -a ARG Pass ARG as argument to scripts" \
  1592. "\n -u UMASK Set UMASK before running scripts" \
  1593. IF_FEATURE_RUN_PARTS_LONG_OPTIONS( \
  1594. "\n --reverse Reverse execution order" \
  1595. "\n --test Dry run" \
  1596. "\n --exit-on-error Exit if a script exits with non-zero" \
  1597. IF_FEATURE_RUN_PARTS_FANCY( \
  1598. "\n --list Print names of matching files even if they are not executable" \
  1599. ) \
  1600. ) \
  1601. #define run_parts_example_usage \
  1602. "$ run-parts -a start /etc/init.d\n" \
  1603. "$ run-parts -a stop=now /etc/init.d\n\n" \
  1604. "Let's assume you have a script foo/dosomething:\n" \
  1605. "#!/bin/sh\n" \
  1606. "for i in $*; do eval $i; done; unset i\n" \
  1607. "case \"$1\" in\n" \
  1608. "start*) echo starting something;;\n" \
  1609. "stop*) set -x; shutdown -h $stop;;\n" \
  1610. "esac\n\n" \
  1611. "Running this yields:\n" \
  1612. "$run-parts -a stop=+4m foo/\n" \
  1613. "+ shutdown -h +4m" \
  1614. #define start_stop_daemon_trivial_usage \
  1615. "[OPTIONS] [-S|-K] ... [-- ARGS...]" \
  1616. #define start_stop_daemon_full_usage "\n\n" \
  1617. "Search for matching processes, and then\n" \
  1618. "-K: stop all matching processes\n" \
  1619. "-S: start a process unless a matching process is found\n" \
  1620. "\nProcess matching:" \
  1621. "\n -u USERNAME|UID Match only this user's processes" \
  1622. "\n -n NAME Match processes with NAME" \
  1623. "\n in comm field in /proc/PID/stat" \
  1624. "\n -x EXECUTABLE Match processes with this command" \
  1625. "\n command in /proc/PID/cmdline" \
  1626. "\n -p FILE Match a process with PID from FILE" \
  1627. "\n All specified conditions must match" \
  1628. "\n-S only:" \
  1629. "\n -x EXECUTABLE Program to run" \
  1630. "\n -a NAME Zeroth argument" \
  1631. "\n -b Background" \
  1632. IF_FEATURE_START_STOP_DAEMON_FANCY( \
  1633. "\n -N N Change nice level" \
  1634. ) \
  1635. "\n -c USER[:[GRP]] Change user/group" \
  1636. "\n -m Write PID to pidfile specified by -p" \
  1637. "\n-K only:" \
  1638. "\n -s SIG Signal to send" \
  1639. "\n -t Match only, exit with 0 if found" \
  1640. "\nOther:" \
  1641. IF_FEATURE_START_STOP_DAEMON_FANCY( \
  1642. "\n -o Exit with status 0 if nothing is done" \
  1643. "\n -v Verbose" \
  1644. ) \
  1645. "\n -q Quiet" \
  1646. #define which_trivial_usage \
  1647. "[COMMAND]..." \
  1648. #define which_full_usage "\n\n" \
  1649. "Locate a COMMAND" \
  1650. #define which_example_usage \
  1651. "$ which login\n" \
  1652. "/bin/login\n" \
  1653. #define chattr_trivial_usage \
  1654. "[-R] [-v VERSION] [-+=AacDdijsStTu] FILE..." \
  1655. #define chattr_full_usage "\n\n" \
  1656. "Change ext2 file attributes\n" \
  1657. "\n -R Recurse" \
  1658. "\n -v VER Set version/generation number" \
  1659. "\nModifiers:" \
  1660. "\n -,+,= Remove/add/set attributes" \
  1661. "\nAttributes:" \
  1662. "\n A Don't track atime" \
  1663. "\n a Append mode only" \
  1664. "\n c Enable compress" \
  1665. "\n D Write dir contents synchronously" \
  1666. "\n d Don't backup with dump" \
  1667. "\n i Cannot be modified (immutable)" \
  1668. "\n j Write all data to journal first" \
  1669. "\n s Zero disk storage when deleted" \
  1670. "\n S Write synchronously" \
  1671. "\n t Disable tail-merging of partial blocks with other files" \
  1672. "\n u Allow file to be undeleted" \
  1673. #define fsck_trivial_usage \
  1674. "[-ANPRTV] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..." \
  1675. #define fsck_full_usage "\n\n" \
  1676. "Check and repair filesystems\n" \
  1677. "\n -A Walk /etc/fstab and check all filesystems" \
  1678. "\n -N Don't execute, just show what would be done" \
  1679. "\n -P With -A, check filesystems in parallel" \
  1680. "\n -R With -A, skip the root filesystem" \
  1681. "\n -T Don't show title on startup" \
  1682. "\n -V Verbose" \
  1683. "\n -t TYPE List of filesystem types to check" \
  1684. #define lsattr_trivial_usage \
  1685. "[-Radlv] [FILE]..." \
  1686. #define lsattr_full_usage "\n\n" \
  1687. "List ext2 file attributes\n" \
  1688. "\n -R Recurse" \
  1689. "\n -a Don't hide entries starting with ." \
  1690. "\n -d List directory entries instead of contents" \
  1691. "\n -l List long flag names" \
  1692. "\n -v List version/generation number" \
  1693. #define tune2fs_trivial_usage \
  1694. "[-c MAX_MOUNT_COUNT] " \
  1695. "[-i DAYS] " \
  1696. "[-C MOUNT_COUNT] " \
  1697. "[-L LABEL] " \
  1698. "BLOCKDEV" \
  1699. #define tune2fs_full_usage "\n\n" \
  1700. "Adjust filesystem options on ext[23] filesystems" \
  1701. #define awk_trivial_usage \
  1702. "[OPTIONS] [AWK_PROGRAM] [FILE]..." \
  1703. #define awk_full_usage "\n\n" \
  1704. " -v VAR=VAL Set variable" \
  1705. "\n -F SEP Use SEP as field separator" \
  1706. "\n -f FILE Read program from FILE" \
  1707. IF_FEATURE_AWK_GNU_EXTENSIONS( \
  1708. "\n -e AWK_PROGRAM" \
  1709. ) \
  1710. #define cmp_trivial_usage \
  1711. "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]" \
  1712. #define cmp_full_usage "\n\n" \
  1713. "Compare FILE1 with FILE2 (or stdin)\n" \
  1714. "\n -l Write the byte numbers (decimal) and values (octal)" \
  1715. "\n for all differing bytes" \
  1716. "\n -s Quiet" \
  1717. #define diff_trivial_usage \
  1718. "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2" \
  1719. #define diff_full_usage "\n\n" \
  1720. "Compare files line by line and output the differences between them.\n" \
  1721. "This implementation supports unified diffs only.\n" \
  1722. "\n -a Treat all files as text" \
  1723. "\n -b Ignore changes in the amount of whitespace" \
  1724. "\n -B Ignore changes whose lines are all blank" \
  1725. "\n -d Try hard to find a smaller set of changes" \
  1726. "\n -i Ignore case differences" \
  1727. "\n -L Use LABEL instead of the filename in the unified header" \
  1728. "\n -N Treat absent files as empty" \
  1729. "\n -q Output only whether files differ" \
  1730. "\n -r Recurse" \
  1731. "\n -S Start with FILE when comparing directories" \
  1732. "\n -T Make tabs line up by prefixing a tab when necessary" \
  1733. "\n -s Report when two files are the same" \
  1734. "\n -t Expand tabs to spaces in output" \
  1735. "\n -U Output LINES lines of context" \
  1736. "\n -w Ignore all whitespace" \
  1737. #define ed_trivial_usage "[FILE]" \
  1738. #define ed_full_usage "" \
  1739. #define patch_trivial_usage \
  1740. "[OPTIONS] [ORIGFILE [PATCHFILE]]" \
  1741. #define patch_full_usage "\n\n" \
  1742. IF_LONG_OPTS( \
  1743. " -p,--strip N Strip N leading components from file names" \
  1744. "\n -i,--input DIFF Read DIFF instead of stdin" \
  1745. "\n -R,--reverse Reverse patch" \
  1746. "\n -N,--forward Ignore already applied patches" \
  1747. "\n -E,--remove-empty-files Remove output files if they become empty" \
  1748. ) \
  1749. IF_NOT_LONG_OPTS( \
  1750. " -p N Strip N leading components from file names" \
  1751. "\n -i DIFF Read DIFF instead of stdin" \
  1752. "\n -R Reverse patch" \
  1753. "\n -N Ignore already applied patches" \
  1754. "\n -E Remove output files if they become empty" \
  1755. ) \
  1756. #define patch_example_usage \
  1757. "$ patch -p1 < example.diff\n" \
  1758. "$ patch -p0 -i example.diff" \
  1759. #define sed_trivial_usage \
  1760. "[-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]...\n" \
  1761. "or: sed [-i[SFX]] [-nrE] CMD [FILE]..." \
  1762. #define sed_full_usage "\n\n" \
  1763. " -e CMD Add CMD to sed commands to be executed" \
  1764. "\n -f FILE Add FILE contents to sed commands to be executed" \
  1765. "\n -i[SFX] Edit files in-place (otherwise sends to stdout)" \
  1766. "\n Optionally back files up, appending SFX" \
  1767. "\n -n Suppress automatic printing of pattern space" \
  1768. "\n -r,-E Use extended regex syntax" \
  1769. "\n" \
  1770. "\nIf no -e or -f, the first non-option argument is the sed command string." \
  1771. "\nRemaining arguments are input files (stdin if none)." \
  1772. #define sed_example_usage \
  1773. "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
  1774. "bar\n" \
  1775. #define vi_trivial_usage \
  1776. "[OPTIONS] [FILE]..." \
  1777. #define vi_full_usage "\n\n" \
  1778. "Edit FILE\n" \
  1779. IF_FEATURE_VI_COLON( \
  1780. "\n -c CMD Initial command to run ($EXINIT also available)" \
  1781. ) \
  1782. IF_FEATURE_VI_READONLY( \
  1783. "\n -R Read-only" \
  1784. ) \
  1785. "\n -H List available features" \
  1786. #define find_trivial_usage \
  1787. "[-HL] [PATH]... [OPTIONS] [ACTIONS]" \
  1788. #define find_full_usage "\n\n" \
  1789. "Search for files and perform actions on them.\n" \
  1790. "First failed action stops processing of current file.\n" \
  1791. "Defaults: PATH is current directory, action is '-print'\n" \
  1792. "\n -L,-follow Follow symlinks" \
  1793. "\n -H ...on command line only" \
  1794. IF_FEATURE_FIND_XDEV( \
  1795. "\n -xdev Don't descend directories on other filesystems" \
  1796. ) \
  1797. IF_FEATURE_FIND_MAXDEPTH( \
  1798. "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
  1799. "\n actions to command line arguments only" \
  1800. "\n -mindepth N Don't act on first N levels" \
  1801. ) \
  1802. IF_FEATURE_FIND_DEPTH( \
  1803. "\n -depth Act on directory *after* traversing it" \
  1804. ) \
  1805. "\n" \
  1806. "\nActions:" \
  1807. IF_FEATURE_FIND_PAREN( \
  1808. "\n ( ACTIONS ) Group actions for -o / -a" \
  1809. ) \
  1810. IF_FEATURE_FIND_NOT( \
  1811. "\n ! ACT Invert ACT's success/failure" \
  1812. ) \
  1813. "\n ACT1 [-a] ACT2 If ACT1 fails, stop, else do ACT2" \
  1814. "\n ACT1 -o ACT2 If ACT1 succeeds, stop, else do ACT2" \
  1815. "\n Note: -a has higher priority than -o" \
  1816. "\n -name PATTERN Match file name (w/o directory name) to PATTERN" \
  1817. "\n -iname PATTERN Case insensitive -name" \
  1818. IF_FEATURE_FIND_PATH( \
  1819. "\n -path PATTERN Match path to PATTERN" \
  1820. "\n -ipath PATTERN Case insensitive -path" \
  1821. ) \
  1822. IF_FEATURE_FIND_REGEX( \
  1823. "\n -regex PATTERN Match path to regex PATTERN" \
  1824. ) \
  1825. IF_FEATURE_FIND_TYPE( \
  1826. "\n -type X File type is X (one of: f,d,l,b,c,...)" \
  1827. ) \
  1828. IF_FEATURE_FIND_PERM( \
  1829. "\n -perm MASK At least one mask bit (+MASK), all bits (-MASK)," \
  1830. "\n or exactly MASK bits are set in file's mode" \
  1831. ) \
  1832. IF_FEATURE_FIND_MTIME( \
  1833. "\n -mtime DAYS mtime is greater than (+N), less than (-N)," \
  1834. "\n or exactly N days in the past" \
  1835. ) \
  1836. IF_FEATURE_FIND_MMIN( \
  1837. "\n -mmin MINS mtime is greater than (+N), less than (-N)," \
  1838. "\n or exactly N minutes in the past" \
  1839. ) \
  1840. IF_FEATURE_FIND_NEWER( \
  1841. "\n -newer FILE mtime is more recent than FILE's" \
  1842. ) \
  1843. IF_FEATURE_FIND_INUM( \
  1844. "\n -inum N File has inode number N" \
  1845. ) \
  1846. IF_FEATURE_FIND_USER( \
  1847. "\n -user NAME/ID File is owned by given user" \
  1848. ) \
  1849. IF_FEATURE_FIND_GROUP( \
  1850. "\n -group NAME/ID File is owned by given group" \
  1851. ) \
  1852. IF_FEATURE_FIND_SIZE( \
  1853. "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))" \
  1854. "\n +/-N: file size is bigger/smaller than N" \
  1855. ) \
  1856. IF_FEATURE_FIND_LINKS( \
  1857. "\n -links N Number of links is greater than (+N), less than (-N)," \
  1858. "\n or exactly N" \
  1859. ) \
  1860. IF_FEATURE_FIND_CONTEXT( \
  1861. "\n -context CTX File has specified security context" \
  1862. ) \
  1863. IF_FEATURE_FIND_PRUNE( \
  1864. "\n -prune If current file is directory, don't descend into it" \
  1865. ) \
  1866. "\nIf none of the following actions is specified, -print is assumed" \
  1867. "\n -print Print file name" \
  1868. IF_FEATURE_FIND_PRINT0( \
  1869. "\n -print0 Print file name, NUL terminated" \
  1870. ) \
  1871. IF_FEATURE_FIND_EXEC( \
  1872. "\n -exec CMD ARG ; Run CMD with all instances of {} replaced by" \
  1873. "\n file name. Fails if CMD exits with nonzero" \
  1874. ) \
  1875. IF_FEATURE_FIND_EXEC_PLUS( \
  1876. "\n -exec CMD ARG + Run CMD with {} replaced by list of file names" \
  1877. ) \
  1878. IF_FEATURE_FIND_DELETE( \
  1879. "\n -delete Delete current file/directory. Turns on -depth option" \
  1880. ) \
  1881. #define find_example_usage \
  1882. "$ find / -name passwd\n" \
  1883. "/etc/passwd\n" \
  1884. #define grep_trivial_usage \
  1885. "[-HhnlLoqvsriwFE" \
  1886. IF_EXTRA_COMPAT("z") \
  1887. "] [-m N] " \
  1888. IF_FEATURE_GREP_CONTEXT("[-A/B/C N] ") \
  1889. "PATTERN/-e PATTERN.../-f FILE [FILE]..." \
  1890. #define grep_full_usage "\n\n" \
  1891. "Search for PATTERN in FILEs (or stdin)\n" \
  1892. "\n -H Add 'filename:' prefix" \
  1893. "\n -h Do not add 'filename:' prefix" \
  1894. "\n -n Add 'line_no:' prefix" \
  1895. "\n -l Show only names of files that match" \
  1896. "\n -L Show only names of files that don't match" \
  1897. "\n -c Show only count of matching lines" \
  1898. "\n -o Show only the matching part of line" \
  1899. "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \
  1900. "\n -v Select non-matching lines" \
  1901. "\n -s Suppress open and read errors" \
  1902. "\n -r Recurse" \
  1903. "\n -i Ignore case" \
  1904. "\n -w Match whole words only" \
  1905. "\n -x Match whole lines only" \
  1906. "\n -F PATTERN is a literal (not regexp)" \
  1907. "\n -E PATTERN is an extended regexp" \
  1908. IF_EXTRA_COMPAT( \
  1909. "\n -z Input is NUL terminated" \
  1910. ) \
  1911. "\n -m N Match up to N times per file" \
  1912. IF_FEATURE_GREP_CONTEXT( \
  1913. "\n -A N Print N lines of trailing context" \
  1914. "\n -B N Print N lines of leading context" \
  1915. "\n -C N Same as '-A N -B N'" \
  1916. ) \
  1917. "\n -e PTRN Pattern to match" \
  1918. "\n -f FILE Read pattern from file" \
  1919. #define grep_example_usage \
  1920. "$ grep root /etc/passwd\n" \
  1921. "root:x:0:0:root:/root:/bin/bash\n" \
  1922. "$ grep ^[rR]oo. /etc/passwd\n" \
  1923. "root:x:0:0:root:/root:/bin/bash\n" \
  1924. #define egrep_trivial_usage NOUSAGE_STR \
  1925. #define egrep_full_usage "" \
  1926. #define fgrep_trivial_usage NOUSAGE_STR \
  1927. #define fgrep_full_usage "" \
  1928. #define xargs_trivial_usage \
  1929. "[OPTIONS] [PROG ARGS]" \
  1930. #define xargs_full_usage "\n\n" \
  1931. "Run PROG on every item given by stdin\n" \
  1932. IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
  1933. "\n -p Ask user whether to run each command" \
  1934. ) \
  1935. "\n -r Don't run command if input is empty" \
  1936. IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
  1937. "\n -0 Input is separated by NUL characters" \
  1938. ) \
  1939. IF_FEATURE_XARGS_SUPPORT_ARGS_FILE( \
  1940. "\n -a FILE Read from FILE instead of stdin" \
  1941. ) \
  1942. "\n -t Print the command on stderr before execution" \
  1943. "\n -e[STR] STR stops input processing" \
  1944. "\n -n N Pass no more than N args to PROG" \
  1945. "\n -s N Pass command line of no more than N bytes" \
  1946. IF_FEATURE_XARGS_SUPPORT_REPL_STR( \
  1947. "\n -I STR Replace STR within PROG ARGS with input line" \
  1948. ) \
  1949. IF_FEATURE_XARGS_SUPPORT_PARALLEL( \
  1950. "\n -P N Run up to N PROGs in parallel" \
  1951. ) \
  1952. IF_FEATURE_XARGS_SUPPORT_TERMOPT( \
  1953. "\n -x Exit if size is exceeded" \
  1954. ) \
  1955. #define xargs_example_usage \
  1956. "$ ls | xargs gzip\n" \
  1957. "$ find . -name '*.c' -print | xargs rm\n" \
  1958. #define bootchartd_trivial_usage \
  1959. "start [PROG ARGS]|stop|init" \
  1960. #define bootchartd_full_usage "\n\n" \
  1961. "Create /var/log/bootchart.tgz with boot chart data\n" \
  1962. "\nstart: start background logging; with PROG, run PROG, then kill logging with USR1" \
  1963. "\nstop: send USR1 to all bootchartd processes" \
  1964. "\ninit: start background logging; stop when getty/xdm is seen (for init scripts)" \
  1965. "\nUnder PID 1: as init, then exec $bootchart_init, /init, /sbin/init" \
  1966. #define halt_trivial_usage \
  1967. "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]") \
  1968. #define halt_full_usage "\n\n" \
  1969. "Halt the system\n" \
  1970. "\n -d SEC Delay interval" \
  1971. "\n -n Do not sync" \
  1972. "\n -f Force (don't go through init)" \
  1973. IF_FEATURE_WTMP( \
  1974. "\n -w Only write a wtmp record" \
  1975. ) \
  1976. #define poweroff_trivial_usage \
  1977. "[-d DELAY] [-n] [-f]" \
  1978. #define poweroff_full_usage "\n\n" \
  1979. "Halt and shut off power\n" \
  1980. "\n -d SEC Delay interval" \
  1981. "\n -n Do not sync" \
  1982. "\n -f Force (don't go through init)" \
  1983. #define reboot_trivial_usage \
  1984. "[-d DELAY] [-n] [-f]" \
  1985. #define reboot_full_usage "\n\n" \
  1986. "Reboot the system\n" \
  1987. "\n -d SEC Delay interval" \
  1988. "\n -n Do not sync" \
  1989. "\n -f Force (don't go through init)" \
  1990. #define linuxrc_trivial_usage NOUSAGE_STR \
  1991. #define linuxrc_full_usage "" \
  1992. #define init_trivial_usage \
  1993. "" \
  1994. #define init_full_usage "\n\n" \
  1995. "Init is the first process started during boot. It never exits." \
  1996. IF_FEATURE_USE_INITTAB( \
  1997. "\n""It (re)spawns children according to /etc/inittab." \
  1998. ) \
  1999. IF_NOT_FEATURE_USE_INITTAB( \
  2000. "\n""This version of init doesn't use /etc/inittab," \
  2001. "\n""has fixed set of processed to run." \
  2002. ) \
  2003. #define init_notes_usage \
  2004. "This version of init is designed to be run only by the kernel.\n" \
  2005. "\n" \
  2006. "BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
  2007. "the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
  2008. "runlevels, use sysvinit.\n" \
  2009. "\n" \
  2010. "BusyBox init works just fine without an inittab. If no inittab is found,\n" \
  2011. "it has the following default behavior:\n" \
  2012. "\n" \
  2013. " ::sysinit:/etc/init.d/rcS\n" \
  2014. " ::askfirst:/bin/sh\n" \
  2015. " ::ctrlaltdel:/sbin/reboot\n" \
  2016. " ::shutdown:/sbin/swapoff -a\n" \
  2017. " ::shutdown:/bin/umount -a -r\n" \
  2018. " ::restart:/sbin/init\n" \
  2019. " tty2::askfirst:/bin/sh\n" \
  2020. " tty3::askfirst:/bin/sh\n" \
  2021. " tty4::askfirst:/bin/sh\n" \
  2022. "\n" \
  2023. "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
  2024. "\n" \
  2025. " <id>:<runlevels>:<action>:<process>\n" \
  2026. "\n" \
  2027. " <id>:\n" \
  2028. "\n" \
  2029. " WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
  2030. " The id field is used by BusyBox init to specify the controlling tty for\n" \
  2031. " the specified process to run on. The contents of this field are\n" \
  2032. " appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
  2033. " be unique, although if it isn't you may have strange results. If this\n" \
  2034. " field is left blank, then the init's stdin/out will be used.\n" \
  2035. "\n" \
  2036. " <runlevels>:\n" \
  2037. "\n" \
  2038. " The runlevels field is completely ignored.\n" \
  2039. "\n" \
  2040. " <action>:\n" \
  2041. "\n" \
  2042. " Valid actions include: sysinit, respawn, askfirst, wait,\n" \
  2043. " once, restart, ctrlaltdel, and shutdown.\n" \
  2044. "\n" \
  2045. " The available actions can be classified into two groups: actions\n" \
  2046. " that are run only once, and actions that are re-run when the specified\n" \
  2047. " process exits.\n" \
  2048. "\n" \
  2049. " Run only-once actions:\n" \
  2050. "\n" \
  2051. " 'sysinit' is the first item run on boot. init waits until all\n" \
  2052. " sysinit actions are completed before continuing. Following the\n" \
  2053. " completion of all sysinit actions, all 'wait' actions are run.\n" \
  2054. " 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
  2055. " the specified task completes. 'once' actions are asynchronous,\n" \
  2056. " therefore, init does not wait for them to complete. 'restart' is\n" \
  2057. " the action taken to restart the init process. By default this should\n" \
  2058. " simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
  2059. " can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
  2060. " actions are run when the system detects that someone on the system\n" \
  2061. " console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
  2062. " wants to run 'reboot' at this point to cause the system to reboot.\n" \
  2063. " Finally the 'shutdown' action specifies the actions to taken when\n" \
  2064. " init is told to reboot. Unmounting filesystems and disabling swap\n" \
  2065. " is a very good here.\n" \
  2066. "\n" \
  2067. " Run repeatedly actions:\n" \
  2068. "\n" \
  2069. " 'respawn' actions are run after the 'once' actions. When a process\n" \
  2070. " started with a 'respawn' action exits, init automatically restarts\n" \
  2071. " it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
  2072. " respawning out of control. The 'askfirst' actions acts just like\n" \
  2073. " respawn, except that before running the specified process it\n" \
  2074. " displays the line \"Please press Enter to activate this console.\"\n" \
  2075. " and then waits for the user to press enter before starting the\n" \
  2076. " specified process.\n" \
  2077. "\n" \
  2078. " Unrecognized actions (like initdefault) will cause init to emit an\n" \
  2079. " error message, and then go along with its business. All actions are\n" \
  2080. " run in the order they appear in /etc/inittab.\n" \
  2081. "\n" \
  2082. " <process>:\n" \
  2083. "\n" \
  2084. " Specifies the process to be executed and its command line.\n" \
  2085. "\n" \
  2086. "Example /etc/inittab file:\n" \
  2087. "\n" \
  2088. " # This is run first except when booting in single-user mode\n" \
  2089. " #\n" \
  2090. " ::sysinit:/etc/init.d/rcS\n" \
  2091. " \n" \
  2092. " # /bin/sh invocations on selected ttys\n" \
  2093. " #\n" \
  2094. " # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
  2095. " ::askfirst:-/bin/sh\n" \
  2096. " # Start an \"askfirst\" shell on /dev/tty2-4\n" \
  2097. " tty2::askfirst:-/bin/sh\n" \
  2098. " tty3::askfirst:-/bin/sh\n" \
  2099. " tty4::askfirst:-/bin/sh\n" \
  2100. " \n" \
  2101. " # /sbin/getty invocations for selected ttys\n" \
  2102. " #\n" \
  2103. " tty4::respawn:/sbin/getty 38400 tty4\n" \
  2104. " tty5::respawn:/sbin/getty 38400 tty5\n" \
  2105. " \n" \
  2106. " \n" \
  2107. " # Example of how to put a getty on a serial line (for a terminal)\n" \
  2108. " #\n" \
  2109. " #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
  2110. " #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
  2111. " #\n" \
  2112. " # Example how to put a getty on a modem line\n" \
  2113. " #::respawn:/sbin/getty 57600 ttyS2\n" \
  2114. " \n" \
  2115. " # Stuff to do when restarting the init process\n" \
  2116. " ::restart:/sbin/init\n" \
  2117. " \n" \
  2118. " # Stuff to do before rebooting\n" \
  2119. " ::ctrlaltdel:/sbin/reboot\n" \
  2120. " ::shutdown:/bin/umount -a -r\n" \
  2121. " ::shutdown:/sbin/swapoff -a\n" \
  2122. #define nuke_trivial_usage \
  2123. "DIR..." \
  2124. #define nuke_full_usage "\n\n" \
  2125. "Remove DIRs" \
  2126. #define resume_trivial_usage \
  2127. "BLOCKDEV [OFFSET]" \
  2128. #define resume_full_usage "\n" \
  2129. "\n""Restore system state from 'suspend-to-disk' data in BLOCKDEV" \
  2130. #define busybox_trivial_usage NOUSAGE_STR \
  2131. #define busybox_full_usage "" \
  2132. #define unit_trivial_usage \
  2133. "" \
  2134. #define unit_full_usage "\n\n" \
  2135. "Run the unit-test suite" \
  2136. #define parse_trivial_usage \
  2137. "[-x] [-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..." \
  2138. #define parse_full_usage "\n\n" \
  2139. " -x Suppress output (for benchmarking)" \
  2140. #define add_shell_trivial_usage \
  2141. "SHELL..." \
  2142. #define add_shell_full_usage "\n\n" \
  2143. "Add SHELLs to /etc/shells" \
  2144. #define remove_shell_trivial_usage \
  2145. "SHELL..." \
  2146. #define remove_shell_full_usage "\n\n" \
  2147. "Remove SHELLs from /etc/shells" \
  2148. #define addgroup_trivial_usage \
  2149. "[-g GID] [-S] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP" \
  2150. #define addgroup_full_usage "\n\n" \
  2151. "Add a group" IF_FEATURE_ADDUSER_TO_GROUP(" or add a user to a group") "\n" \
  2152. "\n -g GID Group id" \
  2153. "\n -S Create a system group" \
  2154. #define adduser_trivial_usage \
  2155. "[OPTIONS] USER [GROUP]" \
  2156. #define adduser_full_usage "\n\n" \
  2157. "Create new user, or add USER to GROUP\n" \
  2158. "\n -h DIR Home directory" \
  2159. "\n -g GECOS GECOS field" \
  2160. "\n -s SHELL Login shell" \
  2161. "\n -G GRP Group" \
  2162. "\n -S Create a system user" \
  2163. "\n -D Don't assign a password" \
  2164. "\n -H Don't create home directory" \
  2165. "\n -u UID User id" \
  2166. "\n -k SKEL Skeleton directory (/etc/skel)" \
  2167. #define chpasswd_trivial_usage \
  2168. IF_LONG_OPTS("[--md5|--encrypted|--crypt-method]") IF_NOT_LONG_OPTS("[-m|-e|-c]") \
  2169. #define chpasswd_full_usage "\n\n" \
  2170. "Read user:password from stdin and update /etc/passwd\n" \
  2171. IF_LONG_OPTS( \
  2172. "\n -e,--encrypted Supplied passwords are in encrypted form" \
  2173. "\n -m,--md5 Eencrypt using md5, not des" \
  2174. "\n -c,--crypt-method ALG "CRYPT_METHODS_HELP_STR \
  2175. ) \
  2176. IF_NOT_LONG_OPTS( \
  2177. "\n -e Supplied passwords are in encrypted form" \
  2178. "\n -m Eencrypt using md5, not des" \
  2179. "\n -c ALG "CRYPT_METHODS_HELP_STR \
  2180. ) \
  2181. #define cryptpw_trivial_usage \
  2182. "[OPTIONS] [PASSWORD] [SALT]" \
  2183. #define cryptpw_full_usage "\n\n" \
  2184. "Print crypt(3) hashed PASSWORD\n" \
  2185. IF_LONG_OPTS( \
  2186. "\n -P,--password-fd N Read password from fd N" \
  2187. "\n -m,--method TYPE "CRYPT_METHODS_HELP_STR \
  2188. "\n -S,--salt SALT" \
  2189. ) \
  2190. IF_NOT_LONG_OPTS( \
  2191. "\n -P N Read password from fd N" \
  2192. "\n -m TYPE "CRYPT_METHODS_HELP_STR \
  2193. "\n -S SALT" \
  2194. ) \
  2195. #define deluser_trivial_usage \
  2196. IF_LONG_OPTS("[--remove-home] ") "USER" \
  2197. #define deluser_full_usage "\n\n" \
  2198. "Delete USER from the system" \
  2199. #define delgroup_trivial_usage \
  2200. IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP" \
  2201. #define delgroup_full_usage "\n\n" \
  2202. "Delete group GROUP from the system" \
  2203. IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP") \
  2204. #define getty_trivial_usage \
  2205. "[OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]" \
  2206. #define getty_full_usage "\n\n" \
  2207. "Open TTY, prompt for login name, then invoke /bin/login\n" \
  2208. "\n -h Enable hardware RTS/CTS flow control" \
  2209. "\n -L Set CLOCAL (ignore Carrier Detect state)" \
  2210. "\n -m Get baud rate from modem's CONNECT status message" \
  2211. "\n -n Don't prompt for login name" \
  2212. "\n -w Wait for CR or LF before sending /etc/issue" \
  2213. "\n -i Don't display /etc/issue" \
  2214. "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" \
  2215. "\n -l LOGIN Invoke LOGIN instead of /bin/login" \
  2216. "\n -t SEC Terminate after SEC if no login name is read" \
  2217. "\n -I INITSTR Send INITSTR before anything else" \
  2218. "\n -H HOST Log HOST into the utmp file as the hostname" \
  2219. "\n" \
  2220. "\nBAUD_RATE of 0 leaves it unchanged" \
  2221. #define login_trivial_usage \
  2222. "[-p] [-h HOST] [[-f] USER]" \
  2223. #define login_full_usage "\n\n" \
  2224. "Begin a new session on the system\n" \
  2225. "\n -f Don't authenticate (user already authenticated)" \
  2226. "\n -h HOST Host user came from (for network logins)" \
  2227. "\n -p Preserve environment" \
  2228. #define passwd_trivial_usage \
  2229. "[OPTIONS] [USER]" \
  2230. #define passwd_full_usage "\n\n" \
  2231. "Change USER's password (default: current user)" \
  2232. "\n" \
  2233. "\n -a ALG "CRYPT_METHODS_HELP_STR \
  2234. "\n -d Set password to ''" \
  2235. "\n -l Lock (disable) account" \
  2236. "\n -u Unlock (enable) account" \
  2237. #define su_trivial_usage \
  2238. "[-lmp] [-] [-s SH] [USER [SCRIPT ARGS / -c 'CMD' ARG0 ARGS]]" \
  2239. #define su_full_usage "\n\n" \
  2240. "Run shell under USER (by default, root)\n" \
  2241. "\n -,-l Clear environment, go to home dir, run shell as login shell" \
  2242. "\n -p,-m Do not set new $HOME, $SHELL, $USER, $LOGNAME" \
  2243. "\n -c CMD Command to pass to 'sh -c'" \
  2244. "\n -s SH Shell to use instead of user's default" \
  2245. #define sulogin_trivial_usage \
  2246. "[-t N] [TTY]" \
  2247. #define sulogin_full_usage "\n\n" \
  2248. "Single user login\n" \
  2249. "\n -t N Timeout" \
  2250. #define vlock_trivial_usage \
  2251. "[-a]" \
  2252. #define vlock_full_usage "\n\n" \
  2253. "Lock a virtual terminal. A password is required to unlock.\n" \
  2254. "\n -a Lock all VTs" \
  2255. #define makemime_trivial_usage \
  2256. "[OPTIONS] [FILE]..." \
  2257. #define makemime_full_usage "\n\n" \
  2258. "Create multipart MIME-encoded message from FILEs\n" \
  2259. "\n -o FILE Output. Default: stdout" \
  2260. "\n -a HDR Add header(s). Examples:" \
  2261. "\n \"From: user@host.org\", \"Date: `date -R`\"" \
  2262. "\n -c CT Content type. Default: application/octet-stream" \
  2263. "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET \
  2264. "\n" \
  2265. "\nOther options are silently ignored" \
  2266. #define popmaildir_trivial_usage \
  2267. "[OPTIONS] MAILDIR [CONN_HELPER ARGS]" \
  2268. #define popmaildir_full_usage "\n\n" \
  2269. "Fetch content of remote mailbox to local maildir\n" \
  2270. "\n -s Skip authorization" \
  2271. "\n -T Get messages with TOP instead of RETR" \
  2272. "\n -k Keep retrieved messages on the server" \
  2273. "\n -t SEC Network timeout" \
  2274. IF_FEATURE_POPMAILDIR_DELIVERY( \
  2275. "\n -F \"PROG ARGS\" Filter program (may be repeated)" \
  2276. "\n -M \"PROG ARGS\" Delivery program" \
  2277. ) \
  2278. "\n" \
  2279. "\nFetch from plain POP3 server:" \
  2280. "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt" \
  2281. "\nFetch from SSLed POP3 server and delete fetched emails:" \
  2282. "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt" \
  2283. #define popmaildir_example_usage \
  2284. "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
  2285. "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n" \
  2286. #define reformime_trivial_usage \
  2287. "[OPTIONS]" \
  2288. #define reformime_full_usage "\n\n" \
  2289. "Parse MIME-encoded message on stdin\n" \
  2290. "\n -x PREFIX Extract content of MIME sections to files" \
  2291. "\n -X PROG ARGS Filter content of MIME sections through PROG" \
  2292. "\n Must be the last option" \
  2293. "\n" \
  2294. "\nOther options are silently ignored" \
  2295. #define sendmail_trivial_usage \
  2296. "[-tv] [-f SENDER] [-amLOGIN 4<user_pass.txt | -auUSER -apPASS]" \
  2297. "\n [-w SECS] [-H 'PROG ARGS' | -S HOST] [RECIPIENT_EMAIL]..." \
  2298. #define sendmail_full_usage "\n\n" \
  2299. "Read email from stdin and send it\n" \
  2300. "\nStandard options:" \
  2301. "\n -t Read additional recipients from message body" \
  2302. "\n -f SENDER For use in MAIL FROM:<sender>. Can be empty string" \
  2303. "\n Default: -auUSER, or username of current UID" \
  2304. "\n -o OPTIONS Various options. -oi implied, others are ignored" \
  2305. "\n -i -oi synonym, implied and ignored" \
  2306. "\n" \
  2307. "\nBusybox specific options:" \
  2308. "\n -v Verbose" \
  2309. "\n -w SECS Network timeout" \
  2310. "\n -H 'PROG ARGS' Run connection helper. Examples:" \
  2311. "\n openssl s_client -quiet -tls1 -starttls smtp -connect smtp.gmail.com:25" \
  2312. "\n openssl s_client -quiet -tls1 -connect smtp.gmail.com:465" \
  2313. "\n $SMTP_ANTISPAM_DELAY: seconds to wait after helper connect" \
  2314. "\n -S HOST[:PORT] Server (default $SMTPHOST or 127.0.0.1)" \
  2315. "\n -amLOGIN Log in using AUTH LOGIN (-amCRAM-MD5 not supported)" \
  2316. "\n -auUSER Username for AUTH" \
  2317. "\n -apPASS Password for AUTH" \
  2318. "\n" \
  2319. "\nIf no -a options are given, authentication is not done." \
  2320. "\nIf -amLOGIN is given but no -au/-ap, user/password is read from fd #4." \
  2321. "\nOther options are silently ignored; -oi is implied." \
  2322. IF_MAKEMIME( \
  2323. "\nUse makemime to create emails with attachments." \
  2324. ) \
  2325. #define adjtimex_trivial_usage \
  2326. "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" \
  2327. #define adjtimex_full_usage "\n\n" \
  2328. "Read or set kernel time variables. See adjtimex(2)\n" \
  2329. "\n -q Quiet" \
  2330. "\n -o OFF Time offset, microseconds" \
  2331. "\n -f FREQ Frequency adjust, integer kernel units (65536 is 1ppm)" \
  2332. "\n -t TICK Microseconds per tick, usually 10000" \
  2333. "\n (positive -t or -f values make clock run faster)" \
  2334. "\n -p TCONST" \
  2335. #define bbconfig_trivial_usage \
  2336. "" \
  2337. #define bbconfig_full_usage "\n\n" \
  2338. "Print the config file used by busybox build" \
  2339. #define beep_trivial_usage \
  2340. "-f FREQ -l LEN -d DELAY -r COUNT -n" \
  2341. #define beep_full_usage "\n\n" \
  2342. " -f Frequency in Hz" \
  2343. "\n -l Length in ms" \
  2344. "\n -d Delay in ms" \
  2345. "\n -r Repetitions" \
  2346. "\n -n Start new tone" \
  2347. #define chat_trivial_usage \
  2348. "EXPECT [SEND [EXPECT [SEND...]]]" \
  2349. #define chat_full_usage "\n\n" \
  2350. "Useful for interacting with a modem connected to stdin/stdout.\n" \
  2351. "A script consists of \"expect-send\" argument pairs.\n" \
  2352. "Example:\n" \
  2353. "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
  2354. #define conspy_trivial_usage \
  2355. "[-vcsndfFQ] [-x COL] [-y LINE] [CONSOLE_NO]" \
  2356. #define conspy_full_usage "\n\n" \
  2357. "A text-mode VNC like program for Linux virtual consoles." \
  2358. "\nTo exit, quickly press ESC 3 times." \
  2359. "\n" \
  2360. "\n -v Don't send keystrokes to the console" \
  2361. "\n -c Create missing /dev/{tty,vcsa}N" \
  2362. "\n -s Open a SHELL session" \
  2363. "\n -n Black & white" \
  2364. "\n -d Dump console to stdout" \
  2365. "\n -f Follow cursor" \
  2366. "\n -F Assume console is on a framebuffer device" \
  2367. "\n -Q Disable exit on ESC-ESC-ESC" \
  2368. "\n -x COL Starting column" \
  2369. "\n -y LINE Starting line" \
  2370. #define crond_trivial_usage \
  2371. "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" \
  2372. #define crond_full_usage "\n\n" \
  2373. " -f Foreground" \
  2374. "\n -b Background (default)" \
  2375. "\n -S Log to syslog (default)" \
  2376. "\n -l N Set log level. Most verbose 0, default 8" \
  2377. IF_FEATURE_CROND_D( \
  2378. "\n -d N Set log level, log to stderr" \
  2379. ) \
  2380. "\n -L FILE Log to FILE" \
  2381. "\n -c DIR Cron dir. Default:"CONFIG_FEATURE_CROND_DIR"/crontabs" \
  2382. #define crontab_trivial_usage \
  2383. "[-c DIR] [-u USER] [-ler]|[FILE]" \
  2384. #define crontab_full_usage "\n\n" \
  2385. " -c Crontab directory" \
  2386. "\n -u User" \
  2387. "\n -l List crontab" \
  2388. "\n -e Edit crontab" \
  2389. "\n -r Delete crontab" \
  2390. "\n FILE Replace crontab by FILE ('-': stdin)" \
  2391. #define dc_trivial_usage \
  2392. "EXPRESSION..." \
  2393. #define dc_full_usage "\n\n" \
  2394. "Tiny RPN calculator. Operations:\n" \
  2395. "+, add, -, sub, *, mul, /, div, %, mod, "IF_FEATURE_DC_LIBM("**, exp, ")"and, or, not, xor,\n" \
  2396. "p - print top of the stack (without popping),\n" \
  2397. "f - print entire stack,\n" \
  2398. "o - pop the value and set output radix (must be 10, 16, 8 or 2).\n" \
  2399. "Examples: 'dc 2 2 add p' -> 4, 'dc 8 8 mul 2 2 + / p' -> 16" \
  2400. #define dc_example_usage \
  2401. "$ dc 2 2 + p\n" \
  2402. "4\n" \
  2403. "$ dc 8 8 \\* 2 2 + / p\n" \
  2404. "16\n" \
  2405. "$ dc 0 1 and p\n" \
  2406. "0\n" \
  2407. "$ dc 0 1 or p\n" \
  2408. "1\n" \
  2409. "$ echo 72 9 div 8 mul p | dc\n" \
  2410. "64\n" \
  2411. #define devfsd_trivial_usage \
  2412. "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") \
  2413. #define devfsd_full_usage "\n\n" \
  2414. "Manage devfs permissions and old device name symlinks\n" \
  2415. "\n mntpnt The mount point where devfs is mounted" \
  2416. "\n -v Print the protocol version numbers for devfsd" \
  2417. "\n and the kernel-side protocol version and exit" \
  2418. IF_DEVFSD_FG_NP( \
  2419. "\n -fg Run in foreground" \
  2420. "\n -np Exit after parsing the configuration file" \
  2421. "\n and processing synthetic REGISTER events," \
  2422. "\n don't poll for events" \
  2423. ) \
  2424. #define devmem_trivial_usage \
  2425. "ADDRESS [WIDTH [VALUE]]" \
  2426. #define devmem_full_usage "\n\n" \
  2427. "Read/write from physical address\n" \
  2428. "\n ADDRESS Address to act upon" \
  2429. "\n WIDTH Width (8/16/...)" \
  2430. "\n VALUE Data to be written" \
  2431. #define fbsplash_trivial_usage \
  2432. "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" \
  2433. #define fbsplash_full_usage "\n\n" \
  2434. " -s Image" \
  2435. "\n -c Hide cursor" \
  2436. "\n -d Framebuffer device (default /dev/fb0)" \
  2437. "\n -i Config file (var=value):" \
  2438. "\n BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT" \
  2439. "\n BAR_R,BAR_G,BAR_B" \
  2440. "\n -f Control pipe (else exit after drawing image)" \
  2441. "\n commands: 'NN' (% for progress bar) or 'exit'" \
  2442. #define flash_eraseall_trivial_usage \
  2443. "[-jNq] MTD_DEVICE" \
  2444. #define flash_eraseall_full_usage "\n\n" \
  2445. "Erase an MTD device\n" \
  2446. "\n -j Format the device for jffs2" \
  2447. "\n -N Don't skip bad blocks" \
  2448. "\n -q Don't display progress messages" \
  2449. #define flash_lock_trivial_usage \
  2450. "MTD_DEVICE OFFSET SECTORS" \
  2451. #define flash_lock_full_usage "\n\n" \
  2452. "Lock part or all of an MTD device. If SECTORS is -1, then all sectors\n" \
  2453. "will be locked, regardless of the value of OFFSET" \
  2454. #define flash_unlock_trivial_usage \
  2455. "MTD_DEVICE" \
  2456. #define flash_unlock_full_usage "\n\n" \
  2457. "Unlock an MTD device" \
  2458. #define flashcp_trivial_usage \
  2459. "-v FILE MTD_DEVICE" \
  2460. #define flashcp_full_usage "\n\n" \
  2461. "Copy an image to MTD device\n" \
  2462. "\n -v Verbose" \
  2463. #define hdparm_trivial_usage \
  2464. "[OPTIONS] [DEVICE]" \
  2465. #define hdparm_full_usage "\n\n" \
  2466. " -a Get/set fs readahead" \
  2467. "\n -A Set drive read-lookahead flag (0/1)" \
  2468. "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)" \
  2469. "\n -B Set Advanced Power Management setting (1-255)" \
  2470. "\n -c Get/set IDE 32-bit IO setting" \
  2471. "\n -C Check IDE power mode status" \
  2472. IF_FEATURE_HDPARM_HDIO_GETSET_DMA( \
  2473. "\n -d Get/set using_dma flag") \
  2474. "\n -D Enable/disable drive defect-mgmt" \
  2475. "\n -f Flush buffer cache for device on exit" \
  2476. "\n -g Display drive geometry" \
  2477. "\n -h Display terse usage information" \
  2478. IF_FEATURE_HDPARM_GET_IDENTITY( \
  2479. "\n -i Display drive identification") \
  2480. IF_FEATURE_HDPARM_GET_IDENTITY( \
  2481. "\n -I Detailed/current information directly from drive") \
  2482. "\n -k Get/set keep_settings_over_reset flag (0/1)" \
  2483. "\n -K Set drive keep_features_over_reset flag (0/1)" \
  2484. "\n -L Set drive doorlock (0/1) (removable harddisks only)" \
  2485. "\n -m Get/set multiple sector count" \
  2486. "\n -n Get/set ignore-write-errors flag (0/1)" \
  2487. "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \
  2488. "\n -P Set drive prefetch count" \
  2489. "\n -Q Get/set DMA tagged-queuing depth (if supported)" \
  2490. "\n -r Get/set readonly flag (DANGEROUS to set)" \
  2491. IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
  2492. "\n -R Register an IDE interface (DANGEROUS)") \
  2493. "\n -S Set standby (spindown) timeout" \
  2494. "\n -t Perform device read timings" \
  2495. "\n -T Perform cache read timings" \
  2496. "\n -u Get/set unmaskirq flag (0/1)" \
  2497. IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
  2498. "\n -U Unregister an IDE interface (DANGEROUS)") \
  2499. "\n -v Defaults; same as -mcudkrag for IDE drives" \
  2500. "\n -V Display program version and exit immediately" \
  2501. IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
  2502. "\n -w Perform device reset (DANGEROUS)") \
  2503. "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
  2504. IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
  2505. "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
  2506. "\n -X Set IDE xfer mode (DANGEROUS)" \
  2507. "\n -y Put IDE drive in standby mode" \
  2508. "\n -Y Put IDE drive to sleep" \
  2509. "\n -Z Disable Seagate auto-powersaving mode" \
  2510. "\n -z Reread partition table" \
  2511. #define hexedit_trivial_usage \
  2512. "FILE" \
  2513. #define hexedit_full_usage "\n\n" \
  2514. "Edit FILE in hexadecimal" \
  2515. #define i2cget_trivial_usage \
  2516. "[-fy] BUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]" \
  2517. #define i2cget_full_usage "\n\n" \
  2518. "Read from I2C/SMBus chip registers" \
  2519. "\n" \
  2520. "\n I2CBUS I2C bus number" \
  2521. "\n ADDRESS 0x03-0x77" \
  2522. "\nMODE is:" \
  2523. "\n b Read byte data (default)" \
  2524. "\n w Read word data" \
  2525. "\n c Write byte/read byte" \
  2526. "\n Append p for SMBus PEC" \
  2527. "\n" \
  2528. "\n -f Force access" \
  2529. "\n -y Disable interactive mode" \
  2530. #define i2cset_trivial_usage \
  2531. "[-fy] [-m MASK] BUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]" \
  2532. #define i2cset_full_usage "\n\n" \
  2533. "Set I2C registers" \
  2534. "\n" \
  2535. "\n I2CBUS I2C bus number" \
  2536. "\n ADDRESS 0x03-0x77" \
  2537. "\nMODE is:" \
  2538. "\n c Byte, no value" \
  2539. "\n b Byte data (default)" \
  2540. "\n w Word data" \
  2541. "\n i I2C block data" \
  2542. "\n s SMBus block data" \
  2543. "\n Append p for SMBus PEC" \
  2544. "\n" \
  2545. "\n -f Force access" \
  2546. "\n -y Disable interactive mode" \
  2547. "\n -r Read back and compare the result" \
  2548. "\n -m MASK Mask specifying which bits to write" \
  2549. #define i2cdump_trivial_usage \
  2550. "[-fy] [-r FIRST-LAST] BUS ADDR [MODE]" \
  2551. #define i2cdump_full_usage "\n\n" \
  2552. "Examine I2C registers" \
  2553. "\n" \
  2554. "\n I2CBUS I2C bus number" \
  2555. "\n ADDRESS 0x03-0x77" \
  2556. "\nMODE is:" \
  2557. "\n b Byte (default)" \
  2558. "\n w Word" \
  2559. "\n W Word on even register addresses" \
  2560. "\n i I2C block" \
  2561. "\n s SMBus block" \
  2562. "\n c Consecutive byte" \
  2563. "\n Append p for SMBus PEC" \
  2564. "\n" \
  2565. "\n -f Force access" \
  2566. "\n -y Disable interactive mode" \
  2567. "\n -r Limit the number of registers being accessed" \
  2568. #define i2cdetect_trivial_usage \
  2569. "-l | -F I2CBUS | [-ya] [-q|-r] I2CBUS [FIRST LAST]" \
  2570. #define i2cdetect_full_usage "\n\n" \
  2571. "Detect I2C chips" \
  2572. "\n" \
  2573. "\n -l List installed buses" \
  2574. "\n -F BUS# List functionalities on this bus" \
  2575. "\n -y Disable interactive mode" \
  2576. "\n -a Force scanning of non-regular addresses" \
  2577. "\n -q Use smbus quick write commands for probing (default)" \
  2578. "\n -r Use smbus read byte commands for probing" \
  2579. "\n FIRST and LAST limit probing range" \
  2580. #define inotifyd_trivial_usage \
  2581. "PROG FILE1[:MASK]..." \
  2582. #define inotifyd_full_usage "\n\n" \
  2583. "Run PROG on filesystem changes." \
  2584. "\nWhen a filesystem event matching MASK occurs on FILEn," \
  2585. "\nPROG ACTUAL_EVENTS FILEn [SUBFILE] is run." \
  2586. "\nIf PROG is -, events are sent to stdout." \
  2587. "\nEvents:" \
  2588. "\n a File is accessed" \
  2589. "\n c File is modified" \
  2590. "\n e Metadata changed" \
  2591. "\n w Writable file is closed" \
  2592. "\n 0 Unwritable file is closed" \
  2593. "\n r File is opened" \
  2594. "\n D File is deleted" \
  2595. "\n M File is moved" \
  2596. "\n u Backing fs is unmounted" \
  2597. "\n o Event queue overflowed" \
  2598. "\n x File can't be watched anymore" \
  2599. "\nIf watching a directory:" \
  2600. "\n y Subfile is moved into dir" \
  2601. "\n m Subfile is moved out of dir" \
  2602. "\n n Subfile is created" \
  2603. "\n d Subfile is deleted" \
  2604. "\n" \
  2605. "\ninotifyd waits for PROG to exit." \
  2606. "\nWhen x event happens for all FILEs, inotifyd exits." \
  2607. #define less_trivial_usage \
  2608. "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") \
  2609. "N" IF_FEATURE_LESS_TRUNCATE("S") "h~] [FILE]..." \
  2610. #define less_full_usage "\n\n" \
  2611. "View FILE (or stdin) one screenful at a time\n" \
  2612. "\n -E Quit once the end of a file is reached" \
  2613. IF_FEATURE_LESS_REGEXP( \
  2614. "\n -I Ignore case in all searches" \
  2615. ) \
  2616. IF_FEATURE_LESS_FLAGS( \
  2617. "\n -M,-m Display status line with line numbers" \
  2618. "\n and percentage through the file" \
  2619. ) \
  2620. "\n -N Prefix line number to each line" \
  2621. IF_FEATURE_LESS_TRUNCATE( \
  2622. "\n -S Truncate long lines" \
  2623. ) \
  2624. "\n -~ Suppress ~s displayed past EOF" \
  2625. #define lsscsi_trivial_usage NOUSAGE_STR \
  2626. #define lsscsi_full_usage "" \
  2627. #if ENABLE_FEATURE_MAKEDEVS_LEAF \
  2628. #define makedevs_trivial_usage \
  2629. "NAME TYPE MAJOR MINOR FIRST LAST [s]" \
  2630. #define makedevs_full_usage "\n\n" \
  2631. "Create a range of block or character special files" \
  2632. "\n" \
  2633. "\nTYPE is:" \
  2634. "\n b Block device" \
  2635. "\n c Character device" \
  2636. "\n f FIFO, MAJOR and MINOR are ignored" \
  2637. "\n" \
  2638. "\nFIRST..LAST specify numbers appended to NAME." \
  2639. "\nIf 's' is the last argument, the base device is created as well." \
  2640. "\n" \
  2641. "\nExamples:" \
  2642. "\n makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63" \
  2643. "\n makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8" \
  2644. #define makedevs_example_usage \
  2645. "# makedevs /dev/ttyS c 4 66 2 63\n" \
  2646. "[creates ttyS2-ttyS63]\n" \
  2647. "# makedevs /dev/hda b 3 0 0 8 s\n" \
  2648. "[creates hda,hda1-hda8]\n" \
  2649. #endif \
  2650. #if ENABLE_FEATURE_MAKEDEVS_TABLE \
  2651. #define makedevs_trivial_usage \
  2652. "[-d device_table] rootdir" \
  2653. #define makedevs_full_usage "\n\n" \
  2654. "Create a range of special files as specified in a device table.\n" \
  2655. "Device table entries take the form of:\n" \
  2656. "<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
  2657. "Where name is the file name, type can be one of:\n" \
  2658. " f Regular file\n" \
  2659. " d Directory\n" \
  2660. " c Character device\n" \
  2661. " b Block device\n" \
  2662. " p Fifo (named pipe)\n" \
  2663. "uid is the user id for the target file, gid is the group id for the\n" \
  2664. "target file. The rest of the entries (major, minor, etc) apply to\n" \
  2665. "to device special files. A '-' may be used for blank entries." \
  2666. #define makedevs_example_usage \
  2667. "For example:\n" \
  2668. "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
  2669. "/dev d 755 0 0 - - - - -\n" \
  2670. "/dev/console c 666 0 0 5 1 - - -\n" \
  2671. "/dev/null c 666 0 0 1 3 0 0 -\n" \
  2672. "/dev/zero c 666 0 0 1 5 0 0 -\n" \
  2673. "/dev/hda b 640 0 0 3 0 0 0 -\n" \
  2674. "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \
  2675. "Will Produce:\n" \
  2676. "/dev\n" \
  2677. "/dev/console\n" \
  2678. "/dev/null\n" \
  2679. "/dev/zero\n" \
  2680. "/dev/hda\n" \
  2681. "/dev/hda[0-15]\n" \
  2682. #endif \
  2683. #define man_trivial_usage \
  2684. "[-aw] [MANPAGE]..." \
  2685. #define man_full_usage "\n\n" \
  2686. "Format and display manual page\n" \
  2687. "\n -a Display all pages" \
  2688. "\n -w Show page locations" \
  2689. "\n" \
  2690. "\n$COLUMNS overrides output width" \
  2691. #define microcom_trivial_usage \
  2692. "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" \
  2693. #define microcom_full_usage "\n\n" \
  2694. "Copy bytes for stdin to TTY and from TTY to stdout\n" \
  2695. "\n -d Wait up to DELAY ms for TTY output before sending every" \
  2696. "\n next byte to it" \
  2697. "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \
  2698. "\n -s Set serial line to SPEED" \
  2699. "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \
  2700. #define mt_trivial_usage \
  2701. "[-f device] opcode value" \
  2702. #define mt_full_usage "\n\n" \
  2703. "Control magnetic tape drive operation\n" \
  2704. "\n" \
  2705. "Available Opcodes:\n" \
  2706. "\n" \
  2707. "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
  2708. "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
  2709. "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
  2710. "setpart tell unload unlock weof wset" \
  2711. #define nandwrite_trivial_usage \
  2712. "[-np] [-s ADDR] MTD_DEVICE [FILE]" \
  2713. #define nandwrite_full_usage "\n\n" \
  2714. "Write to MTD_DEVICE\n" \
  2715. "\n -n Write without ecc" \
  2716. "\n -p Pad to page size" \
  2717. "\n -s ADDR Start address" \
  2718. #define nanddump_trivial_usage \
  2719. "[-no]" IF_LONG_OPTS(" [--bb padbad|skipbad]") " [-s ADDR] [-l LEN] [-f FILE] MTD_DEVICE" \
  2720. #define nanddump_full_usage "\n\n" \
  2721. "Dump MTD_DEVICE\n" \
  2722. "\n -n Read without ecc" \
  2723. "\n -o Dump oob data" \
  2724. "\n -s ADDR Start address" \
  2725. "\n -l LEN Length" \
  2726. "\n -f FILE Dump to file ('-' for stdout)" \
  2727. IF_LONG_OPTS( \
  2728. "\n --bb METHOD" \
  2729. "\n skipbad: skip bad blocks" \
  2730. "\n padbad: substitute bad blocks by 0xff (default)" \
  2731. ) \
  2732. #define partprobe_trivial_usage \
  2733. "DEVICE..." \
  2734. #define partprobe_full_usage "\n\n" \
  2735. "Ask kernel to rescan partition table" \
  2736. #define raidautorun_trivial_usage \
  2737. "DEVICE" \
  2738. #define raidautorun_full_usage "\n\n" \
  2739. "Tell the kernel to automatically search and start RAID arrays" \
  2740. #define raidautorun_example_usage \
  2741. "$ raidautorun /dev/md0" \
  2742. #define readahead_trivial_usage \
  2743. "[FILE]..." \
  2744. #define readahead_full_usage "\n\n" \
  2745. "Preload FILEs to RAM" \
  2746. #define rfkill_trivial_usage \
  2747. "COMMAND [INDEX|TYPE]" \
  2748. #define rfkill_full_usage "\n\n" \
  2749. "Enable/disable wireless devices\n" \
  2750. "\nCommands:" \
  2751. "\n list [INDEX|TYPE] List current state" \
  2752. "\n block INDEX|TYPE Disable device" \
  2753. "\n unblock INDEX|TYPE Enable device" \
  2754. "\n" \
  2755. "\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \
  2756. "\n wimax, wwan, gps, fm" \
  2757. #define runlevel_trivial_usage \
  2758. "[FILE]" \
  2759. #define runlevel_full_usage "\n\n" \
  2760. "Find the current and previous system runlevel\n" \
  2761. "\n" \
  2762. "If no utmp FILE exists or if no runlevel record can be found,\n" \
  2763. "print \"unknown\"" \
  2764. #define runlevel_example_usage \
  2765. "$ runlevel /var/run/utmp\n" \
  2766. "N 2" \
  2767. #define rx_trivial_usage \
  2768. "FILE" \
  2769. #define rx_full_usage "\n\n" \
  2770. "Receive a file using the xmodem protocol" \
  2771. #define rx_example_usage \
  2772. "$ rx /tmp/foo\n" \
  2773. #define setfattr_trivial_usage \
  2774. "[-h] -n|-x ATTR [-v VALUE] FILE..." \
  2775. #define setfattr_full_usage "\n\n" \
  2776. "Set extended attributes" \
  2777. "\n" \
  2778. "\n -h Do not follow symlinks" \
  2779. "\n -x ATTR Remove attribute ATTR" \
  2780. "\n -n ATTR Set attribute ATTR to VALUE" \
  2781. "\n -v VALUE (default: empty)" \
  2782. #define setserial_trivial_usage \
  2783. "[-abGvz] { DEVICE [PARAMETER [ARG]]... | -g DEVICE... }" \
  2784. #define setserial_full_usage "\n\n" \
  2785. "Print or set serial port parameters" \
  2786. "\n" \
  2787. "\n"" -a Print all" \
  2788. "\n"" -b Print summary" \
  2789. "\n"" -G Print as setserial PARAMETERs" \
  2790. "\n"" -v Verbose" \
  2791. "\n"" -z Zero out serial flags before setting" \
  2792. "\n"" -g All args are device names" \
  2793. "\n" \
  2794. "\n""PARAMETERs: (* = takes ARG, ^ = can be turned off by preceding ^)" \
  2795. "\n"" *port, *irq, *divisor, *uart, *baud_base, *close_delay, *closing_wait," \
  2796. "\n"" ^fourport, ^auto_irq, ^skip_test, ^sak, ^session_lockout, ^pgrp_lockout," \
  2797. "\n"" ^callout_nohup, ^split_termios, ^hup_notify, ^low_latency, autoconfig," \
  2798. "\n"" spd_normal, spd_hi, spd_vhi, spd_shi, spd_warp, spd_cust" \
  2799. "\n""ARG for uart:" \
  2800. "\n"" unknown, 8250, 16450, 16550, 16550A, Cirrus, 16650, 16650V2, 16750," \
  2801. "\n"" 16950, 16954, 16654, 16850, RSA, NS16550A, XSCALE, RM9000, OCTEON, AR7," \
  2802. "\n"" U6_16550A" \
  2803. #define strings_trivial_usage \
  2804. "[-fo] [-t o/d/x] [-n LEN] [FILE]..." \
  2805. #define strings_full_usage "\n\n" \
  2806. "Display printable strings in a binary file\n" \
  2807. "\n -f Precede strings with filenames" \
  2808. "\n -o Precede strings with octal offsets" \
  2809. "\n -t o/d/x Precede strings with offsets in base 8/10/16" \
  2810. "\n -n LEN At least LEN characters form a string (default 4)" \
  2811. #define time_trivial_usage \
  2812. "[-vpa] [-o FILE] PROG ARGS" \
  2813. #define time_full_usage "\n\n" \
  2814. "Run PROG, display resource usage when it exits\n" \
  2815. "\n -v Verbose" \
  2816. "\n -p POSIX output format" \
  2817. "\n -f FMT Custom format" \
  2818. "\n -o FILE Write result to FILE" \
  2819. "\n -a Append (else overwrite)" \
  2820. #define ttysize_trivial_usage \
  2821. "[w] [h]" \
  2822. #define ttysize_full_usage "\n\n" \
  2823. "Print dimensions of stdin tty, or 80x24" \
  2824. #define ubiattach_trivial_usage \
  2825. "-m MTD_NUM [-d UBI_NUM] [-O VID_HDR_OFF] UBI_CTRL_DEV" \
  2826. #define ubiattach_full_usage "\n\n" \
  2827. "Attach MTD device to UBI\n" \
  2828. "\n -m MTD_NUM MTD device number to attach" \
  2829. "\n -d UBI_NUM UBI device number to assign" \
  2830. "\n -O VID_HDR_OFF VID header offset" \
  2831. #define ubidetach_trivial_usage \
  2832. "-d UBI_NUM UBI_CTRL_DEV" \
  2833. #define ubidetach_full_usage "\n\n" \
  2834. "Detach MTD device from UBI\n" \
  2835. "\n -d UBI_NUM UBI device number" \
  2836. #define ubimkvol_trivial_usage \
  2837. "-N NAME [-s SIZE | -m] UBI_DEVICE" \
  2838. #define ubimkvol_full_usage "\n\n" \
  2839. "Create UBI volume\n" \
  2840. "\n -a ALIGNMENT Volume alignment (default 1)" \
  2841. "\n -m Set volume size to maximum available" \
  2842. "\n -n VOLID Volume ID. If not specified," \
  2843. "\n assigned automatically" \
  2844. "\n -N NAME Volume name" \
  2845. "\n -s SIZE Size in bytes" \
  2846. "\n -t TYPE Volume type (static|dynamic)" \
  2847. #define ubirmvol_trivial_usage \
  2848. "-n VOLID / -N VOLNAME UBI_DEVICE" \
  2849. #define ubirmvol_full_usage "\n\n" \
  2850. "Remove UBI volume\n" \
  2851. "\n -n VOLID Volume ID" \
  2852. "\n -N VOLNAME Volume name" \
  2853. #define ubirsvol_trivial_usage \
  2854. "-n VOLID -s SIZE UBI_DEVICE" \
  2855. #define ubirsvol_full_usage "\n\n" \
  2856. "Resize UBI volume\n" \
  2857. "\n -n VOLID Volume ID" \
  2858. "\n -s SIZE Size in bytes" \
  2859. #define ubiupdatevol_trivial_usage \
  2860. "-t UBI_DEVICE | [-s SIZE] UBI_DEVICE IMG_FILE" \
  2861. #define ubiupdatevol_full_usage "\n\n" \
  2862. "Update UBI volume\n" \
  2863. "\n -t Truncate to zero size" \
  2864. "\n -s SIZE Size in bytes to resize to" \
  2865. #define ubirename_trivial_usage \
  2866. "UBI_DEVICE OLD_VOLNAME NEW_VOLNAME [OLD2 NEW2]..." \
  2867. #define ubirename_full_usage "\n\n" \
  2868. "Rename UBI volumes on UBI_DEVICE" \
  2869. #define volname_trivial_usage \
  2870. "[DEVICE]" \
  2871. #define volname_full_usage "\n\n" \
  2872. "Show CD volume name of the DEVICE (default /dev/cdrom)" \
  2873. #define watchdog_trivial_usage \
  2874. "[-t N[ms]] [-T N[ms]] [-F] DEV" \
  2875. #define watchdog_full_usage "\n\n" \
  2876. "Periodically write to watchdog device DEV\n" \
  2877. "\n -T N Reboot after N seconds if not reset (default 60)" \
  2878. "\n -t N Reset every N seconds (default 30)" \
  2879. "\n -F Run in foreground" \
  2880. "\n" \
  2881. "\nUse 500ms to specify period in milliseconds" \
  2882. #if !ENABLE_MODPROBE_SMALL \
  2883. #define depmod_trivial_usage "[-n] [-b BASE] [VERSION] [MODFILES]..." \
  2884. #define depmod_full_usage "\n\n" \
  2885. "Generate modules.dep, alias, and symbols files" \
  2886. "\n" \
  2887. "\n -b BASE Use BASE/lib/modules/VERSION" \
  2888. "\n -n Dry run: print files to stdout" \
  2889. #endif \
  2890. #if !ENABLE_MODPROBE_SMALL \
  2891. #define insmod_trivial_usage \
  2892. IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE") \
  2893. IF_NOT_FEATURE_2_4_MODULES("FILE") \
  2894. IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...") \
  2895. #define insmod_full_usage "\n\n" \
  2896. "Load kernel module" \
  2897. IF_FEATURE_2_4_MODULES( "\n" \
  2898. "\n -f Force module to load into the wrong kernel version" \
  2899. "\n -k Make module autoclean-able" \
  2900. "\n -v Verbose" \
  2901. "\n -q Quiet" \
  2902. "\n -L Lock: prevent simultaneous loads" \
  2903. IF_FEATURE_INSMOD_LOAD_MAP( \
  2904. "\n -m Output load map to stdout" \
  2905. ) \
  2906. "\n -x Don't export externs" \
  2907. ) \
  2908. #endif \
  2909. #if !ENABLE_MODPROBE_SMALL \
  2910. #define lsmod_trivial_usage \
  2911. "" \
  2912. #define lsmod_full_usage "\n\n" \
  2913. "List loaded kernel modules" \
  2914. #endif \
  2915. #define modinfo_trivial_usage \
  2916. "[-adlpn0] [-F keyword] MODULE" \
  2917. #define modinfo_full_usage "\n\n" \
  2918. " -a Shortcut for '-F author'" \
  2919. "\n -d Shortcut for '-F description'" \
  2920. "\n -l Shortcut for '-F license'" \
  2921. "\n -p Shortcut for '-F parm'" \
  2922. "\n -F keyword Keyword to look for" \
  2923. "\n -0 Separate output with NULs" \
  2924. #define modinfo_example_usage \
  2925. "$ modinfo -F vermagic loop\n" \
  2926. #if ENABLE_MODPROBE_SMALL \
  2927. #define lsmod_trivial_usage \
  2928. "" \
  2929. #define lsmod_full_usage "\n\n" \
  2930. "List loaded kernel modules" \
  2931. #endif \
  2932. #if ENABLE_MODPROBE_SMALL \
  2933. #define depmod_trivial_usage "[-n]" \
  2934. #define depmod_full_usage "\n\n" \
  2935. "Generate modules.dep.bb" \
  2936. "\n" \
  2937. "\n -n Dry run: print file to stdout" \
  2938. #define insmod_trivial_usage \
  2939. "FILE" IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...") \
  2940. #define insmod_full_usage "\n\n" \
  2941. "Load kernel module" \
  2942. #define rmmod_trivial_usage \
  2943. "MODULE..." \
  2944. #define rmmod_full_usage "\n\n" \
  2945. "Unload kernel modules" \
  2946. #define modprobe_trivial_usage \
  2947. "[-rq] MODULE" IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...") \
  2948. #define modprobe_full_usage "\n\n" \
  2949. " -r Remove MODULE" \
  2950. "\n -q Quiet" \
  2951. #endif \
  2952. #if !ENABLE_MODPROBE_SMALL \
  2953. #define modprobe_notes_usage \
  2954. "modprobe can (un)load a stack of modules, passing each module options (when\n" \
  2955. "loading). modprobe uses a configuration file to determine what option(s) to\n" \
  2956. "pass each module it loads.\n" \
  2957. "\n" \
  2958. "The configuration file is searched (in this order):\n" \
  2959. "\n" \
  2960. " /etc/modprobe.conf (2.6 only)\n" \
  2961. " /etc/modules.conf\n" \
  2962. " /etc/conf.modules (deprecated)\n" \
  2963. "\n" \
  2964. "They all have the same syntax (see below). If none is present, it is\n" \
  2965. "_not_ an error; each loaded module is then expected to load without\n" \
  2966. "options. Once a file is found, the others are tested for.\n" \
  2967. "\n" \
  2968. "/etc/modules.conf entry format:\n" \
  2969. "\n" \
  2970. " alias <alias_name> <mod_name>\n" \
  2971. " Makes it possible to modprobe alias_name, when there is no such module.\n" \
  2972. " It makes sense if your mod_name is long, or you want a more representative\n" \
  2973. " name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
  2974. " This makes it also possible to use a different set of options (below) for\n" \
  2975. " the module and the alias.\n" \
  2976. " A module can be aliased more than once.\n" \
  2977. "\n" \
  2978. " options <mod_name|alias_name> <symbol=value...>\n" \
  2979. " When loading module mod_name (or the module aliased by alias_name), pass\n" \
  2980. " the \"symbol=value\" pairs as option to that module.\n" \
  2981. "\n" \
  2982. "Sample /etc/modules.conf file:\n" \
  2983. "\n" \
  2984. " options tulip irq=3\n" \
  2985. " alias tulip tulip2\n" \
  2986. " options tulip2 irq=4 io=0x308\n" \
  2987. "\n" \
  2988. "Other functionality offered by 'classic' modprobe is not available in\n" \
  2989. "this implementation.\n" \
  2990. "\n" \
  2991. "If module options are present both in the config file, and on the command line,\n" \
  2992. "then the options from the command line will be passed to the module _after_\n" \
  2993. "the options from the config file. That way, you can have defaults in the config\n" \
  2994. "file, and override them for a specific usage from the command line.\n" \
  2995. #define modprobe_example_usage \
  2996. "(with the above /etc/modules.conf):\n\n" \
  2997. "$ modprobe tulip\n" \
  2998. " will load the module 'tulip' with default option 'irq=3'\n\n" \
  2999. "$ modprobe tulip irq=5\n" \
  3000. " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
  3001. "$ modprobe tulip2\n" \
  3002. " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
  3003. " which are the default for alias 'tulip2'\n\n" \
  3004. "$ modprobe tulip2 irq=8\n" \
  3005. " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
  3006. " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
  3007. " from the command line\n\n" \
  3008. "$ modprobe tulip2 irq=2 io=0x210\n" \
  3009. " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
  3010. " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
  3011. " from the command line\n" \
  3012. #define modprobe_trivial_usage \
  3013. "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]" \
  3014. " MODULE" IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...") \
  3015. #define modprobe_full_usage "\n\n" \
  3016. " -a Load multiple MODULEs" \
  3017. "\n -l List (MODULE is a pattern)" \
  3018. "\n -r Remove MODULE (stacks) or do autoclean" \
  3019. "\n -q Quiet" \
  3020. "\n -v Verbose" \
  3021. "\n -s Log to syslog" \
  3022. "\n -D Show dependencies" \
  3023. IF_FEATURE_MODPROBE_BLACKLIST( \
  3024. "\n -b Apply blacklist to module names too" \
  3025. ) \
  3026. #endif /* !ENABLE_MODPROBE_SMALL */ \
  3027. #if !ENABLE_MODPROBE_SMALL \
  3028. #define rmmod_trivial_usage \
  3029. "[-wfa] [MODULE]..." \
  3030. #define rmmod_full_usage "\n\n" \
  3031. "Unload kernel modules\n" \
  3032. "\n -w Wait until the module is no longer used" \
  3033. "\n -f Force unload" \
  3034. "\n -a Remove all unused modules (recursively)" \
  3035. #define rmmod_example_usage \
  3036. "$ rmmod tulip\n" \
  3037. #endif \
  3038. #define arp_trivial_usage \
  3039. "\n[-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME]" \
  3040. "\n[-v] [-i IF] -d HOSTNAME [pub]" \
  3041. "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]" \
  3042. "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub" \
  3043. "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub" \
  3044. #define arp_full_usage "\n\n" \
  3045. "Manipulate ARP cache\n" \
  3046. "\n -a Display (all) hosts" \
  3047. "\n -d Delete ARP entry" \
  3048. "\n -s Set new entry" \
  3049. "\n -v Verbose" \
  3050. "\n -n Don't resolve names" \
  3051. "\n -i IF Network interface" \
  3052. "\n -D Read HWADDR from IFACE" \
  3053. "\n -A,-p AF Protocol family" \
  3054. "\n -H HWTYPE Hardware address type" \
  3055. #define arping_trivial_usage \
  3056. "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP" \
  3057. #define arping_full_usage "\n\n" \
  3058. "Send ARP requests/replies\n" \
  3059. "\n -f Quit on first ARP reply" \
  3060. "\n -q Quiet" \
  3061. "\n -b Keep broadcasting, don't go unicast" \
  3062. "\n -D Exit with 1 if DST_IP replies" \
  3063. "\n -U Unsolicited ARP mode, update your neighbors" \
  3064. "\n -A ARP answer mode, update your neighbors" \
  3065. "\n -c N Stop after sending N ARP requests" \
  3066. "\n -w TIMEOUT Seconds to wait for ARP reply" \
  3067. "\n -I IFACE Interface to use (default eth0)" \
  3068. "\n -s SRC_IP Sender IP address" \
  3069. "\n DST_IP Target IP address" \
  3070. #define brctl_trivial_usage \
  3071. "COMMAND [BRIDGE [INTERFACE]]" \
  3072. #define brctl_full_usage "\n\n" \
  3073. "Manage ethernet bridges\n" \
  3074. "\nCommands:" \
  3075. IF_FEATURE_BRCTL_SHOW( \
  3076. "\n show Show a list of bridges" \
  3077. ) \
  3078. "\n addbr BRIDGE Create BRIDGE" \
  3079. "\n delbr BRIDGE Delete BRIDGE" \
  3080. "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
  3081. "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
  3082. IF_FEATURE_BRCTL_FANCY( \
  3083. "\n setageing BRIDGE TIME Set ageing time" \
  3084. "\n setfd BRIDGE TIME Set bridge forward delay" \
  3085. "\n sethello BRIDGE TIME Set hello time" \
  3086. "\n setmaxage BRIDGE TIME Set max message age" \
  3087. "\n setpathcost BRIDGE COST Set path cost" \
  3088. "\n setportprio BRIDGE PRIO Set port priority" \
  3089. "\n setbridgeprio BRIDGE PRIO Set bridge priority" \
  3090. "\n stp BRIDGE [1/yes/on|0/no/off] STP on/off" \
  3091. ) \
  3092. #define dnsd_trivial_usage \
  3093. "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]" \
  3094. #define dnsd_full_usage "\n\n" \
  3095. "Small static DNS server daemon\n" \
  3096. "\n -c FILE Config file" \
  3097. "\n -t SEC TTL" \
  3098. "\n -p PORT Listen on PORT" \
  3099. "\n -i ADDR Listen on ADDR" \
  3100. "\n -d Daemonize" \
  3101. "\n -v Verbose" \
  3102. "\n -s Send successful replies only. Use this if you want" \
  3103. "\n to use /etc/resolv.conf with two nameserver lines:" \
  3104. "\n nameserver DNSD_SERVER" \
  3105. "\n nameserver NORMAL_DNS_SERVER" \
  3106. #define ether_wake_trivial_usage \
  3107. "[-b] [-i IFACE] [-p aa:bb:cc:dd[:ee:ff]/a.b.c.d] MAC" \
  3108. #define ether_wake_full_usage "\n\n" \
  3109. "Send a magic packet to wake up sleeping machines.\n" \
  3110. "MAC must be a station address (00:11:22:33:44:55) or\n" \
  3111. "a hostname with a known 'ethers' entry.\n" \
  3112. "\n -b Broadcast the packet" \
  3113. "\n -i IFACE Interface to use (default eth0)" \
  3114. "\n -p PASSWORD Append four or six byte PASSWORD to the packet" \
  3115. #define ftpd_trivial_usage \
  3116. "[-wvS]"IF_FEATURE_FTPD_AUTHENTICATION(" [-a USER]")" [-t N] [-T N] [DIR]" \
  3117. #define ftpd_full_usage "\n\n" \
  3118. IF_NOT_FEATURE_FTPD_AUTHENTICATION( \
  3119. "Anonymous FTP server. Accesses by clients occur under ftpd's UID.\n" \
  3120. ) \
  3121. IF_FEATURE_FTPD_AUTHENTICATION( \
  3122. "FTP server. " \
  3123. ) \
  3124. "Chroots to DIR, if this fails (run by non-root), cds to it.\n" \
  3125. "Should be used as inetd service, inetd.conf line:\n" \
  3126. " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" \
  3127. "Can be run from tcpsvd:\n" \
  3128. " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" \
  3129. "\n -w Allow upload" \
  3130. IF_FEATURE_FTPD_AUTHENTICATION( \
  3131. "\n -a USER Enable 'anonymous' login and map it to USER" \
  3132. ) \
  3133. "\n -v Log errors to stderr. -vv: verbose log" \
  3134. "\n -S Log errors to syslog. -SS: verbose log" \
  3135. "\n -t,-T N Idle and absolute timeout" \
  3136. #define ftpget_trivial_usage \
  3137. "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE" \
  3138. #define ftpget_full_usage "\n\n" \
  3139. "Download a file via FTP\n" \
  3140. "\n -c Continue previous transfer" \
  3141. "\n -v Verbose" \
  3142. "\n -u USER Username" \
  3143. "\n -p PASS Password" \
  3144. "\n -P NUM Port" \
  3145. #define ftpput_trivial_usage \
  3146. "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE" \
  3147. #define ftpput_full_usage "\n\n" \
  3148. "Upload a file to a FTP server\n" \
  3149. "\n -v Verbose" \
  3150. "\n -u USER Username" \
  3151. "\n -p PASS Password" \
  3152. "\n -P NUM Port number" \
  3153. #define hostname_trivial_usage \
  3154. "[OPTIONS] [HOSTNAME | -F FILE]" \
  3155. #define hostname_full_usage "\n\n" \
  3156. "Get or set hostname or DNS domain name\n" \
  3157. "\n -s Short" \
  3158. "\n -i Addresses for the hostname" \
  3159. "\n -d DNS domain name" \
  3160. "\n -f Fully qualified domain name" \
  3161. "\n -F FILE Use FILE's content as hostname" \
  3162. #define hostname_example_usage \
  3163. "$ hostname\n" \
  3164. "sage\n" \
  3165. #define dnsdomainname_trivial_usage NOUSAGE_STR \
  3166. #define dnsdomainname_full_usage "" \
  3167. #define httpd_trivial_usage \
  3168. "[-ifv[v]]" \
  3169. " [-c CONFFILE]" \
  3170. " [-p [IP:]PORT]" \
  3171. IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") \
  3172. IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]") \
  3173. " [-h HOME]\n" \
  3174. "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING" \
  3175. #define httpd_full_usage "\n\n" \
  3176. "Listen for incoming HTTP requests\n" \
  3177. "\n -i Inetd mode" \
  3178. "\n -f Don't daemonize" \
  3179. "\n -v[v] Verbose" \
  3180. "\n -p [IP:]PORT Bind to IP:PORT (default *:80)" \
  3181. IF_FEATURE_HTTPD_SETUID( \
  3182. "\n -u USER[:GRP] Set uid/gid after binding to port") \
  3183. IF_FEATURE_HTTPD_BASIC_AUTH( \
  3184. "\n -r REALM Authentication Realm for Basic Authentication") \
  3185. "\n -h HOME Home directory (default .)" \
  3186. "\n -c FILE Configuration file (default {/etc,HOME}/httpd.conf)" \
  3187. IF_FEATURE_HTTPD_AUTH_MD5( \
  3188. "\n -m STRING MD5 crypt STRING") \
  3189. "\n -e STRING HTML encode STRING" \
  3190. "\n -d STRING URL decode STRING" \
  3191. #define ifconfig_trivial_usage \
  3192. IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" \
  3193. #define ifconfig_full_usage "\n\n" \
  3194. "Configure a network interface\n" \
  3195. "\n" \
  3196. IF_FEATURE_IPV6( \
  3197. " [add ADDRESS[/PREFIXLEN]]\n") \
  3198. IF_FEATURE_IPV6( \
  3199. " [del ADDRESS[/PREFIXLEN]]\n") \
  3200. " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
  3201. " [netmask ADDRESS] [dstaddr ADDRESS]\n" \
  3202. IF_FEATURE_IFCONFIG_SLIP( \
  3203. " [outfill NN] [keepalive NN]\n") \
  3204. " " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
  3205. " [[-]trailers] [[-]arp] [[-]allmulti]\n" \
  3206. " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
  3207. IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
  3208. " [mem_start NN] [io_addr NN] [irq NN]\n") \
  3209. " [up|down] ..." \
  3210. #define ifenslave_trivial_usage \
  3211. "[-cdf] MASTER_IFACE SLAVE_IFACE..." \
  3212. #define ifenslave_full_usage "\n\n" \
  3213. "Configure network interfaces for parallel routing\n" \
  3214. "\n -c Change active slave" \
  3215. "\n -d Remove slave interface from bonding device" \
  3216. "\n -f Force, even if interface is not Ethernet" \
  3217. #define ifenslave_example_usage \
  3218. "To create a bond device, simply follow these three steps:\n" \
  3219. "- ensure that the required drivers are properly loaded:\n" \
  3220. " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \
  3221. "- assign an IP address to the bond device:\n" \
  3222. " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \
  3223. "- attach all the interfaces you need to the bond device:\n" \
  3224. " # ifenslave bond0 eth0 eth1 eth2\n" \
  3225. " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \
  3226. " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \
  3227. " To detach a dead interface without setting the bond device down:\n" \
  3228. " # ifenslave -d bond0 eth1\n\n" \
  3229. " To set the bond device down and automatically release all the slaves:\n" \
  3230. " # ifconfig bond0 down\n\n" \
  3231. " To change active slave:\n" \
  3232. " # ifenslave -c bond0 eth0\n" \
  3233. #define ifplugd_trivial_usage \
  3234. "[OPTIONS]" \
  3235. #define ifplugd_full_usage "\n\n" \
  3236. "Network interface plug detection daemon\n" \
  3237. "\n -n Don't daemonize" \
  3238. "\n -s Don't log to syslog" \
  3239. "\n -i IFACE Interface" \
  3240. "\n -f/-F Treat link detection error as link down/link up" \
  3241. "\n (otherwise exit on error)" \
  3242. "\n -a Don't up interface at each link probe" \
  3243. "\n -M Monitor creation/destruction of interface" \
  3244. "\n (otherwise it must exist)" \
  3245. "\n -r PROG Script to run" \
  3246. "\n -x ARG Extra argument for script" \
  3247. "\n -I Don't exit on nonzero exit code from script" \
  3248. "\n -p Don't run \"up\" script on startup" \
  3249. "\n -q Don't run \"down\" script on exit" \
  3250. "\n -l Always run script on startup" \
  3251. "\n -t SECS Poll time in seconds" \
  3252. "\n -u SECS Delay before running script after link up" \
  3253. "\n -d SECS Delay after link down" \
  3254. "\n -m MODE API mode (mii, priv, ethtool, wlan, iff, auto)" \
  3255. "\n -k Kill running daemon" \
  3256. #define ifup_trivial_usage \
  3257. "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." \
  3258. #define ifup_full_usage "\n\n" \
  3259. " -a Configure all interfaces" \
  3260. "\n -i FILE Use FILE instead of /etc/network/interfaces" \
  3261. "\n -n Print out what would happen, but don't do it" \
  3262. IF_FEATURE_IFUPDOWN_MAPPING( \
  3263. "\n (note: doesn't disable mappings)" \
  3264. "\n -m Don't run any mappings" \
  3265. ) \
  3266. "\n -v Print out what would happen before doing it" \
  3267. "\n -f Force configuration" \
  3268. #define ifdown_trivial_usage \
  3269. "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." \
  3270. #define ifdown_full_usage "\n\n" \
  3271. " -a Deconfigure all interfaces" \
  3272. "\n -i FILE Use FILE for interface definitions" \
  3273. "\n -n Print out what would happen, but don't do it" \
  3274. IF_FEATURE_IFUPDOWN_MAPPING( \
  3275. "\n (note: doesn't disable mappings)" \
  3276. "\n -m Don't run any mappings" \
  3277. ) \
  3278. "\n -v Print out what would happen before doing it" \
  3279. "\n -f Force deconfiguration" \
  3280. #define inetd_trivial_usage \
  3281. "[-fe] [-q N] [-R N] [CONFFILE]" \
  3282. #define inetd_full_usage "\n\n" \
  3283. "Listen for network connections and launch programs\n" \
  3284. "\n -f Run in foreground" \
  3285. "\n -e Log to stderr" \
  3286. "\n -q N Socket listen queue (default 128)" \
  3287. "\n -R N Pause services after N connects/min" \
  3288. "\n (default 0 - disabled)" \
  3289. "\n Default CONFFILE is /etc/inetd.conf" \
  3290. #define ipaddr_trivial_usage \
  3291. "add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX]" \
  3292. #define ipaddr_full_usage "\n\n" \
  3293. "ipaddr add|change|replace|delete dev IFACE IFADDR\n" \
  3294. " IFADDR := PREFIX | ADDR peer PREFIX [broadcast ADDR|+|-]\n" \
  3295. " [anycast ADDR] [label STRING] [scope SCOPE]\n" \
  3296. " PREFIX := ADDR[/MASK]\n" \
  3297. " SCOPE := [host|link|global|NUMBER]\n" \
  3298. "ipaddr show|flush [dev IFACE] [scope SCOPE] [to PREFIX] [label PATTERN]" \
  3299. #define iplink_trivial_usage \
  3300. "set IFACE [up|down] [arp on|off] | show [IFACE]" \
  3301. #define iplink_full_usage "\n\n" \
  3302. "iplink set IFACE [up|down] [arp on|off] [multicast on|off] [promisc on|off]\n" \
  3303. " [mtu NUM] [name NAME] [qlen NUM] [address MAC]\n" \
  3304. "iplink show [IFACE]" \
  3305. #define iproute_trivial_usage \
  3306. "list|flush|add|del|change|append|replace|test ROUTE" \
  3307. #define iproute_full_usage "\n\n" \
  3308. "iproute list|flush SELECTOR\n" \
  3309. " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
  3310. " PREFIX := default|ADDR[/MASK]\n" \
  3311. "iproute get ADDR [from ADDR iif IFACE]\n" \
  3312. " [oif IFACE] [tos TOS]\n" \
  3313. "iproute add|del|change|append|replace|test ROUTE\n" \
  3314. " ROUTE := NODE_SPEC [INFO_SPEC]\n" \
  3315. " NODE_SPEC := PREFIX"IF_FEATURE_IP_RULE(" [table TABLE_ID]")" [proto RTPROTO] [scope SCOPE] [metric METRIC]\n" \
  3316. " INFO_SPEC := NH OPTIONS\n" \
  3317. " NH := [via [inet|inet6] ADDR] [dev IFACE] [src ADDR] [onlink]\n" \
  3318. " OPTIONS := [mtu [lock] NUM] [advmss [lock] NUM]" \
  3319. #define iprule_trivial_usage \
  3320. "[list] | add|del SELECTOR ACTION" \
  3321. #define iprule_full_usage "\n\n" \
  3322. " SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \
  3323. " [dev IFACE] [pref NUMBER]\n" \
  3324. " ACTION := [table TABLE_ID] [nat ADDR]\n" \
  3325. " [prohibit|reject|unreachable]\n" \
  3326. " [realms [SRCREALM/]DSTREALM]\n" \
  3327. " TABLE_ID := [local|main|default|NUMBER]" \
  3328. #define iptunnel_trivial_usage \
  3329. "add|change|del|show [NAME]\n" \
  3330. " [mode ipip|gre|sit]\n" \
  3331. " [remote ADDR] [local ADDR] [ttl TTL]" \
  3332. #define iptunnel_full_usage "\n\n" \
  3333. "iptunnel add|change|del|show [NAME]\n" \
  3334. " [mode ipip|gre|sit] [remote ADDR] [local ADDR]\n" \
  3335. " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
  3336. " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
  3337. #define ipneigh_trivial_usage \
  3338. "show|flush [to PREFIX] [dev DEV] [nud STATE]" \
  3339. #define ipneigh_full_usage "" \
  3340. #if ENABLE_FEATURE_IP_ADDRESS || ENABLE_FEATURE_IP_ROUTE \
  3341. # define IP_BAR_LINK "|" \
  3342. #else \
  3343. # define IP_BAR_LINK "" \
  3344. #endif \
  3345. #if ENABLE_FEATURE_IP_ADDRESS || ENABLE_FEATURE_IP_ROUTE || ENABLE_FEATURE_IP_LINK \
  3346. # define IP_BAR_TUNNEL "|" \
  3347. #else \
  3348. # define IP_BAR_TUNNEL "" \
  3349. #endif \
  3350. #if ENABLE_FEATURE_IP_ADDRESS || ENABLE_FEATURE_IP_ROUTE || ENABLE_FEATURE_IP_LINK || ENABLE_FEATURE_IP_TUNNEL \
  3351. # define IP_BAR_NEIGH "|" \
  3352. #else \
  3353. # define IP_BAR_NEIGH "" \
  3354. #endif \
  3355. #if ENABLE_FEATURE_IP_ADDRESS || ENABLE_FEATURE_IP_ROUTE || ENABLE_FEATURE_IP_LINK || ENABLE_FEATURE_IP_TUNNEL || ENABLE_FEATURE_IP_NEIGH \
  3356. # define IP_BAR_RULE "|" \
  3357. #else \
  3358. # define IP_BAR_RULE "" \
  3359. #endif \
  3360. #define ip_trivial_usage \
  3361. "[OPTIONS] " \
  3362. IF_FEATURE_IP_ADDRESS("address") \
  3363. IF_FEATURE_IP_ROUTE( IF_FEATURE_IP_ADDRESS("|")"route") \
  3364. IF_FEATURE_IP_LINK( IP_BAR_LINK "link") \
  3365. IF_FEATURE_IP_TUNNEL( IP_BAR_TUNNEL"tunnel") \
  3366. IF_FEATURE_IP_NEIGH( IP_BAR_NEIGH "neigh") \
  3367. IF_FEATURE_IP_RULE( IP_BAR_RULE "rule") \
  3368. " [COMMAND]" \
  3369. #define ip_full_usage "\n\n" \
  3370. "OPTIONS := -f[amily] inet|inet6|link | -o[neline]\n" \
  3371. "COMMAND :=" \
  3372. IF_FEATURE_IP_ADDRESS("\n" \
  3373. "ip addr "ipaddr_trivial_usage) \
  3374. IF_FEATURE_IP_ROUTE("\n" \
  3375. "ip route "iproute_trivial_usage) \
  3376. IF_FEATURE_IP_LINK("\n" \
  3377. "ip link "iplink_trivial_usage) \
  3378. IF_FEATURE_IP_TUNNEL("\n" \
  3379. "ip tunnel "iptunnel_trivial_usage) \
  3380. IF_FEATURE_IP_NEIGH("\n" \
  3381. "ip neigh "ipneigh_trivial_usage) \
  3382. IF_FEATURE_IP_RULE("\n" \
  3383. "ip rule "iprule_trivial_usage) \
  3384. #define ipcalc_trivial_usage \
  3385. "[OPTIONS] ADDRESS" \
  3386. IF_FEATURE_IPCALC_FANCY("[/PREFIX]") " [NETMASK]" \
  3387. #define ipcalc_full_usage "\n\n" \
  3388. "Calculate and display network settings from IP address\n" \
  3389. "\n -b Broadcast address" \
  3390. "\n -n Network address" \
  3391. "\n -m Default netmask for IP" \
  3392. IF_FEATURE_IPCALC_FANCY( \
  3393. "\n -p Prefix for IP/NETMASK" \
  3394. "\n -h Resolved host name" \
  3395. "\n -s No error messages" \
  3396. ) \
  3397. #define fakeidentd_trivial_usage \
  3398. "[-fiw] [-b ADDR] [STRING]" \
  3399. #define fakeidentd_full_usage "\n\n" \
  3400. "Provide fake ident (auth) service\n" \
  3401. "\n -f Run in foreground" \
  3402. "\n -i Inetd mode" \
  3403. "\n -w Inetd 'wait' mode" \
  3404. "\n -b ADDR Bind to specified address" \
  3405. "\n STRING Ident answer string (default: nobody)" \
  3406. #define nameif_trivial_usage \
  3407. IF_NOT_FEATURE_NAMEIF_EXTENDED( \
  3408. "[-s] [-c FILE] [IFNAME HWADDR]..." \
  3409. ) \
  3410. IF_FEATURE_NAMEIF_EXTENDED( \
  3411. "[-s] [-c FILE] [IFNAME SELECTOR]..." \
  3412. ) \
  3413. #define nameif_full_usage "\n\n" \
  3414. "Rename network interface while it in the down state." \
  3415. IF_NOT_FEATURE_NAMEIF_EXTENDED( \
  3416. "\nThe device with address HWADDR is renamed to IFACE." \
  3417. ) \
  3418. IF_FEATURE_NAMEIF_EXTENDED( \
  3419. "\nThe device matched by SELECTOR is renamed to IFACE." \
  3420. "\nSELECTOR can be a combination of:" \
  3421. "\n driver=STRING" \
  3422. "\n bus=STRING" \
  3423. "\n phy_address=NUM" \
  3424. "\n [mac=]XX:XX:XX:XX:XX:XX" \
  3425. ) \
  3426. "\n" \
  3427. "\n -c FILE Configuration file (default: /etc/mactab)" \
  3428. "\n -s Log to syslog" \
  3429. #define nameif_example_usage \
  3430. "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
  3431. " or\n" \
  3432. "$ nameif -c /etc/my_mactab_file\n" \
  3433. #define nbdclient_trivial_usage \
  3434. "HOST PORT BLOCKDEV" \
  3435. #define nbdclient_full_usage "\n\n" \
  3436. "Connect to HOST and provide a network block device on BLOCKDEV" \
  3437. #if !ENABLE_NC_110_COMPAT \
  3438. #if ENABLE_NC_SERVER || ENABLE_NC_EXTRA \
  3439. #define NC_OPTIONS_STR "\n" \
  3440. #else \
  3441. #define NC_OPTIONS_STR \
  3442. #endif \
  3443. #define nc_trivial_usage \
  3444. IF_NC_EXTRA("[-iN] [-wN] ")IF_NC_SERVER("[-l] [-p PORT] ") \
  3445. "["IF_NC_EXTRA("-f FILE|")"IPADDR PORT]"IF_NC_EXTRA(" [-e PROG]") \
  3446. #define nc_full_usage "\n\n" \
  3447. "Open a pipe to IP:PORT" IF_NC_EXTRA(" or FILE") \
  3448. NC_OPTIONS_STR \
  3449. IF_NC_SERVER( \
  3450. "\n -l Listen mode, for inbound connects" \
  3451. IF_NC_EXTRA( \
  3452. "\n (use -ll with -e for persistent server)" \
  3453. ) \
  3454. "\n -p PORT Local port" \
  3455. ) \
  3456. IF_NC_EXTRA( \
  3457. "\n -w SEC Connect timeout" \
  3458. "\n -i SEC Delay interval for lines sent" \
  3459. "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
  3460. "\n -e PROG Run PROG after connect" \
  3461. ) \
  3462. #define nc_notes_usage "" \
  3463. IF_NC_EXTRA( \
  3464. "To use netcat as a terminal emulator on a serial port:\n\n" \
  3465. "$ stty 115200 -F /dev/ttyS0\n" \
  3466. "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
  3467. ) \
  3468. #define nc_example_usage \
  3469. "$ nc foobar.somedomain.com 25\n" \
  3470. "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
  3471. "help\n" \
  3472. "214-Commands supported:\n" \
  3473. "214- HELO EHLO MAIL RCPT DATA AUTH\n" \
  3474. "214 NOOP QUIT RSET HELP\n" \
  3475. "quit\n" \
  3476. "221 foobar closing connection\n" \
  3477. #endif \
  3478. #if ENABLE_NC_110_COMPAT \
  3479. #define nc_trivial_usage \
  3480. "[OPTIONS] HOST PORT - connect" \
  3481. IF_NC_SERVER("\n" \
  3482. "nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen" \
  3483. ) \
  3484. #define nc_full_usage "\n\n" \
  3485. " -e PROG Run PROG after connect (must be last)" \
  3486. IF_NC_SERVER( \
  3487. "\n -l Listen mode, for inbound connects" \
  3488. "\n -lk With -e, provides persistent server" \
  3489. ) \
  3490. "\n -p PORT Local port" \
  3491. "\n -s ADDR Local address" \
  3492. "\n -w SEC Timeout for connects and final net reads" \
  3493. IF_NC_EXTRA( \
  3494. "\n -i SEC Delay interval for lines sent" /* ", ports scanned" */ \
  3495. ) \
  3496. "\n -n Don't do DNS resolution" \
  3497. "\n -u UDP mode" \
  3498. "\n -v Verbose" \
  3499. IF_NC_EXTRA( \
  3500. "\n -o FILE Hex dump traffic" \
  3501. "\n -z Zero-I/O mode (scanning)" \
  3502. ) \
  3503. #endif \
  3504. #define netstat_trivial_usage \
  3505. "[-"IF_ROUTE("r")"al] [-tuwx] [-en"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]" \
  3506. #define netstat_full_usage "\n\n" \
  3507. "Display networking information\n" \
  3508. IF_ROUTE( \
  3509. "\n -r Routing table" \
  3510. ) \
  3511. "\n -a All sockets" \
  3512. "\n -l Listening sockets" \
  3513. "\n Else: connected sockets" \
  3514. "\n -t TCP sockets" \
  3515. "\n -u UDP sockets" \
  3516. "\n -w Raw sockets" \
  3517. "\n -x Unix sockets" \
  3518. "\n Else: all socket types" \
  3519. "\n -e Other/more information" \
  3520. "\n -n Don't resolve names" \
  3521. IF_FEATURE_NETSTAT_WIDE( \
  3522. "\n -W Wide display" \
  3523. ) \
  3524. IF_FEATURE_NETSTAT_PRG( \
  3525. "\n -p Show PID/program name for sockets" \
  3526. ) \
  3527. #define nslookup_trivial_usage \
  3528. "[HOST] [SERVER]" \
  3529. #define nslookup_full_usage "\n\n" \
  3530. "Query the nameserver for the IP address of the given HOST\n" \
  3531. "optionally using a specified DNS server" \
  3532. #define nslookup_example_usage \
  3533. "$ nslookup localhost\n" \
  3534. "Server: default\n" \
  3535. "Address: default\n" \
  3536. "\n" \
  3537. "Name: debian\n" \
  3538. "Address: 127.0.0.1\n" \
  3539. #define ntpd_trivial_usage \
  3540. "[-dnqNw"IF_FEATURE_NTPD_SERVER("l -I IFACE")"] [-S PROG] [-p PEER]..." \
  3541. #define ntpd_full_usage "\n\n" \
  3542. "NTP client/server\n" \
  3543. "\n -d Verbose (may be repeated)" \
  3544. "\n -n Do not daemonize" \
  3545. "\n -q Quit after clock is set" \
  3546. "\n -N Run at high priority" \
  3547. "\n -w Do not set time (only query peers), implies -n" \
  3548. "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \
  3549. "\n -p PEER Obtain time from PEER (may be repeated)" \
  3550. IF_FEATURE_NTPD_CONF( \
  3551. "\n If -p is not given, 'server HOST' lines" \
  3552. "\n from /etc/ntp.conf are used" \
  3553. ) \
  3554. IF_FEATURE_NTPD_SERVER( \
  3555. "\n -l Also run as server on port 123" \
  3556. "\n -I IFACE Bind server to IFACE, implies -l" \
  3557. ) \
  3558. #if !ENABLE_FEATURE_FANCY_PING \
  3559. # define ping_trivial_usage \
  3560. "HOST" \
  3561. # define ping_full_usage "\n\n" \
  3562. "Send ICMP ECHO_REQUEST packets to network hosts" \
  3563. # define ping6_trivial_usage \
  3564. "HOST" \
  3565. # define ping6_full_usage "\n\n" \
  3566. "Send ICMP ECHO_REQUEST packets to network hosts" \
  3567. #else \
  3568. # define ping_trivial_usage \
  3569. "[OPTIONS] HOST" \
  3570. # define ping_full_usage "\n\n" \
  3571. "Send ICMP ECHO_REQUEST packets to network hosts\n" \
  3572. IF_PING6( \
  3573. "\n -4,-6 Force IP or IPv6 name resolution" \
  3574. ) \
  3575. "\n -c CNT Send only CNT pings" \
  3576. "\n -s SIZE Send SIZE data bytes in packets (default 56)" \
  3577. "\n -t TTL Set TTL" \
  3578. "\n -I IFACE/IP Source interface or IP address" \
  3579. "\n -W SEC Seconds to wait for the first response (default 10)" \
  3580. "\n (after all -c CNT packets are sent)" \
  3581. "\n -w SEC Seconds until ping exits (default:infinite)" \
  3582. "\n (can exit earlier with -c CNT)" \
  3583. "\n -q Quiet, only display output at start" \
  3584. "\n and when finished" \
  3585. "\n -p HEXBYTE Pattern to use for payload" \
  3586. # define ping6_trivial_usage \
  3587. "[OPTIONS] HOST" \
  3588. # define ping6_full_usage "\n\n" \
  3589. "Send ICMP ECHO_REQUEST packets to network hosts\n" \
  3590. "\n -c CNT Send only CNT pings" \
  3591. "\n -s SIZE Send SIZE data bytes in packets (default 56)" \
  3592. "\n -I IFACE/IP Source interface or IP address" \
  3593. "\n -q Quiet, only display output at start" \
  3594. "\n and when finished" \
  3595. "\n -p HEXBYTE Pattern to use for payload" \
  3596. #endif \
  3597. #define ping_example_usage \
  3598. "$ ping localhost\n" \
  3599. "PING slag (127.0.0.1): 56 data bytes\n" \
  3600. "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
  3601. "\n" \
  3602. "--- debian ping statistics ---\n" \
  3603. "1 packets transmitted, 1 packets received, 0% packet loss\n" \
  3604. "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" \
  3605. #define ping6_example_usage \
  3606. "$ ping6 ip6-localhost\n" \
  3607. "PING ip6-localhost (::1): 56 data bytes\n" \
  3608. "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
  3609. "\n" \
  3610. "--- ip6-localhost ping statistics ---\n" \
  3611. "1 packets transmitted, 1 packets received, 0% packet loss\n" \
  3612. "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" \
  3613. #define pscan_trivial_usage \
  3614. "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST" \
  3615. #define pscan_full_usage "\n\n" \
  3616. "Scan a host, print all open ports\n" \
  3617. "\n -c Show closed ports too" \
  3618. "\n -b Show blocked ports too" \
  3619. "\n -p Scan from this port (default 1)" \
  3620. "\n -P Scan up to this port (default 1024)" \
  3621. "\n -t Timeout (default 5000 ms)" \
  3622. "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \
  3623. #define route_trivial_usage \
  3624. "[{add|del|delete}]" \
  3625. #define route_full_usage "\n\n" \
  3626. "Edit kernel routing tables\n" \
  3627. "\n -n Don't resolve names" \
  3628. "\n -e Display other/more information" \
  3629. "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \
  3630. #define slattach_trivial_usage \
  3631. "[-ehmLF] [-c SCRIPT] [-s BAUD] [-p PROTOCOL] SERIAL_DEVICE" \
  3632. #define slattach_full_usage "\n\n" \
  3633. "Configure serial line as SLIP network interface\n" \
  3634. "\n -p PROT Protocol: slip, cslip (default), slip6, clisp6, adaptive" \
  3635. "\n -s BAUD Line speed" \
  3636. "\n -e Exit after initialization" \
  3637. "\n -h Exit if carrier is lost (else never exits)" \
  3638. "\n -c PROG Run PROG on carrier loss" \
  3639. "\n -m Do NOT set raw 8bit mode" \
  3640. "\n -L Enable 3-wire operation" \
  3641. "\n -F Disable RTS/CTS flow control" \
  3642. #define ssl_client_trivial_usage \
  3643. "-s FD [-r FD] [-n SNI]" \
  3644. #define ssl_client_full_usage "" \
  3645. #define tc_trivial_usage \
  3646. "OBJECT CMD [dev STRING]" \
  3647. #define tc_full_usage "\n\n" \
  3648. "OBJECT: qdisc|class|filter\n" \
  3649. "CMD: add|del|change|replace|show\n" \
  3650. "\n" \
  3651. "qdisc [handle QHANDLE] [root|"IF_FEATURE_TC_INGRESS("ingress|")"parent CLASSID]\n" \
  3652. " [[QDISC_KIND] [help|OPTIONS]]\n" \
  3653. " QDISC_KIND := [p|b]fifo|tbf|prio|cbq|red|etc.\n" \
  3654. "qdisc show [dev STRING]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \
  3655. "class [classid CLASSID] [root|parent CLASSID]\n" \
  3656. " [[QDISC_KIND] [help|OPTIONS] ]\n" \
  3657. "class show [ dev STRING ] [root|parent CLASSID]\n" \
  3658. "filter [pref PRIO] [protocol PROTO]\n" \
  3659. " [root|classid CLASSID] [handle FILTERID]\n" \
  3660. " [[FILTER_TYPE] [help|OPTIONS]]\n" \
  3661. "filter show [dev STRING] [root|parent CLASSID]" \
  3662. #define tcpsvd_trivial_usage \
  3663. "[-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG" \
  3664. #define tcpsvd_full_usage "\n\n" \
  3665. "Create TCP socket, bind to IP:PORT and listen for incoming connections.\n" \
  3666. "Run PROG for each connection.\n" \
  3667. "\n IP PORT IP:PORT to listen on" \
  3668. "\n PROG ARGS Program to run" \
  3669. "\n -u USER[:GRP] Change to user/group after bind" \
  3670. "\n -c N Up to N connections simultaneously (default 30)" \
  3671. "\n -b N Allow backlog of approximately N TCP SYNs (default 20)" \
  3672. "\n -C N[:MSG] Allow only up to N connections from the same IP:" \
  3673. "\n new connections from this IP address are closed" \
  3674. "\n immediately, MSG is written to the peer before close" \
  3675. "\n -E Don't set up environment" \
  3676. "\n -h Look up peer's hostname" \
  3677. "\n -l NAME Local hostname (else look up local hostname in DNS)" \
  3678. "\n -v Verbose" \
  3679. "\n" \
  3680. "\nEnvironment if no -E:" \
  3681. "\nPROTO='TCP'" \
  3682. "\nTCPREMOTEADDR='ip:port'" IF_FEATURE_IPV6(" ('[ip]:port' for IPv6)") \
  3683. "\nTCPLOCALADDR='ip:port'" \
  3684. "\nTCPORIGDSTADDR='ip:port' of destination before firewall" \
  3685. "\n Useful for REDIRECTed-to-local connections:" \
  3686. "\n iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080" \
  3687. "\nTCPCONCURRENCY=num_of_connects_from_this_ip" \
  3688. "\nIf -h:" \
  3689. "\nTCPLOCALHOST='hostname' (-l NAME is used if specified)" \
  3690. "\nTCPREMOTEHOST='hostname'" \
  3691. #define udpsvd_trivial_usage \
  3692. "[-hEv] [-c N] [-u USER] [-l NAME] IP PORT PROG" \
  3693. #define udpsvd_full_usage "\n\n" \
  3694. "Create UDP socket, bind to IP:PORT and wait for incoming packets.\n" \
  3695. "Run PROG for each packet, redirecting all further packets with same\n" \
  3696. "peer ip:port to it.\n" \
  3697. "\n IP PORT IP:PORT to listen on" \
  3698. "\n PROG ARGS Program to run" \
  3699. "\n -u USER[:GRP] Change to user/group after bind" \
  3700. "\n -c N Up to N connections simultaneously (default 30)" \
  3701. "\n -E Don't set up environment" \
  3702. "\n -h Look up peer's hostname" \
  3703. "\n -l NAME Local hostname (else look up local hostname in DNS)" \
  3704. "\n -v Verbose" \
  3705. "\n" \
  3706. "\nEnvironment if no -E:" \
  3707. "\nPROTO='UDP'" \
  3708. "\nUDPREMOTEADDR='ip:port'" IF_FEATURE_IPV6(" ('[ip]:port' for IPv6)") \
  3709. "\nUDPLOCALADDR='ip:port'" \
  3710. "\nIf -h:" \
  3711. "\nUDPLOCALHOST='hostname' (-l NAME is used if specified)" \
  3712. "\nUDPREMOTEHOST='hostname'" \
  3713. #if ENABLE_FEATURE_TELNET_AUTOLOGIN \
  3714. #define telnet_trivial_usage \
  3715. "[-a] [-l USER] HOST [PORT]" \
  3716. #define telnet_full_usage "\n\n" \
  3717. "Connect to telnet server\n" \
  3718. "\n -a Automatic login with $USER variable" \
  3719. "\n -l USER Automatic login as USER" \
  3720. #else \
  3721. #define telnet_trivial_usage \
  3722. "HOST [PORT]" \
  3723. #define telnet_full_usage "\n\n" \
  3724. "Connect to telnet server" \
  3725. #endif \
  3726. #define telnetd_trivial_usage \
  3727. "[OPTIONS]" \
  3728. #define telnetd_full_usage "\n\n" \
  3729. "Handle incoming telnet connections" \
  3730. IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
  3731. "\n -l LOGIN Exec LOGIN on connect" \
  3732. "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" \
  3733. "\n -K Close connection as soon as login exits" \
  3734. "\n (normally wait until all programs close slave pty)" \
  3735. IF_FEATURE_TELNETD_STANDALONE( \
  3736. "\n -p PORT Port to listen on" \
  3737. "\n -b ADDR[:PORT] Address to bind to" \
  3738. "\n -F Run in foreground" \
  3739. "\n -i Inetd mode" \
  3740. IF_FEATURE_TELNETD_INETD_WAIT( \
  3741. "\n -w SEC Inetd 'wait' mode, linger time SEC" \
  3742. "\n -S Log to syslog (implied by -i or without -F and -w)" \
  3743. ) \
  3744. ) \
  3745. #define tftp_trivial_usage \
  3746. "[OPTIONS] HOST [PORT]" \
  3747. #define tftp_full_usage "\n\n" \
  3748. "Transfer a file from/to tftp server\n" \
  3749. "\n -l FILE Local FILE" \
  3750. "\n -r FILE Remote FILE" \
  3751. IF_FEATURE_TFTP_GET( \
  3752. "\n -g Get file" \
  3753. ) \
  3754. IF_FEATURE_TFTP_PUT( \
  3755. "\n -p Put file" \
  3756. ) \
  3757. IF_FEATURE_TFTP_BLOCKSIZE( \
  3758. "\n -b SIZE Transfer blocks of SIZE octets" \
  3759. ) \
  3760. #define tftpd_trivial_usage \
  3761. "[-cr] [-u USER] [DIR]" \
  3762. #define tftpd_full_usage "\n\n" \
  3763. "Transfer a file on tftp client's request\n" \
  3764. "\n" \
  3765. "tftpd should be used as an inetd service.\n" \
  3766. "tftpd's line for inetd.conf:\n" \
  3767. " 69 dgram udp nowait root tftpd tftpd -l /files/to/serve\n" \
  3768. "It also can be ran from udpsvd:\n" \
  3769. " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" \
  3770. "\n -r Prohibit upload" \
  3771. "\n -c Allow file creation via upload" \
  3772. "\n -u Access files as USER" \
  3773. "\n -l Log to syslog (inetd mode requires this)" \
  3774. #define traceroute_trivial_usage \
  3775. "[-"IF_TRACEROUTE6("46")"FIlnrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]\n" \
  3776. " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n" \
  3777. " [-z PAUSE_MSEC] HOST [BYTES]" \
  3778. #define traceroute_full_usage "\n\n" \
  3779. "Trace the route to HOST\n" \
  3780. IF_TRACEROUTE6( \
  3781. "\n -4,-6 Force IP or IPv6 name resolution" \
  3782. ) \
  3783. "\n -F Set don't fragment bit" \
  3784. IF_FEATURE_TRACEROUTE_USE_ICMP( \
  3785. "\n -I Use ICMP ECHO instead of UDP datagrams" \
  3786. ) \
  3787. "\n -l Display TTL value of the returned packet" \
  3788. "\n -n Print numeric addresses" \
  3789. "\n -r Bypass routing tables, send directly to HOST" \
  3790. IF_FEATURE_TRACEROUTE_VERBOSE( \
  3791. "\n -v Verbose" \
  3792. ) \
  3793. "\n -f N First number of hops (default 1)" \
  3794. "\n -m N Max number of hops" \
  3795. "\n -q N Number of probes per hop (default 3)" \
  3796. "\n -p N Base UDP port number used in probes" \
  3797. "\n (default 33434)" \
  3798. "\n -s IP Source address" \
  3799. "\n -i IFACE Source interface" \
  3800. "\n -t N Type-of-service in probe packets (default 0)" \
  3801. "\n -w SEC Time to wait for a response (default 3)" \
  3802. "\n -g IP Loose source route gateway (8 max)" \
  3803. #define traceroute6_trivial_usage \
  3804. "[-nrv] [-m MAXTTL] [-q PROBES] [-p PORT]\n" \
  3805. " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n" \
  3806. " HOST [BYTES]" \
  3807. #define traceroute6_full_usage "\n\n" \
  3808. "Trace the route to HOST\n" \
  3809. "\n -n Print numeric addresses" \
  3810. "\n -r Bypass routing tables, send directly to HOST" \
  3811. IF_FEATURE_TRACEROUTE_VERBOSE( \
  3812. "\n -v Verbose" \
  3813. ) \
  3814. "\n -m N Max number of hops" \
  3815. "\n -q N Number of probes per hop (default 3)" \
  3816. "\n -p N Base UDP port number used in probes" \
  3817. "\n (default 33434)" \
  3818. "\n -s IP Source address" \
  3819. "\n -i IFACE Source interface" \
  3820. "\n -t N Type-of-service in probe packets (default 0)" \
  3821. "\n -w SEC Time wait for a response (default 3)" \
  3822. #define tunctl_trivial_usage \
  3823. "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") \
  3824. #define tunctl_full_usage "\n\n" \
  3825. "Create or delete tun interfaces\n" \
  3826. "\n -f name tun device (/dev/net/tun)" \
  3827. "\n -t name Create iface 'name'" \
  3828. "\n -d name Delete iface 'name'" \
  3829. IF_FEATURE_TUNCTL_UG( \
  3830. "\n -u owner Set iface owner" \
  3831. "\n -g group Set iface group" \
  3832. "\n -b Brief output" \
  3833. ) \
  3834. #define tunctl_example_usage \
  3835. "# tunctl\n" \
  3836. "# tunctl -d tun0\n" \
  3837. #define vconfig_trivial_usage \
  3838. "COMMAND [OPTIONS]" \
  3839. #define vconfig_full_usage "\n\n" \
  3840. "Create and remove virtual ethernet devices\n" \
  3841. "\n add IFACE VLAN_ID" \
  3842. "\n rem VLAN_NAME" \
  3843. "\n set_flag IFACE 0|1 VLAN_QOS" \
  3844. "\n set_egress_map VLAN_NAME SKB_PRIO VLAN_QOS" \
  3845. "\n set_ingress_map VLAN_NAME SKB_PRIO VLAN_QOS" \
  3846. "\n set_name_type NAME_TYPE" \
  3847. #define wget_trivial_usage \
  3848. IF_FEATURE_WGET_LONG_OPTIONS( \
  3849. "[-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]\n" \
  3850. " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
  3851. " [-S|--server-response] [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..." \
  3852. ) \
  3853. IF_NOT_FEATURE_WGET_LONG_OPTIONS( \
  3854. "[-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT]" \
  3855. IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..." \
  3856. ) \
  3857. #define wget_full_usage "\n\n" \
  3858. "Retrieve files via HTTP or FTP\n" \
  3859. IF_FEATURE_WGET_LONG_OPTIONS( \
  3860. "\n --spider Only check URL existence: $? is 0 if exists" \
  3861. ) \
  3862. "\n -c Continue retrieval of aborted transfer" \
  3863. "\n -q Quiet" \
  3864. "\n -P DIR Save to DIR (default .)" \
  3865. "\n -S Show server response" \
  3866. IF_FEATURE_WGET_TIMEOUT( \
  3867. "\n -T SEC Network read timeout is SEC seconds" \
  3868. ) \
  3869. "\n -O FILE Save to FILE ('-' for stdout)" \
  3870. "\n -U STR Use STR for User-Agent header" \
  3871. "\n -Y on/off Use proxy" \
  3872. #define whois_trivial_usage \
  3873. "[-i] [-h SERVER] [-p PORT] NAME..." \
  3874. #define whois_full_usage "\n\n" \
  3875. "Query WHOIS info about NAME\n" \
  3876. "\n -i Show redirect results too" \
  3877. "\n -h,-p Server to query" \
  3878. #define zcip_trivial_usage \
  3879. "[OPTIONS] IFACE SCRIPT" \
  3880. #define zcip_full_usage "\n\n" \
  3881. "Manage a ZeroConf IPv4 link-local address\n" \
  3882. "\n -f Run in foreground" \
  3883. "\n -q Quit after obtaining address" \
  3884. "\n -r 169.254.x.x Request this address first" \
  3885. "\n -l x.x.0.0 Use this range instead of 169.254" \
  3886. "\n -v Verbose" \
  3887. "\n" \
  3888. "\n$LOGGING=none Suppress logging" \
  3889. "\n$LOGGING=syslog Log to syslog" \
  3890. "\n" \
  3891. "\nWith no -q, runs continuously monitoring for ARP conflicts," \
  3892. "\nexits only on I/O errors (link down etc)" \
  3893. #define lpd_trivial_usage \
  3894. "SPOOLDIR [HELPER [ARGS]]" \
  3895. #define lpd_full_usage "\n\n" \
  3896. "SPOOLDIR must contain (symlinks to) device nodes or directories" \
  3897. "\nwith names matching print queue names. In the first case, jobs are" \
  3898. "\nsent directly to the device. Otherwise each job is stored in queue" \
  3899. "\ndirectory and HELPER program is called. Name of file to print" \
  3900. "\nis passed in $DATAFILE variable." \
  3901. "\nExample:" \
  3902. "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \
  3903. #define lpr_trivial_usage \
  3904. "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE]..." \
  3905. #define lpr_full_usage "\n\n" \
  3906. " -P lp service to connect to (else uses $PRINTER)" \
  3907. "\n -m Send mail on completion" \
  3908. "\n -h Print banner page too" \
  3909. "\n -V Verbose" \
  3910. #define lpq_trivial_usage \
  3911. "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID]... [-fs]" \
  3912. #define lpq_full_usage "\n\n" \
  3913. " -P lp service to connect to (else uses $PRINTER)" \
  3914. "\n -d Delete jobs" \
  3915. "\n -f Force any waiting job to be printed" \
  3916. "\n -s Short display" \
  3917. #define free_trivial_usage \
  3918. "" IF_DESKTOP("[-b/k/m/g]") \
  3919. #define free_full_usage "\n\n" \
  3920. "Display the amount of free and used system memory" \
  3921. #define free_example_usage \
  3922. "$ free\n" \
  3923. " total used free shared buffers\n" \
  3924. " Mem: 257628 248724 8904 59644 93124\n" \
  3925. " Swap: 128516 8404 120112\n" \
  3926. "Total: 386144 257128 129016\n" \
  3927. #define fuser_trivial_usage \
  3928. "[OPTIONS] FILE or PORT/PROTO" \
  3929. #define fuser_full_usage "\n\n" \
  3930. "Find processes which use FILEs or PORTs\n" \
  3931. "\n -m Find processes which use same fs as FILEs" \
  3932. "\n -4,-6 Search only IPv4/IPv6 space" \
  3933. "\n -s Don't display PIDs" \
  3934. "\n -k Kill found processes" \
  3935. "\n -SIGNAL Signal to send (default: KILL)" \
  3936. #define iostat_trivial_usage \
  3937. "[-c] [-d] [-t] [-z] [-k|-m] [ALL|BLOCKDEV...] [INTERVAL [COUNT]]" \
  3938. #define iostat_full_usage "\n\n" \
  3939. "Report CPU and I/O statistics\n" \
  3940. "\n -c Show CPU utilization" \
  3941. "\n -d Show device utilization" \
  3942. "\n -t Print current time" \
  3943. "\n -z Omit devices with no activity" \
  3944. "\n -k Use kb/s" \
  3945. "\n -m Use Mb/s" \
  3946. #define kill_trivial_usage \
  3947. "[-l] [-SIG] PID..." \
  3948. #define kill_full_usage "\n\n" \
  3949. "Send a signal (default: TERM) to given PIDs\n" \
  3950. "\n -l List all signal names and numbers" \
  3951. #define kill_example_usage \
  3952. "$ ps | grep apache\n" \
  3953. "252 root root S [apache]\n" \
  3954. "263 www-data www-data S [apache]\n" \
  3955. "264 www-data www-data S [apache]\n" \
  3956. "265 www-data www-data S [apache]\n" \
  3957. "266 www-data www-data S [apache]\n" \
  3958. "267 www-data www-data S [apache]\n" \
  3959. "$ kill 252\n" \
  3960. #define killall_trivial_usage \
  3961. "[-l] [-q] [-SIG] PROCESS_NAME..." \
  3962. #define killall_full_usage "\n\n" \
  3963. "Send a signal (default: TERM) to given processes\n" \
  3964. "\n -l List all signal names and numbers" \
  3965. "\n -q Don't complain if no processes were killed" \
  3966. #define killall_example_usage \
  3967. "$ killall apache\n" \
  3968. #define killall5_trivial_usage \
  3969. "[-l] [-SIG] [-o PID]..." \
  3970. #define killall5_full_usage "\n\n" \
  3971. "Send a signal (default: TERM) to all processes outside current session\n" \
  3972. "\n -l List all signal names and numbers" \
  3973. "\n -o PID Don't signal this PID" \
  3974. #define lsof_trivial_usage \
  3975. "" \
  3976. #define lsof_full_usage "\n\n" \
  3977. "Show all open files" \
  3978. #define mpstat_trivial_usage \
  3979. "[-A] [-I SUM|CPU|ALL|SCPU] [-u] [-P num|ALL] [INTERVAL [COUNT]]" \
  3980. #define mpstat_full_usage "\n\n" \
  3981. "Per-processor statistics\n" \
  3982. "\n -A Same as -I ALL -u -P ALL" \
  3983. "\n -I SUM|CPU|ALL|SCPU Report interrupt statistics" \
  3984. "\n -P num|ALL Processor to monitor" \
  3985. "\n -u Report CPU utilization" \
  3986. #define nmeter_trivial_usage \
  3987. "[-d MSEC] FORMAT_STRING" \
  3988. #define nmeter_full_usage "\n\n" \
  3989. "Monitor system in real time" \
  3990. "\n" \
  3991. "\n -d MSEC Milliseconds between updates, default:1000, none:-1" \
  3992. "\n" \
  3993. "\nFormat specifiers:" \
  3994. "\n %Nc or %[cN] CPU. N - bar size (default 10)" \
  3995. "\n (displays: S:system U:user N:niced D:iowait I:irq i:softirq)" \
  3996. "\n %[nINTERFACE] Network INTERFACE" \
  3997. "\n %m Allocated memory" \
  3998. "\n %[mf] Free memory" \
  3999. "\n %[mt] Total memory" \
  4000. "\n %s Allocated swap" \
  4001. "\n %f Number of used file descriptors" \
  4002. "\n %Ni Total/specific IRQ rate" \
  4003. "\n %x Context switch rate" \
  4004. "\n %p Forks" \
  4005. "\n %[pn] # of processes" \
  4006. "\n %b Block io" \
  4007. "\n %Nt Time (with N decimal points)" \
  4008. "\n %r Print <cr> instead of <lf> at EOL" \
  4009. #define pgrep_trivial_usage \
  4010. "[-flanovx] [-s SID|-P PPID|PATTERN]" \
  4011. #define pgrep_full_usage "\n\n" \
  4012. "Display process(es) selected by regex PATTERN\n" \
  4013. "\n -l Show command name too" \
  4014. "\n -a Show command line too" \
  4015. "\n -f Match against entire command line" \
  4016. "\n -n Show the newest process only" \
  4017. "\n -o Show the oldest process only" \
  4018. "\n -v Negate the match" \
  4019. "\n -x Match whole name (not substring)" \
  4020. "\n -s Match session ID (0 for current)" \
  4021. "\n -P Match parent process ID" \
  4022. #define pkill_trivial_usage \
  4023. "[-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN]" \
  4024. #define pkill_full_usage "\n\n" \
  4025. "Send a signal to process(es) selected by regex PATTERN\n" \
  4026. "\n -l List all signals" \
  4027. "\n -f Match against entire command line" \
  4028. "\n -n Signal the newest process only" \
  4029. "\n -o Signal the oldest process only" \
  4030. "\n -v Negate the match" \
  4031. "\n -x Match whole name (not substring)" \
  4032. "\n -s Match session ID (0 for current)" \
  4033. "\n -P Match parent process ID" \
  4034. #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) \
  4035. #define pidof_trivial_usage \
  4036. "[OPTIONS] [NAME]..." \
  4037. #define USAGE_PIDOF "\n" \
  4038. #else \
  4039. #define pidof_trivial_usage \
  4040. "[NAME]..." \
  4041. #define USAGE_PIDOF /* none */ \
  4042. #endif \
  4043. #define pidof_full_usage "\n\n" \
  4044. "List PIDs of all processes with names that match NAMEs" \
  4045. USAGE_PIDOF \
  4046. IF_FEATURE_PIDOF_SINGLE( \
  4047. "\n -s Show only one PID" \
  4048. ) \
  4049. IF_FEATURE_PIDOF_OMIT( \
  4050. "\n -o PID Omit given pid" \
  4051. "\n Use %PPID to omit pid of pidof's parent" \
  4052. ) \
  4053. #define pidof_example_usage \
  4054. "$ pidof init\n" \
  4055. "1\n" \
  4056. IF_FEATURE_PIDOF_OMIT( \
  4057. "$ pidof /bin/sh\n20351 5973 5950\n") \
  4058. IF_FEATURE_PIDOF_OMIT( \
  4059. "$ pidof /bin/sh -o %PPID\n20351 5950") \
  4060. #define pmap_trivial_usage \
  4061. "[-xq] PID..." \
  4062. #define pmap_full_usage "\n\n" \
  4063. "Display process memory usage" \
  4064. "\n" \
  4065. "\n -x Show details" \
  4066. "\n -q Quiet" \
  4067. #define powertop_trivial_usage \
  4068. "" \
  4069. #define powertop_full_usage "\n\n" \
  4070. "Analyze power consumption on Intel-based laptops" \
  4071. #if ENABLE_DESKTOP \
  4072. #define ps_trivial_usage \
  4073. "[-o COL1,COL2=HEADER]" IF_FEATURE_SHOW_THREADS(" [-T]") \
  4074. #define ps_full_usage "\n\n" \
  4075. "Show list of processes\n" \
  4076. "\n -o COL1,COL2=HEADER Select columns for display" \
  4077. IF_FEATURE_SHOW_THREADS( \
  4078. "\n -T Show threads" \
  4079. ) \
  4080. #else /* !ENABLE_DESKTOP */ \
  4081. #if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE \
  4082. #define USAGE_PS "\nThis version of ps accepts no options" \
  4083. #else \
  4084. #define USAGE_PS "" \
  4085. #endif \
  4086. #define ps_trivial_usage \
  4087. "" \
  4088. #define ps_full_usage "\n\n" \
  4089. "Show list of processes\n" \
  4090. USAGE_PS \
  4091. IF_SELINUX( \
  4092. "\n -Z Show selinux context" \
  4093. ) \
  4094. IF_FEATURE_PS_WIDE( \
  4095. "\n w Wide output" \
  4096. ) \
  4097. IF_FEATURE_PS_LONG( \
  4098. "\n l Long output" \
  4099. ) \
  4100. IF_FEATURE_SHOW_THREADS( \
  4101. "\n T Show threads" \
  4102. ) \
  4103. #endif /* ENABLE_DESKTOP */ \
  4104. #define ps_example_usage \
  4105. "$ ps\n" \
  4106. " PID Uid Gid State Command\n" \
  4107. " 1 root root S init\n" \
  4108. " 2 root root S [kflushd]\n" \
  4109. " 3 root root S [kupdate]\n" \
  4110. " 4 root root S [kpiod]\n" \
  4111. " 5 root root S [kswapd]\n" \
  4112. " 742 andersen andersen S [bash]\n" \
  4113. " 743 andersen andersen S -bash\n" \
  4114. " 745 root root S [getty]\n" \
  4115. " 2990 andersen andersen R ps\n" \
  4116. #define pstree_trivial_usage \
  4117. "[-p] [PID|USER]" \
  4118. #define pstree_full_usage "\n\n" \
  4119. "Display process tree, optionally start from USER or PID\n" \
  4120. "\n -p Show pids" \
  4121. #define pwdx_trivial_usage \
  4122. "PID..." \
  4123. #define pwdx_full_usage "\n\n" \
  4124. "Show current directory for PIDs" \
  4125. #define smemcap_trivial_usage ">SMEMDATA.TAR" \
  4126. #define smemcap_full_usage "\n\n" \
  4127. "Collect memory usage data in /proc and write it to stdout" \
  4128. #define sysctl_trivial_usage \
  4129. "-p [-enq] [FILE...] / [-enqaw] [KEY[=VALUE]]..." \
  4130. #define sysctl_full_usage "\n\n" \
  4131. "Show/set kernel parameters\n" \
  4132. "\n -p Set values from FILEs (default /etc/sysctl.conf)" \
  4133. "\n -e Don't warn about unknown keys" \
  4134. "\n -n Don't show key names" \
  4135. "\n -q Quiet" \
  4136. "\n -a Show all values" \
  4137. "\n -w Set values" \
  4138. #define sysctl_example_usage \
  4139. "sysctl [-n] [-e] variable...\n" \
  4140. "sysctl [-n] [-e] [-q] -w variable=value...\n" \
  4141. "sysctl [-n] [-e] -a\n" \
  4142. "sysctl [-n] [-e] [-q] -p file (default /etc/sysctl.conf)\n" \
  4143. "sysctl [-n] [-e] -A\n" \
  4144. #if ENABLE_FEATURE_SHOW_THREADS || ENABLE_FEATURE_TOP_SMP_CPU \
  4145. # define IF_SHOW_THREADS_OR_TOP_SMP(...) __VA_ARGS__ \
  4146. #else \
  4147. # define IF_SHOW_THREADS_OR_TOP_SMP(...) \
  4148. #endif \
  4149. #define top_trivial_usage \
  4150. "[-b] [-nCOUNT] [-dSECONDS]" IF_FEATURE_TOPMEM(" [-m]") \
  4151. #define top_full_usage "\n\n" \
  4152. "Provide a view of process activity in real time." \
  4153. "\n""Read the status of all processes from /proc each SECONDS" \
  4154. "\n""and display a screenful of them." \
  4155. "\n" \
  4156. IF_FEATURE_TOP_INTERACTIVE( \
  4157. "Keys:" \
  4158. "\n"" N/M" \
  4159. IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/P") \
  4160. IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/T") \
  4161. ": " IF_FEATURE_TOPMEM("show CPU usage, ") "sort by pid/mem" \
  4162. IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/cpu") \
  4163. IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/time") \
  4164. IF_FEATURE_TOPMEM( \
  4165. "\n"" S: show memory" \
  4166. ) \
  4167. "\n"" R: reverse sort" \
  4168. IF_SHOW_THREADS_OR_TOP_SMP( \
  4169. "\n"" " \
  4170. IF_FEATURE_SHOW_THREADS("H: toggle threads") \
  4171. IF_FEATURE_SHOW_THREADS(IF_FEATURE_TOP_SMP_CPU(", ")) \
  4172. IF_FEATURE_TOP_SMP_CPU("1: toggle SMP") \
  4173. ) \
  4174. "\n"" Q,^C: exit" \
  4175. "\n" \
  4176. "\n""Options:" \
  4177. ) \
  4178. "\n"" -b Batch mode" \
  4179. "\n"" -n N Exit after N iterations" \
  4180. "\n"" -d N Delay between updates" \
  4181. IF_FEATURE_TOPMEM( \
  4182. "\n"" -m Same as 's' key" \
  4183. ) \
  4184. #define uptime_trivial_usage \
  4185. "" \
  4186. #define uptime_full_usage "\n\n" \
  4187. "Display the time since the last boot" \
  4188. #define uptime_example_usage \
  4189. "$ uptime\n" \
  4190. " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" \
  4191. #define watch_trivial_usage \
  4192. "[-n SEC] [-t] PROG ARGS" \
  4193. #define watch_full_usage "\n\n" \
  4194. "Run PROG periodically\n" \
  4195. "\n -n Loop period in seconds (default 2)" \
  4196. "\n -t Don't print header" \
  4197. #define watch_example_usage \
  4198. "$ watch date\n" \
  4199. "Mon Dec 17 10:31:40 GMT 2000\n" \
  4200. "Mon Dec 17 10:31:42 GMT 2000\n" \
  4201. "Mon Dec 17 10:31:44 GMT 2000" \
  4202. #define chpst_trivial_usage \
  4203. "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \
  4204. " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \
  4205. " [-p N] [-f BYTES] [-c BYTES] PROG ARGS" \
  4206. #define chpst_full_usage "\n\n" \
  4207. "Change the process state, run PROG\n" \
  4208. "\n -u USER[:GRP] Set uid and gid" \
  4209. "\n -U USER[:GRP] Set $UID and $GID in environment" \
  4210. "\n -e DIR Set environment variables as specified by files" \
  4211. "\n in DIR: file=1st_line_of_file" \
  4212. "\n -/ DIR Chroot to DIR" \
  4213. "\n -n NICE Add NICE to nice value" \
  4214. "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES" \
  4215. "\n -d BYTES Limit data segment" \
  4216. "\n -o N Limit number of open files per process" \
  4217. "\n -p N Limit number of processes per uid" \
  4218. "\n -f BYTES Limit output file sizes" \
  4219. "\n -c BYTES Limit core file size" \
  4220. "\n -v Verbose" \
  4221. "\n -P Create new process group" \
  4222. "\n -0 Close stdin" \
  4223. "\n -1 Close stdout" \
  4224. "\n -2 Close stderr" \
  4225. #define envdir_trivial_usage \
  4226. "DIR PROG ARGS" \
  4227. #define envdir_full_usage "\n\n" \
  4228. "Set various environment variables as specified by files\n" \
  4229. "in the directory DIR, run PROG" \
  4230. #define envuidgid_trivial_usage \
  4231. "USER PROG ARGS" \
  4232. #define envuidgid_full_usage "\n\n" \
  4233. "Set $UID to USER's uid and $GID to USER's gid, run PROG" \
  4234. #define setuidgid_trivial_usage \
  4235. "USER PROG ARGS" \
  4236. #define setuidgid_full_usage "\n\n" \
  4237. "Set uid and gid to USER's uid and gid, drop supplementary group ids,\n" \
  4238. "run PROG" \
  4239. #define softlimit_trivial_usage \
  4240. "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" \
  4241. " [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" \
  4242. " PROG ARGS" \
  4243. #define softlimit_full_usage "\n\n" \
  4244. "Set soft resource limits, then run PROG\n" \
  4245. "\n -a BYTES Limit total size of all segments" \
  4246. "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES" \
  4247. "\n -d BYTES Limit data segment" \
  4248. "\n -s BYTES Limit stack segment" \
  4249. "\n -l BYTES Limit locked memory size" \
  4250. "\n -o N Limit number of open files per process" \
  4251. "\n -p N Limit number of processes per uid" \
  4252. "\nOptions controlling file sizes:" \
  4253. "\n -f BYTES Limit output file sizes" \
  4254. "\n -c BYTES Limit core file size" \
  4255. "\nEfficiency opts:" \
  4256. "\n -r BYTES Limit resident set size" \
  4257. "\n -t N Limit CPU time, process receives" \
  4258. "\n a SIGXCPU after N seconds" \
  4259. #define runsv_trivial_usage \
  4260. "DIR" \
  4261. #define runsv_full_usage "\n\n" \
  4262. "Start and monitor a service and optionally an appendant log service" \
  4263. #define runsvdir_trivial_usage \
  4264. "[-P] [-s SCRIPT] DIR" \
  4265. #define runsvdir_full_usage "\n\n" \
  4266. "Start a runsv process for each subdirectory. If it exits, restart it.\n" \
  4267. "\n -P Put each runsv in a new session" \
  4268. "\n -s SCRIPT Run SCRIPT <signo> after signal is processed" \
  4269. #define sv_trivial_usage \
  4270. "[-v] [-w SEC] CMD SERVICE_DIR..." \
  4271. #define sv_full_usage "\n\n" \
  4272. "Control services monitored by runsv supervisor.\n" \
  4273. "Commands (only first character is enough):\n" \
  4274. "\n" \
  4275. "status: query service status\n" \
  4276. "up: if service isn't running, start it. If service stops, restart it\n" \
  4277. "once: like 'up', but if service stops, don't restart it\n" \
  4278. "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
  4279. " if it exists. After it stops, don't restart service\n" \
  4280. "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
  4281. " runsv exits too\n" \
  4282. "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
  4283. "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
  4284. #define svc_trivial_usage \
  4285. "[-udopchaitkx] SERVICE_DIR..." \
  4286. #define svc_full_usage "\n\n" \
  4287. "Control services monitored by runsv supervisor" \
  4288. "\n" \
  4289. "\n"" -u If service is not running, start it; restart if it stops" \
  4290. "\n"" -d If service is running, send TERM+CONT signals; do not restart it" \
  4291. "\n"" -o Once: if service is not running, start it; do not restart it" \
  4292. "\n"" -pchaitk Send STOP, CONT, HUP, ALRM, INT, TERM, KILL signal to service" \
  4293. "\n"" -x Exit: runsv will exit as soon as the service is down" \
  4294. #define svlogd_trivial_usage \
  4295. "[-tttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..." \
  4296. #define svlogd_full_usage "\n\n" \
  4297. "Read log data from stdin and write to rotated log files in DIRs" \
  4298. "\n" \
  4299. "\n""-r C Replace non-printable characters with C" \
  4300. "\n""-R CHARS Also replace CHARS with C (default _)" \
  4301. "\n""-t Timestamp with @tai64n" \
  4302. "\n""-tt Timestamp with yyyy-mm-dd_hh:mm:ss.sssss" \
  4303. "\n""-ttt Timestamp with yyyy-mm-ddThh:mm:ss.sssss" \
  4304. "\n""-v Verbose" \
  4305. "\n" \
  4306. "\n""DIR/config file modifies behavior:" \
  4307. "\n""sSIZE - when to rotate logs (default 1000000, 0 disables)" \
  4308. "\n""nNUM - number of files to retain" \
  4309. "\n""!PROG - process rotated log with PROG" \
  4310. "\n""+,-PATTERN - (de)select line for logging" \
  4311. "\n""E,ePATTERN - (de)select line for stderr" \
  4312. #define chcon_trivial_usage \
  4313. "[OPTIONS] CONTEXT FILE..." \
  4314. "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
  4315. IF_LONG_OPTS( \
  4316. "\n chcon [OPTIONS] --reference=RFILE FILE..." \
  4317. ) \
  4318. #define chcon_full_usage "\n\n" \
  4319. "Change the security context of each FILE to CONTEXT\n" \
  4320. "\n -v Verbose" \
  4321. "\n -c Report changes made" \
  4322. "\n -h Affect symlinks instead of their targets" \
  4323. "\n -f Suppress most error messages" \
  4324. IF_LONG_OPTS( \
  4325. "\n --reference RFILE Use RFILE's group instead of using a CONTEXT value" \
  4326. ) \
  4327. "\n -u USER Set user/role/type/range in the target security context" \
  4328. "\n -r ROLE" \
  4329. "\n -t TYPE" \
  4330. "\n -l RNG" \
  4331. "\n -R Recurse" \
  4332. #define getenforce_trivial_usage NOUSAGE_STR \
  4333. #define getenforce_full_usage "" \
  4334. #define getsebool_trivial_usage \
  4335. "-a or getsebool boolean..." \
  4336. #define getsebool_full_usage "\n\n" \
  4337. " -a Show all selinux booleans" \
  4338. #define load_policy_trivial_usage NOUSAGE_STR \
  4339. #define load_policy_full_usage "" \
  4340. #define matchpathcon_trivial_usage \
  4341. "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]" \
  4342. #define matchpathcon_full_usage "\n\n" \
  4343. " -n Don't display path" \
  4344. "\n -N Don't use translations" \
  4345. "\n -f Use alternate file_context file" \
  4346. "\n -p Use prefix to speed translations" \
  4347. "\n -V Verify file context on disk matches defaults" \
  4348. #define runcon_trivial_usage \
  4349. "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG ARGS\n" \
  4350. "runcon CONTEXT PROG ARGS" \
  4351. #define runcon_full_usage "\n\n" \
  4352. "Run PROG in a different security context\n" \
  4353. "\n CONTEXT Complete security context\n" \
  4354. "\n -c Compute process transition context before modifying" \
  4355. "\n -t TYPE Type (for same role as parent)" \
  4356. "\n -u USER User identity" \
  4357. "\n -r ROLE Role" \
  4358. "\n -l RNG Levelrange" \
  4359. #define selinuxenabled_trivial_usage NOUSAGE_STR \
  4360. #define selinuxenabled_full_usage "" \
  4361. #define sestatus_trivial_usage \
  4362. "[-vb]" \
  4363. #define sestatus_full_usage "\n\n" \
  4364. " -v Verbose" \
  4365. "\n -b Display current state of booleans" \
  4366. #define setenforce_trivial_usage \
  4367. "[Enforcing | Permissive | 1 | 0]" \
  4368. #define setenforce_full_usage "" \
  4369. #define setfiles_trivial_usage \
  4370. "[-dnpqsvW] [-e DIR]... [-o FILE] [-r alt_root_path]" \
  4371. IF_FEATURE_SETFILES_CHECK_OPTION( \
  4372. " [-c policyfile] spec_file" \
  4373. ) \
  4374. " pathname" \
  4375. #define setfiles_full_usage "\n\n" \
  4376. "Reset file contexts under pathname according to spec_file\n" \
  4377. IF_FEATURE_SETFILES_CHECK_OPTION( \
  4378. "\n -c FILE Check the validity of the contexts against the specified binary policy" \
  4379. ) \
  4380. "\n -d Show which specification matched each file" \
  4381. "\n -l Log changes in file labels to syslog" \
  4382. "\n -n Don't change any file labels" \
  4383. "\n -q Suppress warnings" \
  4384. "\n -r DIR Use an alternate root path" \
  4385. "\n -e DIR Exclude DIR" \
  4386. "\n -F Force reset of context to match file_context for customizable files" \
  4387. "\n -o FILE Save list of files with incorrect context" \
  4388. "\n -s Take a list of files from stdin (instead of command line)" \
  4389. "\n -v Show changes in file labels, if type or role are changing" \
  4390. "\n -vv Show changes in file labels, if type, role, or user are changing" \
  4391. "\n -W Display warnings about entries that had no matching files" \
  4392. #define restorecon_trivial_usage \
  4393. "[-iFnRv] [-e EXCLUDEDIR]... [-o FILE] [-f FILE]" \
  4394. #define restorecon_full_usage "\n\n" \
  4395. "Reset security contexts of files in pathname\n" \
  4396. "\n -i Ignore files that don't exist" \
  4397. "\n -f FILE File with list of files to process" \
  4398. "\n -e DIR Directory to exclude" \
  4399. "\n -R,-r Recurse" \
  4400. "\n -n Don't change any file labels" \
  4401. "\n -o FILE Save list of files with incorrect context" \
  4402. "\n -v Verbose" \
  4403. "\n -vv Show changed labels" \
  4404. "\n -F Force reset of context to match file_context" \
  4405. "\n for customizable files, or the user section," \
  4406. "\n if it has changed" \
  4407. #define setsebool_trivial_usage \
  4408. "boolean value" \
  4409. #define setsebool_full_usage "\n\n" \
  4410. "Change boolean setting" \
  4411. #define ash_trivial_usage \
  4412. "[-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]" \
  4413. #define ash_full_usage "\n\n" \
  4414. "Unix shell interpreter" \
  4415. #define cttyhack_trivial_usage \
  4416. "[PROG ARGS]" \
  4417. #define cttyhack_full_usage "\n\n" \
  4418. "Give PROG a controlling tty if possible." \
  4419. "\nExample for /etc/inittab (for busybox init):" \
  4420. "\n ::respawn:/bin/cttyhack /bin/sh" \
  4421. "\nGiving controlling tty to shell running with PID 1:" \
  4422. "\n $ exec cttyhack sh" \
  4423. "\nStarting interactive shell from boot shell script:" \
  4424. "\n setsid cttyhack sh" \
  4425. #define hush_trivial_usage \
  4426. "[-enxl] [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]" \
  4427. #define hush_full_usage "\n\n" \
  4428. "Unix shell interpreter" \
  4429. #define klogd_trivial_usage \
  4430. "[-c N] [-n]" \
  4431. #define klogd_full_usage "\n\n" \
  4432. "Kernel logger\n" \
  4433. "\n -c N Print to console messages more urgent than prio N (1-8)" \
  4434. "\n -n Run in foreground" \
  4435. #define logger_trivial_usage \
  4436. "[OPTIONS] [MESSAGE]" \
  4437. #define logger_full_usage "\n\n" \
  4438. "Write MESSAGE (or stdin) to syslog\n" \
  4439. "\n -s Log to stderr as well as the system log" \
  4440. "\n -t TAG Log using the specified tag (defaults to user name)" \
  4441. "\n -p PRIO Priority (numeric or facility.level pair)" \
  4442. #define logger_example_usage \
  4443. "$ logger \"hello\"\n" \
  4444. #define logread_trivial_usage \
  4445. "[-fF]" \
  4446. #define logread_full_usage "\n\n" \
  4447. "Show messages in syslogd's circular buffer\n" \
  4448. "\n -f Output data as log grows" \
  4449. "\n -F Same as -f, but dump buffer first" \
  4450. #define syslogd_trivial_usage \
  4451. "[OPTIONS]" \
  4452. #define syslogd_full_usage "\n\n" \
  4453. "System logging utility\n" \
  4454. IF_NOT_FEATURE_SYSLOGD_CFG( \
  4455. "(this version of syslogd ignores /etc/syslog.conf)\n" \
  4456. ) \
  4457. "\n -n Run in foreground" \
  4458. IF_FEATURE_REMOTE_LOG( \
  4459. "\n -R HOST[:PORT] Log to HOST:PORT (default PORT:514)" \
  4460. "\n -L Log locally and via network (default is network only if -R)" \
  4461. ) \
  4462. IF_FEATURE_IPC_SYSLOG( \
  4463. "\n -C[size_kb] Log to shared mem buffer (use logread to read it)" \
  4464. ) \
  4465. IF_FEATURE_KMSG_SYSLOG( \
  4466. "\n -K Log to kernel printk buffer (use dmesg to read it)" \
  4467. ) \
  4468. "\n -O FILE Log to FILE (default: /var/log/messages, stdout if -)" \
  4469. IF_FEATURE_ROTATE_LOGFILE( \
  4470. "\n -s SIZE Max size (KB) before rotation (default 200KB, 0=off)" \
  4471. "\n -b N N rotated logs to keep (default 1, max 99, 0=purge)" \
  4472. ) \
  4473. "\n -l N Log only messages more urgent than prio N (1-8)" \
  4474. "\n -S Smaller output" \
  4475. IF_FEATURE_SYSLOGD_DUP( \
  4476. "\n -D Drop duplicates" \
  4477. ) \
  4478. IF_FEATURE_SYSLOGD_CFG( \
  4479. "\n -f FILE Use FILE as config (default:/etc/syslog.conf)" \
  4480. ) \
  4481. #define syslogd_example_usage \
  4482. "$ syslogd -R masterlog:514\n" \
  4483. "$ syslogd -R 192.168.1.1:601\n" \
  4484. #define acpid_trivial_usage \
  4485. "[-df] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]" \
  4486. #define acpid_full_usage "\n\n" \
  4487. "Listen to ACPI events and spawn specific helpers on event arrival\n" \
  4488. "\n -d Log to stderr, not log file (implies -f)" \
  4489. "\n -f Run in foreground" \
  4490. "\n -c DIR Config directory [/etc/acpi]" \
  4491. "\n -e FILE /proc event file [/proc/acpi/event]" \
  4492. "\n -l FILE Log file [/var/log/acpid.log]" \
  4493. "\n -p FILE Pid file [/var/run/acpid.pid]" \
  4494. "\n -a FILE Action file [/etc/acpid.conf]" \
  4495. "\n -M FILE Map file [/etc/acpi.map]" \
  4496. IF_FEATURE_ACPID_COMPAT( \
  4497. "\n\nAccept and ignore compatibility options -g -m -s -S -v" \
  4498. ) \
  4499. #define acpid_example_usage \
  4500. "Without -e option, acpid uses all /dev/input/event* files\n" \
  4501. "# acpid\n" \
  4502. "# acpid -l /var/log/my-acpi-log\n" \
  4503. "# acpid -e /proc/acpi/event\n" \
  4504. #define blkdiscard_trivial_usage \
  4505. "[-o OFS] [-l LEN] [-s] DEVICE" \
  4506. #define blkdiscard_full_usage "\n\n" \
  4507. "Discard sectors on DEVICE\n" \
  4508. "\n -o OFS Byte offset into device" \
  4509. "\n -l LEN Number of bytes to discard" \
  4510. "\n -s Perform a secure discard" \
  4511. #define blkdiscard_example_usage \
  4512. "$ blkdiscard -o 0 -l 1G /dev/sdb" \
  4513. #define blkid_trivial_usage \
  4514. "[BLOCKDEV]..." \
  4515. #define blkid_full_usage "\n\n" \
  4516. "Print UUIDs of all filesystems" \
  4517. #define blockdev_trivial_usage \
  4518. "OPTION BLOCKDEV" \
  4519. #define blockdev_full_usage "\n\n" \
  4520. " --setro Set ro" \
  4521. "\n --setrw Set rw" \
  4522. "\n --getro Get ro" \
  4523. "\n --getss Get sector size" \
  4524. "\n --getbsz Get block size" \
  4525. "\n --setbsz BYTES Set block size" \
  4526. "\n --getsz Get device size in 512-byte sectors" \
  4527. "\n --getsize64 Get device size in bytes" \
  4528. "\n --flushbufs Flush buffers" \
  4529. "\n --rereadpt Reread partition table" \
  4530. #define cal_trivial_usage \
  4531. "[-jy] [[MONTH] YEAR]" \
  4532. #define cal_full_usage "\n\n" \
  4533. "Display a calendar\n" \
  4534. "\n -j Use julian dates" \
  4535. "\n -y Display the entire year" \
  4536. #define chrt_trivial_usage \
  4537. "[-prfom] [PRIO] [PID | PROG ARGS]" \
  4538. #define chrt_full_usage "\n\n" \
  4539. "Change scheduling priority and class for a process\n" \
  4540. "\n -p Operate on PID" \
  4541. "\n -r Set SCHED_RR class" \
  4542. "\n -f Set SCHED_FIFO class" \
  4543. "\n -o Set SCHED_OTHER class" \
  4544. "\n -m Show min/max priorities" \
  4545. #define chrt_example_usage \
  4546. "$ chrt -r 4 sleep 900; x=$!\n" \
  4547. "$ chrt -f -p 3 $x\n" \
  4548. "You need CAP_SYS_NICE privileges to set scheduling attributes of a process" \
  4549. #define dmesg_trivial_usage \
  4550. "[-c] [-n LEVEL] [-s SIZE]" \
  4551. #define dmesg_full_usage "\n\n" \
  4552. "Print or control the kernel ring buffer\n" \
  4553. "\n -c Clear ring buffer after printing" \
  4554. "\n -n LEVEL Set console logging level" \
  4555. "\n -s SIZE Buffer size" \
  4556. "\n -r Print raw message buffer" \
  4557. #define eject_trivial_usage \
  4558. "[-t] [-T] [DEVICE]" \
  4559. #define eject_full_usage "\n\n" \
  4560. "Eject DEVICE or default /dev/cdrom\n" \
  4561. IF_FEATURE_EJECT_SCSI( \
  4562. "\n -s SCSI device" \
  4563. ) \
  4564. "\n -t Close tray" \
  4565. "\n -T Open/close tray (toggle)" \
  4566. #define fallocate_trivial_usage \
  4567. "[-o OFS] -l LEN FILE" \
  4568. #define fallocate_full_usage "\n\n" \
  4569. "Preallocate space for FILE\n" \
  4570. "\n -o OFS Offset of range" \
  4571. "\n -l LEN Length of range" \
  4572. #define fatattr_trivial_usage \
  4573. "[-+rhsvda] FILE..." \
  4574. #define fatattr_full_usage "\n\n" \
  4575. "Change file attributes on FAT filesystem\n" \
  4576. "\n - Clear attributes" \
  4577. "\n + Set attributes" \
  4578. "\n r Read only" \
  4579. "\n h Hidden" \
  4580. "\n s System" \
  4581. "\n v Volume label" \
  4582. "\n d Directory" \
  4583. "\n a Archive" \
  4584. #define fbset_trivial_usage \
  4585. "[OPTIONS] [MODE]" \
  4586. #define fbset_full_usage "\n\n" \
  4587. "Show and modify frame buffer settings" \
  4588. #define fbset_example_usage \
  4589. "$ fbset\n" \
  4590. "mode \"1024x768-76\"\n" \
  4591. " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
  4592. " geometry 1024 768 1024 768 16\n" \
  4593. " timings 12714 128 32 16 4 128 4\n" \
  4594. " accel false\n" \
  4595. " rgba 5/11,6/5,5/0,0/0\n" \
  4596. "endmode\n" \
  4597. #define fdformat_trivial_usage \
  4598. "[-n] DEVICE" \
  4599. #define fdformat_full_usage "\n\n" \
  4600. "Format floppy disk\n" \
  4601. "\n -n Don't verify after format" \
  4602. #ifndef ENABLE_FEATURE_FDISK_BLKSIZE \
  4603. # define ENABLE_FEATURE_FDISK_BLKSIZE 0 \
  4604. # define IF_FEATURE_FDISK_BLKSIZE(a) \
  4605. #endif \
  4606. #define fdisk_trivial_usage \
  4607. "[-ul" IF_FEATURE_FDISK_BLKSIZE("s") "] " \
  4608. "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK" \
  4609. #define fdisk_full_usage "\n\n" \
  4610. "Change partition table\n" \
  4611. "\n -u Start and End are in sectors (instead of cylinders)" \
  4612. "\n -l Show partition table for each DISK, then exit" \
  4613. IF_FEATURE_FDISK_BLKSIZE( \
  4614. "\n -s Show partition sizes in kb for each DISK, then exit" \
  4615. ) \
  4616. "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \
  4617. "\n -C CYLINDERS Set number of cylinders/heads/sectors" \
  4618. "\n -H HEADS Typically 255" \
  4619. "\n -S SECTORS Typically 63" \
  4620. #define findfs_trivial_usage \
  4621. "LABEL=label or UUID=uuid" \
  4622. #define findfs_full_usage "\n\n" \
  4623. "Find a filesystem device based on a label or UUID" \
  4624. #define findfs_example_usage \
  4625. "$ findfs LABEL=MyDevice" \
  4626. #define flock_trivial_usage \
  4627. "[-sxun] FD|{FILE [-c] PROG ARGS}" \
  4628. #define flock_full_usage "\n\n" \
  4629. "[Un]lock file descriptor, or lock FILE, run PROG\n" \
  4630. "\n -s Shared lock" \
  4631. "\n -x Exclusive lock (default)" \
  4632. "\n -u Unlock FD" \
  4633. "\n -n Fail rather than wait" \
  4634. #define freeramdisk_trivial_usage \
  4635. "DEVICE" \
  4636. #define freeramdisk_full_usage "\n\n" \
  4637. "Free all memory used by the specified ramdisk" \
  4638. #define freeramdisk_example_usage \
  4639. "$ freeramdisk /dev/ram2\n" \
  4640. #define fdflush_trivial_usage \
  4641. "DEVICE" \
  4642. #define fdflush_full_usage "\n\n" \
  4643. "Force floppy disk drive to detect disk change" \
  4644. #define fsck_minix_trivial_usage \
  4645. "[-larvsmf] BLOCKDEV" \
  4646. #define fsck_minix_full_usage "\n\n" \
  4647. "Check MINIX filesystem\n" \
  4648. "\n -l List all filenames" \
  4649. "\n -r Perform interactive repairs" \
  4650. "\n -a Perform automatic repairs" \
  4651. "\n -v Verbose" \
  4652. "\n -s Output superblock information" \
  4653. "\n -m Show \"mode not cleared\" warnings" \
  4654. "\n -f Force file system check" \
  4655. #define fsfreeze_trivial_usage \
  4656. "--[un]freeze MOUNTPOINT" \
  4657. #define fsfreeze_full_usage "\n\n" \
  4658. "Flush and halt writes to MOUNTPOINT" \
  4659. #define fstrim_trivial_usage \
  4660. "[OPTIONS] MOUNTPOINT" \
  4661. #define fstrim_full_usage "\n\n" \
  4662. IF_LONG_OPTS( \
  4663. " -o,--offset OFFSET Offset in bytes to discard from" \
  4664. "\n -l,--length LEN Bytes to discard" \
  4665. "\n -m,--minimum MIN Minimum extent length" \
  4666. "\n -v,--verbose Print number of discarded bytes" \
  4667. ) \
  4668. IF_NOT_LONG_OPTS( \
  4669. " -o OFFSET Offset in bytes to discard from" \
  4670. "\n -l LEN Bytes to discard" \
  4671. "\n -m MIN Minimum extent length" \
  4672. "\n -v Print number of discarded bytes" \
  4673. ) \
  4674. #define getopt_trivial_usage \
  4675. "[OPTIONS] [--] OPTSTRING PARAMS" \
  4676. #define getopt_full_usage "\n\n" \
  4677. IF_FEATURE_GETOPT_LONG( \
  4678. " -a Allow long options starting with single -\n" \
  4679. " -l LOPT[,...] Long options to recognize\n" \
  4680. ) \
  4681. " -n PROGNAME The name under which errors are reported" \
  4682. "\n -o OPTSTRING Short options to recognize" \
  4683. "\n -q No error messages on unrecognized options" \
  4684. "\n -Q No normal output" \
  4685. "\n -s SHELL Set shell quoting conventions" \
  4686. "\n -T Version test (exits with 4)" \
  4687. "\n -u Don't quote output" \
  4688. IF_FEATURE_GETOPT_LONG( /* example uses -l, needs FEATURE_GETOPT_LONG */ \
  4689. "\n" \
  4690. "\nExample:" \
  4691. "\n" \
  4692. "\nO=`getopt -l bb: -- ab:c:: \"$@\"` || exit 1" \
  4693. "\neval set -- \"$O\"" \
  4694. "\nwhile true; do" \
  4695. "\n case \"$1\" in" \
  4696. "\n -a) echo A; shift;;" \
  4697. "\n -b|--bb) echo \"B:'$2'\"; shift 2;;" \
  4698. "\n -c) case \"$2\" in" \
  4699. "\n \"\") echo C; shift 2;;" \
  4700. "\n *) echo \"C:'$2'\"; shift 2;;" \
  4701. "\n esac;;" \
  4702. "\n --) shift; break;;" \
  4703. "\n *) echo Error; exit 1;;" \
  4704. "\n esac" \
  4705. "\ndone" \
  4706. ) \
  4707. #define getopt_example_usage \
  4708. "$ cat getopt.test\n" \
  4709. "#!/bin/sh\n" \
  4710. "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
  4711. " -n 'example.busybox' -- \"$@\"`\n" \
  4712. "if [ $? != 0 ]; then exit 1; fi\n" \
  4713. "eval set -- \"$GETOPT\"\n" \
  4714. "while true; do\n" \
  4715. " case $1 in\n" \
  4716. " -a|--a-long) echo \"Option a\"; shift;;\n" \
  4717. " -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
  4718. " -c|--c-long)\n" \
  4719. " case \"$2\" in\n" \
  4720. " \"\") echo \"Option c, no argument\"; shift 2;;\n" \
  4721. " *) echo \"Option c, argument '$2'\"; shift 2;;\n" \
  4722. " esac;;\n" \
  4723. " --) shift; break;;\n" \
  4724. " *) echo \"Internal error!\"; exit 1;;\n" \
  4725. " esac\n" \
  4726. "done\n" \
  4727. #define hexdump_trivial_usage \
  4728. "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..." \
  4729. #define hexdump_full_usage "\n\n" \
  4730. "Display FILEs (or stdin) in a user specified format\n" \
  4731. "\n -b 1-byte octal display" \
  4732. "\n -c 1-byte character display" \
  4733. "\n -d 2-byte decimal display" \
  4734. "\n -o 2-byte octal display" \
  4735. "\n -x 2-byte hex display" \
  4736. "\n -C hex+ASCII 16 bytes per line" \
  4737. "\n -v Show all (no dup folding)" \
  4738. "\n -e FORMAT_STR Example: '16/1 \"%02x|\"\"\\n\"'" \
  4739. "\n -f FORMAT_FILE" \
  4740. "\n -n LENGTH Show only first LENGTH bytes" \
  4741. "\n -s OFFSET Skip OFFSET bytes" \
  4742. IF_FEATURE_HEXDUMP_REVERSE( \
  4743. "\n -R Reverse of 'hexdump -Cv'") \
  4744. #define hd_trivial_usage \
  4745. "FILE..." \
  4746. #define hd_full_usage "\n\n" \
  4747. "hd is an alias for hexdump -C" \
  4748. #define xxd_trivial_usage \
  4749. "[OPTIONS] [FILE]" \
  4750. #define xxd_full_usage "\n\n" \
  4751. "Hex dump FILE (or stdin)\n" \
  4752. "\n -g N Bytes per group" \
  4753. "\n -c N Bytes per line" \
  4754. "\n -p Show only hex bytes, assumes -c30" \
  4755. "\n -l LENGTH Show only first LENGTH bytes" \
  4756. "\n -s OFFSET Skip OFFSET bytes" \
  4757. #define hwclock_trivial_usage \
  4758. IF_LONG_OPTS( \
  4759. "[-r|--show] [-s|--hctosys] [-w|--systohc] [--systz]" \
  4760. " [--localtime] [-u|--utc]" \
  4761. " [-f|--rtc FILE]" \
  4762. ) \
  4763. IF_NOT_LONG_OPTS( \
  4764. "[-r] [-s] [-w] [-t] [-l] [-u] [-f FILE]" \
  4765. ) \
  4766. #define hwclock_full_usage "\n\n" \
  4767. "Query and set hardware clock (RTC)\n" \
  4768. "\n -r Show hardware clock time" \
  4769. "\n -s Set system time from hardware clock" \
  4770. "\n -w Set hardware clock from system time" \
  4771. IF_LONG_OPTS( \
  4772. "\n --systz Set in-kernel timezone, correct system time" \
  4773. ) \
  4774. "\n if hardware clock is in local time" \
  4775. "\n -u Assume hardware clock is kept in UTC" \
  4776. IF_LONG_OPTS( \
  4777. "\n --localtime Assume hardware clock is kept in local time" \
  4778. ) \
  4779. "\n -f FILE Use specified device (e.g. /dev/rtc2)" \
  4780. #define ionice_trivial_usage \
  4781. "[-c 1-3] [-n 0-7] [-p PID] [PROG]" \
  4782. #define ionice_full_usage "\n\n" \
  4783. "Change I/O priority and class\n" \
  4784. "\n -c Class. 1:realtime 2:best-effort 3:idle" \
  4785. "\n -n Priority" \
  4786. #define ipcrm_trivial_usage \
  4787. "[-MQS key] [-mqs id]" \
  4788. #define ipcrm_full_usage "\n\n" \
  4789. "Upper-case options MQS remove an object by shmkey value.\n" \
  4790. "Lower-case options remove an object by shmid value.\n" \
  4791. "\n -mM Remove memory segment after last detach" \
  4792. "\n -qQ Remove message queue" \
  4793. "\n -sS Remove semaphore" \
  4794. #define ipcs_trivial_usage \
  4795. "[[-smq] -i shmid] | [[-asmq] [-tcplu]]" \
  4796. #define ipcs_full_usage "\n\n" \
  4797. " -i Show specific resource" \
  4798. "\nResource specification:" \
  4799. "\n -m Shared memory segments" \
  4800. "\n -q Message queues" \
  4801. "\n -s Semaphore arrays" \
  4802. "\n -a All (default)" \
  4803. "\nOutput format:" \
  4804. "\n -t Time" \
  4805. "\n -c Creator" \
  4806. "\n -p Pid" \
  4807. "\n -l Limits" \
  4808. "\n -u Summary" \
  4809. #define last_trivial_usage \
  4810. ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") \
  4811. #define last_full_usage "\n\n" \
  4812. "Show listing of the last users that logged into the system" \
  4813. IF_FEATURE_LAST_FANCY( "\n" \
  4814. "\n -W Display with no host column truncation" \
  4815. "\n -f FILE Read from FILE instead of /var/log/wtmp" \
  4816. ) \
  4817. #define losetup_trivial_usage \
  4818. "[-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices\n" \
  4819. " losetup -d LOOPDEV - disassociate\n" \
  4820. " losetup -a - show status\n" \
  4821. " losetup -f - show next free loop device" \
  4822. #define losetup_full_usage "\n\n" \
  4823. " -o OFS Start OFS bytes into FILE" \
  4824. "\n -r Read-only" \
  4825. "\n -f Show/use next free loop device" \
  4826. #define losetup_notes_usage \
  4827. "One argument (losetup /dev/loop1) will display the current association\n" \
  4828. "(if any), or disassociate it (with -d). The display shows the offset\n" \
  4829. "and filename of the file the loop device is currently bound to.\n\n" \
  4830. "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
  4831. "with an optional offset (-o 12345). Encryption is not yet supported.\n" \
  4832. "losetup -f will show the first loop free loop device\n\n" \
  4833. #define lspci_trivial_usage \
  4834. "[-mk]" \
  4835. #define lspci_full_usage "\n\n" \
  4836. "List all PCI devices" \
  4837. "\n" \
  4838. "\n -m Parsable output" \
  4839. "\n -k Show driver" \
  4840. #define lsusb_trivial_usage NOUSAGE_STR \
  4841. #define lsusb_full_usage "" \
  4842. #define mdev_trivial_usage \
  4843. "[-s]" \
  4844. #define mdev_full_usage "\n\n" \
  4845. "mdev -s is to be run during boot to scan /sys and populate /dev.\n" \
  4846. "\n" \
  4847. "Bare mdev is a kernel hotplug helper. To activate it:\n" \
  4848. " echo /sbin/mdev >/proc/sys/kernel/hotplug\n" \
  4849. IF_FEATURE_MDEV_CONF( \
  4850. "\n" \
  4851. "It uses /etc/mdev.conf with lines\n" \
  4852. " [-][ENV=regex;]...DEVNAME UID:GID PERM" \
  4853. IF_FEATURE_MDEV_RENAME(" [>|=PATH]|[!]") \
  4854. IF_FEATURE_MDEV_EXEC(" [@|$|*PROG]") \
  4855. "\n" \
  4856. "where DEVNAME is device name regex, @major,minor[-minor2], or\n" \
  4857. "environment variable regex. A common use of the latter is\n" \
  4858. "to load modules for hotplugged devices:\n" \
  4859. " $MODALIAS=.* 0:0 660 @modprobe \"$MODALIAS\"\n" \
  4860. ) \
  4861. "\n" \
  4862. "If /dev/mdev.seq file exists, mdev will wait for its value\n" \
  4863. "to match $SEQNUM variable. This prevents plug/unplug races.\n" \
  4864. "To activate this feature, create empty /dev/mdev.seq at boot.\n" \
  4865. "\n" \
  4866. "If /dev/mdev.log file exists, debug log will be appended to it." \
  4867. #define mesg_trivial_usage \
  4868. "[y|n]" \
  4869. #define mesg_full_usage "\n\n" \
  4870. "Control write access to your terminal\n" \
  4871. " y Allow write access to your terminal\n" \
  4872. " n Disallow write access to your terminal" \
  4873. #define mkfs_ext2_trivial_usage \
  4874. "[-Fn] " \
  4875. "[-b BLK_SIZE] " \
  4876. "[-i INODE_RATIO] [-I INODE_SIZE] " \
  4877. "[-m RESERVED_PERCENT] " \
  4878. "[-L LABEL] " \
  4879. "BLOCKDEV [KBYTES]" \
  4880. #define mkfs_ext2_full_usage "\n\n" \
  4881. " -b BLK_SIZE Block size, bytes" \
  4882. "\n -F Force" \
  4883. "\n -i RATIO Max number of files is filesystem_size / RATIO" \
  4884. "\n -I BYTES Inode size (min 128)" \
  4885. "\n -L LBL Volume label" \
  4886. "\n -m PERCENT Percent of blocks to reserve for admin" \
  4887. "\n -n Dry run" \
  4888. #define mkfs_minix_trivial_usage \
  4889. "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]" \
  4890. #define mkfs_minix_full_usage "\n\n" \
  4891. "Make a MINIX filesystem\n" \
  4892. "\n -c Check device for bad blocks" \
  4893. "\n -n [14|30] Maximum length of filenames" \
  4894. "\n -i INODES Number of inodes for the filesystem" \
  4895. "\n -l FILE Read bad blocks list from FILE" \
  4896. "\n -v Make version 2 filesystem" \
  4897. #define mkfs_reiser_trivial_usage \
  4898. "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]" \
  4899. #define mkfs_reiser_full_usage "\n\n" \
  4900. "Make a ReiserFS V3 filesystem\n" \
  4901. "\n -f Force" \
  4902. "\n -l LBL Volume label" \
  4903. #define mkfs_vfat_trivial_usage \
  4904. "[-v] [-n LABEL] BLOCKDEV [KBYTES]" \
  4905. #define mkfs_vfat_full_usage "\n\n" \
  4906. "Make a FAT32 filesystem\n" \
  4907. "\n -v Verbose" \
  4908. "\n -n LBL Volume label" \
  4909. #define mkswap_trivial_usage \
  4910. "[-L LBL] BLOCKDEV [KBYTES]" \
  4911. #define mkswap_full_usage "\n\n" \
  4912. "Prepare BLOCKDEV to be used as swap partition\n" \
  4913. "\n -L LBL Label" \
  4914. #define more_trivial_usage \
  4915. "[FILE]..." \
  4916. #define more_full_usage "\n\n" \
  4917. "View FILE (or stdin) one screenful at a time" \
  4918. #define more_example_usage \
  4919. "$ dmesg | more\n" \
  4920. #define mount_trivial_usage \
  4921. "[OPTIONS] [-o OPT] DEVICE NODE" \
  4922. #define mount_full_usage "\n\n" \
  4923. "Mount a filesystem. Filesystem autodetection requires /proc.\n" \
  4924. "\n -a Mount all filesystems in fstab" \
  4925. IF_FEATURE_MOUNT_FAKE( \
  4926. IF_FEATURE_MTAB_SUPPORT( \
  4927. "\n -f Update /etc/mtab, but don't mount" \
  4928. ) \
  4929. IF_NOT_FEATURE_MTAB_SUPPORT( \
  4930. "\n -f Dry run" \
  4931. ) \
  4932. ) \
  4933. IF_FEATURE_MOUNT_HELPERS( \
  4934. "\n -i Don't run mount helper" \
  4935. ) \
  4936. IF_FEATURE_MTAB_SUPPORT( \
  4937. "\n -n Don't update /etc/mtab" \
  4938. ) \
  4939. IF_FEATURE_MOUNT_VERBOSE( \
  4940. "\n -v Verbose" \
  4941. ) \
  4942. "\n -r Read-only mount" \
  4943. "\n -t FSTYPE[,...] Filesystem type(s)" \
  4944. IF_FEATURE_MOUNT_OTHERTAB( \
  4945. "\n -T FILE Read FILE instead of /etc/fstab" \
  4946. ) \
  4947. "\n -O OPT Mount only filesystems with option OPT (-a only)" \
  4948. "\n-o OPT:" \
  4949. IF_FEATURE_MOUNT_LOOP( \
  4950. "\n loop Ignored (loop devices are autodetected)" \
  4951. ) \
  4952. IF_FEATURE_MOUNT_FLAGS( \
  4953. "\n [a]sync Writes are [a]synchronous" \
  4954. "\n [no]atime Disable/enable updates to inode access times" \
  4955. "\n [no]diratime Disable/enable atime updates to directories" \
  4956. "\n [no]relatime Disable/enable atime updates relative to modification time" \
  4957. "\n [no]dev (Dis)allow use of special device files" \
  4958. "\n [no]exec (Dis)allow use of executable files" \
  4959. "\n [no]suid (Dis)allow set-user-id-root programs" \
  4960. "\n [r]shared Convert [recursively] to a shared subtree" \
  4961. "\n [r]slave Convert [recursively] to a slave subtree" \
  4962. "\n [r]private Convert [recursively] to a private subtree" \
  4963. "\n [un]bindable Make mount point [un]able to be bind mounted" \
  4964. "\n [r]bind Bind a file or directory [recursively] to another location" \
  4965. "\n move Relocate an existing mount point" \
  4966. ) \
  4967. "\n remount Remount a mounted filesystem, changing flags" \
  4968. "\n ro Same as -r" \
  4969. "\n" \
  4970. "\nThere are filesystem-specific -o flags." \
  4971. #define mount_example_usage \
  4972. "$ mount\n" \
  4973. "/dev/hda3 on / type minix (rw)\n" \
  4974. "proc on /proc type proc (rw)\n" \
  4975. "devpts on /dev/pts type devpts (rw)\n" \
  4976. "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
  4977. "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
  4978. "$ mount cd_image.iso mydir\n" \
  4979. #define mount_notes_usage \
  4980. "Returns 0 for success, number of failed mounts for -a, or errno for one mount." \
  4981. #define mountpoint_trivial_usage \
  4982. "[-q] <[-dn] DIR | -x DEVICE>" \
  4983. #define mountpoint_full_usage "\n\n" \
  4984. "Check if the directory is a mountpoint\n" \
  4985. "\n -q Quiet" \
  4986. "\n -d Print major/minor device number of the filesystem" \
  4987. "\n -n Print device name of the filesystem" \
  4988. "\n -x Print major/minor device number of the blockdevice" \
  4989. #define mountpoint_example_usage \
  4990. "$ mountpoint /proc\n" \
  4991. "/proc is not a mountpoint\n" \
  4992. "$ mountpoint /sys\n" \
  4993. "/sys is a mountpoint\n" \
  4994. #define nsenter_trivial_usage \
  4995. "[OPTIONS] [PROG [ARGS]]" \
  4996. #define nsenter_full_usage "\n" \
  4997. "\n -t PID Target process to get namespaces from" \
  4998. "\n -m[FILE] Enter mount namespace" \
  4999. "\n -u[FILE] Enter UTS namespace (hostname etc)" \
  5000. "\n -i[FILE] Enter System V IPC namespace" \
  5001. "\n -n[FILE] Enter network namespace" \
  5002. "\n -p[FILE] Enter pid namespace" \
  5003. "\n -U[FILE] Enter user namespace" \
  5004. "\n -S UID Set uid in entered namespace" \
  5005. "\n -G GID Set gid in entered namespace" \
  5006. IF_LONG_OPTS( \
  5007. "\n --preserve-credentials Don't touch uids or gids" \
  5008. ) \
  5009. "\n -r[DIR] Set root directory" \
  5010. "\n -w[DIR] Set working directory" \
  5011. "\n -F Don't fork before exec'ing PROG" \
  5012. #define pivot_root_trivial_usage \
  5013. "NEW_ROOT PUT_OLD" \
  5014. #define pivot_root_full_usage "\n\n" \
  5015. "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
  5016. "the new root file system" \
  5017. #define rdate_trivial_usage \
  5018. "[-s/-p] HOST" \
  5019. #define rdate_full_usage "\n\n" \
  5020. "Set and print time from HOST using RFC 868\n" \
  5021. "\n -s Only set system time" \
  5022. "\n -p Only print time" \
  5023. #define rdev_trivial_usage \
  5024. "" \
  5025. #define rdev_full_usage "\n\n" \
  5026. "Print the device node associated with the filesystem mounted at '/'" \
  5027. #define rdev_example_usage \
  5028. "$ rdev\n" \
  5029. "/dev/mtdblock9 /\n" \
  5030. #define readprofile_trivial_usage \
  5031. "[OPTIONS]" \
  5032. #define readprofile_full_usage "\n\n" \
  5033. " -m mapfile (Default: /boot/System.map)" \
  5034. "\n -p profile (Default: /proc/profile)" \
  5035. "\n -M NUM Set the profiling multiplier to NUM" \
  5036. "\n -i Print only info about the sampling step" \
  5037. "\n -v Verbose" \
  5038. "\n -a Print all symbols, even if count is 0" \
  5039. "\n -b Print individual histogram-bin counts" \
  5040. "\n -s Print individual counters within functions" \
  5041. "\n -r Reset all the counters (root only)" \
  5042. "\n -n Disable byte order auto-detection" \
  5043. #define renice_trivial_usage \
  5044. "[-n] PRIORITY [[-p | -g | -u] ID...]..." \
  5045. #define renice_full_usage "\n\n" \
  5046. "Change scheduling priority of a running process\n" \
  5047. "\n -n Add PRIORITY to current nice value" \
  5048. "\n Without -n, nice value is set to PRIORITY" \
  5049. "\n -p Process ids (default)" \
  5050. "\n -g Process group ids" \
  5051. "\n -u Process user names" \
  5052. #define rev_trivial_usage \
  5053. "[FILE]..." \
  5054. #define rev_full_usage "\n\n" \
  5055. "Reverse lines of FILE" \
  5056. #define rtcwake_trivial_usage \
  5057. "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]" \
  5058. #define rtcwake_full_usage "\n\n" \
  5059. "Enter a system sleep state until specified wakeup time\n" \
  5060. IF_LONG_OPTS( \
  5061. "\n -a,--auto Read clock mode from adjtime" \
  5062. "\n -l,--local Clock is set to local time" \
  5063. "\n -u,--utc Clock is set to UTC time" \
  5064. "\n -d,--device DEV Specify the RTC device" \
  5065. "\n -m,--mode MODE Set sleep state (default: standby)" \
  5066. "\n -s,--seconds SEC Set timeout in SEC seconds from now" \
  5067. "\n -t,--time TIME Set timeout to TIME seconds from epoch" \
  5068. ) \
  5069. IF_NOT_LONG_OPTS( \
  5070. "\n -a Read clock mode from adjtime" \
  5071. "\n -l Clock is set to local time" \
  5072. "\n -u Clock is set to UTC time" \
  5073. "\n -d DEV Specify the RTC device" \
  5074. "\n -m MODE Set sleep state (default: standby)" \
  5075. "\n -s SEC Set timeout in SEC seconds from now" \
  5076. "\n -t TIME Set timeout to TIME seconds from epoch" \
  5077. ) \
  5078. #define script_trivial_usage \
  5079. "[-afq] [-t[FILE]] [-c PROG] [OUTFILE]" \
  5080. #define script_full_usage "\n\n" \
  5081. "Default OUTFILE is 'typescript'" \
  5082. "\n" \
  5083. "\n -a Append output" \
  5084. "\n -c PROG Run PROG, not shell" \
  5085. "\n -q Quiet" \
  5086. "\n -t[FILE] Send timing to stderr or FILE" \
  5087. #define scriptreplay_trivial_usage \
  5088. "TIMINGFILE [TYPESCRIPT [DIVISOR]]" \
  5089. #define scriptreplay_full_usage "\n\n" \
  5090. "Play back typescripts, using timing information" \
  5091. #define setarch_trivial_usage \
  5092. "PERSONALITY [-R] PROG ARGS" \
  5093. #define setarch_full_usage "\n\n" \
  5094. "PERSONALITY may be:" \
  5095. "\n"" linux32 Set 32bit uname emulation" \
  5096. "\n"" linux64 Set 64bit uname emulation" \
  5097. "\n" \
  5098. "\n"" -R Disable address space randomization" \
  5099. #define linux32_trivial_usage NOUSAGE_STR \
  5100. #define linux32_full_usage "" \
  5101. #define linux64_trivial_usage NOUSAGE_STR \
  5102. #define linux64_full_usage "" \
  5103. #define setpriv_trivial_usage \
  5104. "[OPTIONS] PROG [ARGS]" \
  5105. #define setpriv_full_usage "\n\n" \
  5106. "Run PROG with different privilege settings\n" \
  5107. IF_FEATURE_SETPRIV_DUMP( \
  5108. "\n-d,--dump Show current capabilities" \
  5109. ) \
  5110. "\n--nnp,--no-new-privs Ignore setuid/setgid bits and file capabilities" \
  5111. IF_FEATURE_SETPRIV_CAPABILITIES( \
  5112. "\n--inh-caps CAP,CAP Set inheritable capabilities" \
  5113. "\n--ambient-caps CAP,CAP Set ambient capabilities" \
  5114. ) \
  5115. #define setsid_trivial_usage \
  5116. "[-c] PROG ARGS" \
  5117. #define setsid_full_usage "\n\n" \
  5118. "Run PROG in a new session. PROG will have no controlling terminal\n" \
  5119. "and will not be affected by keyboard signals (^C etc).\n" \
  5120. "\n -c Set controlling terminal to stdin" \
  5121. #define swapon_trivial_usage \
  5122. "[-a] [-e]" IF_FEATURE_SWAPON_DISCARD(" [-d[POL]]") IF_FEATURE_SWAPON_PRI(" [-p PRI]") " [DEVICE]" \
  5123. #define swapon_full_usage "\n\n" \
  5124. "Start swapping on DEVICE\n" \
  5125. "\n -a Start swapping on all swap devices" \
  5126. IF_FEATURE_SWAPON_DISCARD( \
  5127. "\n -d[POL] Discard blocks at swapon (POL=once)," \
  5128. "\n as freed (POL=pages), or both (POL omitted)" \
  5129. ) \
  5130. "\n -e Silently skip devices that do not exist" \
  5131. IF_FEATURE_SWAPON_PRI( \
  5132. "\n -p PRI Set swap device priority" \
  5133. ) \
  5134. #define swapoff_trivial_usage \
  5135. "[-a] [DEVICE]" \
  5136. #define swapoff_full_usage "\n\n" \
  5137. "Stop swapping on DEVICE\n" \
  5138. "\n -a Stop swapping on all swap devices" \
  5139. #define switch_root_trivial_usage \
  5140. "[-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]" \
  5141. #define switch_root_full_usage "\n\n" \
  5142. "Free initramfs and switch to another root fs:\n" \
  5143. "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n" \
  5144. "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n" \
  5145. "\n -c DEV Reopen stdio to DEV after switch" \
  5146. #define run_init_trivial_usage \
  5147. "[-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]" \
  5148. #define run_init_full_usage "\n\n" \
  5149. "Free initramfs and switch to another root fs:\n" \
  5150. "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n" \
  5151. "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n" \
  5152. "\n -c DEV Reopen stdio to DEV after switch" \
  5153. "\n -d CAPS Drop capabilities" \
  5154. "\n -n Dry run" \
  5155. #define taskset_trivial_usage \
  5156. "[-p] [HEXMASK] PID | PROG ARGS" \
  5157. #define taskset_full_usage "\n\n" \
  5158. "Set or get CPU affinity\n" \
  5159. "\n -p Operate on an existing PID" \
  5160. #define taskset_example_usage \
  5161. "$ taskset 0x7 ./dgemm_test&\n" \
  5162. "$ taskset -p 0x1 $!\n" \
  5163. "pid 4790's current affinity mask: 7\n" \
  5164. "pid 4790's new affinity mask: 1\n" \
  5165. "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
  5166. "pid 6671's current affinity mask: 1\n" \
  5167. "pid 6671's new affinity mask: 1\n" \
  5168. "$ taskset -p 1\n" \
  5169. "pid 1's current affinity mask: 3\n" \
  5170. #define uevent_trivial_usage \
  5171. "[PROG [ARGS]]" \
  5172. #define uevent_full_usage "\n\n" \
  5173. "uevent runs PROG for every netlink notification." \
  5174. "\n""PROG's environment contains data passed from the kernel." \
  5175. "\n""Typical usage (daemon for dynamic device node creation):" \
  5176. "\n"" # uevent mdev & mdev -s" \
  5177. #define umount_trivial_usage \
  5178. "[OPTIONS] FILESYSTEM|DIRECTORY" \
  5179. #define umount_full_usage "\n\n" \
  5180. "Unmount file systems\n" \
  5181. IF_FEATURE_UMOUNT_ALL( \
  5182. "\n -a Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
  5183. ) \
  5184. IF_FEATURE_MTAB_SUPPORT( \
  5185. "\n -n Don't erase /etc/mtab entries" \
  5186. ) \
  5187. "\n -r Try to remount devices as read-only if mount is busy" \
  5188. "\n -l Lazy umount (detach filesystem)" \
  5189. "\n -f Force umount (i.e., unreachable NFS server)" \
  5190. IF_FEATURE_MOUNT_LOOP( \
  5191. "\n -d Free loop device if it has been used" \
  5192. ) \
  5193. #define umount_example_usage \
  5194. "$ umount /dev/hdc1\n" \
  5195. #define unshare_trivial_usage \
  5196. "[OPTIONS] [PROG [ARGS]]" \
  5197. #define unshare_full_usage "\n" \
  5198. "\n -m,--mount[=FILE] Unshare mount namespace" \
  5199. "\n -u,--uts[=FILE] Unshare UTS namespace (hostname etc.)" \
  5200. "\n -i,--ipc[=FILE] Unshare System V IPC namespace" \
  5201. "\n -n,--net[=FILE] Unshare network namespace" \
  5202. "\n -p,--pid[=FILE] Unshare PID namespace" \
  5203. "\n -U,--user[=FILE] Unshare user namespace" \
  5204. "\n -f,--fork Fork before execing PROG" \
  5205. "\n -r,--map-root-user Map current user to root (implies -U)" \
  5206. "\n --mount-proc[=DIR] Mount /proc filesystem first (implies -m)" \
  5207. "\n --propagation slave|shared|private|unchanged" \
  5208. "\n Modify mount propagation in mount namespace" \
  5209. "\n --setgroups allow|deny Control the setgroups syscall in user namespaces" \
  5210. #define wall_trivial_usage \
  5211. "[FILE]" \
  5212. #define wall_full_usage "\n\n" \
  5213. "Write content of FILE or stdin to all logged-in users" \
  5214. #define wall_sample_usage \
  5215. "echo foo | wall\n" \
  5216. "wall ./mymessage" \
  5217. #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 \
  5218. # define IF_UDHCP_VERBOSE(...) __VA_ARGS__ \
  5219. #else \
  5220. # define IF_UDHCP_VERBOSE(...) \
  5221. #endif \
  5222. #define udhcpc6_trivial_usage \
  5223. "[-fbnq"IF_UDHCP_VERBOSE("v")"oR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n" \
  5224. " [-x OPT:VAL]... [-O OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]") \
  5225. #define udhcpc6_full_usage "\n" \
  5226. IF_LONG_OPTS( \
  5227. "\n -i,--interface IFACE Interface to use (default eth0)" \
  5228. "\n -p,--pidfile FILE Create pidfile" \
  5229. "\n -s,--script PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
  5230. "\n -B,--broadcast Request broadcast replies" \
  5231. "\n -t,--retries N Send up to N discover packets" \
  5232. "\n -T,--timeout N Pause between packets (default 3 seconds)" \
  5233. "\n -A,--tryagain N Wait N seconds after failure (default 20)" \
  5234. "\n -f,--foreground Run in foreground" \
  5235. USE_FOR_MMU( \
  5236. "\n -b,--background Background if lease is not obtained" \
  5237. ) \
  5238. "\n -n,--now Exit if lease is not obtained" \
  5239. "\n -q,--quit Exit after obtaining lease" \
  5240. "\n -R,--release Release IP on exit" \
  5241. "\n -S,--syslog Log to syslog too" \
  5242. IF_FEATURE_UDHCP_PORT( \
  5243. "\n -P,--client-port N Use port N (default 546)" \
  5244. ) \
  5245. "\n -O,--request-option OPT Request option OPT from server (cumulative)" \
  5246. "\n -o,--no-default-options Don't request any options (unless -O is given)" \
  5247. "\n -r,--request IP Request this IP address" \
  5248. "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \
  5249. "\n Examples of string, numeric, and hex byte opts:" \
  5250. "\n -x hostname:bbox - option 12" \
  5251. "\n -x lease:3600 - option 51 (lease time)" \
  5252. "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \
  5253. IF_UDHCP_VERBOSE( \
  5254. "\n -v Verbose" \
  5255. ) \
  5256. ) \
  5257. IF_NOT_LONG_OPTS( \
  5258. "\n -i IFACE Interface to use (default eth0)" \
  5259. "\n -p FILE Create pidfile" \
  5260. "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
  5261. "\n -B Request broadcast replies" \
  5262. "\n -t N Send up to N discover packets" \
  5263. "\n -T N Pause between packets (default 3 seconds)" \
  5264. "\n -A N Wait N seconds (default 20) after failure" \
  5265. "\n -f Run in foreground" \
  5266. USE_FOR_MMU( \
  5267. "\n -b Background if lease is not obtained" \
  5268. ) \
  5269. "\n -n Exit if lease is not obtained" \
  5270. "\n -q Exit after obtaining lease" \
  5271. "\n -R Release IP on exit" \
  5272. "\n -S Log to syslog too" \
  5273. IF_FEATURE_UDHCP_PORT( \
  5274. "\n -P N Use port N (default 546)" \
  5275. ) \
  5276. "\n -O OPT Request option OPT from server (cumulative)" \
  5277. "\n -o Don't request any options (unless -O is given)" \
  5278. "\n -r IP Request this IP address" \
  5279. "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \
  5280. "\n Examples of string, numeric, and hex byte opts:" \
  5281. "\n -x hostname:bbox - option 12" \
  5282. "\n -x lease:3600 - option 51 (lease time)" \
  5283. "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \
  5284. IF_UDHCP_VERBOSE( \
  5285. "\n -v Verbose" \
  5286. ) \
  5287. ) \
  5288. "\nSignals:" \
  5289. "\n USR1 Renew lease" \
  5290. "\n USR2 Release lease" \
  5291. #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 \
  5292. # define IF_UDHCP_VERBOSE(...) __VA_ARGS__ \
  5293. #else \
  5294. # define IF_UDHCP_VERBOSE(...) \
  5295. #endif \
  5296. #define udhcpc_trivial_usage \
  5297. "[-fbq"IF_UDHCP_VERBOSE("v")"RB]"IF_FEATURE_UDHCPC_ARPING(" [-a[MSEC]]")" [-t N] [-T SEC] [-A SEC/-n]\n" \
  5298. " [-i IFACE]"IF_FEATURE_UDHCP_PORT(" [-P PORT]")" [-s PROG] [-p PIDFILE]\n" \
  5299. " [-oC] [-r IP] [-V VENDOR] [-F NAME] [-x OPT:VAL]... [-O OPT]..." \
  5300. #define udhcpc_full_usage "\n" \
  5301. "\n -i IFACE Interface to use (default eth0)" \
  5302. IF_FEATURE_UDHCP_PORT( \
  5303. "\n -P PORT Use PORT (default 68)" \
  5304. ) \
  5305. "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
  5306. "\n -p FILE Create pidfile" \
  5307. "\n -B Request broadcast replies" \
  5308. "\n -t N Send up to N discover packets (default 3)" \
  5309. "\n -T SEC Pause between packets (default 3)" \
  5310. "\n -A SEC Wait if lease is not obtained (default 20)" \
  5311. "\n -n Exit if lease is not obtained" \
  5312. "\n -q Exit after obtaining lease" \
  5313. "\n -R Release IP on exit" \
  5314. "\n -f Run in foreground" \
  5315. USE_FOR_MMU( \
  5316. "\n -b Background if lease is not obtained" \
  5317. ) \
  5318. "\n -S Log to syslog too" \
  5319. IF_FEATURE_UDHCPC_ARPING( \
  5320. "\n -a[MSEC] Validate offered address with ARP ping" \
  5321. ) \
  5322. "\n -r IP Request this IP address" \
  5323. "\n -o Don't request any options (unless -O is given)" \
  5324. "\n -O OPT Request option OPT from server (cumulative)" \
  5325. "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \
  5326. "\n Examples of string, numeric, and hex byte opts:" \
  5327. "\n -x hostname:bbox - option 12" \
  5328. "\n -x lease:3600 - option 51 (lease time)" \
  5329. "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \
  5330. "\n -F NAME Ask server to update DNS mapping for NAME" \
  5331. "\n -V VENDOR Vendor identifier (default 'udhcp VERSION')" \
  5332. "\n -C Don't send MAC as client identifier" \
  5333. IF_UDHCP_VERBOSE( \
  5334. "\n -v Verbose" \
  5335. ) \
  5336. "\nSignals:" \
  5337. "\n USR1 Renew lease" \
  5338. "\n USR2 Release lease" \
  5339. #define udhcpd_trivial_usage \
  5340. "[-fS] [-I ADDR]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [CONFFILE]" \
  5341. #define udhcpd_full_usage "\n\n" \
  5342. "DHCP server\n" \
  5343. "\n -f Run in foreground" \
  5344. "\n -S Log to syslog too" \
  5345. "\n -I ADDR Local address" \
  5346. "\n -a MSEC Timeout for ARP ping (default 2000)" \
  5347. IF_FEATURE_UDHCP_PORT( \
  5348. "\n -P N Use port N (default 67)" \
  5349. ) \
  5350. #define dhcprelay_trivial_usage \
  5351. "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]" \
  5352. #define dhcprelay_full_usage "\n\n" \
  5353. "Relay DHCP requests between clients and server" \
  5354. #define dumpleases_trivial_usage \
  5355. "[-r|-a] [-d] [-f LEASEFILE]" \
  5356. #define dumpleases_full_usage "\n\n" \
  5357. "Display DHCP leases granted by udhcpd\n" \
  5358. IF_LONG_OPTS( \
  5359. "\n -f,--file FILE Lease file" \
  5360. "\n -r,--remaining Show remaining time" \
  5361. "\n -a,--absolute Show expiration time" \
  5362. "\n -d,--decimal Show time in seconds" \
  5363. ) \
  5364. IF_NOT_LONG_OPTS( \
  5365. "\n -f FILE Lease file" \
  5366. "\n -r Show remaining time" \
  5367. "\n -a Show expiration time" \
  5368. "\n -d Show time in seconds" \
  5369. ) \
  5370. #define busybox_notes_usage \
  5371. "Hello world!\n"
  5372. #endif