usage.h 168 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632
  1. /* vi: set sw=8 ts=8: */
  2. /*
  3. * This file suffers from chronically incorrect tabification
  4. * of messages. Before editing this file:
  5. * 1. Switch you editor to 8-space tab mode.
  6. * 2. Do not use \t in messages, use real tab character.
  7. * 3. Start each source line with message as follows:
  8. * |<7 spaces>"text with tabs"....
  9. * or
  10. * |<5 spaces>"\ntext with tabs"....
  11. */
  12. #ifndef __BB_USAGE_H__
  13. #define __BB_USAGE_H__
  14. #define NOUSAGE_STR "\b"
  15. #define addgroup_trivial_usage \
  16. "[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
  17. #define addgroup_full_usage "\n\n" \
  18. "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add an user to a group") "\n" \
  19. "\nOptions:" \
  20. "\n -g GID Group id" \
  21. #define adduser_trivial_usage \
  22. "[OPTIONS] user_name"
  23. #define adduser_full_usage "\n\n" \
  24. "Add an user\n" \
  25. "\nOptions:" \
  26. "\n -h DIR Home directory" \
  27. "\n -g GECOS GECOS field" \
  28. "\n -s SHELL Login shell" \
  29. "\n -G GROUP Add user to existing group" \
  30. "\n -S Create a system user" \
  31. "\n -D Do not assign a password" \
  32. "\n -H Do not create home directory" \
  33. #define adjtimex_trivial_usage \
  34. "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]"
  35. #define adjtimex_full_usage "\n\n" \
  36. "Read and optionally set system timebase parameters. See adjtimex(2).\n" \
  37. "\nOptions:" \
  38. "\n -q Quiet" \
  39. "\n -o offset Time offset, microseconds" \
  40. "\n -f frequency Frequency adjust, integer kernel units (65536 is 1ppm)" \
  41. "\n (positive values make clock run faster)" \
  42. "\n -t tick Microseconds per tick, usually 10000" \
  43. "\n -p timeconstant" \
  44. #define ar_trivial_usage \
  45. "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
  46. #define ar_full_usage "\n\n" \
  47. "Extract or list FILES from an ar archive\n" \
  48. "\nOptions:" \
  49. "\n -o Preserve original dates" \
  50. "\n -p Extract to stdout" \
  51. "\n -t List" \
  52. "\n -x Extract" \
  53. "\n -v Verbose" \
  54. #define arp_trivial_usage \
  55. "\n" \
  56. "[-vn] [-H type] [-i if] -a [hostname]\n" \
  57. "[-v] [-i if] -d hostname [pub]\n" \
  58. "[-v] [-H type] [-i if] -s hostname hw_addr [temp]\n" \
  59. "[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
  60. "[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
  61. #define arp_full_usage "\n\n" \
  62. "Manipulate ARP cache\n" \
  63. "\nOptions:" \
  64. "\n -a Display (all) hosts" \
  65. "\n -s Set new ARP entry" \
  66. "\n -d Delete a specified entry" \
  67. "\n -v Verbose" \
  68. "\n -n Don't resolve names" \
  69. "\n -i IF Network interface" \
  70. "\n -D Read <hwaddr> from given device" \
  71. "\n -A, -p AF Protocol family" \
  72. "\n -H HWTYPE Hardware address type" \
  73. #define arping_trivial_usage \
  74. "[-fqbDUA] [-c count] [-w timeout] [-I dev] [-s sender] target"
  75. #define arping_full_usage "\n\n" \
  76. "Send ARP requests/replies\n" \
  77. "\nOptions:" \
  78. "\n -f Quit on first ARP reply" \
  79. "\n -q Quiet" \
  80. "\n -b Keep broadcasting, don't go unicast" \
  81. "\n -D Duplicated address detection mode" \
  82. "\n -U Unsolicited ARP mode, update your neighbors" \
  83. "\n -A ARP answer mode, update your neighbors" \
  84. "\n -c N Stop after sending N ARP requests" \
  85. "\n -w timeout Time to wait for ARP reply, in seconds" \
  86. "\n -I dev Interface to use (default eth0)" \
  87. "\n -s sender Sender IP address" \
  88. "\n target Target IP address" \
  89. #define sh_trivial_usage NOUSAGE_STR
  90. #define sh_full_usage ""
  91. #define ash_trivial_usage NOUSAGE_STR
  92. #define ash_full_usage ""
  93. #define hush_trivial_usage NOUSAGE_STR
  94. #define hush_full_usage ""
  95. #define msh_trivial_usage NOUSAGE_STR
  96. #define msh_full_usage ""
  97. #define awk_trivial_usage \
  98. "[OPTION]... [program-text] [FILE...]"
  99. #define awk_full_usage "\n\n" \
  100. "Options:" \
  101. "\n -v var=val Set variable" \
  102. "\n -F sep Use sep as field separator" \
  103. "\n -f file Read program from file" \
  104. #define basename_trivial_usage \
  105. "FILE [SUFFIX]"
  106. #define basename_full_usage "\n\n" \
  107. "Strip directory path and suffixes from FILE.\n" \
  108. "If specified, also remove any trailing SUFFIX."
  109. #define basename_example_usage \
  110. "$ basename /usr/local/bin/foo\n" \
  111. "foo\n" \
  112. "$ basename /usr/local/bin/\n" \
  113. "bin\n" \
  114. "$ basename /foo/bar.txt .txt\n" \
  115. "bar"
  116. #define fbsplash_trivial_usage \
  117. "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]"
  118. #define fbsplash_full_usage "\n\n" \
  119. "Options:\n" \
  120. "\n -s Image" \
  121. "\n -c Hide cursor" \
  122. "\n -d Framebuffer device (default /dev/fb0)" \
  123. "\n -i Config file (var=value):" \
  124. "\n BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT" \
  125. "\n BAR_R,BAR_G,BAR_B" \
  126. "\n -f Control pipe (else exit after drawing image)" \
  127. "\n commands: 'NN' (% for progress bar) or 'exit'" \
  128. #define brctl_trivial_usage \
  129. "COMMAND [BRIDGE [INTERFACE]]"
  130. #define brctl_full_usage "\n\n" \
  131. "Manage ethernet bridges.\n" \
  132. "\nCommands:" \
  133. USE_FEATURE_BRCTL_SHOW( \
  134. "\n show Show a list of bridges" \
  135. ) \
  136. "\n addbr BRIDGE Create BRIDGE" \
  137. "\n delbr BRIDGE Delete BRIDGE" \
  138. "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
  139. "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
  140. USE_FEATURE_BRCTL_FANCY( \
  141. "\n setageing BRIDGE TIME Set ageing time" \
  142. "\n setfd BRIDGE TIME Set bridge forward delay" \
  143. "\n sethello BRIDGE TIME Set hello time" \
  144. "\n setmaxage BRIDGE TIME Set max message age" \
  145. "\n setpathcost BRIDGE COST Set path cost" \
  146. "\n setportprio BRIDGE PRIO Set port priority" \
  147. "\n setbridgeprio BRIDGE PRIO Set bridge priority" \
  148. "\n stp BRIDGE [1|0] STP on/off" \
  149. ) \
  150. #define bunzip2_trivial_usage \
  151. "[OPTION]... [FILE]"
  152. #define bunzip2_full_usage "\n\n" \
  153. "Uncompress FILE (or standard input if FILE is '-' or omitted)\n" \
  154. "\nOptions:" \
  155. "\n -c Write to standard output" \
  156. "\n -f Force" \
  157. #define bzip2_trivial_usage \
  158. "[OPTION]... [FILE]..."
  159. #define bzip2_full_usage "\n\n" \
  160. "Compress FILE(s) with bzip2 algorithm.\n" \
  161. "When FILE is '-' or unspecified, reads standard input. Implies -c.\n" \
  162. "\nOptions:" \
  163. "\n -c Write to standard output" \
  164. "\n -d Decompress" \
  165. "\n -f Force" \
  166. "\n -1..-9 Compression level" \
  167. #define busybox_notes_usage \
  168. "Hello world!\n"
  169. #define bzcat_trivial_usage \
  170. "FILE"
  171. #define bzcat_full_usage "\n\n" \
  172. "Uncompress to stdout"
  173. #define unlzma_trivial_usage \
  174. "[OPTION]... [FILE]"
  175. #define unlzma_full_usage "\n\n" \
  176. "Uncompress FILE (or standard input if FILE is '-' or omitted)\n" \
  177. "\nOptions:" \
  178. "\n -c Write to standard output" \
  179. "\n -f Force" \
  180. #define lzmacat_trivial_usage \
  181. "FILE"
  182. #define lzmacat_full_usage "\n\n" \
  183. "Uncompress to stdout"
  184. #define cal_trivial_usage \
  185. "[-jy] [[month] year]"
  186. #define cal_full_usage "\n\n" \
  187. "Display a calendar\n" \
  188. "\nOptions:" \
  189. "\n -j Use julian dates" \
  190. "\n -y Display the entire year" \
  191. #define cat_trivial_usage \
  192. "[-u] [FILE]..."
  193. #define cat_full_usage "\n\n" \
  194. "Concatenate FILE(s) and print them to stdout\n" \
  195. "\nOptions:" \
  196. "\n -u Use unbuffered i/o (ignored)" \
  197. #define cat_example_usage \
  198. "$ cat /proc/uptime\n" \
  199. "110716.72 17.67"
  200. #define catv_trivial_usage \
  201. "[-etv] [FILE]..."
  202. #define catv_full_usage "\n\n" \
  203. "Display nonprinting characters as ^x or M-x\n" \
  204. "\nOptions:" \
  205. "\n -e End each line with $" \
  206. "\n -t Show tabs as ^I" \
  207. "\n -v Don't use ^x or M-x escapes" \
  208. #define chat_trivial_usage \
  209. "EXPECT [SEND [EXPECT [SEND...]]]"
  210. #define chat_full_usage "\n\n" \
  211. "Useful for interacting with a modem connected to stdin/stdout.\n" \
  212. "A script consists of one or more \"expect-send\" pairs of strings,\n" \
  213. "each pair is a pair of arguments. Example:\n" \
  214. "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
  215. #define chattr_trivial_usage \
  216. "[-R] [-+=AacDdijsStTu] [-v version] files..."
  217. #define chattr_full_usage "\n\n" \
  218. "Change file attributes on an ext2 fs\n" \
  219. "\nModifiers:" \
  220. "\n - Remove attributes" \
  221. "\n + Add attributes" \
  222. "\n = Set attributes" \
  223. "\nAttributes:" \
  224. "\n A Don't track atime" \
  225. "\n a Append mode only" \
  226. "\n c Enable compress" \
  227. "\n D Write dir contents synchronously" \
  228. "\n d Do not backup with dump" \
  229. "\n i Cannot be modified (immutable)" \
  230. "\n j Write all data to journal first" \
  231. "\n s Zero disk storage when deleted" \
  232. "\n S Write file contents synchronously" \
  233. "\n t Disable tail-merging of partial blocks with other files" \
  234. "\n u Allow file to be undeleted" \
  235. "\nOptions:" \
  236. "\n -R Recursively list subdirectories" \
  237. "\n -v Set the file's version/generation number" \
  238. #define chcon_trivial_usage \
  239. "[OPTIONS] CONTEXT FILE..." \
  240. "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
  241. USE_FEATURE_CHCON_LONG_OPTIONS( \
  242. "\n chcon [OPTIONS] --reference=RFILE FILE..." \
  243. )
  244. #define chcon_full_usage "\n\n" \
  245. "Change the security context of each FILE to CONTEXT\n" \
  246. USE_FEATURE_CHCON_LONG_OPTIONS( \
  247. "\n -v,--verbose Verbose" \
  248. "\n -c,--changes Report changes made" \
  249. "\n -h,--no-dereference Affect symlinks instead of their targets" \
  250. "\n -f,--silent,--quiet Suppress most error messages" \
  251. "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \
  252. "\n -u,--user=USER Set user/role/type/range in the target" \
  253. "\n -r,--role=ROLE security context" \
  254. "\n -t,--type=TYPE" \
  255. "\n -l,--range=RANGE" \
  256. "\n -R,--recursive Recurse subdirectories" \
  257. ) \
  258. SKIP_FEATURE_CHCON_LONG_OPTIONS( \
  259. "\n -v Verbose" \
  260. "\n -c Report changes made" \
  261. "\n -h Affect symlinks instead of their targets" \
  262. "\n -f Suppress most error messages" \
  263. "\n -u USER Set user/role/type/range in the target security context" \
  264. "\n -r ROLE" \
  265. "\n -t TYPE" \
  266. "\n -l RNG" \
  267. "\n -R Recurse subdirectories" \
  268. )
  269. #define chmod_trivial_usage \
  270. "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
  271. #define chmod_full_usage "\n\n" \
  272. "Each MODE is one or more of the letters ugoa, one of the\n" \
  273. "symbols +-= and one or more of the letters rwxst\n" \
  274. "\nOptions:" \
  275. "\n -R Recurse directories" \
  276. USE_DESKTOP( \
  277. "\n -c List changed files" \
  278. "\n -v List all files" \
  279. "\n -f Hide errors" \
  280. )
  281. #define chmod_example_usage \
  282. "$ ls -l /tmp/foo\n" \
  283. "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
  284. "$ chmod u+x /tmp/foo\n" \
  285. "$ ls -l /tmp/foo\n" \
  286. "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
  287. "$ chmod 444 /tmp/foo\n" \
  288. "$ ls -l /tmp/foo\n" \
  289. "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
  290. #define chgrp_trivial_usage \
  291. "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..."
  292. #define chgrp_full_usage "\n\n" \
  293. "Change the group membership of each FILE to GROUP\n" \
  294. "\nOptions:" \
  295. "\n -R Recurse directories" \
  296. "\n -h Affect symlinks instead of symlink targets" \
  297. "\n -L Traverse all symlinks to directories" \
  298. "\n -H Traverse symlinks on command line only" \
  299. "\n -P Do not traverse symlinks (default)" \
  300. USE_DESKTOP( \
  301. "\n -c List changed files" \
  302. "\n -v Verbose" \
  303. "\n -f Hide errors" \
  304. )
  305. #define chgrp_example_usage \
  306. "$ ls -l /tmp/foo\n" \
  307. "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
  308. "$ chgrp root /tmp/foo\n" \
  309. "$ ls -l /tmp/foo\n" \
  310. "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
  311. #define chown_trivial_usage \
  312. "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
  313. #define chown_full_usage "\n\n" \
  314. "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
  315. "\nOptions:" \
  316. "\n -R Recurse directories" \
  317. "\n -h Affect symlinks instead of symlink targets" \
  318. "\n -L Traverse all symlinks to directories" \
  319. "\n -H Traverse symlinks on command line only" \
  320. "\n -P Do not traverse symlinks (default)" \
  321. USE_DESKTOP( \
  322. "\n -c List changed files" \
  323. "\n -v List all files" \
  324. "\n -f Hide errors" \
  325. )
  326. #define chown_example_usage \
  327. "$ ls -l /tmp/foo\n" \
  328. "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
  329. "$ chown root /tmp/foo\n" \
  330. "$ ls -l /tmp/foo\n" \
  331. "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
  332. "$ chown root.root /tmp/foo\n" \
  333. "ls -l /tmp/foo\n" \
  334. "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
  335. #define chpst_trivial_usage \
  336. "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \
  337. " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \
  338. " [-p N] [-f BYTES] [-c BYTES] PROG ARGS"
  339. #define chpst_full_usage "\n\n" \
  340. "Change the process state and run PROG\n" \
  341. "\nOptions:" \
  342. "\n -u USER[:GRP] Set uid and gid" \
  343. "\n -U USER[:GRP] Set $UID and $GID in environment" \
  344. "\n -e DIR Set environment variables as specified by files" \
  345. "\n in DIR: file=1st_line_of_file" \
  346. "\n -/ DIR Chroot to DIR" \
  347. "\n -n NICE Add NICE to nice value" \
  348. "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES" \
  349. "\n -d BYTES Limit data segment" \
  350. "\n -o N Limit number of open files per process" \
  351. "\n -p N Limit number of processes per uid" \
  352. "\n -f BYTES Limit output file sizes" \
  353. "\n -c BYTES Limit core file size" \
  354. "\n -v Verbose" \
  355. "\n -P Create new process group" \
  356. "\n -0 Close standard input" \
  357. "\n -1 Close standard output" \
  358. "\n -2 Close standard error" \
  359. #define setuidgid_trivial_usage \
  360. "account prog args"
  361. #define setuidgid_full_usage "\n\n" \
  362. "Set uid and gid to account's uid and gid, removing all supplementary\n" \
  363. "groups and run PROG"
  364. #define envuidgid_trivial_usage \
  365. "account prog args"
  366. #define envuidgid_full_usage "\n\n" \
  367. "Set $UID to account's uid and $GID to account's gid and run PROG"
  368. #define envdir_trivial_usage \
  369. "dir prog args"
  370. #define envdir_full_usage "\n\n" \
  371. "Set various environment variables as specified by files\n" \
  372. "in the directory dir and run PROG"
  373. #define softlimit_trivial_usage \
  374. "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" \
  375. " [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" \
  376. " PROG ARGS"
  377. #define softlimit_full_usage "\n\n" \
  378. "Set soft resource limits, then run PROG\n" \
  379. "\nOptions:" \
  380. "\n -a BYTES Limit total size of all segments" \
  381. "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES" \
  382. "\n -d BYTES Limit data segment" \
  383. "\n -s BYTES Limit stack segment" \
  384. "\n -l BYTES Limit locked memory size" \
  385. "\n -o N Limit number of open files per process" \
  386. "\n -p N Limit number of processes per uid" \
  387. "\nOptions controlling file sizes:" \
  388. "\n -f BYTES Limit output file sizes" \
  389. "\n -c BYTES Limit core file size" \
  390. "\nEfficiency opts:" \
  391. "\n -r BYTES Limit resident set size" \
  392. "\n -t N Limit CPU time, process receives" \
  393. "\n a SIGXCPU after N seconds" \
  394. #define chroot_trivial_usage \
  395. "NEWROOT [COMMAND...]"
  396. #define chroot_full_usage "\n\n" \
  397. "Run COMMAND with root directory set to NEWROOT"
  398. #define chroot_example_usage \
  399. "$ ls -l /bin/ls\n" \
  400. "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
  401. "# mount /dev/hdc1 /mnt -t minix\n" \
  402. "# chroot /mnt\n" \
  403. "# ls -l /bin/ls\n" \
  404. "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
  405. #define chvt_trivial_usage \
  406. "N"
  407. #define chvt_full_usage "\n\n" \
  408. "Change the foreground virtual terminal to /dev/ttyN"
  409. #define cksum_trivial_usage \
  410. "FILES..."
  411. #define cksum_full_usage "\n\n" \
  412. "Calculate the CRC32 checksums of FILES"
  413. #define clear_trivial_usage \
  414. ""
  415. #define clear_full_usage "\n\n" \
  416. "Clear screen"
  417. #define cmp_trivial_usage \
  418. "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]"
  419. #define cmp_full_usage "\n\n" \
  420. "Compares FILE1 vs stdin if FILE2 is not specified\n" \
  421. "\nOptions:" \
  422. "\n -l Write the byte numbers (decimal) and values (octal)" \
  423. "\n for all differing bytes" \
  424. "\n -s Quiet" \
  425. #define comm_trivial_usage \
  426. "[-123] FILE1 FILE2"
  427. #define comm_full_usage "\n\n" \
  428. "Compare FILE1 to FILE2, or to stdin if - is specified\n" \
  429. "\nOptions:" \
  430. "\n -1 Suppress lines unique to FILE1" \
  431. "\n -2 Suppress lines unique to FILE2" \
  432. "\n -3 Suppress lines common to both files" \
  433. #define bbconfig_trivial_usage \
  434. ""
  435. #define bbconfig_full_usage "\n\n" \
  436. "Print the config file which built busybox"
  437. #define bbsh_trivial_usage \
  438. "[FILE]...\n" \
  439. "or: bbsh -c command [args]..."
  440. #define bbsh_full_usage "\n\n" \
  441. "The bbsh shell (command interpreter)"
  442. #define chrt_trivial_usage \
  443. "[OPTION]... [prio] [pid | command [arg]...]"
  444. #define chrt_full_usage "\n\n" \
  445. "Manipulate real-time attributes of a process\n" \
  446. "\nOptions:" \
  447. "\n -p Operate on pid" \
  448. "\n -r Set scheduling policy to SCHED_RR" \
  449. "\n -f Set scheduling policy to SCHED_FIFO" \
  450. "\n -o Set scheduling policy to SCHED_OTHER" \
  451. "\n -m Show min and max priorities" \
  452. #define chrt_example_usage \
  453. "$ chrt -r 4 sleep 900; x=$!\n" \
  454. "$ chrt -f -p 3 $x\n" \
  455. "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
  456. #define cp_trivial_usage \
  457. "[OPTION]... SOURCE DEST"
  458. #define cp_full_usage "\n\n" \
  459. "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
  460. "\nOptions:" \
  461. "\n -a Same as -dpR" \
  462. USE_SELINUX( \
  463. "\n -c Preserve security context" \
  464. ) \
  465. "\n -d,-P Preserve links" \
  466. "\n -H,-L Dereference all symlinks (default)" \
  467. "\n -p Preserve file attributes if possible" \
  468. "\n -f Force overwrite" \
  469. "\n -i Prompt before overwrite" \
  470. "\n -R,-r Recurse directories" \
  471. "\n -l,-s Create (sym)links" \
  472. #define cpio_trivial_usage \
  473. "-[dim" USE_FEATURE_CPIO_O("o") "tuv][F cpiofile]" \
  474. USE_FEATURE_CPIO_O( "[H newc]" )
  475. #define cpio_full_usage "\n\n" \
  476. "Extract or list files from a cpio archive" \
  477. USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \
  478. "\n" \
  479. "Main operation mode:" \
  480. "\n d Make leading directories" \
  481. "\n i Extract" \
  482. "\n m Preserve mtime" \
  483. USE_FEATURE_CPIO_O( \
  484. "\n o Create" \
  485. "\n H newc Define format" \
  486. ) \
  487. "\n t List" \
  488. "\n v Verbose" \
  489. "\n u Unconditional overwrite" \
  490. "\n F Input from file" \
  491. #define crond_trivial_usage \
  492. "-fbS -l N " USE_DEBUG_CROND_OPTION("-d N ") "-L LOGFILE -c DIR"
  493. #define crond_full_usage "\n\n" \
  494. " -f Foreground" \
  495. "\n -b Background (default)" \
  496. "\n -S Log to syslog (default)" \
  497. "\n -l Set log level. 0 is the most verbose, default 8" \
  498. USE_DEBUG_CROND_OPTION( \
  499. "\n -d Set log level, log to stderr" \
  500. ) \
  501. "\n -L Log to file" \
  502. "\n -c Working dir" \
  503. #define crontab_trivial_usage \
  504. "[-c DIR] [-u USER] [-ler]|[FILE]"
  505. #define crontab_full_usage "\n\n" \
  506. " -c Crontab directory" \
  507. "\n -u User" \
  508. "\n -l List crontab" \
  509. "\n -e Edit crontab" \
  510. "\n -r Delete crontab" \
  511. "\n FILE Replace crontab by FILE ('-': stdin)" \
  512. #define cryptpw_trivial_usage \
  513. "[-a des|md5] [string]"
  514. #define cryptpw_full_usage "\n\n" \
  515. "Output crypted string.\n" \
  516. "If string isn't supplied on cmdline, read it from stdin.\n" \
  517. "\nOptions:" \
  518. "\n -a Algorithm to use (default: md5)" \
  519. #define cttyhack_trivial_usage NOUSAGE_STR
  520. #define cttyhack_full_usage ""
  521. #define cut_trivial_usage \
  522. "[OPTION]... [FILE]..."
  523. #define cut_full_usage "\n\n" \
  524. "Print selected fields from each input FILE to standard output\n" \
  525. "\nOptions:" \
  526. "\n -b LIST Output only bytes from LIST" \
  527. "\n -c LIST Output only characters from LIST" \
  528. "\n -d CHAR Use CHAR instead of tab as the field delimiter" \
  529. "\n -s Output only the lines containing delimiter" \
  530. "\n -f N Print only these fields" \
  531. "\n -n Ignored" \
  532. #define cut_example_usage \
  533. "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
  534. "Hello\n" \
  535. "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
  536. "world\n"
  537. #define date_trivial_usage \
  538. "[OPTION]... [+FMT] [TIME]"
  539. #define date_full_usage "\n\n" \
  540. "Display time (using +FMT), or set time\n" \
  541. "\nOptions:" \
  542. "\n -u Work in UTC (don't convert to local time)" \
  543. "\n -R Output RFC-822 compliant date string" \
  544. USE_FEATURE_DATE_ISOFMT( \
  545. "\n -I[SPEC] Output ISO-8601 compliant date string" \
  546. "\n SPEC='date' (default) for date only," \
  547. "\n 'hours', 'minutes', or 'seconds' for date and" \
  548. "\n time to the indicated precision" \
  549. ) \
  550. "\n -d TIME Display TIME, not 'now'" \
  551. "\n -r FILE Display last modification time of FILE" \
  552. "\n [-s] TIME Set time to TIME" \
  553. USE_FEATURE_DATE_ISOFMT( \
  554. "\n -D FMT Use FMT for str->date conversion" \
  555. ) \
  556. "\n" \
  557. "\nRecognized formats for TIME:" \
  558. "\n hh:mm[:ss]" \
  559. "\n [YYYY.]MM.DD-hh:mm[:ss]" \
  560. "\n YYYY-MM-DD hh:mm[:ss]" \
  561. "\n MMDDhhmm[[YY]YY][.ss]" \
  562. #define date_example_usage \
  563. "$ date\n" \
  564. "Wed Apr 12 18:52:41 MDT 2000\n"
  565. #define dc_trivial_usage \
  566. "expression..."
  567. #define dc_full_usage "\n\n" \
  568. "Tiny RPN calculator. Operations:\n" \
  569. "+, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not, eor,\n" \
  570. "p - print top of the stack (without altering the stack),\n" \
  571. "f - print entire stack, o - pop the value and set output radix\n" \
  572. "(value must be 10 or 16).\n" \
  573. "Examples: 'dc 2 2 add' -> 4, 'dc 8 8 * 2 2 + /' -> 16.\n" \
  574. #define dc_example_usage \
  575. "$ dc 2 2 + p\n" \
  576. "4\n" \
  577. "$ dc 8 8 \\* 2 2 + / p\n" \
  578. "16\n" \
  579. "$ dc 0 1 and p\n" \
  580. "0\n" \
  581. "$ dc 0 1 or p\n" \
  582. "1\n" \
  583. "$ echo 72 9 div 8 mul p | dc\n" \
  584. "64\n"
  585. #define dd_trivial_usage \
  586. "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
  587. " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
  588. #define dd_full_usage "\n\n" \
  589. "Copy a file with converting and formatting\n" \
  590. "\nOptions:" \
  591. "\n if=FILE Read from FILE instead of stdin" \
  592. "\n of=FILE Write to FILE instead of stdout" \
  593. "\n bs=N Read and write N bytes at a time" \
  594. USE_FEATURE_DD_IBS_OBS( \
  595. "\n ibs=N Read N bytes at a time" \
  596. ) \
  597. USE_FEATURE_DD_IBS_OBS( \
  598. "\n obs=N Write N bytes at a time" \
  599. ) \
  600. "\n count=N Copy only N input blocks" \
  601. "\n skip=N Skip N input blocks" \
  602. "\n seek=N Skip N output blocks" \
  603. USE_FEATURE_DD_IBS_OBS( \
  604. "\n conv=notrunc Don't truncate output file" \
  605. "\n conv=noerror Continue after read errors" \
  606. "\n conv=sync Pad blocks with zeros" \
  607. "\n conv=fsync Physically write data out before finishing" \
  608. ) \
  609. "\n" \
  610. "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," \
  611. "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" \
  612. #define dd_example_usage \
  613. "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
  614. "4+0 records in\n" \
  615. "4+0 records out\n"
  616. #define deallocvt_trivial_usage \
  617. "[N]"
  618. #define deallocvt_full_usage "\n\n" \
  619. "Deallocate unused virtual terminal /dev/ttyN"
  620. #define delgroup_trivial_usage \
  621. USE_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
  622. #define delgroup_full_usage "\n\n" \
  623. "Delete group GROUP from the system" \
  624. USE_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
  625. #define deluser_trivial_usage \
  626. "USER"
  627. #define deluser_full_usage "\n\n" \
  628. "Delete USER from the system"
  629. #define depmod_trivial_usage NOUSAGE_STR
  630. #define depmod_full_usage ""
  631. #define devfsd_trivial_usage \
  632. "mntpnt [-v]" USE_DEVFSD_FG_NP("[-fg][-np]")
  633. #define devfsd_full_usage "\n\n" \
  634. "Manage devfs permissions and old device name symlinks\n" \
  635. "\nOptions:" \
  636. "\n mntpnt The mount point where devfs is mounted" \
  637. "\n -v Print the protocol version numbers for devfsd" \
  638. "\n and the kernel-side protocol version and exit" \
  639. USE_DEVFSD_FG_NP( \
  640. "\n -fg Run in foreground" \
  641. "\n -np Exit after parsing the configuration file" \
  642. "\n and processing synthetic REGISTER events," \
  643. "\n do not poll for events" \
  644. )
  645. /* -k is accepted but ignored for !HUMAN_READABLE,
  646. * but we won't mention this (unimportant) */
  647. #if ENABLE_FEATURE_HUMAN_READABLE || ENABLE_FEATURE_DF_INODE
  648. #define DF_HAS_OPTIONS(x) x
  649. #else
  650. #define DF_HAS_OPTIONS(x)
  651. #endif
  652. #define df_trivial_usage \
  653. DF_HAS_OPTIONS("[-") \
  654. USE_FEATURE_HUMAN_READABLE("hmk") USE_FEATURE_DF_INODE("i") \
  655. DF_HAS_OPTIONS("] ") "[FILESYSTEM...]"
  656. #define df_full_usage "\n\n" \
  657. "Print filesystem usage statistics\n" \
  658. DF_HAS_OPTIONS("\nOptions:") \
  659. USE_FEATURE_HUMAN_READABLE( \
  660. "\n -h Human readable (e.g. 1K 243M 2G)" \
  661. "\n -m 1024*1024 blocks" \
  662. "\n -k 1024 blocks" \
  663. ) \
  664. USE_FEATURE_DF_INODE( \
  665. "\n -i Inodes" \
  666. )
  667. #define df_example_usage \
  668. "$ df\n" \
  669. "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
  670. "/dev/sda3 8690864 8553540 137324 98% /\n" \
  671. "/dev/sda1 64216 36364 27852 57% /boot\n" \
  672. "$ df /dev/sda3\n" \
  673. "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
  674. "/dev/sda3 8690864 8553540 137324 98% /\n"
  675. #define dhcprelay_trivial_usage \
  676. "[client1,client2,...] [server_device]"
  677. #define dhcprelay_full_usage "\n\n" \
  678. "Relay dhcp requests from client devices to server device.\n" \
  679. "Pass clients as CSV"
  680. #define diff_trivial_usage \
  681. "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
  682. #define diff_full_usage "\n\n" \
  683. "Compare files line by line and output the differences between them.\n" \
  684. "This implementation supports unified diffs only.\n" \
  685. "\nOptions:" \
  686. "\n -a Treat all files as text" \
  687. "\n -b Ignore changes in the amount of whitespace" \
  688. "\n -d Try hard to find a smaller set of changes" \
  689. "\n -i Ignore case differences" \
  690. "\n -L Use LABEL instead of the filename in the unified header" \
  691. "\n -N Treat absent files as empty" \
  692. "\n -q Output only whether files differ" \
  693. "\n -r Recursively compare subdirectories" \
  694. "\n -S Start with FILE when comparing directories" \
  695. "\n -T Make tabs line up by prefixing a tab when necessary" \
  696. "\n -s Report when two files are the same" \
  697. "\n -t Expand tabs to spaces in output" \
  698. "\n -U Output LINES lines of context" \
  699. "\n -w Ignore all whitespace" \
  700. #define dirname_trivial_usage \
  701. "FILENAME"
  702. #define dirname_full_usage "\n\n" \
  703. "Strip non-directory suffix from FILENAME"
  704. #define dirname_example_usage \
  705. "$ dirname /tmp/foo\n" \
  706. "/tmp\n" \
  707. "$ dirname /tmp/foo/\n" \
  708. "/tmp\n"
  709. #define dmesg_trivial_usage \
  710. "[-c] [-n LEVEL] [-s SIZE]"
  711. #define dmesg_full_usage "\n\n" \
  712. "Print or control the kernel ring buffer\n" \
  713. "\nOptions:" \
  714. "\n -c Clear ring buffer after printing" \
  715. "\n -n LEVEL Set console logging level" \
  716. "\n -s SIZE Buffer size" \
  717. #define dnsd_trivial_usage \
  718. "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
  719. #define dnsd_full_usage "\n\n" \
  720. "Small static DNS server daemon\n" \
  721. "\nOptions:" \
  722. "\n -c Config filename" \
  723. "\n -t TTL in seconds" \
  724. "\n -p Listening port" \
  725. "\n -i Listening ip (default all)" \
  726. "\n -d Daemonize" \
  727. #define dos2unix_trivial_usage \
  728. "[option] [FILE]"
  729. #define dos2unix_full_usage "\n\n" \
  730. "Convert FILE from dos to unix format.\n" \
  731. "When no file is given, use stdin/stdout.\n" \
  732. "\nOptions:" \
  733. "\n -u dos2unix" \
  734. "\n -d unix2dos" \
  735. #define dpkg_trivial_usage \
  736. "[-ilCPru] [-F option] package_name"
  737. #define dpkg_full_usage "\n\n" \
  738. "Install, remove and manage Debian packages\n" \
  739. "\nOptions:" \
  740. "\n -i Install the package" \
  741. "\n -l List of installed packages" \
  742. "\n -C Configure an unpackaged package" \
  743. "\n -F depends Ignore dependency problems" \
  744. "\n -P Purge all files of a package" \
  745. "\n -r Remove all but the configuration files for a package" \
  746. "\n -u Unpack a package, but don't configure it" \
  747. #define dpkg_deb_trivial_usage \
  748. "[-cefxX] FILE [argument]"
  749. #define dpkg_deb_full_usage "\n\n" \
  750. "Perform actions on Debian packages (.debs)\n" \
  751. "\nOptions:" \
  752. "\n -c List contents of filesystem tree" \
  753. "\n -e Extract control files to [argument] directory" \
  754. "\n -f Display control field name starting with [argument]" \
  755. "\n -x Extract packages filesystem tree to directory" \
  756. "\n -X Verbose extract" \
  757. #define dpkg_deb_example_usage \
  758. "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
  759. #define du_trivial_usage \
  760. "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
  761. #define du_full_usage "\n\n" \
  762. "Summarize disk space used for each FILE and/or directory.\n" \
  763. "Disk space is printed in units of " \
  764. USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
  765. SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
  766. " bytes.\n" \
  767. "\nOptions:" \
  768. "\n -a Show file sizes too" \
  769. "\n -H Follow symlinks on command line" \
  770. "\n -L Follow all symlinks" \
  771. "\n -d N Limit output to directories (and files with -a) of depth < N" \
  772. "\n -c Show grand total" \
  773. "\n -l Count sizes many times if hard linked" \
  774. "\n -s Display only a total for each argument" \
  775. "\n -x Skip directories on different filesystems" \
  776. USE_FEATURE_HUMAN_READABLE( \
  777. "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
  778. "\n -m Sizes in megabytes" \
  779. ) \
  780. "\n -k Sizes in kilobytes" \
  781. USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
  782. #define du_example_usage \
  783. "$ du\n" \
  784. "16 ./CVS\n" \
  785. "12 ./kernel-patches/CVS\n" \
  786. "80 ./kernel-patches\n" \
  787. "12 ./tests/CVS\n" \
  788. "36 ./tests\n" \
  789. "12 ./scripts/CVS\n" \
  790. "16 ./scripts\n" \
  791. "12 ./docs/CVS\n" \
  792. "104 ./docs\n" \
  793. "2417 .\n"
  794. #define dumpkmap_trivial_usage \
  795. "> keymap"
  796. #define dumpkmap_full_usage "\n\n" \
  797. "Print a binary keyboard translation table to standard output"
  798. #define dumpkmap_example_usage \
  799. "$ dumpkmap > keymap\n"
  800. #define dumpleases_trivial_usage \
  801. "[-r|-a] [-f LEASEFILE]"
  802. #define dumpleases_full_usage "\n\n" \
  803. "Display DHCP leases granted by udhcpd\n" \
  804. "\nOptions:" \
  805. USE_GETOPT_LONG( \
  806. "\n -f,--file=FILE Leases file to load" \
  807. "\n -r,--remaining Interpret lease times as time remaining" \
  808. "\n -a,--absolute Interpret lease times as expire time" \
  809. ) \
  810. SKIP_GETOPT_LONG( \
  811. "\n -f FILE Leases file to load" \
  812. "\n -r Interpret lease times as time remaining" \
  813. "\n -a Interpret lease times as expire time" \
  814. )
  815. #define e2fsck_trivial_usage \
  816. "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
  817. "[-I inode_buffer_blocks] [-P process_inode_size] " \
  818. "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
  819. "[-E extended-options] device"
  820. #define e2fsck_full_usage "\n\n" \
  821. "Check ext2/ext3 file system\n" \
  822. "\nOptions:" \
  823. "\n -p Automatic repair (no questions)" \
  824. "\n -n Make no changes to the filesystem" \
  825. "\n -y Assume 'yes' to all questions" \
  826. "\n -c Check for bad blocks and add them to the badblock list" \
  827. "\n -f Force checking even if filesystem is marked clean" \
  828. "\n -v Verbose" \
  829. "\n -b superblock Use alternative superblock" \
  830. "\n -B blocksize Force blocksize when looking for superblock" \
  831. "\n -j journal Set location of the external journal" \
  832. "\n -l file Add to badblocks list" \
  833. "\n -L file Set badblocks list" \
  834. #define echo_trivial_usage \
  835. USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]"
  836. #define echo_full_usage "\n\n" \
  837. "Print the specified ARGs to stdout" \
  838. USE_FEATURE_FANCY_ECHO( "\n" \
  839. "\nOptions:" \
  840. "\n -n Suppress trailing newline" \
  841. "\n -e Interpret backslash-escaped characters (i.e., \\t=tab)" \
  842. "\n -E Disable interpretation of backslash-escaped characters" \
  843. )
  844. #define echo_example_usage \
  845. "$ echo \"Erik is cool\"\n" \
  846. "Erik is cool\n" \
  847. USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
  848. "Erik\n" \
  849. "is\n" \
  850. "cool\n" \
  851. "$ echo \"Erik\\nis\\ncool\"\n" \
  852. "Erik\\nis\\ncool\n")
  853. #define eject_trivial_usage \
  854. "[-t] [-T] [DEVICE]"
  855. #define eject_full_usage "\n\n" \
  856. "Eject specified DEVICE (or default /dev/cdrom)\n" \
  857. "\nOptions:" \
  858. USE_FEATURE_EJECT_SCSI( \
  859. "\n -s SCSI device" \
  860. ) \
  861. "\n -t Close tray" \
  862. "\n -T Open/close tray (toggle)" \
  863. #define ed_trivial_usage ""
  864. #define ed_full_usage ""
  865. #define env_trivial_usage \
  866. "[-iu] [-] [name=value]... [command]"
  867. #define env_full_usage "\n\n" \
  868. "Print the current environment or run a program after setting\n" \
  869. "up the specified environment\n" \
  870. "\nOptions:" \
  871. "\n -, -i Start with an empty environment" \
  872. "\n -u Remove variable from the environment" \
  873. #define ether_wake_trivial_usage \
  874. "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
  875. #define ether_wake_full_usage "\n\n" \
  876. "Send a magic packet to wake up sleeping machines.\n" \
  877. "MAC must be a station address (00:11:22:33:44:55) or\n" \
  878. "a hostname with a known 'ethers' entry.\n" \
  879. "\nOptions:" \
  880. "\n -b Send wake-up packet to the broadcast address" \
  881. "\n -i iface Interface to use (default eth0)" \
  882. "\n -p pass Append four or six byte password PW to the packet" \
  883. #define expand_trivial_usage \
  884. "[-i] [-t NUM] [FILE|-]"
  885. #define expand_full_usage "\n\n" \
  886. "Convert tabs to spaces, writing to standard output.\n" \
  887. "\nOptions:" \
  888. USE_FEATURE_EXPAND_LONG_OPTIONS( \
  889. "\n -i,--initial Do not convert tabs after non blanks" \
  890. "\n -t,--tabs=N Tabstops every N chars" \
  891. ) \
  892. SKIP_FEATURE_EXPAND_LONG_OPTIONS( \
  893. "\n -i Do not convert tabs after non blanks" \
  894. "\n -t Tabstops every N chars" \
  895. )
  896. #define expr_trivial_usage \
  897. "EXPRESSION"
  898. #define expr_full_usage "\n\n" \
  899. "Print the value of EXPRESSION to standard output.\n" \
  900. "\n" \
  901. "EXPRESSION may be:\n" \
  902. " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
  903. " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
  904. " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \
  905. " ARG1 <= ARG2\n" \
  906. " ARG1 = ARG2\n" \
  907. " ARG1 != ARG2\n" \
  908. " ARG1 >= ARG2\n" \
  909. " ARG1 > ARG2\n" \
  910. " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \
  911. " ARG1 - ARG2\n" \
  912. " ARG1 * ARG2\n" \
  913. " ARG1 / ARG2\n" \
  914. " ARG1 % ARG2\n" \
  915. " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \
  916. " match STRING REGEXP Same as STRING : REGEXP\n" \
  917. " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \
  918. " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \
  919. " length STRING Length of STRING\n" \
  920. " quote TOKEN Interpret TOKEN as a string, even if\n" \
  921. " it is a keyword like 'match' or an\n" \
  922. " operator like '/'\n" \
  923. " (EXPRESSION) Value of EXPRESSION\n" \
  924. "\n" \
  925. "Beware that many operators need to be escaped or quoted for shells.\n" \
  926. "Comparisons are arithmetic if both ARGs are numbers, else\n" \
  927. "lexicographical. Pattern matches return the string matched between\n" \
  928. "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
  929. "of characters matched or 0."
  930. #define fakeidentd_trivial_usage \
  931. "[-fiw] [-b ADDR] [STRING]"
  932. #define fakeidentd_full_usage "\n\n" \
  933. "Provide fake ident (auth) service\n" \
  934. "\nOptions:" \
  935. "\n -f Run in foreground" \
  936. "\n -i Inetd mode" \
  937. "\n -w Inetd 'wait' mode" \
  938. "\n -b ADDR Bind to specified address" \
  939. "\n STRING Ident answer string (default is 'nobody')" \
  940. #define false_trivial_usage \
  941. ""
  942. #define false_full_usage "\n\n" \
  943. "Return an exit code of FALSE (1)"
  944. #define false_example_usage \
  945. "$ false\n" \
  946. "$ echo $?\n" \
  947. "1\n"
  948. #define fbset_trivial_usage \
  949. "[options] [mode]"
  950. #define fbset_full_usage "\n\n" \
  951. "Show and modify frame buffer settings"
  952. #define fbset_example_usage \
  953. "$ fbset\n" \
  954. "mode \"1024x768-76\"\n" \
  955. " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
  956. " geometry 1024 768 1024 768 16\n" \
  957. " timings 12714 128 32 16 4 128 4\n" \
  958. " accel false\n" \
  959. " rgba 5/11,6/5,5/0,0/0\n" \
  960. "endmode\n"
  961. #define fdflush_trivial_usage \
  962. "DEVICE"
  963. #define fdflush_full_usage "\n\n" \
  964. "Force floppy disk drive to detect disk change"
  965. #define fdformat_trivial_usage \
  966. "[-n] DEVICE"
  967. #define fdformat_full_usage "\n\n" \
  968. "Format floppy disk\n" \
  969. "\nOptions:" \
  970. "\n -n Don't verify after format" \
  971. /* Looks like someone forgot to add this to config system */
  972. #ifndef ENABLE_FEATURE_FDISK_BLKSIZE
  973. # define ENABLE_FEATURE_FDISK_BLKSIZE 0
  974. # define USE_FEATURE_FDISK_BLKSIZE(a)
  975. #endif
  976. #define fdisk_trivial_usage \
  977. "[-ul" USE_FEATURE_FDISK_BLKSIZE("s") "] " \
  978. "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
  979. #define fdisk_full_usage "\n\n" \
  980. "Change partition table\n" \
  981. "\nOptions:" \
  982. "\n -u Start and End are in sectors (instead of cylinders)" \
  983. "\n -l Show partition table for each DISK, then exit" \
  984. USE_FEATURE_FDISK_BLKSIZE( \
  985. "\n -s Show partition sizes in kb for each DISK, then exit" \
  986. ) \
  987. "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \
  988. "\n -C CYLINDERS Set number of cylinders/heads/sectors" \
  989. "\n -H HEADS\n" \
  990. "\n -S SECTORS" \
  991. #define fetchmail_trivial_usage \
  992. "[-w timeout] [-H [user:pass@]server[:port]] [-S] [-t] [-z] maildir [prog]"
  993. #define fetchmail_full_usage "\n\n" \
  994. "Fetch content of remote mailbox to local maildir\n" \
  995. "\nOptions:" \
  996. "\n -w timeout Network timeout" \
  997. "\n -H [user:pass@]server[:port] Server" \
  998. "\n -S Use openssl connection helper for secure servers" \
  999. "\n -t Get only headers" \
  1000. "\n -z Delete messages on server" \
  1001. "\n prog Run 'prog <message_file>' on message delivery" \
  1002. #define findfs_trivial_usage \
  1003. "LABEL=label or UUID=uuid"
  1004. #define findfs_full_usage "\n\n" \
  1005. "Find a filesystem device based on a label or UUID."
  1006. #define findfs_example_usage \
  1007. "$ findfs LABEL=MyDevice"
  1008. #define find_trivial_usage \
  1009. "[PATH...] [EXPRESSION]"
  1010. #define find_full_usage "\n\n" \
  1011. "Search for files. The default PATH is the current directory,\n" \
  1012. "default EXPRESSION is '-print'\n" \
  1013. "\nEXPRESSION may consist of:" \
  1014. "\n -follow Dereference symlinks" \
  1015. USE_FEATURE_FIND_XDEV( \
  1016. "\n -xdev Don't descend directories on other filesystems") \
  1017. USE_FEATURE_FIND_MAXDEPTH( \
  1018. "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
  1019. "\n tests/actions to command line arguments only") \
  1020. "\n -name PATTERN File name (w/o directory name) matches PATTERN" \
  1021. "\n -iname PATTERN Case insensitive -name" \
  1022. USE_FEATURE_FIND_PATH( \
  1023. "\n -path PATTERN Path matches PATTERN") \
  1024. USE_FEATURE_FIND_REGEX( \
  1025. "\n -regex PATTERN Path matches regex PATTERN") \
  1026. USE_FEATURE_FIND_TYPE( \
  1027. "\n -type X File type is X (X is one of: f,d,l,b,c,...)") \
  1028. USE_FEATURE_FIND_PERM( \
  1029. "\n -perm NNN Permissions match any of (+NNN), all of (-NNN)," \
  1030. "\n or exactly (NNN)") \
  1031. USE_FEATURE_FIND_MTIME( \
  1032. "\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \
  1033. "\n or exactly (N) days") \
  1034. USE_FEATURE_FIND_MMIN( \
  1035. "\n -mmin MINS Modified time is greater than (+N), less than (-N)," \
  1036. "\n or exactly (N) minutes") \
  1037. USE_FEATURE_FIND_NEWER( \
  1038. "\n -newer FILE Modified time is more recent than FILE's") \
  1039. USE_FEATURE_FIND_INUM( \
  1040. "\n -inum N File has inode number N") \
  1041. USE_FEATURE_FIND_USER( \
  1042. "\n -user NAME File is owned by user NAME (numeric user ID allowed)") \
  1043. USE_FEATURE_FIND_GROUP( \
  1044. "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \
  1045. USE_FEATURE_FIND_DEPTH( \
  1046. "\n -depth Process directory name after traversing it") \
  1047. USE_FEATURE_FIND_SIZE( \
  1048. "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \
  1049. "\n +/-N: file size is bigger/smaller than N") \
  1050. "\n -print Print (default and assumed)" \
  1051. USE_FEATURE_FIND_PRINT0( \
  1052. "\n -print0 Delimit output with null characters rather than" \
  1053. "\n newlines") \
  1054. USE_FEATURE_FIND_CONTEXT ( \
  1055. "\n -context File has specified security context") \
  1056. USE_FEATURE_FIND_EXEC( \
  1057. "\n -exec CMD ARG ; Execute CMD with all instances of {} replaced by the" \
  1058. "\n matching files") \
  1059. USE_FEATURE_FIND_PRUNE( \
  1060. "\n -prune Stop traversing current subtree") \
  1061. USE_FEATURE_FIND_DELETE( \
  1062. "\n -delete Delete files, turns on -depth option") \
  1063. USE_FEATURE_FIND_PAREN( \
  1064. "\n (EXPR) Group an expression") \
  1065. #define find_example_usage \
  1066. "$ find / -name passwd\n" \
  1067. "/etc/passwd\n"
  1068. #define fold_trivial_usage \
  1069. "[-bs] [-w WIDTH] [FILE]"
  1070. #define fold_full_usage "\n\n" \
  1071. "Wrap input lines in each FILE (standard input by default), writing to\n" \
  1072. "standard output\n" \
  1073. "\nOptions:" \
  1074. "\n -b Count bytes rather than columns" \
  1075. "\n -s Break at spaces" \
  1076. "\n -w Use WIDTH columns instead of 80" \
  1077. #define free_trivial_usage \
  1078. ""
  1079. #define free_full_usage "\n\n" \
  1080. "Display the amount of free and used system memory"
  1081. #define free_example_usage \
  1082. "$ free\n" \
  1083. " total used free shared buffers\n" \
  1084. " Mem: 257628 248724 8904 59644 93124\n" \
  1085. " Swap: 128516 8404 120112\n" \
  1086. "Total: 386144 257128 129016\n" \
  1087. #define freeramdisk_trivial_usage \
  1088. "DEVICE"
  1089. #define freeramdisk_full_usage "\n\n" \
  1090. "Free all memory used by the specified ramdisk"
  1091. #define freeramdisk_example_usage \
  1092. "$ freeramdisk /dev/ram2\n"
  1093. #define fsck_trivial_usage \
  1094. "[-ANPRTV] [-C fd] [-t fstype] [fs-options] [filesys...]"
  1095. #define fsck_full_usage "\n\n" \
  1096. "Check and repair filesystems\n" \
  1097. "\nOptions:" \
  1098. "\n -A Walk /etc/fstab and check all filesystems" \
  1099. "\n -N Don't execute, just show what would be done" \
  1100. "\n -P With -A, check filesystems in parallel" \
  1101. "\n -R With -A, skip the root filesystem" \
  1102. "\n -T Don't show title on startup" \
  1103. "\n -V Verbose" \
  1104. "\n -C n Write status information to specified filedescriptor" \
  1105. "\n -t type List of filesystem types to check" \
  1106. #define fsck_minix_trivial_usage \
  1107. "[-larvsmf] /dev/name"
  1108. #define fsck_minix_full_usage "\n\n" \
  1109. "Check MINIX filesystem\n" \
  1110. "\nOptions:" \
  1111. "\n -l List all filenames" \
  1112. "\n -r Perform interactive repairs" \
  1113. "\n -a Perform automatic repairs" \
  1114. "\n -v Verbose" \
  1115. "\n -s Output superblock information" \
  1116. "\n -m Show \"mode not cleared\" warnings" \
  1117. "\n -f Force file system check" \
  1118. #define ftpget_trivial_usage \
  1119. "[options] remote-host local-file remote-file"
  1120. #define ftpget_full_usage "\n\n" \
  1121. "Retrieve a remote file via FTP\n" \
  1122. "\nOptions:" \
  1123. USE_GETOPT_LONG( \
  1124. "\n -c,--continue Continue previous transfer" \
  1125. "\n -v,--verbose Verbose" \
  1126. "\n -u,--username Username" \
  1127. "\n -p,--password Password" \
  1128. "\n -P,--port Port number" \
  1129. ) \
  1130. SKIP_GETOPT_LONG( \
  1131. "\n -c Continue previous transfer" \
  1132. "\n -v Verbose" \
  1133. "\n -u Username" \
  1134. "\n -p Password" \
  1135. "\n -P Port number" \
  1136. )
  1137. #define ftpput_trivial_usage \
  1138. "[options] remote-host remote-file local-file"
  1139. #define ftpput_full_usage "\n\n" \
  1140. "Store a local file on a remote machine via FTP\n" \
  1141. "\nOptions:" \
  1142. USE_GETOPT_LONG( \
  1143. "\n -v,--verbose Verbose" \
  1144. "\n -u,--username Username" \
  1145. "\n -p,--password Password" \
  1146. "\n -P,--port Port number" \
  1147. ) \
  1148. SKIP_GETOPT_LONG( \
  1149. "\n -v Verbose" \
  1150. "\n -u Username" \
  1151. "\n -p Password" \
  1152. "\n -P Port number" \
  1153. )
  1154. #define fuser_trivial_usage \
  1155. "[options] FILE or PORT/PROTO"
  1156. #define fuser_full_usage "\n\n" \
  1157. "Find processes which use FILEs or PORTs\n" \
  1158. "\nOptions:" \
  1159. "\n -m Find processes which use same fs as FILEs" \
  1160. "\n -4 Search only IPv4 space" \
  1161. "\n -6 Search only IPv6 space" \
  1162. "\n -s Silent: just exit with 0 if any processes are found" \
  1163. "\n -k Kill found processes (otherwise display PIDs)" \
  1164. "\n -SIGNAL Signal to send (default: TERM)" \
  1165. #define getenforce_trivial_usage NOUSAGE_STR
  1166. #define getenforce_full_usage ""
  1167. #define getopt_trivial_usage \
  1168. "[OPTIONS]..."
  1169. #define getopt_full_usage "\n\n" \
  1170. "Parse command options\n" \
  1171. USE_GETOPT_LONG( \
  1172. "\n -a,--alternative Allow long options starting with single -" \
  1173. "\n -l,--longoptions=longopts Long options to be recognized" \
  1174. "\n -n,--name=progname The name under which errors are reported" \
  1175. "\n -o,--options=optstring Short options to be recognized" \
  1176. "\n -q,--quiet Disable error reporting by getopt(3)" \
  1177. "\n -Q,--quiet-output No normal output" \
  1178. "\n -s,--shell=shell Set shell quoting conventions" \
  1179. "\n -T,--test Test for getopt(1) version" \
  1180. "\n -u,--unquoted Don't quote the output" \
  1181. ) \
  1182. SKIP_GETOPT_LONG( \
  1183. "\n -a Allow long options starting with single -" \
  1184. "\n -l longopts Long options to be recognized" \
  1185. "\n -n progname The name under which errors are reported" \
  1186. "\n -o optstring Short options to be recognized" \
  1187. "\n -q Disable error reporting by getopt(3)" \
  1188. "\n -Q No normal output" \
  1189. "\n -s shell Set shell quoting conventions" \
  1190. "\n -T Test for getopt(1) version" \
  1191. "\n -u Don't quote the output" \
  1192. )
  1193. #define getopt_example_usage \
  1194. "$ cat getopt.test\n" \
  1195. "#!/bin/sh\n" \
  1196. "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
  1197. " -n 'example.busybox' -- \"$@\"`\n" \
  1198. "if [ $? != 0 ]; then exit 1; fi\n" \
  1199. "eval set -- \"$GETOPT\"\n" \
  1200. "while true; do\n" \
  1201. " case $1 in\n" \
  1202. " -a|--a-long) echo \"Option a\"; shift;;\n" \
  1203. " -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
  1204. " -c|--c-long)\n" \
  1205. " case \"$2\" in\n" \
  1206. " \"\") echo \"Option c, no argument\"; shift 2;;\n" \
  1207. " *) echo \"Option c, argument '$2'\"; shift 2;;\n" \
  1208. " esac;;\n" \
  1209. " --) shift; break;;\n" \
  1210. " *) echo \"Internal error!\"; exit 1;;\n" \
  1211. " esac\n" \
  1212. "done\n"
  1213. #define getsebool_trivial_usage \
  1214. "-a or getsebool boolean..."
  1215. #define getsebool_full_usage "\n\n" \
  1216. " -a Show all SELinux booleans"
  1217. #define getty_trivial_usage \
  1218. "[OPTIONS] BAUD_RATE TTY [TERMTYPE]"
  1219. #define getty_full_usage "\n\n" \
  1220. "Open a tty, prompt for a login name, then invoke /bin/login\n" \
  1221. "\nOptions:" \
  1222. "\n -h Enable hardware (RTS/CTS) flow control" \
  1223. "\n -i Do not display /etc/issue before running login" \
  1224. "\n -L Local line, do not do carrier detect" \
  1225. "\n -m Get baud rate from modem's CONNECT status message" \
  1226. "\n -w Wait for a CR or LF before sending /etc/issue" \
  1227. "\n -n Do not prompt the user for a login name" \
  1228. "\n -f issue_file Display issue_file instead of /etc/issue" \
  1229. "\n -l login_app Invoke login_app instead of /bin/login" \
  1230. "\n -t timeout Terminate after timeout if no username is read" \
  1231. "\n -I initstring Init string to send before anything else" \
  1232. "\n -H login_host Log login_host into the utmp file as the hostname" \
  1233. #define grep_trivial_usage \
  1234. "[-HhrilLnqvso" \
  1235. USE_DESKTOP("w") \
  1236. "eF" \
  1237. USE_FEATURE_GREP_EGREP_ALIAS("E") \
  1238. USE_FEATURE_GREP_CONTEXT("ABC") \
  1239. "] PATTERN [FILEs...]"
  1240. #define grep_full_usage "\n\n" \
  1241. "Search for PATTERN in each FILE or standard input\n" \
  1242. "\nOptions:" \
  1243. "\n -H Prefix output lines with filename where match was found" \
  1244. "\n -h Suppress the prefixing filename on output" \
  1245. "\n -r Recurse subdirectories" \
  1246. "\n -i Ignore case distinctions" \
  1247. "\n -l List names of files that match" \
  1248. "\n -L List names of files that do not match" \
  1249. "\n -n Print line number with output lines" \
  1250. "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \
  1251. "\n -v Select non-matching lines" \
  1252. "\n -s Suppress file open/read error messages" \
  1253. "\n -c Only print count of matching lines" \
  1254. "\n -o Show only the part of a line that matches PATTERN" \
  1255. "\n -m MAX Match up to MAX times per file" \
  1256. USE_DESKTOP( \
  1257. "\n -w Match whole words only") \
  1258. "\n -F PATTERN is a set of newline-separated strings" \
  1259. USE_FEATURE_GREP_EGREP_ALIAS( \
  1260. "\n -E PATTERN is an extended regular expression") \
  1261. "\n -e PTRN Pattern to match" \
  1262. "\n -f FILE Read pattern from file" \
  1263. USE_FEATURE_GREP_CONTEXT( \
  1264. "\n -A Print NUM lines of trailing context" \
  1265. "\n -B Print NUM lines of leading context" \
  1266. "\n -C Print NUM lines of output context") \
  1267. #define grep_example_usage \
  1268. "$ grep root /etc/passwd\n" \
  1269. "root:x:0:0:root:/root:/bin/bash\n" \
  1270. "$ grep ^[rR]oo. /etc/passwd\n" \
  1271. "root:x:0:0:root:/root:/bin/bash\n"
  1272. #define egrep_trivial_usage NOUSAGE_STR
  1273. #define egrep_full_usage ""
  1274. #define fgrep_trivial_usage NOUSAGE_STR
  1275. #define fgrep_full_usage ""
  1276. #define gunzip_trivial_usage \
  1277. "[OPTION]... [FILE]..."
  1278. #define gunzip_full_usage "\n\n" \
  1279. "Uncompress FILEs (or standard input)\n" \
  1280. "\nOptions:" \
  1281. "\n -c Write to standard output" \
  1282. "\n -f Force" \
  1283. "\n -t Test file integrity" \
  1284. #define gunzip_example_usage \
  1285. "$ ls -la /tmp/BusyBox*\n" \
  1286. "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
  1287. "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
  1288. "$ ls -la /tmp/BusyBox*\n" \
  1289. "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
  1290. #define gzip_trivial_usage \
  1291. "[OPTION]... [FILE]..."
  1292. #define gzip_full_usage "\n\n" \
  1293. "Compress FILEs (or standard input)\n" \
  1294. "\nOptions:" \
  1295. "\n -c Write to standard output" \
  1296. "\n -d Decompress" \
  1297. "\n -f Force" \
  1298. #define gzip_example_usage \
  1299. "$ ls -la /tmp/busybox*\n" \
  1300. "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
  1301. "$ gzip /tmp/busybox.tar\n" \
  1302. "$ ls -la /tmp/busybox*\n" \
  1303. "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
  1304. #define halt_trivial_usage \
  1305. "[-d delay] [-n] [-f]"
  1306. #define halt_full_usage "\n\n" \
  1307. "Halt the system\n" \
  1308. "\nOptions:" \
  1309. "\n -d Delay interval for halting" \
  1310. "\n -n No call to sync()" \
  1311. "\n -f Force halt (don't go through init)" \
  1312. USE_FEATURE_WTMP( \
  1313. "\n -w Only write a wtmp record" \
  1314. )
  1315. #define hdparm_trivial_usage \
  1316. "[options] [device] .."
  1317. #define hdparm_full_usage "\n\n" \
  1318. "Options:" \
  1319. "\n -a Get/set fs readahead" \
  1320. "\n -A Set drive read-lookahead flag (0/1)" \
  1321. "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)" \
  1322. "\n -B Set Advanced Power Management setting (1-255)" \
  1323. "\n -c Get/set IDE 32-bit IO setting" \
  1324. "\n -C Check IDE power mode status" \
  1325. USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \
  1326. "\n -d Get/set using_dma flag") \
  1327. "\n -D Enable/disable drive defect-mgmt" \
  1328. "\n -f Flush buffer cache for device on exit" \
  1329. "\n -g Display drive geometry" \
  1330. "\n -h Display terse usage information" \
  1331. USE_FEATURE_HDPARM_GET_IDENTITY( \
  1332. "\n -i Display drive identification") \
  1333. USE_FEATURE_HDPARM_GET_IDENTITY( \
  1334. "\n -I Detailed/current information directly from drive") \
  1335. "\n -k Get/set keep_settings_over_reset flag (0/1)" \
  1336. "\n -K Set drive keep_features_over_reset flag (0/1)" \
  1337. "\n -L Set drive doorlock (0/1) (removable harddisks only)" \
  1338. "\n -m Get/set multiple sector count" \
  1339. "\n -n Get/set ignore-write-errors flag (0/1)" \
  1340. "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \
  1341. "\n -P Set drive prefetch count" \
  1342. /* "\n -q Change next setting quietly" - not supported ib bbox */ \
  1343. "\n -Q Get/set DMA tagged-queuing depth (if supported)" \
  1344. "\n -r Get/set readonly flag (DANGEROUS to set)" \
  1345. USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
  1346. "\n -R Register an IDE interface (DANGEROUS)") \
  1347. "\n -S Set standby (spindown) timeout" \
  1348. "\n -t Perform device read timings" \
  1349. "\n -T Perform cache read timings" \
  1350. "\n -u Get/set unmaskirq flag (0/1)" \
  1351. USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
  1352. "\n -U Un-register an IDE interface (DANGEROUS)") \
  1353. "\n -v Defaults; same as -mcudkrag for IDE drives" \
  1354. "\n -V Display program version and exit immediately" \
  1355. USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
  1356. "\n -w Perform device reset (DANGEROUS)") \
  1357. "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
  1358. USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
  1359. "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
  1360. "\n -X Set IDE xfer mode (DANGEROUS)" \
  1361. "\n -y Put IDE drive in standby mode" \
  1362. "\n -Y Put IDE drive to sleep" \
  1363. "\n -Z Disable Seagate auto-powersaving mode" \
  1364. "\n -z Re-read partition table" \
  1365. #define head_trivial_usage \
  1366. "[OPTION]... [FILE]..."
  1367. #define head_full_usage "\n\n" \
  1368. "Print first 10 lines of each FILE to standard output.\n" \
  1369. "With more than one FILE, precede each with a header giving the\n" \
  1370. "file name. With no FILE, or when FILE is -, read standard input.\n" \
  1371. "\nOptions:" \
  1372. "\n -n NUM Print first NUM lines instead of first 10" \
  1373. USE_FEATURE_FANCY_HEAD( \
  1374. "\n -c NUM Output the first NUM bytes" \
  1375. "\n -q Never output headers giving file names" \
  1376. "\n -v Always output headers giving file names") \
  1377. #define head_example_usage \
  1378. "$ head -n 2 /etc/passwd\n" \
  1379. "root:x:0:0:root:/root:/bin/bash\n" \
  1380. "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
  1381. #define hexdump_trivial_usage \
  1382. "[-bcCdefnosvx" USE_FEATURE_HEXDUMP_REVERSE("R") "] FILE..."
  1383. #define hexdump_full_usage "\n\n" \
  1384. "Display file(s) or standard input in a user specified format\n" \
  1385. "\nOptions:" \
  1386. "\n -b One-byte octal display" \
  1387. "\n -c One-byte character display" \
  1388. "\n -C Canonical hex+ASCII, 16 bytes per line" \
  1389. "\n -d Two-byte decimal display" \
  1390. "\n -e FORMAT STRING" \
  1391. "\n -f FORMAT FILE" \
  1392. "\n -n LENGTH Interpret only LENGTH bytes of input" \
  1393. "\n -o Two-byte octal display" \
  1394. "\n -s OFFSET Skip OFFSET bytes" \
  1395. "\n -v Display all input data" \
  1396. "\n -x Two-byte hexadecimal display" \
  1397. USE_FEATURE_HEXDUMP_REVERSE( \
  1398. "\n -R Reverse of 'hexdump -Cv'") \
  1399. #define hd_trivial_usage \
  1400. "FILE..."
  1401. #define hd_full_usage "\n\n" \
  1402. "hd is an alias for hexdump -C"
  1403. #define hostid_trivial_usage \
  1404. ""
  1405. #define hostid_full_usage "\n\n" \
  1406. "Print out a unique 32-bit identifier for the machine"
  1407. #define hostname_trivial_usage \
  1408. "[OPTION] [hostname | -F FILE]"
  1409. #define hostname_full_usage "\n\n" \
  1410. "Get or set hostname or DNS domain name\n" \
  1411. "\nOptions:" \
  1412. "\n -s Short" \
  1413. "\n -i Addresses for the hostname" \
  1414. "\n -d DNS domain name" \
  1415. "\n -f Fully qualified domain name" \
  1416. "\n -F FILE Use the contents of FILE to specify the hostname" \
  1417. #define hostname_example_usage \
  1418. "$ hostname\n" \
  1419. "sage\n"
  1420. #define httpd_trivial_usage \
  1421. "[-c conffile]" \
  1422. " [-p [ip:]port]" \
  1423. " [-i] [-f] [-v[v]]" \
  1424. USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
  1425. USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
  1426. USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
  1427. " [-h home]" \
  1428. " [-d/-e string]"
  1429. #define httpd_full_usage "\n\n" \
  1430. "Listen for incoming HTTP requests\n" \
  1431. "\nOptions:" \
  1432. "\n -c FILE Configuration file (default httpd.conf)" \
  1433. "\n -p [IP:]PORT Bind to ip:port (default *:80)" \
  1434. "\n -i Inetd mode" \
  1435. "\n -f Do not daemonize" \
  1436. "\n -v[v] Verbose" \
  1437. USE_FEATURE_HTTPD_SETUID( \
  1438. "\n -u USER[:GRP] Set uid/gid after binding to port") \
  1439. USE_FEATURE_HTTPD_BASIC_AUTH( \
  1440. "\n -r REALM Authentication Realm for Basic Authentication") \
  1441. USE_FEATURE_HTTPD_AUTH_MD5( \
  1442. "\n -m PASS Crypt PASS with md5 algorithm") \
  1443. "\n -h HOME Home directory (default .)" \
  1444. "\n -e STRING HTML encode STRING" \
  1445. "\n -d STRING URL decode STRING" \
  1446. #define hwclock_trivial_usage \
  1447. USE_GETOPT_LONG( \
  1448. "[-r|--show] [-s|--hctosys] [-w|--systohc]" \
  1449. " [-l|--localtime] [-u|--utc]" \
  1450. " [-f FILE]" \
  1451. ) \
  1452. SKIP_GETOPT_LONG( \
  1453. "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
  1454. )
  1455. #define hwclock_full_usage "\n\n" \
  1456. "Query and set hardware clock (RTC)\n" \
  1457. "\nOptions:" \
  1458. "\n -r Show hardware clock time" \
  1459. "\n -s Set system time from hardware clock" \
  1460. "\n -w Set hardware clock to system time" \
  1461. "\n -u Hardware clock is in UTC" \
  1462. "\n -l Hardware clock is in local time" \
  1463. "\n -f FILE Use specified device (e.g. /dev/rtc2)" \
  1464. #define id_trivial_usage \
  1465. "[OPTIONS]... [USER]"
  1466. #define id_full_usage "\n\n" \
  1467. "Print information about USER or the current user\n" \
  1468. "\nOptions:" \
  1469. USE_SELINUX( \
  1470. "\n -Z Print the security context" \
  1471. ) \
  1472. "\n -g Print group ID" \
  1473. "\n -u Print user ID" \
  1474. "\n -n Print name instead of a number" \
  1475. "\n -r Print real user ID instead of effective ID" \
  1476. #define id_example_usage \
  1477. "$ id\n" \
  1478. "uid=1000(andersen) gid=1000(andersen)\n"
  1479. #define ifconfig_trivial_usage \
  1480. USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
  1481. #define ifconfig_full_usage "\n\n" \
  1482. "Configure a network interface\n" \
  1483. "\nOptions:" \
  1484. "\n" \
  1485. USE_FEATURE_IPV6( \
  1486. " [add ADDRESS[/PREFIXLEN]]\n") \
  1487. USE_FEATURE_IPV6( \
  1488. " [del ADDRESS[/PREFIXLEN]]\n") \
  1489. " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
  1490. " [netmask ADDRESS] [dstaddr ADDRESS]\n" \
  1491. USE_FEATURE_IFCONFIG_SLIP( \
  1492. " [outfill NN] [keepalive NN]\n") \
  1493. " " USE_FEATURE_IFCONFIG_HW("[hw ether" USE_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
  1494. " [[-]trailers] [[-]arp] [[-]allmulti]\n" \
  1495. " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
  1496. USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
  1497. " [mem_start NN] [io_addr NN] [irq NN]\n") \
  1498. " [up|down] ..."
  1499. #define ifenslave_trivial_usage \
  1500. "[-cdf] master-iface <slave-iface...>"
  1501. #define ifenslave_full_usage "\n\n" \
  1502. "Configure network interfaces for parallel routing\n" \
  1503. "\nOptions:" \
  1504. "\n -c, --change-active Change active slave" \
  1505. "\n -d, --detach Remove slave interface from bonding device" \
  1506. "\n -f, --force Force, even if interface is not Ethernet" \
  1507. /* "\n -r, --receive-slave Create a receive-only slave" */
  1508. #define ifenslave_example_usage \
  1509. "To create a bond device, simply follow these three steps :\n" \
  1510. "- ensure that the required drivers are properly loaded :\n" \
  1511. " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \
  1512. "- assign an IP address to the bond device :\n" \
  1513. " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \
  1514. "- attach all the interfaces you need to the bond device :\n" \
  1515. " # ifenslave bond0 eth0 eth1 eth2\n" \
  1516. " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \
  1517. " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \
  1518. " To detach a dead interface without setting the bond device down :\n" \
  1519. " # ifenslave -d bond0 eth1\n\n" \
  1520. " To set the bond device down and automatically release all the slaves :\n" \
  1521. " # ifconfig bond0 down\n\n" \
  1522. " To change active slave :\n" \
  1523. " # ifenslave -c bond0 eth0\n" \
  1524. #define ifup_trivial_usage \
  1525. "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
  1526. #define ifup_full_usage "\n\n" \
  1527. "Options:" \
  1528. "\n -a De/configure all interfaces automatically" \
  1529. "\n -i FILE Use FILE for interface definitions" \
  1530. "\n -n Print out what would happen, but don't do it" \
  1531. USE_FEATURE_IFUPDOWN_MAPPING( \
  1532. "\n (note: doesn't disable mappings)" \
  1533. "\n -m Don't run any mappings" \
  1534. ) \
  1535. "\n -v Print out what would happen before doing it" \
  1536. "\n -f Force de/configuration" \
  1537. #define ifdown_trivial_usage \
  1538. "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
  1539. #define ifdown_full_usage "\n\n" \
  1540. "Options:" \
  1541. "\n -a De/configure all interfaces automatically" \
  1542. "\n -i FILE Use FILE for interface definitions" \
  1543. "\n -n Print out what would happen, but don't do it" \
  1544. USE_FEATURE_IFUPDOWN_MAPPING( \
  1545. "\n (note: doesn't disable mappings)" \
  1546. "\n -m Don't run any mappings" \
  1547. ) \
  1548. "\n -v Print out what would happen before doing it" \
  1549. "\n -f Force de/configuration" \
  1550. #define inetd_trivial_usage \
  1551. "[-fe] [-q N] [-R N] [CONFFILE]"
  1552. #define inetd_full_usage "\n\n" \
  1553. "Listen for network connections and launch programs\n" \
  1554. "\nOptions:" \
  1555. "\n -f Run in foreground" \
  1556. "\n -e Log to stderr" \
  1557. "\n -q N Socket listen queue (default: 128)" \
  1558. "\n -R N Pause services after N connects/min" \
  1559. "\n (default: 0 - disabled)" \
  1560. #define init_trivial_usage \
  1561. ""
  1562. #define init_full_usage "\n\n" \
  1563. "Init is the parent of all processes"
  1564. #define init_notes_usage \
  1565. "This version of init is designed to be run only by the kernel.\n" \
  1566. "\n" \
  1567. "BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
  1568. "the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
  1569. "runlevels, use sysvinit.\n" \
  1570. "\n" \
  1571. "BusyBox init works just fine without an inittab. If no inittab is found,\n" \
  1572. "it has the following default behavior:\n" \
  1573. "\n" \
  1574. " ::sysinit:/etc/init.d/rcS\n" \
  1575. " ::askfirst:/bin/sh\n" \
  1576. " ::ctrlaltdel:/sbin/reboot\n" \
  1577. " ::shutdown:/sbin/swapoff -a\n" \
  1578. " ::shutdown:/bin/umount -a -r\n" \
  1579. " ::restart:/sbin/init\n" \
  1580. "\n" \
  1581. "if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
  1582. "\n" \
  1583. " tty2::askfirst:/bin/sh\n" \
  1584. " tty3::askfirst:/bin/sh\n" \
  1585. " tty4::askfirst:/bin/sh\n" \
  1586. "\n" \
  1587. "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
  1588. "\n" \
  1589. " <id>:<runlevels>:<action>:<process>\n" \
  1590. "\n" \
  1591. " <id>:\n" \
  1592. "\n" \
  1593. " WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
  1594. " The id field is used by BusyBox init to specify the controlling tty for\n" \
  1595. " the specified process to run on. The contents of this field are\n" \
  1596. " appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
  1597. " be unique, although if it isn't you may have strange results. If this\n" \
  1598. " field is left blank, the controlling tty is set to the console. Also\n" \
  1599. " note that if BusyBox detects that a serial console is in use, then only\n" \
  1600. " entries whose controlling tty is either the serial console or /dev/null\n" \
  1601. " will be run. BusyBox init does nothing with utmp. We don't need no\n" \
  1602. " stinkin' utmp.\n" \
  1603. "\n" \
  1604. " <runlevels>:\n" \
  1605. "\n" \
  1606. " The runlevels field is completely ignored.\n" \
  1607. "\n" \
  1608. " <action>:\n" \
  1609. "\n" \
  1610. " Valid actions include: sysinit, respawn, askfirst, wait,\n" \
  1611. " once, restart, ctrlaltdel, and shutdown.\n" \
  1612. "\n" \
  1613. " The available actions can be classified into two groups: actions\n" \
  1614. " that are run only once, and actions that are re-run when the specified\n" \
  1615. " process exits.\n" \
  1616. "\n" \
  1617. " Run only-once actions:\n" \
  1618. "\n" \
  1619. " 'sysinit' is the first item run on boot. init waits until all\n" \
  1620. " sysinit actions are completed before continuing. Following the\n" \
  1621. " completion of all sysinit actions, all 'wait' actions are run.\n" \
  1622. " 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
  1623. " the specified task completes. 'once' actions are asynchronous,\n" \
  1624. " therefore, init does not wait for them to complete. 'restart' is\n" \
  1625. " the action taken to restart the init process. By default this should\n" \
  1626. " simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
  1627. " can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
  1628. " actions are run when the system detects that someone on the system\n" \
  1629. " console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
  1630. " wants to run 'reboot' at this point to cause the system to reboot.\n" \
  1631. " Finally the 'shutdown' action specifies the actions to taken when\n" \
  1632. " init is told to reboot. Unmounting filesystems and disabling swap\n" \
  1633. " is a very good here.\n" \
  1634. "\n" \
  1635. " Run repeatedly actions:\n" \
  1636. "\n" \
  1637. " 'respawn' actions are run after the 'once' actions. When a process\n" \
  1638. " started with a 'respawn' action exits, init automatically restarts\n" \
  1639. " it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
  1640. " respawning out of control. The 'askfirst' actions acts just like\n" \
  1641. " respawn, except that before running the specified process it\n" \
  1642. " displays the line \"Please press Enter to activate this console.\"\n" \
  1643. " and then waits for the user to press enter before starting the\n" \
  1644. " specified process.\n" \
  1645. "\n" \
  1646. " Unrecognized actions (like initdefault) will cause init to emit an\n" \
  1647. " error message, and then go along with its business. All actions are\n" \
  1648. " run in the order they appear in /etc/inittab.\n" \
  1649. "\n" \
  1650. " <process>:\n" \
  1651. "\n" \
  1652. " Specifies the process to be executed and its command line.\n" \
  1653. "\n" \
  1654. "Example /etc/inittab file:\n" \
  1655. "\n" \
  1656. " # This is run first except when booting in single-user mode\n" \
  1657. " #\n" \
  1658. " ::sysinit:/etc/init.d/rcS\n" \
  1659. " \n" \
  1660. " # /bin/sh invocations on selected ttys\n" \
  1661. " #\n" \
  1662. " # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
  1663. " ::askfirst:-/bin/sh\n" \
  1664. " # Start an \"askfirst\" shell on /dev/tty2-4\n" \
  1665. " tty2::askfirst:-/bin/sh\n" \
  1666. " tty3::askfirst:-/bin/sh\n" \
  1667. " tty4::askfirst:-/bin/sh\n" \
  1668. " \n" \
  1669. " # /sbin/getty invocations for selected ttys\n" \
  1670. " #\n" \
  1671. " tty4::respawn:/sbin/getty 38400 tty4\n" \
  1672. " tty5::respawn:/sbin/getty 38400 tty5\n" \
  1673. " \n" \
  1674. " \n" \
  1675. " # Example of how to put a getty on a serial line (for a terminal)\n" \
  1676. " #\n" \
  1677. " #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
  1678. " #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
  1679. " #\n" \
  1680. " # Example how to put a getty on a modem line\n" \
  1681. " #::respawn:/sbin/getty 57600 ttyS2\n" \
  1682. " \n" \
  1683. " # Stuff to do when restarting the init process\n" \
  1684. " ::restart:/sbin/init\n" \
  1685. " \n" \
  1686. " # Stuff to do before rebooting\n" \
  1687. " ::ctrlaltdel:/sbin/reboot\n" \
  1688. " ::shutdown:/bin/umount -a -r\n" \
  1689. " ::shutdown:/sbin/swapoff -a\n"
  1690. #define inotifyd_trivial_usage \
  1691. "/user/space/agent dir/or/file/being/watched[:mask] ..."
  1692. #define inotifyd_full_usage "\n\n" \
  1693. "Spawn userspace agent on filesystem changes." \
  1694. "\nWhen a filesystem event matching the mask occurs" \
  1695. "\non specified file/directory an userspace agent is spawned" \
  1696. "\nwith the parameters:" \
  1697. "\n1. actual event(s)" \
  1698. "\n2. file/directory name" \
  1699. "\n3. name of subfile (if any), in case of watching a directory" \
  1700. "\n" \
  1701. "\n a File is accessed" \
  1702. "\n c File is modified" \
  1703. "\n e Metadata changed" \
  1704. "\n w Writtable file is closed" \
  1705. "\n 0 Unwrittable file is closed" \
  1706. "\n r File is opened" \
  1707. "\n m File is moved from X" \
  1708. "\n y File is moved to Y" \
  1709. "\n n Subfile is created" \
  1710. "\n d Subfile is deleted" \
  1711. "\n D Self is deleted" \
  1712. "\n M Self is moved" \
  1713. #define insmod_trivial_usage \
  1714. USE_FEATURE_2_4_MODULES("[OPTION]... ") "MODULE [symbol=value]..."
  1715. #define insmod_full_usage "\n\n" \
  1716. "Load the specified kernel modules into the kernel" \
  1717. USE_FEATURE_2_4_MODULES( "\n" \
  1718. "\nOptions:" \
  1719. "\n -f Force module to load into the wrong kernel version" \
  1720. "\n -k Make module autoclean-able" \
  1721. "\n -v Verbose" \
  1722. "\n -q Quiet" \
  1723. "\n -L Lock to prevent simultaneous loads of a module" \
  1724. USE_FEATURE_INSMOD_LOAD_MAP( \
  1725. "\n -m Output load map to stdout" \
  1726. ) \
  1727. "\n -o NAME Set internal module name to NAME" \
  1728. "\n -x Do not export externs" \
  1729. )
  1730. #define install_trivial_usage \
  1731. "[-cgmops] [sources] dest|directory"
  1732. #define install_full_usage "\n\n" \
  1733. "Copy files and set attributes\n" \
  1734. "\nOptions:" \
  1735. "\n -c Copy the file, default" \
  1736. "\n -d Create directories" \
  1737. "\n -g Set group ownership" \
  1738. "\n -m Set permissions" \
  1739. "\n -o Set ownership" \
  1740. "\n -p Preserve date" \
  1741. "\n -s Strip symbol tables" \
  1742. USE_SELINUX( \
  1743. "\n -Z Set security context of copy" \
  1744. )
  1745. /* would need to make the " | " optional depending on more than one selected: */
  1746. #define ip_trivial_usage \
  1747. "[OPTIONS] {" \
  1748. USE_FEATURE_IP_ADDRESS("address | ") \
  1749. USE_FEATURE_IP_ROUTE("route | ") \
  1750. USE_FEATURE_IP_LINK("link | ") \
  1751. USE_FEATURE_IP_TUNNEL("tunnel | ") \
  1752. USE_FEATURE_IP_RULE("rule") \
  1753. "} {COMMAND}"
  1754. #define ip_full_usage "\n\n" \
  1755. "ip [OPTIONS] OBJECT {COMMAND}\n" \
  1756. "where OBJECT := {" \
  1757. USE_FEATURE_IP_ADDRESS("address | ") \
  1758. USE_FEATURE_IP_ROUTE("route | ") \
  1759. USE_FEATURE_IP_LINK("link | ") \
  1760. USE_FEATURE_IP_TUNNEL("tunnel | ") \
  1761. USE_FEATURE_IP_RULE("rule") \
  1762. "}\n" \
  1763. "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
  1764. #define ipaddr_trivial_usage \
  1765. "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
  1766. " [dev STRING] [to PREFIX] }"
  1767. #define ipaddr_full_usage "\n\n" \
  1768. "ipaddr {add|delete} IFADDR dev STRING\n" \
  1769. "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n" \
  1770. " [to PREFIX] [label PATTERN]\n" \
  1771. " IFADDR := PREFIX | ADDR peer PREFIX\n" \
  1772. " [broadcast ADDR] [anycast ADDR]\n" \
  1773. " [label STRING] [scope SCOPE-ID]\n" \
  1774. " SCOPE-ID := [host | link | global | NUMBER]" \
  1775. #define ipcalc_trivial_usage \
  1776. "[OPTION]... ADDRESS[[/]NETMASK] [NETMASK]"
  1777. #define ipcalc_full_usage "\n\n" \
  1778. "Calculate IP network settings from a IP address\n" \
  1779. "\nOptions:" \
  1780. USE_FEATURE_IPCALC_LONG_OPTIONS( \
  1781. "\n -b,--broadcast Display calculated broadcast address" \
  1782. "\n -n,--network Display calculated network address" \
  1783. "\n -m,--netmask Display default netmask for IP" \
  1784. USE_FEATURE_IPCALC_FANCY( \
  1785. "\n -p,--prefix Display the prefix for IP/NETMASK" \
  1786. "\n -h,--hostname Display first resolved host name" \
  1787. "\n -s,--silent Don't ever display error messages" \
  1788. ) \
  1789. ) \
  1790. SKIP_FEATURE_IPCALC_LONG_OPTIONS( \
  1791. "\n -b Display calculated broadcast address" \
  1792. "\n -n Display calculated network address" \
  1793. "\n -m Display default netmask for IP" \
  1794. USE_FEATURE_IPCALC_FANCY( \
  1795. "\n -p Display the prefix for IP/NETMASK" \
  1796. "\n -h Display first resolved host name" \
  1797. "\n -s Don't ever display error messages" \
  1798. ) \
  1799. )
  1800. #define ipcrm_trivial_usage \
  1801. "[-MQS key] [-mqs id]"
  1802. #define ipcrm_full_usage "\n\n" \
  1803. "Upper-case options MQS remove an object by shmkey value.\n" \
  1804. "Lower-case options remove an object by shmid value.\n" \
  1805. "\nOptions:" \
  1806. "\n -mM Remove memory segment after last detach" \
  1807. "\n -qQ Remove message queue" \
  1808. "\n -sS Remove semaphore" \
  1809. #define ipcs_trivial_usage \
  1810. "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
  1811. #define ipcs_full_usage "\n\n" \
  1812. " -i Show specific resource" \
  1813. "\nResource specification:" \
  1814. "\n -m Shared memory segments" \
  1815. "\n -q Message queues" \
  1816. "\n -s Semaphore arrays" \
  1817. "\n -a All (default)" \
  1818. "\nOutput format:" \
  1819. "\n -t Time" \
  1820. "\n -c Creator" \
  1821. "\n -p Pid" \
  1822. "\n -l Limits" \
  1823. "\n -u Summary" \
  1824. #define iplink_trivial_usage \
  1825. "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
  1826. #define iplink_full_usage "\n\n" \
  1827. "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \
  1828. " dynamic { on | off } |\n" \
  1829. " mtu MTU }\n" \
  1830. "iplink show [DEVICE]" \
  1831. #define iproute_trivial_usage \
  1832. "{ list | flush | { add | del | change | append |\n" \
  1833. " replace | monitor } ROUTE }"
  1834. #define iproute_full_usage "\n\n" \
  1835. "iproute { list | flush } SELECTOR\n" \
  1836. "iproute get ADDRESS [from ADDRESS iif STRING]\n" \
  1837. " [oif STRING] [tos TOS]\n" \
  1838. "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
  1839. " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
  1840. " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]" \
  1841. #define iprule_trivial_usage \
  1842. "{[list | add | del] RULE}"
  1843. #define iprule_full_usage "\n\n" \
  1844. "iprule [list | add | del] SELECTOR ACTION\n" \
  1845. " SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \
  1846. " [dev STRING] [pref NUMBER]\n" \
  1847. " ACTION := [table TABLE_ID] [nat ADDRESS]\n" \
  1848. " [prohibit | reject | unreachable]\n" \
  1849. " [realms [SRCREALM/]DSTREALM]\n" \
  1850. " TABLE_ID := [local | main | default | NUMBER]" \
  1851. #define iptunnel_trivial_usage \
  1852. "{ add | change | del | show } [NAME]\n" \
  1853. " [mode { ipip | gre | sit }]\n" \
  1854. " [remote ADDR] [local ADDR] [ttl TTL]"
  1855. #define iptunnel_full_usage "\n\n" \
  1856. "iptunnel { add | change | del | show } [NAME]\n" \
  1857. " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \
  1858. " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
  1859. " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
  1860. #define kbd_mode_trivial_usage \
  1861. "[-a|k|s|u]"
  1862. #define kbd_mode_full_usage "\n\n" \
  1863. "Report or set the keyboard mode\n" \
  1864. "\nOptions set mode:" \
  1865. "\n -a Default (ASCII)" \
  1866. "\n -k Medium-raw (keyboard)" \
  1867. "\n -s Raw (scancode)" \
  1868. "\n -u Unicode (utf-8)" \
  1869. #define kill_trivial_usage \
  1870. "[-l] [-signal] process-id..."
  1871. #define kill_full_usage "\n\n" \
  1872. "Send a signal (default is TERM) to the specified process(es)\n" \
  1873. "\nOptions:" \
  1874. "\n -l List all signal names and numbers" \
  1875. #define kill_example_usage \
  1876. "$ ps | grep apache\n" \
  1877. "252 root root S [apache]\n" \
  1878. "263 www-data www-data S [apache]\n" \
  1879. "264 www-data www-data S [apache]\n" \
  1880. "265 www-data www-data S [apache]\n" \
  1881. "266 www-data www-data S [apache]\n" \
  1882. "267 www-data www-data S [apache]\n" \
  1883. "$ kill 252\n"
  1884. #define killall_trivial_usage \
  1885. "[-l] [-q] [-signal] process-name..."
  1886. #define killall_full_usage "\n\n" \
  1887. "Send a signal (default is TERM) to the specified process(es)\n" \
  1888. "\nOptions:" \
  1889. "\n -l List all signal names and numbers" \
  1890. "\n -q Do not complain if no processes were killed" \
  1891. #define killall_example_usage \
  1892. "$ killall apache\n"
  1893. #define killall5_trivial_usage \
  1894. "[-l] [-signal]"
  1895. #define killall5_full_usage "\n\n" \
  1896. "Send a signal (default is TERM) to all processes outside current session\n" \
  1897. "\nOptions:" \
  1898. "\n -l List all signal names and numbers" \
  1899. #define klogd_trivial_usage \
  1900. "[-c N] [-n]"
  1901. #define klogd_full_usage "\n\n" \
  1902. "Kernel logger\n" \
  1903. "\nOptions:" \
  1904. "\n -c N Only messages with level < N are printed to console" \
  1905. "\n -n Run in foreground" \
  1906. #define length_trivial_usage \
  1907. "STRING"
  1908. #define length_full_usage "\n\n" \
  1909. "Print STRING's length"
  1910. #define length_example_usage \
  1911. "$ length Hello\n" \
  1912. "5\n"
  1913. #define less_trivial_usage \
  1914. "[-EMNmh~?] [FILE...]"
  1915. #define less_full_usage "\n\n" \
  1916. "View a file or list of files. The position within files can be\n" \
  1917. "changed, and files can be manipulated in various ways.\n" \
  1918. "\nOptions:" \
  1919. "\n -E Quit once the end of a file is reached" \
  1920. "\n -M,-m Display a status line containing the line numbers" \
  1921. "\n and percentage through the file" \
  1922. "\n -N Prefix line numbers to each line" \
  1923. "\n -~ Suppress ~s displayed past the end of the file" \
  1924. #define linux32_trivial_usage NOUSAGE_STR
  1925. #define linux32_full_usage ""
  1926. #define linux64_trivial_usage NOUSAGE_STR
  1927. #define linux64_full_usage ""
  1928. #define linuxrc_trivial_usage NOUSAGE_STR
  1929. #define linuxrc_full_usage ""
  1930. #define setarch_trivial_usage \
  1931. "personality program [args...]"
  1932. #define setarch_full_usage "\n\n" \
  1933. "Personality may be:\n" \
  1934. " linux32 Set 32bit uname emulation\n" \
  1935. " linux64 Set 64bit uname emulation" \
  1936. #define ln_trivial_usage \
  1937. "[OPTION] TARGET... LINK_NAME|DIRECTORY"
  1938. #define ln_full_usage "\n\n" \
  1939. "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \
  1940. "Use '--' to indicate that all following arguments are non-options.\n" \
  1941. "\nOptions:" \
  1942. "\n -s Make symlinks instead of hardlinks" \
  1943. "\n -f Remove existing destination files" \
  1944. "\n -n Don't dereference symlinks - treat like normal file" \
  1945. "\n -b Make a backup of the target (if exists) before link operation" \
  1946. "\n -S suf Use suffix instead of ~ when making backup files" \
  1947. #define ln_example_usage \
  1948. "$ ln -s BusyBox /tmp/ls\n" \
  1949. "$ ls -l /tmp/ls\n" \
  1950. "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
  1951. #define load_policy_trivial_usage NOUSAGE_STR
  1952. #define load_policy_full_usage ""
  1953. #define loadfont_trivial_usage \
  1954. "< font"
  1955. #define loadfont_full_usage "\n\n" \
  1956. "Load a console font from standard input"
  1957. #define loadfont_example_usage \
  1958. "$ loadfont < /etc/i18n/fontname\n"
  1959. #define loadkmap_trivial_usage \
  1960. "< keymap"
  1961. #define loadkmap_full_usage "\n\n" \
  1962. "Load a binary keyboard translation table from standard input"
  1963. #define loadkmap_example_usage \
  1964. "$ loadkmap < /etc/i18n/lang-keymap\n"
  1965. #define logger_trivial_usage \
  1966. "[OPTION]... [MESSAGE]"
  1967. #define logger_full_usage "\n\n" \
  1968. "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n" \
  1969. "\nOptions:" \
  1970. "\n -s Log to stderr as well as the system log" \
  1971. "\n -t TAG Log using the specified tag (defaults to user name)" \
  1972. "\n -p PRIO Priority (numeric or facility.level pair)" \
  1973. #define logger_example_usage \
  1974. "$ logger \"hello\"\n"
  1975. #define login_trivial_usage \
  1976. "[-p] [-h HOST] [[-f] USER]"
  1977. #define login_full_usage "\n\n" \
  1978. "Begin a new session on the system\n" \
  1979. "\nOptions:" \
  1980. "\n -f Do not authenticate (user already authenticated)" \
  1981. "\n -h Name of the remote host" \
  1982. "\n -p Preserve environment" \
  1983. #define logname_trivial_usage \
  1984. ""
  1985. #define logname_full_usage "\n\n" \
  1986. "Print the name of the current user"
  1987. #define logname_example_usage \
  1988. "$ logname\n" \
  1989. "root\n"
  1990. #define logread_trivial_usage \
  1991. "[OPTION]..."
  1992. #define logread_full_usage "\n\n" \
  1993. "Show messages in syslogd's circular buffer\n" \
  1994. "\nOptions:" \
  1995. "\n -f Output data as log grows" \
  1996. #define losetup_trivial_usage \
  1997. "[-o OFS] LOOPDEV FILE - associate loop devices\n" \
  1998. " losetup -d LOOPDEV - disassociate\n" \
  1999. " losetup [-f] - show"
  2000. #define losetup_full_usage "\n\n" \
  2001. "Options:" \
  2002. "\n -o OFS Start OFS bytes into FILE" \
  2003. "\n -f Show first free loop device" \
  2004. #define losetup_notes_usage \
  2005. "No arguments will display all current associations.\n" \
  2006. "One argument (losetup /dev/loop1) will display the current association\n" \
  2007. "(if any), or disassociate it (with -d). The display shows the offset\n" \
  2008. "and filename of the file the loop device is currently bound to.\n\n" \
  2009. "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
  2010. "with an optional offset (-o 12345). Encryption is not yet supported.\n" \
  2011. "losetup -f will show the first loop free loop device\n\n"
  2012. #define lpd_trivial_usage \
  2013. "SPOOLDIR [HELPER [ARGS...]]"
  2014. #define lpd_full_usage "\n\n" \
  2015. "SPOOLDIR must contain (symlinks to) device nodes or directories" \
  2016. "\nwith names matching print queue names. In the first case, jobs are" \
  2017. "\nsent directly to the device. Otherwise each job is stored in queue" \
  2018. "\ndirectory and HELPER program is called. Name of file to print" \
  2019. "\nis passed in $DATAFILE variable." \
  2020. "\nExample:" \
  2021. "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \
  2022. #define lpq_trivial_usage \
  2023. "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]"
  2024. #define lpq_full_usage "\n\n" \
  2025. "Options:" \
  2026. "\n -P lp service to connect to (else uses $PRINTER)" \
  2027. "\n -d Delete jobs" \
  2028. "\n -f Force any waiting job to be printed" \
  2029. "\n -s Short display" \
  2030. #define lpr_trivial_usage \
  2031. "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE...]"
  2032. /* -C CLASS exists too, not shown.
  2033. * CLASS is supposed to be printed on banner page, if one is requested */
  2034. #define lpr_full_usage "\n\n" \
  2035. "Options:" \
  2036. "\n -P lp service to connect to (else uses $PRINTER)"\
  2037. "\n -m Send mail on completion" \
  2038. "\n -h Print banner page too" \
  2039. "\n -V Verbose" \
  2040. #define ls_trivial_usage \
  2041. "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
  2042. USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
  2043. USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
  2044. USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
  2045. USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
  2046. USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \
  2047. USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \
  2048. USE_SELINUX("K") "] [filenames...]"
  2049. #define ls_full_usage "\n\n" \
  2050. "List directory contents\n" \
  2051. "\nOptions:" \
  2052. "\n -1 List files in a single column" \
  2053. "\n -A Do not list implied . and .." \
  2054. "\n -a Do not hide entries starting with ." \
  2055. "\n -C List entries by columns" \
  2056. USE_FEATURE_LS_TIMESTAMPS( \
  2057. "\n -c With -l: show ctime") \
  2058. USE_FEATURE_LS_COLOR( \
  2059. "\n --color[={always,never,auto}] Control coloring") \
  2060. "\n -d List directory entries instead of contents" \
  2061. USE_FEATURE_LS_TIMESTAMPS( \
  2062. "\n -e List both full date and full time") \
  2063. USE_FEATURE_LS_FILETYPES( \
  2064. "\n -F Append indicator (one of */=@|) to entries") \
  2065. "\n -i List the i-node for each file" \
  2066. "\n -l Use a long listing format" \
  2067. "\n -n List numeric UIDs and GIDs instead of names" \
  2068. USE_FEATURE_LS_FILETYPES( \
  2069. "\n -p Append indicator (one of /=@|) to entries") \
  2070. USE_FEATURE_LS_FOLLOWLINKS( \
  2071. "\n -L List entries pointed to by symlinks") \
  2072. USE_FEATURE_LS_RECURSIVE( \
  2073. "\n -R List subdirectories recursively") \
  2074. USE_FEATURE_LS_SORTFILES( \
  2075. "\n -r Sort the listing in reverse order") \
  2076. USE_FEATURE_LS_SORTFILES( \
  2077. "\n -S Sort the listing by file size") \
  2078. "\n -s List the size of each file, in blocks" \
  2079. USE_FEATURE_AUTOWIDTH( \
  2080. "\n -T NUM Assume Tabstop every NUM columns") \
  2081. USE_FEATURE_LS_TIMESTAMPS( \
  2082. "\n -t With -l: show modification time") \
  2083. USE_FEATURE_LS_TIMESTAMPS( \
  2084. "\n -u With -l: show access time") \
  2085. USE_FEATURE_LS_SORTFILES( \
  2086. "\n -v Sort the listing by version") \
  2087. USE_FEATURE_AUTOWIDTH( \
  2088. "\n -w NUM Assume the terminal is NUM columns wide") \
  2089. "\n -x List entries by lines instead of by columns" \
  2090. USE_FEATURE_LS_SORTFILES( \
  2091. "\n -X Sort the listing by extension") \
  2092. USE_FEATURE_HUMAN_READABLE( \
  2093. "\n -h Print sizes in human readable format (e.g., 1K 243M 2G)") \
  2094. USE_SELINUX( \
  2095. "\n -k Print security context") \
  2096. USE_SELINUX( \
  2097. "\n -K Print security context in long format") \
  2098. USE_SELINUX( \
  2099. "\n -Z Print security context and permission") \
  2100. #define lsattr_trivial_usage \
  2101. "[-Radlv] [files...]"
  2102. #define lsattr_full_usage "\n\n" \
  2103. "List file attributes on an ext2 fs\n" \
  2104. "\nOptions:" \
  2105. "\n -R Recursively list subdirectories" \
  2106. "\n -a Do not hide entries starting with ." \
  2107. "\n -d List directory entries instead of contents" \
  2108. "\n -l Print long flag names" \
  2109. "\n -v List the file's version/generation number" \
  2110. #define lsmod_trivial_usage \
  2111. ""
  2112. #define lsmod_full_usage "\n\n" \
  2113. "List the currently loaded kernel modules"
  2114. #if ENABLE_FEATURE_MAKEDEVS_LEAF
  2115. #define makedevs_trivial_usage \
  2116. "NAME TYPE MAJOR MINOR FIRST LAST [s]"
  2117. #define makedevs_full_usage "\n\n" \
  2118. "Create a range of block or character special files" \
  2119. "\n" \
  2120. "\nTYPE is:" \
  2121. "\n b Block device" \
  2122. "\n c Character device" \
  2123. "\n f FIFO, MAJOR and MINOR are ignored" \
  2124. "\n" \
  2125. "\nFIRST..LAST specify numbers appended to NAME." \
  2126. "\nIf 's' is the last argument, the base device is created as well." \
  2127. "\n" \
  2128. "\nExamples:" \
  2129. "\n makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63" \
  2130. "\n makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
  2131. #define makedevs_example_usage \
  2132. "# makedevs /dev/ttyS c 4 66 2 63\n" \
  2133. "[creates ttyS2-ttyS63]\n" \
  2134. "# makedevs /dev/hda b 3 0 0 8 s\n" \
  2135. "[creates hda,hda1-hda8]\n"
  2136. #endif
  2137. #if ENABLE_FEATURE_MAKEDEVS_TABLE
  2138. #define makedevs_trivial_usage \
  2139. "[-d device_table] rootdir"
  2140. #define makedevs_full_usage "\n\n" \
  2141. "Create a range of special files as specified in a device table.\n" \
  2142. "Device table entries take the form of:\n" \
  2143. "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
  2144. "Where name is the file name, type can be one of:\n" \
  2145. " f Regular file\n" \
  2146. " d Directory\n" \
  2147. " c Character device\n" \
  2148. " b Block device\n" \
  2149. " p Fifo (named pipe)\n" \
  2150. "uid is the user id for the target file, gid is the group id for the\n" \
  2151. "target file. The rest of the entries (major, minor, etc) apply to\n" \
  2152. "to device special files. A '-' may be used for blank entries."
  2153. #define makedevs_example_usage \
  2154. "For example:\n" \
  2155. "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
  2156. "/dev d 755 0 0 - - - - -\n" \
  2157. "/dev/console c 666 0 0 5 1 - - -\n" \
  2158. "/dev/null c 666 0 0 1 3 0 0 -\n" \
  2159. "/dev/zero c 666 0 0 1 5 0 0 -\n" \
  2160. "/dev/hda b 640 0 0 3 0 0 0 -\n" \
  2161. "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \
  2162. "Will Produce:\n" \
  2163. "/dev\n" \
  2164. "/dev/console\n" \
  2165. "/dev/null\n" \
  2166. "/dev/zero\n" \
  2167. "/dev/hda\n" \
  2168. "/dev/hda[0-15]\n"
  2169. #endif
  2170. #define man_trivial_usage \
  2171. "[OPTION]... [MANPAGE]..."
  2172. #define man_full_usage "\n\n" \
  2173. "Format and display manual page\n" \
  2174. "\nOptions:" \
  2175. "\n -a Display all pages" \
  2176. "\n -w Show page locations" \
  2177. #define matchpathcon_trivial_usage \
  2178. "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
  2179. #define matchpathcon_full_usage "\n\n" \
  2180. " -n Do not display path" \
  2181. "\n -N Do not use translations" \
  2182. "\n -f Use alternate file_context file" \
  2183. "\n -p Use prefix to speed translations" \
  2184. "\n -V Verify file context on disk matches defaults" \
  2185. #define md5sum_trivial_usage \
  2186. "[OPTION] [FILEs...]" \
  2187. USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
  2188. #define md5sum_full_usage "\n\n" \
  2189. "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
  2190. USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  2191. "\nOptions:" \
  2192. "\n -c Check MD5 sums against given list" \
  2193. "\n -s Don't output anything, status code shows success" \
  2194. "\n -w Warn about improperly formatted MD5 checksum lines") \
  2195. #define md5sum_example_usage \
  2196. "$ md5sum < busybox\n" \
  2197. "6fd11e98b98a58f64ff3398d7b324003\n" \
  2198. "$ md5sum busybox\n" \
  2199. "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
  2200. "$ md5sum -c -\n" \
  2201. "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
  2202. "busybox: OK\n" \
  2203. "^D\n"
  2204. #define mdev_trivial_usage \
  2205. "[-s]"
  2206. #define mdev_full_usage "\n\n" \
  2207. " -s Scan /sys and populate /dev during system boot\n" \
  2208. "\n" \
  2209. "Called with no options (via hotplug) it uses environment variables\n" \
  2210. "to determine which device to add/remove."
  2211. #define mdev_notes_usage "" \
  2212. USE_FEATURE_MDEV_CONFIG( \
  2213. "The mdev config file contains lines that look like:\n" \
  2214. " hd[a-z][0-9]* 0:3 660\n\n" \
  2215. "That's device name (with regex match), uid:gid, and permissions.\n\n" \
  2216. USE_FEATURE_MDEV_EXEC( \
  2217. "Optionally, that can be followed (on the same line) by a special character\n" \
  2218. "and a command line to run after creating/before deleting the corresponding\n" \
  2219. "device(s). The environment variable $MDEV indicates the active device node\n" \
  2220. "(which is useful if it's a regex match). For example:\n\n" \
  2221. " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" \
  2222. "The special characters are @ (run after creating), $ (run before deleting),\n" \
  2223. "and * (run both after creating and before deleting). The commands run in\n" \
  2224. "the /dev directory, and use system() which calls /bin/sh.\n\n" \
  2225. ) \
  2226. "Config file parsing stops on the first matching line. If no config\n" \
  2227. "entry is matched, devices are created with default 0:0 660. (Make\n" \
  2228. "the last line match .* to override this.)\n\n" \
  2229. )
  2230. #define mesg_trivial_usage \
  2231. "[y|n]"
  2232. #define mesg_full_usage "\n\n" \
  2233. "Control write access to your terminal\n" \
  2234. " y Allow write access to your terminal\n" \
  2235. " n Disallow write access to your terminal"
  2236. #define microcom_trivial_usage \
  2237. "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
  2238. #define microcom_full_usage "\n\n" \
  2239. "Copy bytes for stdin to TTY and from TTY to stdout\n" \
  2240. "\nOptions:" \
  2241. "\n -d Wait up to DELAY ms for TTY output before sending every" \
  2242. "\n next byte to it" \
  2243. "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \
  2244. "\n -s Set serial line to SPEED" \
  2245. "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \
  2246. #define mkdir_trivial_usage \
  2247. "[OPTION] DIRECTORY..."
  2248. #define mkdir_full_usage "\n\n" \
  2249. "Create DIRECTORY\n" \
  2250. "\nOptions:" \
  2251. "\n -m Set permission mode (as in chmod), not rwxrwxrwx - umask" \
  2252. "\n -p No error if existing, make parent directories as needed" \
  2253. USE_SELINUX( \
  2254. "\n -Z Set security context" \
  2255. )
  2256. #define mkdir_example_usage \
  2257. "$ mkdir /tmp/foo\n" \
  2258. "$ mkdir /tmp/foo\n" \
  2259. "/tmp/foo: File exists\n" \
  2260. "$ mkdir /tmp/foo/bar/baz\n" \
  2261. "/tmp/foo/bar/baz: No such file or directory\n" \
  2262. "$ mkdir -p /tmp/foo/bar/baz\n"
  2263. #define mke2fs_trivial_usage \
  2264. "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \
  2265. "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \
  2266. "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \
  2267. "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \
  2268. "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
  2269. "device [blocks-count]"
  2270. #define mke2fs_full_usage "\n\n" \
  2271. " -b size Block size in bytes" \
  2272. "\n -c Check for bad blocks before creating" \
  2273. "\n -E opts Set extended options" \
  2274. "\n -f size Fragment size in bytes" \
  2275. "\n -F Force (ignore sanity checks)" \
  2276. "\n -g num Number of blocks in a block group" \
  2277. "\n -i ratio The bytes/inode ratio" \
  2278. "\n -j Create a journal (ext3)" \
  2279. "\n -J opts Set journal options (size/device)" \
  2280. "\n -l file Read bad blocks list from file" \
  2281. "\n -L lbl Set the volume label" \
  2282. "\n -m percent Percent of fs blocks to reserve for admin" \
  2283. "\n -M dir Set last mounted directory" \
  2284. "\n -n Do not actually create anything" \
  2285. "\n -N num Number of inodes to create" \
  2286. "\n -o os Set the 'creator os' field" \
  2287. "\n -O features Dir_index/filetype/has_journal/journal_dev/sparse_super" \
  2288. "\n -q Quiet" \
  2289. "\n -r rev Set filesystem revision" \
  2290. "\n -S Write superblock and group descriptors only" \
  2291. "\n -T fs-type Set usage type (news/largefile/largefile4)" \
  2292. "\n -v Verbose" \
  2293. #define mkfifo_trivial_usage \
  2294. "[OPTIONS] name"
  2295. #define mkfifo_full_usage "\n\n" \
  2296. "Create named pipe (identical to 'mknod name p')\n" \
  2297. "\nOptions:" \
  2298. "\n -m MODE Mode (default a=rw)" \
  2299. USE_SELINUX( \
  2300. "\n -Z Set security context" \
  2301. )
  2302. #define mkfs_minix_trivial_usage \
  2303. "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
  2304. #define mkfs_minix_full_usage "\n\n" \
  2305. "Make a MINIX filesystem\n" \
  2306. "\nOptions:" \
  2307. "\n -c Check device for bad blocks" \
  2308. "\n -n [14|30] Maximum length of filenames" \
  2309. "\n -i INODES Number of inodes for the filesystem" \
  2310. "\n -l FILENAME Read bad blocks list from FILENAME" \
  2311. "\n -v Make version 2 filesystem" \
  2312. #define mknod_trivial_usage \
  2313. "[OPTIONS] NAME TYPE MAJOR MINOR"
  2314. #define mknod_full_usage "\n\n" \
  2315. "Create a special file (block, character, or pipe)\n" \
  2316. "\nOptions:" \
  2317. "\n -m Create the special file using the specified mode (default a=rw)" \
  2318. "\nTYPEs include:" \
  2319. "\n b: Make a block device" \
  2320. "\n c or u: Make a character device" \
  2321. "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
  2322. USE_SELINUX( \
  2323. "\n -Z Set security context" \
  2324. )
  2325. #define mknod_example_usage \
  2326. "$ mknod /dev/fd0 b 2 0\n" \
  2327. "$ mknod -m 644 /tmp/pipe p\n"
  2328. #define mkswap_trivial_usage \
  2329. "DEVICE"
  2330. #define mkswap_full_usage "\n\n" \
  2331. "Prepare block device to be used as swap partition"
  2332. #if 0
  2333. "[-c] [-v0|-v1] DEVICE [BLOCKS]"
  2334. "\nOptions:"
  2335. "\n -c Check for readability"
  2336. "\n -v0 Make swap version 0 (max 128M)"
  2337. "\n -v1 Make swap version 1 (default for kernels > 2.1.117)"
  2338. "\n BLOCKS Number of blocks to use (default is entire partition)"
  2339. #endif
  2340. #define mktemp_trivial_usage \
  2341. "[-dt] [-p DIR] [TEMPLATE]"
  2342. #define mktemp_full_usage "\n\n" \
  2343. "Create a temporary file with name based on TEMPLATE and print its name.\n" \
  2344. "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" \
  2345. "\nOptions:" \
  2346. "\n -d Make a directory instead of a file" \
  2347. /* "\n -q Fail silently if an error occurs" - we ignore it */ \
  2348. "\n -t Generate a path rooted in temporary directory" \
  2349. "\n -p DIR Use DIR as a temporary directory (implies -t)" \
  2350. "\n" \
  2351. "\nFor -t or -p, directory is chosen as follows:" \
  2352. "\n$TMPDIR if set, else -p DIR, else /tmp" \
  2353. #define mktemp_example_usage \
  2354. "$ mktemp /tmp/temp.XXXXXX\n" \
  2355. "/tmp/temp.mWiLjM\n" \
  2356. "$ ls -la /tmp/temp.mWiLjM\n" \
  2357. "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
  2358. #define modprobe_trivial_usage \
  2359. "[-knqrsv] MODULE [symbol=value...]"
  2360. #define modprobe_full_usage "\n\n" \
  2361. "Options:" \
  2362. "\n -k Make module autoclean-able" \
  2363. "\n -n Dry run" \
  2364. "\n -q Quiet" \
  2365. "\n -r Remove module (stacks) or do autoclean" \
  2366. "\n -s Report via syslog instead of stderr" \
  2367. "\n -v Verbose" \
  2368. #define modprobe_notes_usage \
  2369. "modprobe can (un)load a stack of modules, passing each module options (when\n" \
  2370. "loading). modprobe uses a configuration file to determine what option(s) to\n" \
  2371. "pass each module it loads.\n" \
  2372. "\n" \
  2373. "The configuration file is searched (in order) amongst:\n" \
  2374. "\n" \
  2375. " /etc/modprobe.conf (2.6 only)\n" \
  2376. " /etc/modules.conf\n" \
  2377. " /etc/conf.modules (deprecated)\n" \
  2378. "\n" \
  2379. "They all have the same syntax (see below). If none is present, it is\n" \
  2380. "_not_ an error; each loaded module is then expected to load without\n" \
  2381. "options. Once a file is found, the others are tested for.\n" \
  2382. "\n" \
  2383. "/etc/modules.conf entry format:\n" \
  2384. "\n" \
  2385. " alias <alias_name> <mod_name>\n" \
  2386. " Makes it possible to modprobe alias_name, when there is no such module.\n" \
  2387. " It makes sense if your mod_name is long, or you want a more representative\n" \
  2388. " name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
  2389. " This makes it also possible to use a different set of options (below) for\n" \
  2390. " the module and the alias.\n" \
  2391. " A module can be aliased more than once.\n" \
  2392. "\n" \
  2393. " options <mod_name|alias_name> <symbol=value...>\n" \
  2394. " When loading module mod_name (or the module aliased by alias_name), pass\n" \
  2395. " the \"symbol=value\" pairs as option to that module.\n" \
  2396. "\n" \
  2397. "Sample /etc/modules.conf file:\n" \
  2398. "\n" \
  2399. " options tulip irq=3\n" \
  2400. " alias tulip tulip2\n" \
  2401. " options tulip2 irq=4 io=0x308\n" \
  2402. "\n" \
  2403. "Other functionality offered by 'classic' modprobe is not available in\n" \
  2404. "this implementation.\n" \
  2405. "\n" \
  2406. "If module options are present both in the config file, and on the command line,\n" \
  2407. "then the options from the command line will be passed to the module _after_\n" \
  2408. "the options from the config file. That way, you can have defaults in the config\n" \
  2409. "file, and override them for a specific usage from the command line.\n"
  2410. #define modprobe_example_usage \
  2411. "(with the above /etc/modules.conf):\n\n" \
  2412. "$ modprobe tulip\n" \
  2413. " will load the module 'tulip' with default option 'irq=3'\n\n" \
  2414. "$ modprobe tulip irq=5\n" \
  2415. " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
  2416. "$ modprobe tulip2\n" \
  2417. " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
  2418. " which are the default for alias 'tulip2'\n\n" \
  2419. "$ modprobe tulip2 irq=8\n" \
  2420. " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
  2421. " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
  2422. " from the command line\n\n" \
  2423. "$ modprobe tulip2 irq=2 io=0x210\n" \
  2424. " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
  2425. " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
  2426. " from the command line\n"
  2427. #define more_trivial_usage \
  2428. "[FILE...]"
  2429. #define more_full_usage "\n\n" \
  2430. "View FILE or standard input one screenful at a time"
  2431. #define more_example_usage \
  2432. "$ dmesg | more\n"
  2433. #define mount_trivial_usage \
  2434. "[flags] DEVICE NODE [-o options,more-options]"
  2435. #define mount_full_usage "\n\n" \
  2436. "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n" \
  2437. "\nOptions:" \
  2438. "\n -a Mount all filesystems in fstab" \
  2439. USE_FEATURE_MOUNT_FAKE( \
  2440. "\n -f "USE_FEATURE_MTAB_SUPPORT("Update /etc/mtab, but ")"don't mount" \
  2441. ) \
  2442. USE_FEATURE_MTAB_SUPPORT( \
  2443. "\n -n Don't update /etc/mtab" \
  2444. ) \
  2445. "\n -r Read-only mount" \
  2446. "\n -t fs-type Filesystem type" \
  2447. "\n -w Read-write mount (default)" \
  2448. "\n" \
  2449. "-o option:\n" \
  2450. USE_FEATURE_MOUNT_LOOP( \
  2451. " loop Ignored (loop devices are autodetected)\n" \
  2452. ) \
  2453. USE_FEATURE_MOUNT_FLAGS( \
  2454. " [a]sync Writes are asynchronous / synchronous\n" \
  2455. " [no]atime Disable / enable updates to inode access times\n" \
  2456. " [no]diratime Disable / enable atime updates to directories\n" \
  2457. " [no]relatime Disable / enable atime updates relative to modification time\n" \
  2458. " [no]dev Allow use of special device files / disallow them\n" \
  2459. " [no]exec Allow use of executable files / disallow them\n" \
  2460. " [no]suid Allow set-user-id-root programs / disallow them\n" \
  2461. " [r]shared Convert [recursively] to a shared subtree\n" \
  2462. " [r]slave Convert [recursively] to a slave subtree\n" \
  2463. " [r]private Convert [recursively] to a private subtree\n" \
  2464. " [un]bindable Make mount point [un]able to be bind mounted\n" \
  2465. " bind Bind a directory to an additional location\n" \
  2466. " move Relocate an existing mount point\n" \
  2467. ) \
  2468. " remount Remount a mounted filesystem, changing its flags\n" \
  2469. " ro/rw Mount for read-only / read-write\n" \
  2470. "\n" \
  2471. "There are EVEN MORE flags that are specific to each filesystem\n" \
  2472. "You'll have to see the written documentation for those filesystems" \
  2473. #define mount_example_usage \
  2474. "$ mount\n" \
  2475. "/dev/hda3 on / type minix (rw)\n" \
  2476. "proc on /proc type proc (rw)\n" \
  2477. "devpts on /dev/pts type devpts (rw)\n" \
  2478. "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
  2479. "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
  2480. "$ mount cd_image.iso mydir\n"
  2481. #define mount_notes_usage \
  2482. "Returns 0 for success, number of failed mounts for -a, or errno for one mount."
  2483. #define mountpoint_trivial_usage \
  2484. "[-q] <[-d] DIR | -x DEVICE>"
  2485. #define mountpoint_full_usage "\n\n" \
  2486. "mountpoint checks if the directory is a mountpoint\n" \
  2487. "\nOptions:" \
  2488. "\n -q Quiet" \
  2489. "\n -d Print major/minor device number of the filesystem" \
  2490. "\n -x Print major/minor device number of the blockdevice" \
  2491. #define mountpoint_example_usage \
  2492. "$ mountpoint /proc\n" \
  2493. "/proc is not a mountpoint\n" \
  2494. "$ mountpoint /sys\n" \
  2495. "/sys is a mountpoint\n"
  2496. #define mt_trivial_usage \
  2497. "[-f device] opcode value"
  2498. #define mt_full_usage "\n\n" \
  2499. "Control magnetic tape drive operation\n" \
  2500. "\n" \
  2501. "Available Opcodes:\n" \
  2502. "\n" \
  2503. "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
  2504. "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
  2505. "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
  2506. "setpart tell unload unlock weof wset" \
  2507. #define mv_trivial_usage \
  2508. "[OPTION]... SOURCE DEST\n" \
  2509. "or: mv [OPTION]... SOURCE... DIRECTORY"
  2510. #define mv_full_usage "\n\n" \
  2511. "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \
  2512. "\nOptions:" \
  2513. "\n -f Don't prompt before overwriting" \
  2514. "\n -i Interactive, prompt before overwrite" \
  2515. #define mv_example_usage \
  2516. "$ mv /tmp/foo /bin/bar\n"
  2517. #define nameif_trivial_usage \
  2518. "[-s] [-c FILE] [{IFNAME MACADDR}]"
  2519. #define nameif_full_usage "\n\n" \
  2520. "Rename network interface while it in the down state\n" \
  2521. "\nOptions:" \
  2522. "\n -c FILE Use configuration file (default is /etc/mactab)" \
  2523. "\n -s Use syslog (LOCAL0 facility)" \
  2524. "\n IFNAME MACADDR new_interface_name interface_mac_address" \
  2525. #define nameif_example_usage \
  2526. "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
  2527. " or\n" \
  2528. "$ nameif -c /etc/my_mactab_file\n" \
  2529. #if !ENABLE_DESKTOP
  2530. #if ENABLE_NC_SERVER || ENABLE_NC_EXTRA
  2531. #define NC_OPTIONS_STR "\n\nOptions:"
  2532. #else
  2533. #define NC_OPTIONS_STR
  2534. #endif
  2535. #define nc_trivial_usage \
  2536. USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \
  2537. "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]")
  2538. #define nc_full_usage "\n\n" \
  2539. "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \
  2540. NC_OPTIONS_STR \
  2541. USE_NC_EXTRA( \
  2542. "\n -e Exec rest of command line after connect" \
  2543. "\n -i SECS Delay interval for lines sent" \
  2544. "\n -w SECS Timeout for connect" \
  2545. "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
  2546. ) \
  2547. USE_NC_SERVER( \
  2548. "\n -l Listen mode, for inbound connects" \
  2549. USE_NC_EXTRA( \
  2550. "\n (use -l twice with -e for persistent server)") \
  2551. "\n -p PORT Local port number" \
  2552. )
  2553. #define nc_notes_usage "" \
  2554. USE_NC_EXTRA( \
  2555. "To use netcat as a terminal emulator on a serial port:\n\n" \
  2556. "$ stty 115200 -F /dev/ttyS0\n" \
  2557. "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
  2558. )
  2559. #define nc_example_usage \
  2560. "$ nc foobar.somedomain.com 25\n" \
  2561. "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
  2562. "help\n" \
  2563. "214-Commands supported:\n" \
  2564. "214- HELO EHLO MAIL RCPT DATA AUTH\n" \
  2565. "214 NOOP QUIT RSET HELP\n" \
  2566. "quit\n" \
  2567. "221 foobar closing connection\n"
  2568. #else /* DESKTOP nc - much more compatible with nc 1.10 */
  2569. #define nc_trivial_usage \
  2570. "[-options] hostname port - connect" \
  2571. USE_NC_SERVER("\n" \
  2572. "nc [-options] -l -p port [hostname] [port] - listen")
  2573. #define nc_full_usage "\n\n" \
  2574. "Options:" \
  2575. "\n -e prog [args] Program to exec after connect (must be last)" \
  2576. USE_NC_SERVER( \
  2577. "\n -l Listen mode, for inbound connects" \
  2578. ) \
  2579. "\n -n Don't do DNS resolution" \
  2580. "\n -s addr Local address" \
  2581. "\n -p port Local port" \
  2582. "\n -u UDP mode" \
  2583. "\n -v Verbose (cumulative: -vv)" \
  2584. "\n -w secs Timeout for connects and final net reads" \
  2585. USE_NC_EXTRA( \
  2586. "\n -i sec Delay interval for lines sent" /* ", ports scanned" */ \
  2587. "\n -o file Hex dump of traffic" \
  2588. "\n -z Zero-I/O mode (scanning)" \
  2589. ) \
  2590. /* "\n -r Randomize local and remote ports" */
  2591. /* "\n -g gateway Source-routing hop point[s], up to 8" */
  2592. /* "\n -G num Source-routing pointer: 4, 8, 12, ..." */
  2593. /* "\nport numbers can be individual or ranges: lo-hi [inclusive]" */
  2594. #endif
  2595. #define netstat_trivial_usage \
  2596. "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")USE_FEATURE_NETSTAT_PRG("p")"]"
  2597. #define netstat_full_usage "\n\n" \
  2598. "Display networking information\n" \
  2599. "\nOptions:" \
  2600. "\n -l Display listening server sockets" \
  2601. "\n -a Display all sockets (default: connected)" \
  2602. "\n -e Display other/more information" \
  2603. "\n -n Don't resolve names" \
  2604. "\n -t Tcp sockets" \
  2605. "\n -u Udp sockets" \
  2606. "\n -w Raw sockets" \
  2607. "\n -x Unix sockets" \
  2608. "\n -r Display routing table" \
  2609. USE_FEATURE_NETSTAT_WIDE( \
  2610. "\n -W Display with no column truncation" \
  2611. ) \
  2612. USE_FEATURE_NETSTAT_PRG( \
  2613. "\n -p Display PID/Program name for sockets" \
  2614. )
  2615. #define nice_trivial_usage \
  2616. "[-n ADJUST] [COMMAND [ARG]...]"
  2617. #define nice_full_usage "\n\n" \
  2618. "Run a program with modified scheduling priority\n" \
  2619. "\nOptions:" \
  2620. "\n -n ADJUST Adjust the scheduling priority by ADJUST" \
  2621. #define nmeter_trivial_usage \
  2622. "format_string"
  2623. #define nmeter_full_usage "\n\n" \
  2624. "Monitor system in real time\n\n" \
  2625. "Format specifiers:\n" \
  2626. "%Nc or %[cN] Monitor CPU. N - bar size, default 10\n" \
  2627. " (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \
  2628. "%[niface] Monitor network interface 'iface'\n" \
  2629. "%m Monitor allocated memory\n" \
  2630. "%[mf] Monitor free memory\n" \
  2631. "%[mt] Monitor total memory\n" \
  2632. "%s Monitor allocated swap\n" \
  2633. "%f Monitor number of used file descriptors\n" \
  2634. "%Ni Monitor total/specific IRQ rate\n" \
  2635. "%x Monitor context switch rate\n" \
  2636. "%p Monitor forks\n" \
  2637. "%[pn] Monitor # of processes\n" \
  2638. "%b Monitor block io\n" \
  2639. "%Nt Show time (with N decimal points)\n" \
  2640. "%Nd Milliseconds between updates (default=1000)\n" \
  2641. "%r Print <cr> instead of <lf> at EOL" \
  2642. #define nmeter_example_usage \
  2643. "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'"
  2644. #define nohup_trivial_usage \
  2645. "COMMAND [ARGS]"
  2646. #define nohup_full_usage "\n\n" \
  2647. "Run a command immune to hangups, with output to a non-tty"
  2648. #define nohup_example_usage \
  2649. "$ nohup make &"
  2650. #define nslookup_trivial_usage \
  2651. "[HOST] [SERVER]"
  2652. #define nslookup_full_usage "\n\n" \
  2653. "Query the nameserver for the IP address of the given HOST\n" \
  2654. "optionally using a specified DNS server"
  2655. #define nslookup_example_usage \
  2656. "$ nslookup localhost\n" \
  2657. "Server: default\n" \
  2658. "Address: default\n" \
  2659. "\n" \
  2660. "Name: debian\n" \
  2661. "Address: 127.0.0.1\n"
  2662. #define od_trivial_usage \
  2663. "[-aBbcDdeFfHhIiLlOovXx] " USE_DESKTOP("[-t TYPE] ") "[FILE]"
  2664. #define od_full_usage "\n\n" \
  2665. "Write an unambiguous representation, octal bytes by default, of FILE\n" \
  2666. "to standard output. With no FILE or when FILE is -, read standard input."
  2667. #define openvt_trivial_usage \
  2668. "[-c NUM] [-sw] [COMMAND [ARGS]]"
  2669. #define openvt_full_usage "\n\n" \
  2670. "Start COMMAND on a new virtual terminal\n" \
  2671. "\nOptions:" \
  2672. "\n -c Use specified VT" \
  2673. "\n -s Switch to the VT" \
  2674. /* "\n -l Run COMMAND as login shell (by prepending '-')" */ \
  2675. "\n -w Wait for COMMAND to exit" \
  2676. #define openvt_example_usage \
  2677. "openvt 2 /bin/ash\n"
  2678. #define parse_trivial_usage \
  2679. "[-n maxtokens] [-m mintokens] [-d delims] [-f flags] file ..."
  2680. #define parse_full_usage "\n\n" \
  2681. "[-n maxtokens] [-m mintokens] [-d delims] [-f flags] file ..."
  2682. #define passwd_trivial_usage \
  2683. "[OPTION] [name]"
  2684. #define passwd_full_usage "\n\n" \
  2685. "Change user's password. If no name is specified,\n" \
  2686. "changes the password for the current user.\n" \
  2687. "\nOptions:" \
  2688. "\n -a Algorithm to use for password (choices: des, md5)" /* ", sha1)" */ \
  2689. "\n -d Delete password for the account" \
  2690. "\n -l Lock (disable) account" \
  2691. "\n -u Unlock (re-enable) account" \
  2692. #define chpasswd_trivial_usage \
  2693. USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]")
  2694. #define chpasswd_full_usage "\n\n" \
  2695. "Read user:password information from stdin " \
  2696. "and update /etc/passwd accordingly.\n" \
  2697. "\nOptions:" \
  2698. USE_GETOPT_LONG( \
  2699. "\n -e,--encrypted Supplied passwords are in encrypted form" \
  2700. "\n -m,--md5 Use MD5 encryption instead of DES" \
  2701. ) \
  2702. SKIP_GETOPT_LONG( \
  2703. "\n -e Supplied passwords are in encrypted form" \
  2704. "\n -m Use MD5 encryption instead of DES" \
  2705. )
  2706. #define patch_trivial_usage \
  2707. "[-p NUM] [-i DIFF] [-R]"
  2708. #define patch_full_usage "\n\n" \
  2709. " -p NUM Strip NUM leading components from file names" \
  2710. "\n -i DIFF Read DIFF instead of stdin" \
  2711. "\n -R Reverse patch" \
  2712. #define patch_example_usage \
  2713. "$ patch -p1 < example.diff\n" \
  2714. "$ patch -p0 -i example.diff"
  2715. #define pgrep_trivial_usage \
  2716. "[-flnovx] pattern"
  2717. #define pgrep_full_usage "\n\n" \
  2718. "Display process(es) selected by regex pattern\n" \
  2719. "\nOptions:" \
  2720. "\n -l Show command name too" \
  2721. "\n -f Match against entire command line" \
  2722. "\n -n Show the newest process only" \
  2723. "\n -o Show the oldest process only" \
  2724. "\n -v Negate the matching" \
  2725. "\n -x Match whole name (not substring)" \
  2726. #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
  2727. #define pidof_trivial_usage \
  2728. "[OPTION] [NAME...]"
  2729. #define USAGE_PIDOF "\n\nOptions:"
  2730. #else
  2731. #define pidof_trivial_usage \
  2732. "[NAME...]"
  2733. #define USAGE_PIDOF /* none */
  2734. #endif
  2735. #define pidof_full_usage "\n\n" \
  2736. "List PIDs of all processes with names that match NAMEs" \
  2737. USAGE_PIDOF \
  2738. USE_FEATURE_PIDOF_SINGLE( \
  2739. "\n -s Show only one PID") \
  2740. USE_FEATURE_PIDOF_OMIT( \
  2741. "\n -o PID Omit given pid" \
  2742. "\n Use %PPID to omit pid of pidof's parent") \
  2743. #define pidof_example_usage \
  2744. "$ pidof init\n" \
  2745. "1\n" \
  2746. USE_FEATURE_PIDOF_OMIT( \
  2747. "$ pidof /bin/sh\n20351 5973 5950\n") \
  2748. USE_FEATURE_PIDOF_OMIT( \
  2749. "$ pidof /bin/sh -o %PPID\n20351 5950")
  2750. #if !ENABLE_FEATURE_FANCY_PING
  2751. #define ping_trivial_usage \
  2752. "host"
  2753. #define ping_full_usage "\n\n" \
  2754. "Send ICMP ECHO_REQUEST packets to network hosts"
  2755. #define ping6_trivial_usage \
  2756. "host"
  2757. #define ping6_full_usage "\n\n" \
  2758. "Send ICMP ECHO_REQUEST packets to network hosts"
  2759. #else
  2760. #define ping_trivial_usage \
  2761. "[OPTION]... host"
  2762. #define ping_full_usage "\n\n" \
  2763. "Send ICMP ECHO_REQUEST packets to network hosts\n" \
  2764. "\nOptions:" \
  2765. "\n -4, -6 Force IPv4 or IPv6 hostname resolution" \
  2766. "\n -c CNT Send only CNT pings" \
  2767. "\n -s SIZE Send SIZE data bytes in packets (default=56)" \
  2768. "\n -I iface/IP Use interface or IP address as source" \
  2769. "\n -W timeout Seconds to wait for the first response (default:10)" \
  2770. "\n (after all -c CNT packets are sent)" \
  2771. "\n -w deadline Seconds until ping exits (default:infinite)" \
  2772. "\n (can exit earlier with -c CNT)" \
  2773. "\n -q Quiet, only displays output at start" \
  2774. "\n and when finished" \
  2775. #define ping6_trivial_usage \
  2776. "[OPTION]... host"
  2777. #define ping6_full_usage "\n\n" \
  2778. "Send ICMP ECHO_REQUEST packets to network hosts\n" \
  2779. "\nOptions:" \
  2780. "\n -c CNT Send only CNT pings" \
  2781. "\n -s SIZE Send SIZE data bytes in packets (default=56)" \
  2782. "\n -I iface/IP Use interface or IP address as source" \
  2783. "\n -q Quiet, only displays output at start" \
  2784. "\n and when finished" \
  2785. #endif
  2786. #define ping_example_usage \
  2787. "$ ping localhost\n" \
  2788. "PING slag (127.0.0.1): 56 data bytes\n" \
  2789. "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
  2790. "\n" \
  2791. "--- debian ping statistics ---\n" \
  2792. "1 packets transmitted, 1 packets received, 0% packet loss\n" \
  2793. "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
  2794. #define ping6_example_usage \
  2795. "$ ping6 ip6-localhost\n" \
  2796. "PING ip6-localhost (::1): 56 data bytes\n" \
  2797. "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
  2798. "\n" \
  2799. "--- ip6-localhost ping statistics ---\n" \
  2800. "1 packets transmitted, 1 packets received, 0% packet loss\n" \
  2801. "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
  2802. #define pipe_progress_trivial_usage NOUSAGE_STR
  2803. #define pipe_progress_full_usage ""
  2804. #define pivot_root_trivial_usage \
  2805. "NEW_ROOT PUT_OLD"
  2806. #define pivot_root_full_usage "\n\n" \
  2807. "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
  2808. "the new root file system"
  2809. #define pkill_trivial_usage \
  2810. "[-l] | [-fnovx] [-signal] pattern"
  2811. #define pkill_full_usage "\n\n" \
  2812. "Send a signal to process(es) selected by regex pattern\n" \
  2813. "\nOptions:" \
  2814. "\n -l List all signals" \
  2815. "\n -f Match against entire command line" \
  2816. "\n -n Signal the newest process only" \
  2817. "\n -o Signal the oldest process only" \
  2818. "\n -v Negate the matching" \
  2819. "\n -x Match whole name (not substring)" \
  2820. #define poweroff_trivial_usage \
  2821. "[-d delay] [-n] [-f]"
  2822. #define poweroff_full_usage "\n\n" \
  2823. "Halt and shut off power\n" \
  2824. "\nOptions:" \
  2825. "\n -d Delay interval for halting" \
  2826. "\n -n No call to sync()" \
  2827. "\n -f Force power off (don't go through init)" \
  2828. #define printenv_trivial_usage \
  2829. "[VARIABLES...]"
  2830. #define printenv_full_usage "\n\n" \
  2831. "Print all or part of environment.\n" \
  2832. "If no environment VARIABLE specified, print them all."
  2833. #define printf_trivial_usage \
  2834. "FORMAT [ARGUMENT...]"
  2835. #define printf_full_usage "\n\n" \
  2836. "Format and print ARGUMENT(s) according to FORMAT,\n" \
  2837. "where FORMAT controls the output exactly as in C printf"
  2838. #define printf_example_usage \
  2839. "$ printf \"Val=%d\\n\" 5\n" \
  2840. "Val=5\n"
  2841. #if ENABLE_DESKTOP
  2842. #define ps_trivial_usage \
  2843. ""
  2844. #define ps_full_usage "\n\n" \
  2845. "Report process status\n" \
  2846. "\nOptions:" \
  2847. "\n -o col1,col2=header Select columns for display" \
  2848. #else /* !ENABLE_DESKTOP */
  2849. #if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE
  2850. #define USAGE_PS "\nThis version of ps accepts no options"
  2851. #else
  2852. #define USAGE_PS "\nOptions:"
  2853. #endif
  2854. #define ps_trivial_usage \
  2855. ""
  2856. #define ps_full_usage "\n\n" \
  2857. "Report process status\n" \
  2858. USAGE_PS \
  2859. USE_SELINUX( \
  2860. "\n -Z Show SE Linux context" \
  2861. ) \
  2862. USE_FEATURE_PS_WIDE( \
  2863. "\n w Wide output" \
  2864. )
  2865. #endif /* ENABLE_DESKTOP */
  2866. #define ps_example_usage \
  2867. "$ ps\n" \
  2868. " PID Uid Gid State Command\n" \
  2869. " 1 root root S init\n" \
  2870. " 2 root root S [kflushd]\n" \
  2871. " 3 root root S [kupdate]\n" \
  2872. " 4 root root S [kpiod]\n" \
  2873. " 5 root root S [kswapd]\n" \
  2874. " 742 andersen andersen S [bash]\n" \
  2875. " 743 andersen andersen S -bash\n" \
  2876. " 745 root root S [getty]\n" \
  2877. " 2990 andersen andersen R ps\n" \
  2878. #define pscan_trivial_usage \
  2879. "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
  2880. #define pscan_full_usage "\n\n" \
  2881. "Scan a host, print all open ports\n" \
  2882. "\nOptions:" \
  2883. "\n -c Show closed ports too" \
  2884. "\n -b Show blocked ports too" \
  2885. "\n -p Scan from this port (default 1)" \
  2886. "\n -P Scan up to this port (default 1024)" \
  2887. "\n -t Timeout (default 5000 ms)" \
  2888. "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \
  2889. #define pwd_trivial_usage \
  2890. ""
  2891. #define pwd_full_usage "\n\n" \
  2892. "Print the full filename of the current working directory"
  2893. #define pwd_example_usage \
  2894. "$ pwd\n" \
  2895. "/root\n"
  2896. #define raidautorun_trivial_usage \
  2897. "DEVICE"
  2898. #define raidautorun_full_usage "\n\n" \
  2899. "Tell the kernel to automatically search and start RAID arrays"
  2900. #define raidautorun_example_usage \
  2901. "$ raidautorun /dev/md0"
  2902. #define rdate_trivial_usage \
  2903. "[-sp] HOST"
  2904. #define rdate_full_usage "\n\n" \
  2905. "Get and possibly set the system date and time from a remote HOST\n" \
  2906. "\nOptions:" \
  2907. "\n -s Set the system date and time (default)" \
  2908. "\n -p Print the date and time" \
  2909. #define rdev_trivial_usage \
  2910. ""
  2911. #define rdev_full_usage "\n\n" \
  2912. "Print the device node associated with the filesystem mounted at '/'"
  2913. #define rdev_example_usage \
  2914. "$ rdev\n" \
  2915. "/dev/mtdblock9 /\n"
  2916. #define readahead_trivial_usage \
  2917. "[FILE]..."
  2918. #define readahead_full_usage "\n\n" \
  2919. "Preload FILE(s) in RAM cache so that subsequent reads for those" \
  2920. "files do not block on disk I/O"
  2921. #define readlink_trivial_usage \
  2922. USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
  2923. #define readlink_full_usage "\n\n" \
  2924. "Display the value of a symlink" \
  2925. USE_FEATURE_READLINK_FOLLOW( "\n" \
  2926. "\nOptions:" \
  2927. "\n -f Canonicalize by following all symlinks") \
  2928. #define readprofile_trivial_usage \
  2929. "[OPTIONS]..."
  2930. #define readprofile_full_usage "\n\n" \
  2931. "Options:" \
  2932. "\n -m mapfile (Default: /boot/System.map)" \
  2933. "\n -p profile (Default: /proc/profile)" \
  2934. "\n -M mult Set the profiling multiplier to mult" \
  2935. "\n -i Print only info about the sampling step" \
  2936. "\n -v Verbose" \
  2937. "\n -a Print all symbols, even if count is 0" \
  2938. "\n -b Print individual histogram-bin counts" \
  2939. "\n -s Print individual counters within functions" \
  2940. "\n -r Reset all the counters (root only)" \
  2941. "\n -n Disable byte order auto-detection" \
  2942. #define realpath_trivial_usage \
  2943. "pathname..."
  2944. #define realpath_full_usage "\n\n" \
  2945. "Return the absolute pathnames of given argument"
  2946. #define reboot_trivial_usage \
  2947. "[-d delay] [-n] [-f]"
  2948. #define reboot_full_usage "\n\n" \
  2949. "Reboot the system\n" \
  2950. "\nOptions:" \
  2951. "\n -d Delay interval for rebooting" \
  2952. "\n -n No call to sync()" \
  2953. "\n -f Force reboot (don't go through init)" \
  2954. #define renice_trivial_usage \
  2955. "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
  2956. #define renice_full_usage "\n\n" \
  2957. "Change priority of running processes\n" \
  2958. "\nOptions:" \
  2959. "\n -n Adjust current nice value (smaller is faster)" \
  2960. "\n -p Process id(s) (default)" \
  2961. "\n -g Process group id(s)" \
  2962. "\n -u Process user name(s) and/or id(s)" \
  2963. #define reset_trivial_usage \
  2964. ""
  2965. #define reset_full_usage "\n\n" \
  2966. "Reset the screen"
  2967. #define resize_trivial_usage \
  2968. ""
  2969. #define resize_full_usage "\n\n" \
  2970. "Resize the screen"
  2971. #define restorecon_trivial_usage \
  2972. "[-iFnrRv] [-e excludedir]... [-o filename] [-f filename | pathname]"
  2973. #define restorecon_full_usage "\n\n" \
  2974. "Reset security contexts of files in pathname\n" \
  2975. "\n -i Ignore files that do not exist" \
  2976. "\n -f file File with list of files to process. Use - for stdin" \
  2977. "\n -e directory Directory to exclude" \
  2978. "\n -R,-r Recurse directories" \
  2979. "\n -n Don't change any file labels" \
  2980. "\n -o file Save list of files with incorrect context" \
  2981. "\n -v Verbose" \
  2982. "\n -vv Show changed labels" \
  2983. "\n -F Force reset of context to match file_context" \
  2984. "\n for customizable files, or the user section," \
  2985. "\n if it has changed" \
  2986. #define rm_trivial_usage \
  2987. "[OPTION]... FILE..."
  2988. #define rm_full_usage "\n\n" \
  2989. "Remove (unlink) the FILE(s). Use '--' to\n" \
  2990. "indicate that all following arguments are non-options.\n" \
  2991. "\nOptions:" \
  2992. "\n -i Always prompt before removing" \
  2993. "\n -f Never prompt" \
  2994. "\n -r,-R Remove directories recursively" \
  2995. #define rm_example_usage \
  2996. "$ rm -rf /tmp/foo\n"
  2997. #define rmdir_trivial_usage \
  2998. "[OPTION]... DIRECTORY..."
  2999. #define rmdir_full_usage "\n\n" \
  3000. "Remove the DIRECTORY, if it is empty"
  3001. #define rmdir_example_usage \
  3002. "# rmdir /tmp/foo\n"
  3003. #define rmmod_trivial_usage \
  3004. "[OPTION]... [MODULE]..."
  3005. #define rmmod_full_usage "\n\n" \
  3006. "Unload the specified kernel modules from the kernel\n" \
  3007. "\nOptions:" \
  3008. "\n -a Remove all unused modules (recursively)" \
  3009. #define rmmod_example_usage \
  3010. "$ rmmod tulip\n"
  3011. #define route_trivial_usage \
  3012. "[{add|del|delete}]"
  3013. #define route_full_usage "\n\n" \
  3014. "Edit the kernel's routing tables\n" \
  3015. "\nOptions:" \
  3016. "\n -n Don't resolve names" \
  3017. "\n -e Display other/more information" \
  3018. "\n -A inet" USE_FEATURE_IPV6("{6}") " Select address family" \
  3019. #define rpm_trivial_usage \
  3020. "-i -q[ildc]p package.rpm"
  3021. #define rpm_full_usage "\n\n" \
  3022. "Manipulate RPM packages\n" \
  3023. "\nOptions:" \
  3024. "\n -i Install package" \
  3025. "\n -q Query package" \
  3026. "\n -p Query uninstalled package" \
  3027. "\n -i Show information" \
  3028. "\n -l List contents" \
  3029. "\n -d List documents" \
  3030. "\n -c List config files" \
  3031. #define rpm2cpio_trivial_usage \
  3032. "package.rpm"
  3033. #define rpm2cpio_full_usage "\n\n" \
  3034. "Output a cpio archive of the rpm file"
  3035. #define rtcwake_trivial_usage \
  3036. "[-a | -l | -u] [-d DEV] [-m MODE] [-s SECS | -t TIME]"
  3037. #define rtcwake_full_usage "\n\n" \
  3038. "Enter a system sleep state until specified wakeup time\n" \
  3039. USE_GETOPT_LONG( \
  3040. "\n -a,--auto Read clock mode from adjtime" \
  3041. "\n -l,--local Clock is set to local time" \
  3042. "\n -u,--utc Clock is set to UTC time" \
  3043. "\n -d,--device=DEV Specify the RTC device" \
  3044. "\n -m,--mode=MODE Set the sleep state (default: standby)" \
  3045. "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
  3046. "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
  3047. ) \
  3048. SKIP_GETOPT_LONG( \
  3049. "\n -a Read clock mode from adjtime" \
  3050. "\n -l Clock is set to local time" \
  3051. "\n -u Clock is set to UTC time" \
  3052. "\n -d DEV Specify the RTC device" \
  3053. "\n -m MODE Set the sleep state (default: standby)" \
  3054. "\n -s SEC Set the timeout in SEC seconds from now" \
  3055. "\n -t TIME Set the timeout to TIME seconds from epoch" \
  3056. )
  3057. #define runcon_trivial_usage \
  3058. "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \
  3059. " runcon CONTEXT COMMAND [args]"
  3060. #define runcon_full_usage "\n\n" \
  3061. "Run a program in a different security context\n" \
  3062. "\n CONTEXT Complete security context\n" \
  3063. USE_GETOPT_LONG( \
  3064. "\n -c,--compute Compute process transition context before modifying" \
  3065. "\n -t,--type=TYPE Type (for same role as parent)" \
  3066. "\n -u,--user=USER User identity" \
  3067. "\n -r,--role=ROLE Role" \
  3068. "\n -l,--range=RNG Levelrange" \
  3069. ) \
  3070. SKIP_GETOPT_LONG( \
  3071. "\n -c Compute process transition context before modifying" \
  3072. "\n -t TYPE Type (for same role as parent)" \
  3073. "\n -u USER User identity" \
  3074. "\n -r ROLE Role" \
  3075. "\n -l RNG Levelrange" \
  3076. )
  3077. #define run_parts_trivial_usage \
  3078. "[-t] "USE_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
  3079. #define run_parts_full_usage "\n\n" \
  3080. "Run a bunch of scripts in a directory\n" \
  3081. "\nOptions:" \
  3082. "\n -t Print what would be run, but don't actually run anything" \
  3083. "\n -a ARG Pass ARG as argument for every program" \
  3084. "\n -u MASK Set the umask to MASK before running every program" \
  3085. USE_FEATURE_RUN_PARTS_FANCY( \
  3086. "\n -l Print names of all matching files even if they are not executable" \
  3087. )
  3088. #define run_parts_example_usage \
  3089. "$ run-parts -a start /etc/init.d\n" \
  3090. "$ run-parts -a stop=now /etc/init.d\n\n" \
  3091. "Let's assume you have a script foo/dosomething:\n" \
  3092. "#!/bin/sh\n" \
  3093. "for i in $*; do eval $i; done; unset i\n" \
  3094. "case \"$1\" in\n" \
  3095. "start*) echo starting something;;\n" \
  3096. "stop*) set -x; shutdown -h $stop;;\n" \
  3097. "esac\n\n" \
  3098. "Running this yields:\n" \
  3099. "$run-parts -a stop=+4m foo/\n" \
  3100. "+ shutdown -h +4m"
  3101. #define runlevel_trivial_usage \
  3102. "[utmp]"
  3103. #define runlevel_full_usage "\n\n" \
  3104. "Find the current and previous system runlevel.\n\n" \
  3105. "If no utmp file exists or if no runlevel record can be found,\n" \
  3106. "print \"unknown\""
  3107. #define runlevel_example_usage \
  3108. "$ runlevel /var/run/utmp\n" \
  3109. "N 2"
  3110. #define runsv_trivial_usage \
  3111. "dir"
  3112. #define runsv_full_usage "\n\n" \
  3113. "Start and monitor a service and optionally an appendant log service"
  3114. #define runsvdir_trivial_usage \
  3115. "[-P] dir"
  3116. #define runsvdir_full_usage "\n\n" \
  3117. "Start a runsv process for each subdirectory"
  3118. #define rx_trivial_usage \
  3119. "FILE"
  3120. #define rx_full_usage "\n\n" \
  3121. "Receive a file using the xmodem protocol"
  3122. #define rx_example_usage \
  3123. "$ rx /tmp/foo\n"
  3124. #define script_trivial_usage \
  3125. "[-afq] [-c COMMAND] [OUTFILE]"
  3126. #define script_full_usage "\n\n" \
  3127. "Options:" \
  3128. "\n -a Append output" \
  3129. "\n -c Run COMMAND, not shell" \
  3130. "\n -f Flush output after each write" \
  3131. "\n -q Quiet" \
  3132. #define sed_trivial_usage \
  3133. "[-efinr] pattern [files...]"
  3134. #define sed_full_usage "\n\n" \
  3135. "Options:" \
  3136. "\n -e script Add the script to the commands to be executed" \
  3137. "\n -f scriptfile Add scriptfile contents to the" \
  3138. "\n commands to be executed" \
  3139. "\n -i Edit files in-place" \
  3140. "\n -n Suppress automatic printing of pattern space" \
  3141. "\n -r Use extended regular expression syntax" \
  3142. "\n" \
  3143. "\nIf no -e or -f is given, the first non-option argument is taken as the sed" \
  3144. "\nscript to interpret. All remaining arguments are names of input files; if no" \
  3145. "\ninput files are specified, then the standard input is read. Source files" \
  3146. "\nwill not be modified unless -i option is given." \
  3147. #define sed_example_usage \
  3148. "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
  3149. "bar\n"
  3150. #define selinuxenabled_trivial_usage NOUSAGE_STR
  3151. #define selinuxenabled_full_usage ""
  3152. #define sendmail_trivial_usage \
  3153. "[-w timeout] [-H [user:pass@]server[:port]] [-S]\n" \
  3154. "[-c charset] [-N type] [-i] [-s subject] [-a attach]... [-t] [-f sender] [rcpt]..."
  3155. #define sendmail_full_usage "\n\n" \
  3156. "Send an email\n" \
  3157. "\nOptions:" \
  3158. "\n -w timeout Network timeout" \
  3159. "\n -H [user:pass@]server[:port] Server" \
  3160. "\n -S Use openssl connection helper for secure servers" \
  3161. "\n -c charset Assume charset for body and subject (utf-8)" \
  3162. "\n -N type Request delivery notification. Type is ignored" \
  3163. "\n -i Ignore single dots in mail body. Implied" \
  3164. "\n -s subject Subject" \
  3165. "\n -a file File to attach. May be multiple" \
  3166. "\n -t Read recipients and subject from body" \
  3167. "\n -f sender Sender" \
  3168. #define seq_trivial_usage \
  3169. "[first [increment]] last"
  3170. #define seq_full_usage "\n\n" \
  3171. "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \
  3172. "FIRST, INCREMENT default to 1\n" \
  3173. "\nArguments:" \
  3174. "\n LAST" \
  3175. "\n FIRST LAST" \
  3176. "\n FIRST INCREMENT LAST" \
  3177. #define sestatus_trivial_usage \
  3178. "[-vb]"
  3179. #define sestatus_full_usage "\n\n" \
  3180. " -v Verbose" \
  3181. "\n -b Display current state of booleans" \
  3182. #define setconsole_trivial_usage \
  3183. "[-r" USE_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
  3184. #define setconsole_full_usage "\n\n" \
  3185. "Redirect system console output to DEVICE (default: /dev/tty)\n" \
  3186. "\nOptions:" \
  3187. "\n -r Reset output to /dev/console" \
  3188. #define setenforce_trivial_usage \
  3189. "[Enforcing | Permissive | 1 | 0]"
  3190. #define setenforce_full_usage ""
  3191. #define setfiles_trivial_usage \
  3192. "[-dnpqsvW] [-e dir]... [-o file] [-r alt_root_path]" \
  3193. USE_FEATURE_SETFILES_CHECK_OPTION( \
  3194. " [-c policyfile] spec_file" \
  3195. ) \
  3196. " pathname"
  3197. #define setfiles_full_usage "\n\n" \
  3198. "Reset file contexts under pathname according to spec_file\n" \
  3199. USE_FEATURE_SETFILES_CHECK_OPTION( \
  3200. "\n -c file Check the validity of the contexts against the specified binary policy" \
  3201. ) \
  3202. "\n -d Show which specification matched each file" \
  3203. "\n -l Log changes in file labels to syslog" \
  3204. "\n -n Don't change any file labels" \
  3205. "\n -q Suppress warnings" \
  3206. "\n -r dir Use an altenate root path" \
  3207. "\n -e dir Exclude directory" \
  3208. "\n -F Force reset of context to match file_context for customizable files" \
  3209. "\n -o file Save list of files with incorrect context" \
  3210. "\n -s Take a list of files from standard input (instead of command line)" \
  3211. "\n -v Show changes in file labels, if type or role are changing" \
  3212. "\n -vv Show changes in file labels, if type, role, or user are changing" \
  3213. "\n -W Display warnings about entries that had no matching files" \
  3214. #define setfont_trivial_usage \
  3215. "[-m mapfile] font"
  3216. #define setfont_full_usage "\n\n" \
  3217. "Load a console font\n" \
  3218. "\nOptions:" \
  3219. "\n -m mapfile Load console screen map from mapfile"
  3220. #define setfont_example_usage \
  3221. "$ setfont -m koi8-r /etc/i18n/fontname\n"
  3222. #define setkeycodes_trivial_usage \
  3223. "SCANCODE KEYCODE..."
  3224. #define setkeycodes_full_usage "\n\n" \
  3225. "Set entries into the kernel's scancode-to-keycode map,\n" \
  3226. "allowing unusual keyboards to generate usable keycodes.\n\n" \
  3227. "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
  3228. "and KEYCODE is given in decimal" \
  3229. #define setkeycodes_example_usage \
  3230. "$ setkeycodes e030 127\n"
  3231. #define setlogcons_trivial_usage \
  3232. "N"
  3233. #define setlogcons_full_usage "\n\n" \
  3234. "Redirect the kernel output to console N (0 for current)"
  3235. #define setsebool_trivial_usage \
  3236. "boolean value"
  3237. #define setsebool_full_usage "\n\n" \
  3238. "Change boolean setting"
  3239. #define setsid_trivial_usage \
  3240. "PROG [ARG...]"
  3241. #define setsid_full_usage "\n\n" \
  3242. "Run PROG in a new session. PROG will have no controlling terminal\n" \
  3243. "and will not be affected by keyboard signals (Ctrl-C etc).\n" \
  3244. "See setsid(2) for details." \
  3245. #define lash_trivial_usage \
  3246. "[FILE]...\n" \
  3247. "or: sh -c command [args]..."
  3248. #define lash_full_usage "\n\n" \
  3249. "lash is deprecated, please use hush"
  3250. #define last_trivial_usage \
  3251. ""USE_FEATURE_LAST_FANCY("[-HW] [-f file]")
  3252. #define last_full_usage "\n\n" \
  3253. "Show listing of the last users that logged into the system" \
  3254. USE_FEATURE_LAST_FANCY( "\n" \
  3255. "\nOptions:" \
  3256. /* "\n -H Show header line" */ \
  3257. "\n -W Display with no host column truncation" \
  3258. "\n -f file Read from file instead of /var/log/wtmp" \
  3259. )
  3260. #define sha1sum_trivial_usage \
  3261. "[OPTION] [FILEs...]" \
  3262. USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
  3263. #define sha1sum_full_usage "\n\n" \
  3264. "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
  3265. USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
  3266. "\nOptions:" \
  3267. "\n -c Check SHA1 sums against given list" \
  3268. "\n -s Don't output anything, status code shows success" \
  3269. "\n -w Warn about improperly formatted SHA1 checksum lines" \
  3270. )
  3271. #define showkey_trivial_usage \
  3272. "[-a | -k | -s]"
  3273. #define showkey_full_usage "\n\n" \
  3274. "Show keys pressed\n" \
  3275. "\nOptions:" \
  3276. "\n -a Display decimal/octal/hex values of the keys" \
  3277. "\n -k Display interpreted keycodes (default)" \
  3278. "\n -s Display raw scan-codes" \
  3279. #define slattach_trivial_usage \
  3280. "[-cehmLF] [-s speed] [-p protocol] DEVICEs"
  3281. #define slattach_full_usage "\n\n" \
  3282. "Attach network interface(s) to serial line(s)\n" \
  3283. "\nOptions:" \
  3284. "\n -p Set protocol (slip, cslip, slip6, clisp6 or adaptive)" \
  3285. "\n -s Set line speed" \
  3286. "\n -e Exit after initializing device" \
  3287. "\n -h Exit when the carrier is lost" \
  3288. "\n -c Execute a command when the line is hung up" \
  3289. "\n -m Do NOT initialize the line in raw 8 bits mode" \
  3290. "\n -L Enable 3-wire operation" \
  3291. "\n -F Disable RTS/CTS flow control" \
  3292. #define sleep_trivial_usage \
  3293. USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...")
  3294. #define sleep_full_usage "\n\n" \
  3295. SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds") \
  3296. USE_FEATURE_FANCY_SLEEP( \
  3297. "Pause for a time equal to the total of the args given, where each arg can\n" \
  3298. "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
  3299. #define sleep_example_usage \
  3300. "$ sleep 2\n" \
  3301. "[2 second delay results]\n" \
  3302. USE_FEATURE_FANCY_SLEEP( \
  3303. "$ sleep 1d 3h 22m 8s\n" \
  3304. "[98528 second delay results]\n")
  3305. #define sort_trivial_usage \
  3306. "[-nru" \
  3307. USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
  3308. "] [FILE]..."
  3309. #define sort_full_usage "\n\n" \
  3310. "Sort lines of text\n" \
  3311. "\nOptions:" \
  3312. USE_FEATURE_SORT_BIG( \
  3313. "\n -b Ignore leading blanks" \
  3314. "\n -c Check whether input is sorted" \
  3315. "\n -d Dictionary order (blank or alphanumeric only)" \
  3316. "\n -f Ignore case" \
  3317. "\n -g General numerical sort" \
  3318. "\n -i Ignore unprintable characters" \
  3319. "\n -k Sort key" \
  3320. "\n -M Sort month" \
  3321. ) \
  3322. "\n -n Sort numbers" \
  3323. USE_FEATURE_SORT_BIG( \
  3324. "\n -o Output to file" \
  3325. "\n -k Sort by key" \
  3326. "\n -t CHAR Key separator" \
  3327. ) \
  3328. "\n -r Reverse sort order" \
  3329. USE_FEATURE_SORT_BIG( \
  3330. "\n -s Stable (don't sort ties alphabetically)" \
  3331. ) \
  3332. "\n -u Suppress duplicate lines" \
  3333. USE_FEATURE_SORT_BIG( \
  3334. "\n -z Lines are terminated by NUL, not newline" \
  3335. "\n -mST Ignored for GNU compatibility") \
  3336. #define sort_example_usage \
  3337. "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
  3338. "a\n" \
  3339. "b\n" \
  3340. "c\n" \
  3341. "d\n" \
  3342. "e\n" \
  3343. "f\n" \
  3344. USE_FEATURE_SORT_BIG( \
  3345. "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
  3346. "d 2\n" \
  3347. "b 2\n" \
  3348. "c 3\n" \
  3349. ) \
  3350. ""
  3351. #define split_trivial_usage \
  3352. "[OPTION] [INPUT [PREFIX]]"
  3353. #define split_full_usage "\n\n" \
  3354. "Options:" \
  3355. "\n -b n[k|m] Split by bytes" \
  3356. "\n -l n Split by lines" \
  3357. "\n -a n Use n letters as suffix" \
  3358. #define split_example_usage \
  3359. "$ split TODO foo\n" \
  3360. "$ cat TODO | split -a 2 -l 2 TODO_\n"
  3361. #define start_stop_daemon_trivial_usage \
  3362. "[OPTIONS] [-S|-K] ... [-- arguments...]"
  3363. #define start_stop_daemon_full_usage "\n\n" \
  3364. "Search for matching processes, and then\n" \
  3365. "-K: stop all matching processes.\n" \
  3366. "-S: start a process unless a matching process is found.\n" \
  3367. USE_GETOPT_LONG( \
  3368. "\nProcess matching:" \
  3369. "\n -u,--user USERNAME|UID Match only this user's processes" \
  3370. "\n -n,--name NAME Match processes with NAME" \
  3371. "\n in comm field in /proc/PID/stat" \
  3372. "\n -x,--exec EXECUTABLE Match processes with this command" \
  3373. "\n in /proc/PID/cmdline" \
  3374. "\n -p,--pidfile FILE Match a process with PID from the file" \
  3375. "\n All specified conditions must match" \
  3376. "\n-S only:" \
  3377. "\n -x,--exec EXECUTABLE Program to run" \
  3378. "\n -a,--startas NAME Zeroth argument" \
  3379. "\n -b,--background Background" \
  3380. USE_FEATURE_START_STOP_DAEMON_FANCY( \
  3381. "\n -N,--nicelevel N Change nice level" \
  3382. ) \
  3383. "\n -c,--chuid USER[:[GRP]] Change to user/group" \
  3384. "\n -m,--make-pidfile Write PID to the pidfile specified by -p" \
  3385. "\n-K only:" \
  3386. "\n -s,--signal SIG Signal to send" \
  3387. "\n -t,--test Match only, exit with 0 if a process is found" \
  3388. "\nOther:" \
  3389. USE_FEATURE_START_STOP_DAEMON_FANCY( \
  3390. "\n -o,--oknodo Exit with status 0 if nothing is done" \
  3391. "\n -q,--quiet Quiet" \
  3392. ) \
  3393. "\n -v,--verbose Verbose" \
  3394. ) \
  3395. SKIP_GETOPT_LONG( \
  3396. "\nProcess matching:" \
  3397. "\n -u USERNAME|UID Match only this user's processes" \
  3398. "\n -n NAME Match processes with NAME" \
  3399. "\n in comm field in /proc/PID/stat" \
  3400. "\n -x EXECUTABLE Match processes with this command" \
  3401. "\n command in /proc/PID/cmdline" \
  3402. "\n -p FILE Match a process with PID from the file" \
  3403. "\n All specified conditions must match" \
  3404. "\n-S only:" \
  3405. "\n -x EXECUTABLE Program to run" \
  3406. "\n -a NAME Zeroth argument" \
  3407. "\n -b Background" \
  3408. USE_FEATURE_START_STOP_DAEMON_FANCY( \
  3409. "\n -N N Change nice level" \
  3410. ) \
  3411. "\n -c USER[:[GRP]] Change to user/group" \
  3412. "\n -m Write PID to the pidfile specified by -p" \
  3413. "\n-K only:" \
  3414. "\n -s SIG Signal to send" \
  3415. "\n -t Match only, exit with 0 if a process is found" \
  3416. "\nOther:" \
  3417. USE_FEATURE_START_STOP_DAEMON_FANCY( \
  3418. "\n -o Exit with status 0 if nothing is done" \
  3419. "\n -q Quiet" \
  3420. ) \
  3421. "\n -v Verbose" \
  3422. ) \
  3423. #define stat_trivial_usage \
  3424. "[OPTION] FILE..."
  3425. #define stat_full_usage "\n\n" \
  3426. "Display file (default) or filesystem status\n" \
  3427. "\nOptions:" \
  3428. USE_FEATURE_STAT_FORMAT( \
  3429. "\n -c fmt Use the specified format" \
  3430. ) \
  3431. "\n -f Display filesystem status" \
  3432. "\n -L Dereference links" \
  3433. "\n -t Display info in terse form" \
  3434. USE_SELINUX( \
  3435. "\n -Z Print security context" \
  3436. ) \
  3437. USE_FEATURE_STAT_FORMAT( \
  3438. "\n\nValid format sequences for files:\n" \
  3439. " %a Access rights in octal\n" \
  3440. " %A Access rights in human readable form\n" \
  3441. " %b Number of blocks allocated (see %B)\n" \
  3442. " %B The size in bytes of each block reported by %b\n" \
  3443. " %d Device number in decimal\n" \
  3444. " %D Device number in hex\n" \
  3445. " %f Raw mode in hex\n" \
  3446. " %F File type\n" \
  3447. " %g Group ID of owner\n" \
  3448. " %G Group name of owner\n" \
  3449. " %h Number of hard links\n" \
  3450. " %i Inode number\n" \
  3451. " %n File name\n" \
  3452. " %N Quoted file name with dereference if symlink\n" \
  3453. " %o I/O block size\n" \
  3454. " %s Total size, in bytes\n" \
  3455. " %t Major device type in hex\n" \
  3456. " %T Minor device type in hex\n" \
  3457. " %u User ID of owner\n" \
  3458. " %U User name of owner\n" \
  3459. " %x Time of last access\n" \
  3460. " %X Time of last access as seconds since Epoch\n" \
  3461. " %y Time of last modification\n" \
  3462. " %Y Time of last modification as seconds since Epoch\n" \
  3463. " %z Time of last change\n" \
  3464. " %Z Time of last change as seconds since Epoch\n" \
  3465. "\nValid format sequences for file systems:\n" \
  3466. " %a Free blocks available to non-superuser\n" \
  3467. " %b Total data blocks in file system\n" \
  3468. " %c Total file nodes in file system\n" \
  3469. " %d Free file nodes in file system\n" \
  3470. " %f Free blocks in file system\n" \
  3471. USE_SELINUX( \
  3472. " %C Security context in SELinux\n" \
  3473. ) \
  3474. " %i File System ID in hex\n" \
  3475. " %l Maximum length of filenames\n" \
  3476. " %n File name\n" \
  3477. " %s Block size (for faster transfer)\n" \
  3478. " %S Fundamental block size (for block counts)\n" \
  3479. " %t Type in hex\n" \
  3480. " %T Type in human readable form" \
  3481. ) \
  3482. #define strings_trivial_usage \
  3483. "[-afo] [-n length] [file...]"
  3484. #define strings_full_usage "\n\n" \
  3485. "Display printable strings in a binary file\n" \
  3486. "\nOptions:" \
  3487. "\n -a Scan whole file (default)" \
  3488. "\n -f Precede strings with filenames" \
  3489. "\n -n N At least N characters form a string (default 4)" \
  3490. "\n -o Precede strings with decimal offsets" \
  3491. #define stty_trivial_usage \
  3492. "[-a|g] [-F DEVICE] [SETTING]..."
  3493. #define stty_full_usage "\n\n" \
  3494. "Without arguments, prints baud rate, line discipline,\n" \
  3495. "and deviations from stty sane\n" \
  3496. "\nOptions:" \
  3497. "\n -F DEVICE Open device instead of stdin" \
  3498. "\n -a Print all current settings in human-readable form" \
  3499. "\n -g Print in stty-readable form" \
  3500. "\n [SETTING] See manpage" \
  3501. #define su_trivial_usage \
  3502. "[OPTION]... [-] [username]"
  3503. #define su_full_usage "\n\n" \
  3504. "Change user id or become root\n" \
  3505. "\nOptions:" \
  3506. "\n -p, -m Preserve environment" \
  3507. "\n -c Command to pass to 'sh -c'" \
  3508. "\n -s Shell to use instead of default shell" \
  3509. #define sulogin_trivial_usage \
  3510. "[OPTION]... [tty-device]"
  3511. #define sulogin_full_usage "\n\n" \
  3512. "Single user login\n" \
  3513. "\nOptions:" \
  3514. "\n -t Timeout" \
  3515. #define sum_trivial_usage \
  3516. "[rs] [files...]"
  3517. #define sum_full_usage "\n\n" \
  3518. "Checksum and count the blocks in a file\n" \
  3519. "\nOptions:" \
  3520. "\n -r Use BSD sum algorithm (1K blocks)" \
  3521. "\n -s Use System V sum algorithm (512byte blocks)" \
  3522. #define sv_trivial_usage \
  3523. "[-v] [-w sec] command service..."
  3524. #define sv_full_usage "\n\n" \
  3525. "Control services monitored by runsv supervisor.\n" \
  3526. "Commands (only first character is enough):\n" \
  3527. "\n" \
  3528. "status: query service status\n" \
  3529. "up: if service isn't running, start it. If service stops, restart it\n" \
  3530. "once: like 'up', but if service stops, don't restart it\n" \
  3531. "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
  3532. " if it exists. After it stops, do not restart service\n" \
  3533. "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
  3534. " runsv exits too\n" \
  3535. "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
  3536. "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
  3537. #define svlogd_trivial_usage \
  3538. "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..."
  3539. #define svlogd_full_usage "\n\n" \
  3540. "Continuously read log data from standard input, optionally " \
  3541. "filter log messages, and write the data to one or more automatically " \
  3542. "rotated logs" \
  3543. #define swapoff_trivial_usage \
  3544. "[-a] [DEVICE]"
  3545. #define swapoff_full_usage "\n\n" \
  3546. "Stop swapping on DEVICE\n" \
  3547. "\nOptions:" \
  3548. "\n -a Stop swapping on all swap devices" \
  3549. #define swapon_trivial_usage \
  3550. "[-a]" USE_FEATURE_SWAPON_PRI(" [-p pri]") " [DEVICE]"
  3551. #define swapon_full_usage "\n\n" \
  3552. "Start swapping on DEVICE\n" \
  3553. "\nOptions:" \
  3554. "\n -a Start swapping on all swap devices" \
  3555. USE_FEATURE_SWAPON_PRI( \
  3556. "\n -p pri Set swap device priority" \
  3557. ) \
  3558. #define switch_root_trivial_usage \
  3559. "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
  3560. #define switch_root_full_usage "\n\n" \
  3561. "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
  3562. "and exec NEW_INIT\n" \
  3563. "\nOptions:" \
  3564. "\n -c Redirect console to device on new root" \
  3565. #define sync_trivial_usage \
  3566. ""
  3567. #define sync_full_usage "\n\n" \
  3568. "Write all buffered filesystem blocks to disk"
  3569. #define sysctl_trivial_usage \
  3570. "[OPTIONS]... [VALUE]..."
  3571. #define sysctl_full_usage "\n\n" \
  3572. "Configure kernel parameters at runtime\n" \
  3573. "\nOptions:" \
  3574. "\n -n Disable printing of key names" \
  3575. "\n -e Don't warn about unknown keys" \
  3576. "\n -w Change sysctl setting" \
  3577. "\n -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)" \
  3578. "\n -a Display all values" \
  3579. "\n -A Display all values in table form" \
  3580. #define sysctl_example_usage \
  3581. "sysctl [-n] [-e] variable...\n" \
  3582. "sysctl [-n] [-e] -w variable=value...\n" \
  3583. "sysctl [-n] [-e] -a\n" \
  3584. "sysctl [-n] [-e] -p file (default /etc/sysctl.conf)\n" \
  3585. "sysctl [-n] [-e] -A\n"
  3586. #define syslogd_trivial_usage \
  3587. "[OPTION]..."
  3588. #define syslogd_full_usage "\n\n" \
  3589. "System logging utility.\n" \
  3590. "Note that this version of syslogd ignores /etc/syslog.conf.\n" \
  3591. "\nOptions:" \
  3592. "\n -n Run in foreground" \
  3593. "\n -O FILE Log to given file (default=/var/log/messages)" \
  3594. "\n -l n Set local log level" \
  3595. "\n -S Smaller logging output" \
  3596. USE_FEATURE_ROTATE_LOGFILE( \
  3597. "\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)" \
  3598. "\n -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \
  3599. USE_FEATURE_REMOTE_LOG( \
  3600. "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \
  3601. "\n -L Log locally and via network (default is network only if -R)") \
  3602. USE_FEATURE_SYSLOGD_DUP( \
  3603. "\n -D Drop duplicates") \
  3604. USE_FEATURE_IPC_SYSLOG( \
  3605. "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \
  3606. /* NB: -Csize shouldn't have space (because size is optional) */
  3607. /* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */
  3608. #define syslogd_example_usage \
  3609. "$ syslogd -R masterlog:514\n" \
  3610. "$ syslogd -R 192.168.1.1:601\n"
  3611. #define tac_trivial_usage \
  3612. "[FILE]..."
  3613. #define tac_full_usage "\n\n" \
  3614. "Concatenate FILE(s) and print them in reverse"
  3615. #define tail_trivial_usage \
  3616. "[OPTION]... [FILE]..."
  3617. #define tail_full_usage "\n\n" \
  3618. "Print last 10 lines of each FILE to standard output.\n" \
  3619. "With more than one FILE, precede each with a header giving the\n" \
  3620. "file name. With no FILE, or when FILE is -, read standard input.\n" \
  3621. "\nOptions:" \
  3622. USE_FEATURE_FANCY_TAIL( \
  3623. "\n -c N[kbm] Output the last N bytes") \
  3624. "\n -n N[kbm] Print last N lines instead of last 10" \
  3625. "\n -f Output data as the file grows" \
  3626. USE_FEATURE_FANCY_TAIL( \
  3627. "\n -q Never output headers giving file names" \
  3628. "\n -s SEC Wait SEC seconds between reads with -f" \
  3629. "\n -v Always output headers giving file names" \
  3630. "\n" \
  3631. "\nIf the first character of N (bytes or lines) is a '+', output begins with" \
  3632. "\nthe Nth item from the start of each file, otherwise, print the last N items" \
  3633. "\nin the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) \
  3634. #define tail_example_usage \
  3635. "$ tail -n 1 /etc/resolv.conf\n" \
  3636. "nameserver 10.0.0.1\n"
  3637. #define tar_trivial_usage \
  3638. "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_SEAMLESS_GZ("z") \
  3639. USE_FEATURE_SEAMLESS_BZ2("j") USE_FEATURE_SEAMLESS_LZMA("a") \
  3640. USE_FEATURE_SEAMLESS_Z("Z") "xtvO] " \
  3641. USE_FEATURE_TAR_FROM("[-X FILE] ") \
  3642. "[-f TARFILE] [-C DIR] [FILE(s)]..."
  3643. #define tar_full_usage "\n\n" \
  3644. "Create, extract, or list files from a tar file\n" \
  3645. "\nOptions:" \
  3646. USE_FEATURE_TAR_CREATE( \
  3647. "\n c Create") \
  3648. "\n x Extract" \
  3649. "\n t List" \
  3650. "\nArchive format selection:" \
  3651. USE_FEATURE_SEAMLESS_GZ( \
  3652. "\n z Filter the archive through gzip" \
  3653. ) \
  3654. USE_FEATURE_SEAMLESS_BZ2( \
  3655. "\n j Filter the archive through bzip2" \
  3656. ) \
  3657. USE_FEATURE_SEAMLESS_LZMA( \
  3658. "\n a Filter the archive through lzma" \
  3659. ) \
  3660. USE_FEATURE_SEAMLESS_Z( \
  3661. "\n Z Filter the archive through compress" \
  3662. ) \
  3663. "\nFile selection:" \
  3664. "\n f Name of TARFILE or \"-\" for stdin" \
  3665. "\n O Extract to stdout" \
  3666. USE_FEATURE_TAR_FROM( \
  3667. "\n exclude File to exclude" \
  3668. "\n X File with names to exclude" \
  3669. ) \
  3670. "\n C Change to directory DIR before operation" \
  3671. "\n v Verbose" \
  3672. #define tar_example_usage \
  3673. "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
  3674. "$ tar -cf /tmp/tarball.tar /usr/local\n"
  3675. #define taskset_trivial_usage \
  3676. "[-p] [mask] [pid | command [arg]...]"
  3677. #define taskset_full_usage "\n\n" \
  3678. "Set or get CPU affinity\n" \
  3679. "\nOptions:" \
  3680. "\n -p Operate on an existing PID" \
  3681. #define taskset_example_usage \
  3682. "$ taskset 0x7 ./dgemm_test&\n" \
  3683. "$ taskset -p 0x1 $!\n" \
  3684. "pid 4790's current affinity mask: 7\n" \
  3685. "pid 4790's new affinity mask: 1\n" \
  3686. "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
  3687. "pid 6671's current affinity mask: 1\n" \
  3688. "pid 6671's new affinity mask: 1\n" \
  3689. "$ taskset -p 1\n" \
  3690. "pid 1's current affinity mask: 3\n"
  3691. #define tee_trivial_usage \
  3692. "[OPTION]... [FILE]..."
  3693. #define tee_full_usage "\n\n" \
  3694. "Copy standard input to each FILE, and also to standard output\n" \
  3695. "\nOptions:" \
  3696. "\n -a Append to the given FILEs, do not overwrite" \
  3697. "\n -i Ignore interrupt signals (SIGINT)" \
  3698. #define tee_example_usage \
  3699. "$ echo \"Hello\" | tee /tmp/foo\n" \
  3700. "$ cat /tmp/foo\n" \
  3701. "Hello\n"
  3702. #if ENABLE_FEATURE_TELNET_AUTOLOGIN
  3703. #define telnet_trivial_usage \
  3704. "[-a] [-l USER] HOST [PORT]"
  3705. #define telnet_full_usage "\n\n" \
  3706. "Connect to telnet server\n" \
  3707. "\nOptions:" \
  3708. "\n -a Automatic login with $USER variable" \
  3709. "\n -l USER Automatic login as USER" \
  3710. #else
  3711. #define telnet_trivial_usage \
  3712. "HOST [PORT]"
  3713. #define telnet_full_usage "\n\n" \
  3714. "Connect to telnet server"
  3715. #endif
  3716. #define telnetd_trivial_usage \
  3717. "[OPTION]"
  3718. #define telnetd_full_usage "\n\n" \
  3719. "Handle incoming telnet connections" \
  3720. SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
  3721. "\nOptions:" \
  3722. "\n -l LOGIN Exec LOGIN on connect" \
  3723. "\n -f issue_file Display issue_file instead of /etc/issue" \
  3724. "\n -K Close connection as soon as login exits" \
  3725. "\n (normally wait until all programs close slave pty)" \
  3726. USE_FEATURE_TELNETD_STANDALONE( \
  3727. "\n -p PORT Port to listen on" \
  3728. "\n -b ADDR Address to bind to" \
  3729. "\n -F Run in foreground" \
  3730. "\n -i Run as inetd subservice" \
  3731. )
  3732. /* "test --help" does not print help (POSIX compat), only "[ --help" does.
  3733. * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION") */
  3734. #define test_trivial_usage \
  3735. "EXPRESSION ]"
  3736. #define test_full_usage "\n\n" \
  3737. "Check file types, compare values etc. Return a 0/1 exit code\n" \
  3738. "depending on logical value of EXPRESSION"
  3739. #define test_example_usage \
  3740. "$ test 1 -eq 2\n" \
  3741. "$ echo $?\n" \
  3742. "1\n" \
  3743. "$ test 1 -eq 1\n" \
  3744. "$ echo $?\n" \
  3745. "0\n" \
  3746. "$ [ -d /etc ]\n" \
  3747. "$ echo $?\n" \
  3748. "0\n" \
  3749. "$ [ -d /junk ]\n" \
  3750. "$ echo $?\n" \
  3751. "1\n"
  3752. #define tcpsvd_trivial_usage \
  3753. "[-hEv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] ip port prog..."
  3754. /* with not-implemented options: */
  3755. /* "[-hpEvv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] [-i dir|-x cdb] [-t sec] ip port prog..." */
  3756. #define tcpsvd_full_usage "\n\n" \
  3757. "Create TCP socket, bind it to ip:port and listen\n" \
  3758. "for incoming connection. Run PROG for each connection.\n" \
  3759. "\nip IP to listen on. '0' = all" \
  3760. "\nport Port to listen on" \
  3761. "\nprog [arg] Program to run" \
  3762. "\n-l name Local hostname (else looks up local hostname in DNS)" \
  3763. "\n-u user[:group] Change to user/group after bind" \
  3764. "\n-c n Handle up to n connections simultaneously" \
  3765. "\n-b n Allow a backlog of approximately n TCP SYNs" \
  3766. "\n-C n[:msg] Allow only up to n connections from the same IP" \
  3767. "\n New connections from this IP address are closed" \
  3768. "\n immediately. 'msg' is written to the peer before close" \
  3769. "\n-h Look up peer's hostname" \
  3770. "\n-E Do not set up environment variables" \
  3771. "\n-v Verbose" \
  3772. #define udpsvd_trivial_usage \
  3773. "[-hEv] [-c n] [-u user] [-l name] ip port prog"
  3774. #define udpsvd_full_usage "\n\n" \
  3775. "Create UDP socket, bind it to ip:port and wait\n" \
  3776. "for incoming packets. Run PROG for each packet,\n" \
  3777. "redirecting all further packets with same peer ip:port to it\n" \
  3778. "\nip IP to listen on. '0' = all" \
  3779. "\nport Port to listen on" \
  3780. "\nprog [arg] Program to run" \
  3781. "\n-l name Local hostname (else looks up local hostname in DNS)" \
  3782. "\n-u user[:group] Change to user/group after bind" \
  3783. "\n-c n Handle up to n connections simultaneously" \
  3784. "\n-h Look up peer's hostname" \
  3785. "\n-E Do not set up environment variables" \
  3786. "\n-v Verbose" \
  3787. #define tftp_trivial_usage \
  3788. "[OPTION]... HOST [PORT]"
  3789. #define tftp_full_usage "\n\n" \
  3790. "Transfer a file from/to tftp server\n" \
  3791. "\nOptions:" \
  3792. "\n -l FILE Local FILE" \
  3793. "\n -r FILE Remote FILE" \
  3794. USE_FEATURE_TFTP_GET( \
  3795. "\n -g Get file" \
  3796. ) \
  3797. USE_FEATURE_TFTP_PUT( \
  3798. "\n -p Put file" \
  3799. ) \
  3800. USE_FEATURE_TFTP_BLOCKSIZE( \
  3801. "\n -b SIZE Transfer blocks of SIZE octets" \
  3802. )
  3803. #define tftpd_trivial_usage \
  3804. "[-cr] [-u USER] [DIR]"
  3805. #define tftpd_full_usage "\n\n" \
  3806. "Transfer a file on tftp client's request.\n" \
  3807. "\nOptions:" \
  3808. "\n -r Prohibit upload" \
  3809. "\n -c Allow file creation via upload" \
  3810. "\n -u Access files as USER" \
  3811. #define time_trivial_usage \
  3812. "[OPTION]... COMMAND [ARGS...]"
  3813. #define time_full_usage "\n\n" \
  3814. "Run the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \
  3815. "COMMAND's resource usage information is displayed.\n" \
  3816. "\nOptions:" \
  3817. "\n -v Verbose" \
  3818. #define top_trivial_usage \
  3819. "[-b] [-n COUNT] [-d SECONDS]"
  3820. #define top_full_usage "\n\n" \
  3821. "Provide a view of process activity in real time.\n" \
  3822. "Read the status of all processes from /proc each SECONDS\n" \
  3823. "and show the status for however many processes will fit on the screen." \
  3824. #define touch_trivial_usage \
  3825. "[-c] FILE [FILE...]"
  3826. #define touch_full_usage "\n\n" \
  3827. "Update the last-modified date on the given FILE[s]\n" \
  3828. "\nOptions:" \
  3829. "\n -c Do not create any files" \
  3830. #define touch_example_usage \
  3831. "$ ls -l /tmp/foo\n" \
  3832. "/bin/ls: /tmp/foo: No such file or directory\n" \
  3833. "$ touch /tmp/foo\n" \
  3834. "$ ls -l /tmp/foo\n" \
  3835. "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n"
  3836. #define tr_trivial_usage \
  3837. "[-cds] STRING1 [STRING2]"
  3838. #define tr_full_usage "\n\n" \
  3839. "Translate, squeeze, and/or delete characters from\n" \
  3840. "standard input, writing to standard output\n" \
  3841. "\nOptions:" \
  3842. "\n -c Take complement of STRING1" \
  3843. "\n -d Delete input characters coded STRING1" \
  3844. "\n -s Squeeze multiple output characters of STRING2 into one character" \
  3845. #define tr_example_usage \
  3846. "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
  3847. "hello world\n"
  3848. #define traceroute_trivial_usage \
  3849. "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
  3850. " [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
  3851. " [-z pausemsecs] HOST [data size]"
  3852. #define traceroute_full_usage "\n\n" \
  3853. "Trace the route to HOST\n" \
  3854. "\nOptions:" \
  3855. "\n -F Set the don't fragment bit" \
  3856. "\n -I Use ICMP ECHO instead of UDP datagrams" \
  3857. "\n -l Display the ttl value of the returned packet" \
  3858. "\n -d Set SO_DEBUG options to socket" \
  3859. "\n -n Print hop addresses numerically rather than symbolically" \
  3860. "\n -r Bypass the normal routing tables and send directly to a host" \
  3861. "\n -v Verbose" \
  3862. "\n -m max_ttl Max time-to-live (max number of hops)" \
  3863. "\n -p port# Base UDP port number used in probes" \
  3864. "\n (default is 33434)" \
  3865. "\n -q nqueries Number of probes per 'ttl' (default 3)" \
  3866. "\n -s src_addr IP address to use as the source address" \
  3867. "\n -t tos Type-of-service in probe packets (default 0)" \
  3868. "\n -w wait Time in seconds to wait for a response" \
  3869. "\n (default 3 sec)" \
  3870. "\n -g Loose source route gateway (8 max)" \
  3871. #define true_trivial_usage \
  3872. ""
  3873. #define true_full_usage "\n\n" \
  3874. "Return an exit code of TRUE (0)"
  3875. #define true_example_usage \
  3876. "$ true\n" \
  3877. "$ echo $?\n" \
  3878. "0\n"
  3879. #define tty_trivial_usage \
  3880. ""
  3881. #define tty_full_usage "\n\n" \
  3882. "Print file name of standard input's terminal" \
  3883. USE_INCLUDE_SUSv2( "\n" \
  3884. "\nOptions:" \
  3885. "\n -s Print nothing, only return exit status" \
  3886. )
  3887. #define tty_example_usage \
  3888. "$ tty\n" \
  3889. "/dev/tty2\n"
  3890. #define ttysize_trivial_usage \
  3891. "[w] [h]"
  3892. #define ttysize_full_usage "\n\n" \
  3893. "Print dimension(s) of standard input's terminal, on error return 80x25"
  3894. #define tune2fs_trivial_usage \
  3895. "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
  3896. "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
  3897. "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
  3898. "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
  3899. "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
  3900. "[-T last-check-time] [-U UUID] device"
  3901. #define tune2fs_full_usage "\n\n" \
  3902. "Adjust filesystem options on ext[23] filesystems"
  3903. #define udhcpc_trivial_usage \
  3904. "[-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \
  3905. " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." USE_FEATURE_UDHCP_PORT(" [-P N]")
  3906. #define udhcpc_full_usage "\n\n" \
  3907. USE_GETOPT_LONG( \
  3908. " -V,--vendorclass=CLASSID Vendor class identifier" \
  3909. "\n -i,--interface=INTERFACE Interface to use (default eth0)" \
  3910. "\n -H,-h,--hostname=HOSTNAME Client hostname" \
  3911. "\n -c,--clientid=CLIENTID Client identifier" \
  3912. "\n -C,--clientid-none Suppress default client identifier" \
  3913. "\n -p,--pidfile=file Create pidfile" \
  3914. "\n -r,--request=IP IP address to request" \
  3915. "\n -s,--script=file Run file at DHCP events (default "CONFIG_DHCPC_DEFAULT_SCRIPT")" \
  3916. "\n -t,--retries=N Send up to N request packets" \
  3917. "\n -T,--timeout=N Try to get a lease for N seconds (default 3)" \
  3918. "\n -A,--tryagain=N Wait N seconds (default 20) after failure" \
  3919. "\n -O,--request-option=OPT Request DHCP option OPT (cumulative)" \
  3920. "\n -o,--no-default-options Do not request any options (unless -O is also given)" \
  3921. "\n -f,--foreground Run in foreground" \
  3922. USE_FOR_MMU( \
  3923. "\n -b,--background Background if lease is not immediately obtained" \
  3924. ) \
  3925. "\n -S,--syslog Log to syslog too" \
  3926. "\n -n,--now Exit with failure if lease is not immediately obtained" \
  3927. "\n -q,--quit Quit after obtaining lease" \
  3928. "\n -R,--release Release IP on quit" \
  3929. USE_FEATURE_UDHCP_PORT( \
  3930. "\n -P,--client-port N Use port N instead of default 68" \
  3931. ) \
  3932. USE_FEATURE_UDHCPC_ARPING( \
  3933. "\n -a,--arping Use arping to validate offered address" \
  3934. ) \
  3935. ) \
  3936. SKIP_GETOPT_LONG( \
  3937. " -V CLASSID Vendor class identifier" \
  3938. "\n -i INTERFACE Interface to use (default: eth0)" \
  3939. "\n -H,-h HOSTNAME Client hostname" \
  3940. "\n -c CLIENTID Client identifier" \
  3941. "\n -C Suppress default client identifier" \
  3942. "\n -p file Create pidfile" \
  3943. "\n -r IP IP address to request" \
  3944. "\n -s file Run file at DHCP events (default "CONFIG_DHCPC_DEFAULT_SCRIPT")" \
  3945. "\n -t N Send up to N request packets" \
  3946. "\n -T N Try to get a lease for N seconds (default 3)" \
  3947. "\n -A N Wait N seconds (default 20) after failure" \
  3948. "\n -O OPT Request DHCP option OPT (cumulative)" \
  3949. "\n -o Do not request any options (unless -O is also given)" \
  3950. "\n -f Run in foreground" \
  3951. USE_FOR_MMU( \
  3952. "\n -b Background if lease is not immediately obtained" \
  3953. ) \
  3954. "\n -S Log to syslog too" \
  3955. "\n -n Exit with failure if lease is not immediately obtained" \
  3956. "\n -q Quit after obtaining lease" \
  3957. "\n -R Release IP on quit" \
  3958. USE_FEATURE_UDHCP_PORT( \
  3959. "\n -P N Use port N instead of default 68" \
  3960. ) \
  3961. USE_FEATURE_UDHCPC_ARPING( \
  3962. "\n -a Use arping to validate offered address" \
  3963. ) \
  3964. )
  3965. #define udhcpd_trivial_usage \
  3966. "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
  3967. #define udhcpd_full_usage "\n\n" \
  3968. "DHCP server\n" \
  3969. "\n -f Run in foreground" \
  3970. "\n -S Log to syslog too" \
  3971. USE_FEATURE_UDHCP_PORT( \
  3972. "\n -P N Use port N instead of default 67" \
  3973. )
  3974. #define umount_trivial_usage \
  3975. "[flags] FILESYSTEM|DIRECTORY"
  3976. #define umount_full_usage "\n\n" \
  3977. "Unmount file systems\n" \
  3978. "\nOptions:" \
  3979. USE_FEATURE_UMOUNT_ALL( \
  3980. "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
  3981. ) \
  3982. USE_FEATURE_MTAB_SUPPORT( \
  3983. "\n -n Don't erase /etc/mtab entries" \
  3984. ) \
  3985. "\n -r Try to remount devices as read-only if mount is busy" \
  3986. "\n -l Lazy umount (detach filesystem)" \
  3987. "\n -f Force umount (i.e., unreachable NFS server)" \
  3988. USE_FEATURE_MOUNT_LOOP( \
  3989. "\n -d Free loop device if it has been used" \
  3990. )
  3991. #define umount_example_usage \
  3992. "$ umount /dev/hdc1\n"
  3993. #define uname_trivial_usage \
  3994. "[-amnrspv]"
  3995. #define uname_full_usage "\n\n" \
  3996. "Print system information.\n" \
  3997. "\nOptions:" \
  3998. "\n -a Print all" \
  3999. "\n -m The machine (hardware) type" \
  4000. "\n -n Hostname" \
  4001. "\n -r OS release" \
  4002. "\n -s OS name (default)" \
  4003. "\n -p Processor type" \
  4004. "\n -v OS version" \
  4005. #define uname_example_usage \
  4006. "$ uname -a\n" \
  4007. "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
  4008. #define uncompress_trivial_usage \
  4009. "[-c] [-f] [name...]"
  4010. #define uncompress_full_usage "\n\n" \
  4011. "Uncompress .Z file[s]\n" \
  4012. "\nOptions:" \
  4013. "\n -c Extract to stdout" \
  4014. "\n -f Overwrite an existing file" \
  4015. #define unexpand_trivial_usage \
  4016. "[-f][-a][-t NUM] [FILE|-]"
  4017. #define unexpand_full_usage "\n\n" \
  4018. "Convert spaces to tabs, writing to standard output.\n" \
  4019. "\nOptions:" \
  4020. USE_FEATURE_UNEXPAND_LONG_OPTIONS( \
  4021. "\n -a,--all Convert all blanks" \
  4022. "\n -f,--first-only Convert only leading blanks" \
  4023. "\n -t,--tabs=N Tabstops every N chars" \
  4024. ) \
  4025. SKIP_FEATURE_UNEXPAND_LONG_OPTIONS( \
  4026. "\n -a Convert all blanks" \
  4027. "\n -f Convert only leading blanks" \
  4028. "\n -t N Tabstops every N chars" \
  4029. )
  4030. #define uniq_trivial_usage \
  4031. "[-fscduw]... [INPUT [OUTPUT]]"
  4032. #define uniq_full_usage "\n\n" \
  4033. "Discard duplicate lines\n" \
  4034. "\nOptions:" \
  4035. "\n -c Prefix lines by the number of occurrences" \
  4036. "\n -d Only print duplicate lines" \
  4037. "\n -u Only print unique lines" \
  4038. "\n -f N Skip first N fields" \
  4039. "\n -s N Skip first N chars (after any skipped fields)" \
  4040. "\n -w N Compare N characters in line" \
  4041. #define uniq_example_usage \
  4042. "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
  4043. "a\n" \
  4044. "b\n" \
  4045. "c\n"
  4046. #define unix2dos_trivial_usage \
  4047. "[option] [FILE]"
  4048. #define unix2dos_full_usage "\n\n" \
  4049. "Convert FILE from unix to dos format.\n" \
  4050. "When no file is given, use stdin/stdout.\n" \
  4051. "\nOptions:" \
  4052. "\n -u dos2unix" \
  4053. "\n -d unix2dos" \
  4054. #define unzip_trivial_usage \
  4055. "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
  4056. #define unzip_full_usage "\n\n" \
  4057. "Extract files from ZIP archives\n" \
  4058. "\nOptions:" \
  4059. "\n -l List archive contents (with -q for short form)" \
  4060. "\n -n Never overwrite existing files (default)" \
  4061. "\n -o Overwrite files without prompting" \
  4062. "\n -p Send output to stdout" \
  4063. "\n -q Quiet" \
  4064. "\n -x Exclude these files" \
  4065. "\n -d Extract files into this directory" \
  4066. #define uptime_trivial_usage \
  4067. ""
  4068. #define uptime_full_usage "\n\n" \
  4069. "Display the time since the last boot"
  4070. #define uptime_example_usage \
  4071. "$ uptime\n" \
  4072. " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
  4073. #define usleep_trivial_usage \
  4074. "N"
  4075. #define usleep_full_usage "\n\n" \
  4076. "Pause for N microseconds"
  4077. #define usleep_example_usage \
  4078. "$ usleep 1000000\n" \
  4079. "[pauses for 1 second]\n"
  4080. #define uudecode_trivial_usage \
  4081. "[-o outfile] [infile]"
  4082. #define uudecode_full_usage "\n\n" \
  4083. "Uudecode a file\n" \
  4084. "Finds outfile name in uuencoded source unless -o is given"
  4085. #define uudecode_example_usage \
  4086. "$ uudecode -o busybox busybox.uu\n" \
  4087. "$ ls -l busybox\n" \
  4088. "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
  4089. #define uuencode_trivial_usage \
  4090. "[-m] [infile] stored_filename"
  4091. #define uuencode_full_usage "\n\n" \
  4092. "Uuencode a file to stdout\n" \
  4093. "\nOptions:" \
  4094. "\n -m Use base64 encoding per RFC1521" \
  4095. #define uuencode_example_usage \
  4096. "$ uuencode busybox busybox\n" \
  4097. "begin 755 busybox\n" \
  4098. "<encoded file snipped>\n" \
  4099. "$ uudecode busybox busybox > busybox.uu\n" \
  4100. "$\n"
  4101. #define vconfig_trivial_usage \
  4102. "COMMAND [OPTIONS]..."
  4103. #define vconfig_full_usage "\n\n" \
  4104. "Create and remove virtual ethernet devices\n" \
  4105. "\nOptions:" \
  4106. "\n add [interface-name] [vlan_id]" \
  4107. "\n rem [vlan-name]" \
  4108. "\n set_flag [interface-name] [flag-num] [0 | 1]" \
  4109. "\n set_egress_map [vlan-name] [skb_priority] [vlan_qos]" \
  4110. "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
  4111. "\n set_name_type [name-type]" \
  4112. #define vi_trivial_usage \
  4113. "[OPTION] [FILE]..."
  4114. #define vi_full_usage "\n\n" \
  4115. "Edit FILE\n" \
  4116. "\nOptions:" \
  4117. USE_FEATURE_VI_COLON( \
  4118. "\n -c Initial command to run ($EXINIT also available)") \
  4119. USE_FEATURE_VI_READONLY( \
  4120. "\n -R Read-only - do not write to the file") \
  4121. "\n -H Short help regarding available features" \
  4122. #define vlock_trivial_usage \
  4123. "[OPTIONS]"
  4124. #define vlock_full_usage "\n\n" \
  4125. "Lock a virtual terminal. A password is required to unlock.\n" \
  4126. "\nOptions:" \
  4127. "\n -a Lock all VTs" \
  4128. #define watch_trivial_usage \
  4129. "[-n seconds] [-t] COMMAND..."
  4130. #define watch_full_usage "\n\n" \
  4131. "Execute a program periodically\n" \
  4132. "\nOptions:" \
  4133. "\n -n Loop period in seconds (default 2)" \
  4134. "\n -t Don't print header" \
  4135. #define watch_example_usage \
  4136. "$ watch date\n" \
  4137. "Mon Dec 17 10:31:40 GMT 2000\n" \
  4138. "Mon Dec 17 10:31:42 GMT 2000\n" \
  4139. "Mon Dec 17 10:31:44 GMT 2000"
  4140. #define watchdog_trivial_usage \
  4141. "[-t N[ms]] [-F] DEV"
  4142. #define watchdog_full_usage "\n\n" \
  4143. "Periodically write to watchdog device DEV\n" \
  4144. "\nOptions:" \
  4145. "\n -t N Timer period (default 30)" \
  4146. "\n -F Run in foreground" \
  4147. "\n" \
  4148. "\nUse -t 500ms to specify period in milliseconds" \
  4149. #define wc_trivial_usage \
  4150. "[OPTION]... [FILE]..."
  4151. #define wc_full_usage "\n\n" \
  4152. "Print line, word, and byte counts for each FILE, and a total line if\n" \
  4153. "more than one FILE is specified. With no FILE, read standard input.\n" \
  4154. "\nOptions:" \
  4155. "\n -c Print the byte counts" \
  4156. "\n -l Print the newline counts" \
  4157. "\n -L Print the length of the longest line" \
  4158. "\n -w Print the word counts" \
  4159. #define wc_example_usage \
  4160. "$ wc /etc/passwd\n" \
  4161. " 31 46 1365 /etc/passwd\n"
  4162. #define wget_trivial_usage \
  4163. USE_GETOPT_LONG( \
  4164. "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \
  4165. " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
  4166. " [-U|--user-agent agent] url" \
  4167. ) \
  4168. SKIP_GETOPT_LONG( \
  4169. "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \
  4170. )
  4171. #define wget_full_usage "\n\n" \
  4172. "Retrieve files via HTTP or FTP\n" \
  4173. "\nOptions:" \
  4174. "\n -s Spider mode - only check file existence" \
  4175. "\n -c Continue retrieval of aborted transfer" \
  4176. "\n -q Quiet" \
  4177. "\n -P Set directory prefix to DIR" \
  4178. "\n -O Save to filename ('-' for stdout)" \
  4179. "\n -U Adjust 'User-Agent' field" \
  4180. "\n -Y Use proxy ('on' or 'off')" \
  4181. #define which_trivial_usage \
  4182. "[COMMAND...]"
  4183. #define which_full_usage "\n\n" \
  4184. "Locate a COMMAND"
  4185. #define which_example_usage \
  4186. "$ which login\n" \
  4187. "/bin/login\n"
  4188. #define who_trivial_usage \
  4189. "[-a]"
  4190. #define who_full_usage "\n\n" \
  4191. "Show who is logged on\n" \
  4192. "\nOptions:" \
  4193. "\n -a show all" \
  4194. #define whoami_trivial_usage \
  4195. ""
  4196. #define whoami_full_usage "\n\n" \
  4197. "Print the user name associated with the current effective user id"
  4198. #define xargs_trivial_usage \
  4199. "[OPTIONS] [COMMAND] [ARGS...]"
  4200. #define xargs_full_usage "\n\n" \
  4201. "Execute COMMAND on every item given by standard input\n" \
  4202. "\nOptions:" \
  4203. USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
  4204. "\n -p Ask user whether to run each command") \
  4205. "\n -r Do not run command if input is empty" \
  4206. USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
  4207. "\n -0 Input is separated by NUL characters") \
  4208. "\n -t Print the command on stderr before execution" \
  4209. "\n -e[STR] STR stops input processing (default _)" \
  4210. "\n -n N Pass no more than N args to COMMAND" \
  4211. "\n -s N Pass command line of no more than N bytes" \
  4212. USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
  4213. "\n -x Exit if size is exceeded") \
  4214. #define xargs_example_usage \
  4215. "$ ls | xargs gzip\n" \
  4216. "$ find . -name '*.c' -print | xargs rm\n"
  4217. #define yes_trivial_usage \
  4218. "[OPTION]... [STRING]..."
  4219. #define yes_full_usage "\n\n" \
  4220. "Repeatedly output a line with all specified STRING(s), or 'y'"
  4221. #define zcat_trivial_usage \
  4222. "FILE"
  4223. #define zcat_full_usage "\n\n" \
  4224. "Uncompress to stdout"
  4225. #define zcip_trivial_usage \
  4226. "[OPTIONS] ifname script"
  4227. #define zcip_full_usage "\n\n" \
  4228. "Manage a ZeroConf IPv4 link-local address\n" \
  4229. "\nOptions:" \
  4230. "\n -f Run in foreground" \
  4231. "\n -q Quit after address (no daemon)" \
  4232. "\n -r 169.254.x.x Request this address first" \
  4233. "\n -v Verbose" \
  4234. #endif /* __BB_USAGE_H__ */