3
0

usage.h 122 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542
  1. #ifndef __BB_USAGE_H__
  2. #define __BB_USAGE_H__
  3. #define addgroup_trivial_usage \
  4. "[-g GID] group_name [user_name]"
  5. #define addgroup_full_usage \
  6. "Adds a group to the system\n\n" \
  7. "Options:\n" \
  8. "\t-g GID\t\tspecify gid"
  9. #define adduser_trivial_usage \
  10. "[OPTIONS] user_name"
  11. #define adduser_full_usage \
  12. "Adds a user to the system\n\n" \
  13. "Options:\n" \
  14. "\t-h DIR\t\tAssign home directory DIR\n" \
  15. "\t-g GECOS\tAssign gecos field GECOS\n" \
  16. "\t-s SHELL\tAssign login shell SHELL\n" \
  17. "\t-G\t\tAdd the user to existing group GROUP\n" \
  18. "\t-S\t\tcreate a system user (ignored)\n" \
  19. "\t-D\t\tDo not assign a password (logins still possible via ssh)\n" \
  20. "\t-H\t\tDo not create the home directory"
  21. #define adjtimex_trivial_usage \
  22. "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]"
  23. #define adjtimex_full_usage \
  24. "Reads and optionally sets system timebase parameters.\n" \
  25. "See adjtimex(2).\n\n" \
  26. "Options:\n" \
  27. "\t-q\t\tquiet mode - do not print\n" \
  28. "\t-o offset\ttime offset, microseconds\n" \
  29. "\t-f frequency\tfrequency adjust, integer kernel units (65536 is 1ppm)\n" \
  30. "\t\t\t(positive values make the system clock run fast)\n" \
  31. "\t-t tick\t\tmicroseconds per tick, usually 10000\n" \
  32. "\t-p timeconstant"
  33. #define ar_trivial_usage \
  34. "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
  35. #define ar_full_usage \
  36. "Extract or list FILES from an ar archive.\n\n" \
  37. "Options:\n" \
  38. "\t-o\t\tpreserve original dates\n" \
  39. "\t-p\t\textract to stdout\n" \
  40. "\t-t\t\tlist\n" \
  41. "\t-x\t\textract\n" \
  42. "\t-v\t\tverbosely list files processed"
  43. #define arping_trivial_usage \
  44. "[-fqbDUA] [-c count] [-w timeout] [-I device] [-s sender] target"
  45. #define arping_full_usage \
  46. "Ping hosts by ARP requests/replies.\n\n" \
  47. "Options:\n" \
  48. "\t-f\t\tQuit on first ARP reply\n" \
  49. "\t-q\t\tBe quiet\n" \
  50. "\t-b\t\tKeep broadcasting, don't go unicast\n" \
  51. "\t-D\t\tDuplicated address detection mode\n" \
  52. "\t-U\t\tUnsolicited ARP mode, update your neighbours\n" \
  53. "\t-A\t\tARP answer mode, update your neighbours\n" \
  54. "\t-c count\tStop after sending count ARP request packets\n" \
  55. "\t-w timeout\tTime to wait for ARP reply, in seconds\n" \
  56. "\t-I device\tOutgoing interface name, default is eth0\n" \
  57. "\t-s sender\tSet specific sender IP address\n" \
  58. "\ttarget\t\tTarget IP address of ARP request"
  59. #define ash_trivial_usage \
  60. "[FILE]...\n" \
  61. "or: ash -c command [args]..."
  62. #define ash_full_usage \
  63. "The ash shell (command interpreter)"
  64. #define awk_trivial_usage \
  65. "[OPTION]... [program-text] [FILE ...]"
  66. #define awk_full_usage \
  67. "Options:\n" \
  68. "\t-v var=val\tassign value 'val' to variable 'var'\n" \
  69. "\t-F sep\t\tuse 'sep' as field separator\n" \
  70. "\t-f progname\tread program source from file 'progname'"
  71. #define basename_trivial_usage \
  72. "FILE [SUFFIX]"
  73. #define basename_full_usage \
  74. "Strips directory path and suffixes from FILE.\n" \
  75. "If specified, also removes any trailing SUFFIX."
  76. #define basename_example_usage \
  77. "$ basename /usr/local/bin/foo\n" \
  78. "foo\n" \
  79. "$ basename /usr/local/bin/\n" \
  80. "bin\n" \
  81. "$ basename /foo/bar.txt .txt\n" \
  82. "bar"
  83. #define bunzip2_trivial_usage \
  84. "[OPTION]... [FILE]"
  85. #define bunzip2_full_usage \
  86. "Uncompress FILE (or standard input if FILE is '-' or omitted).\n\n" \
  87. "Options:\n" \
  88. "\t-c\tWrite output to standard output\n" \
  89. "\t-f\tForce"
  90. #define busybox_notes_usage \
  91. "Hello world!\n"
  92. #define bzcat_trivial_usage \
  93. "FILE"
  94. #define bzcat_full_usage \
  95. "Uncompress to stdout."
  96. #define unlzma_trivial_usage \
  97. "[OPTION]... [FILE]"
  98. #define unlzma_full_usage \
  99. "Uncompress FILE (or standard input if FILE is '-' or omitted).\n\n" \
  100. "Options:\n" \
  101. "\t-c\tWrite output to standard output\n" \
  102. "\t-f\tForce"
  103. #define lzmacat_trivial_usage \
  104. "FILE"
  105. #define lzmacat_full_usage \
  106. "Uncompress to stdout."
  107. #define cal_trivial_usage \
  108. "[-jy] [[month] year]"
  109. #define cal_full_usage \
  110. "Display a calendar.\n" \
  111. "\nOptions:\n" \
  112. "\t-j\tUse julian dates\n" \
  113. "\t-y\tDisplay the entire year"
  114. #define cat_trivial_usage \
  115. "[-u] [FILE]..."
  116. #define cat_full_usage \
  117. "Concatenates FILE(s) and prints them to stdout.\n\n" \
  118. "Options:\n" \
  119. "\t-u\tignored since unbuffered i/o is always used"
  120. #define cat_example_usage \
  121. "$ cat /proc/uptime\n" \
  122. "110716.72 17.67"
  123. #define chattr_trivial_usage \
  124. "[-R] [-+=AacDdijsStTu] [-v version] files..."
  125. #define chattr_full_usage \
  126. "change file attributes on an ext2 fs\n\n" \
  127. "Modifiers:\n" \
  128. "\t-\tremove attributes\n" \
  129. "\t+\tadd attributes\n" \
  130. "\t=\tset attributes\n" \
  131. "Attributes:\n" \
  132. "\tA\tdon't track atime\n" \
  133. "\ta\tappend mode only\n" \
  134. "\tc\tenable compress\n" \
  135. "\tD\twrite dir contents synchronously\n" \
  136. "\td\tdo not backup with dump\n" \
  137. "\ti\tcannot be modified (immutable)\n" \
  138. "\tj\twrite all data to journal first\n" \
  139. "\ts\tzero disk storage when deleted\n" \
  140. "\tS\twrite file contents synchronously\n" \
  141. "\tt\tdisable tail-merging of partial blocks with other files\n" \
  142. "\tu\tallow file to be undeleted\n" \
  143. "Options:\n" \
  144. "\t-R\trecursively list subdirectories\n" \
  145. "\t-v\tset the file's version/generation number"
  146. #define chgrp_trivial_usage \
  147. "[OPTION]... GROUP FILE..."
  148. #define chgrp_full_usage \
  149. "Change the group membership of each FILE to GROUP.\n" \
  150. "\nOptions:\n" \
  151. "\t-R\tChanges files and directories recursively"
  152. #define chgrp_example_usage \
  153. "$ ls -l /tmp/foo\n" \
  154. "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
  155. "$ chgrp root /tmp/foo\n" \
  156. "$ ls -l /tmp/foo\n" \
  157. "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
  158. #define chmod_trivial_usage \
  159. "[-R] MODE[,MODE]... FILE..."
  160. #define chmod_full_usage \
  161. "Each MODE is one or more of the letters ugoa, one of the\n" \
  162. "symbols +-= and one or more of the letters rwxst.\n\n" \
  163. "Options:\n" \
  164. "\t-R\tChanges files and directories recursively"
  165. #define chmod_example_usage \
  166. "$ ls -l /tmp/foo\n" \
  167. "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
  168. "$ chmod u+x /tmp/foo\n" \
  169. "$ ls -l /tmp/foo\n" \
  170. "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
  171. "$ chmod 444 /tmp/foo\n" \
  172. "$ ls -l /tmp/foo\n" \
  173. "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
  174. #define chown_trivial_usage \
  175. "[ -Rh ]... OWNER[<.|:>[GROUP]] FILE..."
  176. #define chown_full_usage \
  177. "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \
  178. "\nOptions:\n" \
  179. "\t-R\tChanges files and directories recursively\n" \
  180. "\t-h\tDo not dereference symbolic links"
  181. #define chown_example_usage \
  182. "$ ls -l /tmp/foo\n" \
  183. "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
  184. "$ chown root /tmp/foo\n" \
  185. "$ ls -l /tmp/foo\n" \
  186. "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
  187. "$ chown root.root /tmp/foo\n" \
  188. "ls -l /tmp/foo\n" \
  189. "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
  190. #define chroot_trivial_usage \
  191. "NEWROOT [COMMAND...]"
  192. #define chroot_full_usage \
  193. "Run COMMAND with root directory set to NEWROOT."
  194. #define chroot_example_usage \
  195. "$ ls -l /bin/ls\n" \
  196. "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
  197. "# mount /dev/hdc1 /mnt -t minix\n" \
  198. "# chroot /mnt\n" \
  199. "# ls -l /bin/ls\n" \
  200. "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
  201. #define chvt_trivial_usage \
  202. "N"
  203. #define chvt_full_usage \
  204. "Changes the foreground virtual terminal to /dev/ttyN"
  205. #define clear_trivial_usage \
  206. ""
  207. #define clear_full_usage \
  208. "Clear screen."
  209. #define cmp_trivial_usage \
  210. "[-l] [-s] FILE1 [FILE2]"
  211. #define cmp_full_usage \
  212. "Compares FILE1 vs stdin if FILE2 is not specified.\n\n" \
  213. "Options:\n" \
  214. "\t-l\tWrite the byte numbers (decimal) and values (octal)\n" \
  215. "\t\t for all differing bytes\n" \
  216. "\t-s\tquiet mode - do not print"
  217. #define comm_trivial_usage \
  218. "[-123] FILE1 FILE2"
  219. #define comm_full_usage \
  220. "Compares FILE1 to FILE2, or to stdin if = is specified.\n\n" \
  221. "Options:\n" \
  222. "\t-1\tSuppress lines unique to FILE1\n" \
  223. "\t-2\tSuppress lines unique to FILE2\n" \
  224. "\t-3\tSuppress lines common to both files"
  225. #define bbconfig_trivial_usage \
  226. ""
  227. #define bbconfig_full_usage \
  228. "Print the config file which built busybox"
  229. #define cp_trivial_usage \
  230. "[OPTION]... SOURCE DEST"
  231. #define cp_full_usage \
  232. "Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" \
  233. "\n" \
  234. "\t-a\tSame as -dpR\n" \
  235. "\t-d,-P\tPreserves links\n" \
  236. "\t-H,-L\tDereference all symlinks (implied by default)\n" \
  237. "\t-p\tPreserves file attributes if possible\n" \
  238. "\t-f\tforce (implied; ignored) - always set\n" \
  239. "\t-i\tinteractive, prompt before overwrite\n" \
  240. "\t-R,-r\tCopies directories recursively"
  241. #define cpio_trivial_usage \
  242. "-[dimtuv][F cpiofile]"
  243. #define cpio_full_usage \
  244. "Extract or list files from a cpio archive\n" \
  245. "Main operation mode:\n" \
  246. "\td\t\tmake leading directories\n" \
  247. "\ti\t\textract\n" \
  248. "\tm\t\tpreserve mtime\n" \
  249. "\tt\t\tlist\n" \
  250. "\tv\t\tverbose\n" \
  251. "\tu\t\tunconditional overwrite\n" \
  252. "\tF\t\tinput from file"
  253. #define crond_trivial_usage \
  254. "-d[#] -c <crondir> -f -b"
  255. #define crond_full_usage \
  256. "\t-d [#] -l [#] -S -L logfile -f -b -c dir\n" \
  257. "\t-d num\tdebug level\n" \
  258. "\t-l num\tlog level (8 - default)\n" \
  259. "\t-S\tlog to syslogd (default)\n" \
  260. "\t-L file\tlog to file\n" \
  261. "\t-f\trun in fordeground\n" \
  262. "\t-b\trun in background (default)\n" \
  263. "\t-c dir\tworking dir"
  264. #define crontab_trivial_usage \
  265. "[-c dir] {file|-}|[-u|-l|-e|-d user]"
  266. #define crontab_full_usage \
  267. "\tfile <opts> replace crontab from file\n" \
  268. "\t- <opts> replace crontab from stdin\n" \
  269. "\t-u user specify user\n" \
  270. "\t-l [user] list crontab for user\n" \
  271. "\t-e [user] edit crontab for user\n" \
  272. "\t-d [user] delete crontab for user\n" \
  273. "\t-c dir specify crontab directory"
  274. #define cut_trivial_usage \
  275. "[OPTION]... [FILE]..."
  276. #define cut_full_usage \
  277. "Prints selected fields from each input FILE to standard output.\n\n" \
  278. "Options:\n" \
  279. "\t-b LIST\t\tOutput only bytes from LIST\n" \
  280. "\t-c LIST\t\tOutput only characters from LIST\n" \
  281. "\t-d CHAR\t\tUse CHAR instead of tab as the field delimiter\n" \
  282. "\t-s\t\tOutput only the lines containing delimiter\n" \
  283. "\t-f N\t\tPrint only these fields\n" \
  284. "\t-n\t\tIgnored"
  285. #define cut_example_usage \
  286. "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
  287. "Hello\n" \
  288. "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
  289. "world\n"
  290. #ifdef CONFIG_FEATURE_DATE_ISOFMT
  291. #define USAGE_DATE_ISOFMT(a) a
  292. #else
  293. #define USAGE_DATE_ISOFMT(a)
  294. #endif
  295. #define date_trivial_usage \
  296. "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]"
  297. #define date_full_usage \
  298. "Displays the current time in the given FORMAT, or sets the system date.\n" \
  299. "\nOptions:\n" \
  300. "\t-R\t\tOutputs RFC-822 compliant date string\n" \
  301. "\t-d STRING\tDisplays time described by STRING, not `now'\n" \
  302. USAGE_DATE_ISOFMT( \
  303. "\t-I[TIMESPEC]\tOutputs an ISO-8601 compliant date/time string\n" \
  304. "\t\t\tTIMESPEC=`date' (or missing) for date only,\n" \
  305. "\t\t\t`hours', `minutes', or `seconds' for date and,\n" \
  306. "\t\t\ttime to the indicated precision\n" \
  307. "\t-D hint\t\tUse 'hint' as date format, via strptime()\n" \
  308. ) \
  309. "\t-s\t\tSets time described by STRING\n" \
  310. "\t-r FILE\t\tDisplays the last modification time of FILE\n" \
  311. "\t-u\t\tPrints or sets Coordinated Universal Time"
  312. #define date_example_usage \
  313. "$ date\n" \
  314. "Wed Apr 12 18:52:41 MDT 2000\n"
  315. #define dc_trivial_usage \
  316. "expression ..."
  317. #define dc_full_usage \
  318. "This is a Tiny RPN calculator that understands the\n" \
  319. "following operations: +, add, -, sub, *, mul, /, div, %, mod, " \
  320. "**, exp, and, or, not, eor.\n" \
  321. "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16.\n" \
  322. "\nOptions:\n" \
  323. "p - Prints the value on the top of the stack, without altering the stack\n" \
  324. "f - Prints the entire contents of the stack without altering anything\n" \
  325. "o - Pops the value off the top of the stack and uses it to set the output radix\n" \
  326. " Only 10 and 16 are supported"
  327. #define dc_example_usage \
  328. "$ dc 2 2 + p\n" \
  329. "4\n" \
  330. "$ dc 8 8 \\* 2 2 + / p\n" \
  331. "16\n" \
  332. "$ dc 0 1 and p\n" \
  333. "0\n" \
  334. "$ dc 0 1 or p\n" \
  335. "1\n" \
  336. "$ echo 72 9 div 8 mul p | dc\n" \
  337. "64\n"
  338. #define dd_trivial_usage \
  339. "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]\n" \
  340. "\t [seek=N] [conv=notrunc|noerror|sync]"
  341. #define dd_full_usage \
  342. "Copy a file, converting and formatting according to options\n\n" \
  343. "\tif=FILE\t\tread from FILE instead of stdin\n" \
  344. "\tof=FILE\t\twrite to FILE instead of stdout\n" \
  345. "\tbs=N\t\tread and write N bytes at a time\n" \
  346. "\tcount=N\t\tcopy only N input blocks\n" \
  347. "\tskip=N\t\tskip N input blocks\n" \
  348. "\tseek=N\t\tskip N output blocks\n" \
  349. "\tconv=notrunc\tdon't truncate output file\n" \
  350. "\tconv=noerror\tcontinue after read errors\n" \
  351. "\tconv=sync\tpad blocks with zeros\n" \
  352. "\n" \
  353. "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \
  354. "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)"
  355. #define dd_example_usage \
  356. "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
  357. "4+0 records in\n" \
  358. "4+0 records out\n"
  359. #define deallocvt_trivial_usage \
  360. "[N]"
  361. #define deallocvt_full_usage \
  362. "Deallocate unused virtual terminal /dev/ttyN"
  363. #define delgroup_trivial_usage \
  364. "GROUP"
  365. #define delgroup_full_usage \
  366. "Deletes group GROUP from the system"
  367. #define deluser_trivial_usage \
  368. "USER"
  369. #define deluser_full_usage \
  370. "Deletes user USER from the system"
  371. #ifdef CONFIG_DEVFSD_FG_NP
  372. # define USAGE_DEVFSD_FG_NP(a) a
  373. #else
  374. # define USAGE_DEVFSD_FG_NP(a)
  375. #endif
  376. #define devfsd_trivial_usage \
  377. "mntpnt [-v]" \
  378. USAGE_DEVFSD_FG_NP("[-fg][-np]" )
  379. #define devfsd_full_usage \
  380. "Optional daemon for managing devfs permissions and old device name symlinks.\n" \
  381. "\nOptions:\n" \
  382. "\tmntpnt\tThe mount point where devfs is mounted.\n\n" \
  383. "\t-v\tPrint the protocol version numbers for devfsd\n" \
  384. "\t\tand the kernel-side protocol version and exits." \
  385. USAGE_DEVFSD_FG_NP( "\n\n\t-fg\tRun the daemon in the foreground.\n\n" \
  386. "\t-np\tExit after parsing the configuration file\n" \
  387. "\t\tand processing synthetic REGISTER events.\n" \
  388. "\t\tDo not poll for events.")
  389. #ifdef CONFIG_FEATURE_HUMAN_READABLE
  390. # define USAGE_HUMAN_READABLE(a) a
  391. # define USAGE_NOT_HUMAN_READABLE(a)
  392. #else
  393. # define USAGE_HUMAN_READABLE(a)
  394. # define USAGE_NOT_HUMAN_READABLE(a) a
  395. #endif
  396. #define df_trivial_usage \
  397. "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILESYSTEM ...]"
  398. #define df_full_usage \
  399. "Print the filesystem space used and space available.\n\n" \
  400. "Options:\n" \
  401. USAGE_HUMAN_READABLE( \
  402. "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
  403. "\t-m\tprint sizes in megabytes\n" \
  404. "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
  405. "\n\t-k\tprint sizes in kilobytes(compatibility)")
  406. #define df_example_usage \
  407. "$ df\n" \
  408. "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
  409. "/dev/sda3 8690864 8553540 137324 98% /\n" \
  410. "/dev/sda1 64216 36364 27852 57% /boot\n" \
  411. "$ df /dev/sda3\n" \
  412. "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
  413. "/dev/sda3 8690864 8553540 137324 98% /\n"
  414. #define dirname_trivial_usage \
  415. "FILENAME"
  416. #define dirname_full_usage \
  417. "Strips non-directory suffix from FILENAME"
  418. #define dirname_example_usage \
  419. "$ dirname /tmp/foo\n" \
  420. "/tmp\n" \
  421. "$ dirname /tmp/foo/\n" \
  422. "/tmp\n"
  423. #define dmesg_trivial_usage \
  424. "[-c] [-n LEVEL] [-s SIZE]"
  425. #define dmesg_full_usage \
  426. "Prints or controls the kernel ring buffer\n\n" \
  427. "Options:\n" \
  428. "\t-c\t\tClears the ring buffer's contents after printing\n" \
  429. "\t-n LEVEL\tSets console logging level\n" \
  430. "\t-s SIZE\t\tUse a buffer of size SIZE"
  431. #define dnsd_trivial_usage \
  432. "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
  433. #define dnsd_full_usage \
  434. "Small and static DNS server daemon\n\n" \
  435. "Options:\n" \
  436. "\t-c\t\tconfig filename\n" \
  437. "\t-t\t\tTTL in seconds\n" \
  438. "\t-p\t\tlistening port\n" \
  439. "\t-i\t\tlistening iface ip (default all)\n" \
  440. "\t-d\t\tdaemonize"
  441. #define dos2unix_trivial_usage \
  442. "[option] [FILE]"
  443. #define dos2unix_full_usage \
  444. "Converts FILE from dos format to unix format. When no option\n" \
  445. "is given, the input is converted to the opposite output format.\n" \
  446. "When no file is given, uses stdin for input and stdout for output.\n\n" \
  447. "Options:\n" \
  448. "\t-u\toutput will be in UNIX format\n" \
  449. "\t-d\toutput will be in DOS format"
  450. #define dpkg_trivial_usage \
  451. "[-ilCPru] [-F option] package_name"
  452. #define dpkg_full_usage \
  453. "dpkg is a utility to install, remove and manage Debian packages.\n\n" \
  454. "Options:\n" \
  455. "\t-i\t\tInstall the package\n" \
  456. "\t-l\t\tList of installed packages\n" \
  457. "\t-C\t\tConfigure an unpackaged package\n" \
  458. "\t-F depends\tIgnore depency problems\n" \
  459. "\t-P\t\tPurge all files of a package\n" \
  460. "\t-r\t\tRemove all but the configuration files for a package\n" \
  461. "\t-u\t\tUnpack a package, but don't configure it"
  462. #define dpkg_deb_trivial_usage \
  463. "[-cefxX] FILE [argument]"
  464. #define dpkg_deb_full_usage \
  465. "Perform actions on Debian packages (.debs)\n\n" \
  466. "Options:\n" \
  467. "\t-c\tList contents of filesystem tree\n" \
  468. "\t-e\tExtract control files to [argument] directory\n" \
  469. "\t-f\tDisplay control field name starting with [argument]\n" \
  470. "\t-x\tExtract packages filesystem tree to directory\n" \
  471. "\t-X\tVerbose extract"
  472. #define dpkg_deb_example_usage \
  473. "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
  474. #ifdef CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K
  475. #define USAGE_DU_DEFALT_BLOCKSIZE_1k(a) a
  476. #define USAGE_NOT_DU_DEFALT_BLOCKSIZE_1k(a)
  477. #else
  478. #define USAGE_DU_DEFALT_BLOCKSIZE_1k(a)
  479. #define USAGE_NOT_DU_DEFALT_BLOCKSIZE_1k(a) a
  480. #endif
  481. #define du_trivial_usage \
  482. "[-aHLdclsx" USAGE_HUMAN_READABLE("hm") "k] [FILE]..."
  483. #define du_full_usage \
  484. "Summarizes disk space used for each FILE and/or directory.\n" \
  485. "Disk space is printed in units of " \
  486. USAGE_DU_DEFALT_BLOCKSIZE_1k("1024") USAGE_NOT_DU_DEFALT_BLOCKSIZE_1k("512") \
  487. " bytes.\n\n" \
  488. "Options:\n" \
  489. "\t-a\tshow sizes of files in addition to directories\n" \
  490. "\t-H\tfollow symbolic links that are FILE command line args\n" \
  491. "\t-L\tfollow all symbolic links encountered\n" \
  492. "\t-d N\tlimit output to directories (and files with -a) of depth < N\n" \
  493. "\t-c\toutput a grand total\n" \
  494. "\t-l\tcount sizes many times if hard linked\n" \
  495. "\t-s\tdisplay only a total for each argument\n" \
  496. "\t-x\tskip directories on different filesystems\n" \
  497. USAGE_HUMAN_READABLE( \
  498. "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
  499. "\t-m\tprint sizes in megabytes\n" ) \
  500. "\t-k\tprint sizes in kilobytes" USAGE_DU_DEFALT_BLOCKSIZE_1k("(default)")
  501. #define du_example_usage \
  502. "$ du\n" \
  503. "16 ./CVS\n" \
  504. "12 ./kernel-patches/CVS\n" \
  505. "80 ./kernel-patches\n" \
  506. "12 ./tests/CVS\n" \
  507. "36 ./tests\n" \
  508. "12 ./scripts/CVS\n" \
  509. "16 ./scripts\n" \
  510. "12 ./docs/CVS\n" \
  511. "104 ./docs\n" \
  512. "2417 .\n"
  513. #define dumpkmap_trivial_usage \
  514. "> keymap"
  515. #define dumpkmap_full_usage \
  516. "Prints out a binary keyboard translation table to standard output."
  517. #define dumpkmap_example_usage \
  518. "$ dumpkmap > keymap\n"
  519. #define dumpleases_trivial_usage \
  520. "[-r|-a] [-f LEASEFILE]"
  521. #define dumpleases_full_usage \
  522. "Displays the DHCP leases granted by udhcpd.\n\n" \
  523. "Options:\n" \
  524. "\t-f,\t--file=FILENAME\tLeases file to load\n" \
  525. "\t-r,\t--remaining\tInterpret lease times as time remaing\n" \
  526. "\t-a,\t--absolute\tInterpret lease times as expire time"
  527. #define e2fsck_trivial_usage \
  528. "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
  529. "[-I inode_buffer_blocks] [-P process_inode_size] " \
  530. "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
  531. "[-E extended-options] device"
  532. #define e2fsck_full_usage \
  533. "Check a Linux ext2/ext3 file system.\n\n" \
  534. "Options:\n" \
  535. "\t-p\tAutomatic repair (no questions)\n" \
  536. "\t-n\tMake no changes to the filesystem\n" \
  537. "\t-y\tAssume 'yes' to all questions\n" \
  538. "\t-c\tCheck for bad blocks and add them to the badblock list\n" \
  539. "\t-f\tForce checking even if filesystem is marked clean\n" \
  540. "\t-v\tBe verbose\n" \
  541. "\t-b superblock\tUse alternative superblock\n" \
  542. "\t-B blocksize\tForce blocksize when looking for superblock\n" \
  543. "\t-j journal\tSet location of the external journal\n" \
  544. "\t-l file\tAdd to badblocks list\n" \
  545. "\t-L file\tSet badblocks list"
  546. #ifdef CONFIG_FEATURE_FANCY_ECHO
  547. # define USAGE_FANCY_ECHO(a) a
  548. #else
  549. # define USAGE_FANCY_ECHO(a)
  550. #endif
  551. #define echo_trivial_usage \
  552. USAGE_FANCY_ECHO("[-neE] ") "[ARG ...]"
  553. #define echo_full_usage \
  554. "Prints the specified ARGs to stdout\n\n" \
  555. USAGE_FANCY_ECHO("Options:\n" \
  556. "\t-n\tsuppress trailing newline\n" \
  557. "\t-e\tinterpret backslash-escaped characters (i.e., \\t=tab)\n" \
  558. "\t-E\tdisable interpretation of backslash-escaped characters")
  559. #define echo_example_usage \
  560. "$ echo \"Erik is cool\"\n" \
  561. "Erik is cool\n" \
  562. USAGE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
  563. "Erik\n" \
  564. "is\n" \
  565. "cool\n" \
  566. "$ echo \"Erik\\nis\\ncool\"\n" \
  567. "Erik\\nis\\ncool\n")
  568. #define eject_trivial_usage \
  569. "[-t] [DEVICE]"
  570. #define eject_full_usage \
  571. "Eject specified DEVICE (or default /dev/cdrom).\n\n" \
  572. "Options:\n" \
  573. "\t-t\tclose tray"
  574. #define env_trivial_usage \
  575. "[-iu] [-] [name=value]... [command]"
  576. #define env_full_usage \
  577. "Prints the current environment or runs a program after setting\n" \
  578. "up the specified environment.\n\n" \
  579. "Options:\n" \
  580. "\t-, -i\tstart with an empty environment\n" \
  581. "\t-u\tremove variable from the environment"
  582. #define ether_wake_trivial_usage \
  583. "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
  584. #define ether_wake_full_usage \
  585. "Send a magic packet to wake up sleeping machines.\n" \
  586. "MAC must be a station address (00:11:22:33:44:55) or\n" \
  587. " a hostname with a known 'ethers' entry.\n\n" \
  588. "Options:\n" \
  589. "\t-b\t\tSend wake-up packet to the broadcast address\n" \
  590. "\t-i iface\tUse interface ifname instead of the default \"eth0\"\n" \
  591. "\t-p pass\tAppend the four or six byte password PW to the packet"
  592. #define expr_trivial_usage \
  593. "EXPRESSION"
  594. #define expr_full_usage \
  595. "Prints the value of EXPRESSION to standard output.\n\n" \
  596. "EXPRESSION may be:\n" \
  597. "\tARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
  598. "\tARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
  599. "\tARG1 < ARG2 ARG1 is less than ARG2\n" \
  600. "\tARG1 <= ARG2 ARG1 is less than or equal to ARG2\n" \
  601. "\tARG1 = ARG2 ARG1 is equal to ARG2\n" \
  602. "\tARG1 != ARG2 ARG1 is unequal to ARG2\n" \
  603. "\tARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n" \
  604. "\tARG1 > ARG2 ARG1 is greater than ARG2\n" \
  605. "\tARG1 + ARG2 arithmetic sum of ARG1 and ARG2\n" \
  606. "\tARG1 - ARG2 arithmetic difference of ARG1 and ARG2\n" \
  607. "\tARG1 * ARG2 arithmetic product of ARG1 and ARG2\n" \
  608. "\tARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2\n" \
  609. "\tARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2\n" \
  610. "\tSTRING : REGEXP anchored pattern match of REGEXP in STRING\n" \
  611. "\tmatch STRING REGEXP same as STRING : REGEXP\n" \
  612. "\tsubstr STRING POS LENGTH substring of STRING, POS counted from 1\n" \
  613. "\tindex STRING CHARS index in STRING where any CHARS is found,\n" \
  614. "\t or 0\n" \
  615. "\tlength STRING length of STRING\n" \
  616. "\tquote TOKEN interpret TOKEN as a string, even if\n" \
  617. "\t it is a keyword like `match' or an\n" \
  618. "\t operator like `/'\n" \
  619. "\t( EXPRESSION ) value of EXPRESSION\n\n" \
  620. "Beware that many operators need to be escaped or quoted for shells.\n" \
  621. "Comparisons are arithmetic if both ARGs are numbers, else\n" \
  622. "lexicographical. Pattern matches return the string matched between \n" \
  623. "\\( and \\) or null; if \\( and \\) are not used, they return the number \n" \
  624. "of characters matched or 0."
  625. #define fakeidentd_trivial_usage \
  626. "[-b ip] [STRING]"
  627. #define fakeidentd_full_usage \
  628. "Returns a set string to auth requests\n\n" \
  629. "\t-b\tBind to ip address\n" \
  630. "\tSTRING\tThe ident answer string (default is nobody)"
  631. #define false_trivial_usage \
  632. ""
  633. #define false_full_usage \
  634. "Return an exit code of FALSE (1)."
  635. #define false_example_usage \
  636. "$ false\n" \
  637. "$ echo $?\n" \
  638. "1\n"
  639. #define fbset_trivial_usage \
  640. "[options] [mode]"
  641. #define fbset_full_usage \
  642. "Show and modify frame buffer settings"
  643. #define fbset_example_usage \
  644. "$ fbset\n" \
  645. "mode \"1024x768-76\"\n" \
  646. "\t# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
  647. "\tgeometry 1024 768 1024 768 16\n" \
  648. "\ttimings 12714 128 32 16 4 128 4\n" \
  649. "\taccel false\n" \
  650. "\trgba 5/11,6/5,5/0,0/0\n" \
  651. "endmode\n"
  652. #define fdflush_trivial_usage \
  653. "DEVICE"
  654. #define fdflush_full_usage \
  655. "Forces floppy disk drive to detect disk change"
  656. #define fdformat_trivial_usage \
  657. "[-n] DEVICE"
  658. #define fdformat_full_usage \
  659. "Low-level formats a floppy disk\n\n" \
  660. "Options:\n" \
  661. "\t-n\tDon't verify after format"
  662. #define fdisk_trivial_usage \
  663. "[-luv] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
  664. #define fdisk_full_usage \
  665. "Change partition table\n" \
  666. "Options:\n" \
  667. "\t-l List partition table(s)\n" \
  668. "\t-u Give Start and End in sector (instead of cylinder) units\n" \
  669. "\t-s PARTITION Give partition size(s) in blocks\n" \
  670. "\t-b 2048: (for certain MO disks) use 2048-byte sectors\n" \
  671. "\t-C CYLINDERS Set the number of cylinders\n" \
  672. "\t-H HEADS Set the number of heads\n" \
  673. "\t-S SECTORS Set the number of sectors\n" \
  674. "\t-v Give fdisk version"
  675. #ifdef CONFIG_FEATURE_FIND_TYPE
  676. # define USAGE_FIND_TYPE(a) a
  677. #else
  678. # define USAGE_FIND_TYPE(a)
  679. #endif
  680. #ifdef CONFIG_FEATURE_FIND_PERM
  681. # define USAGE_FIND_PERM(a) a
  682. #else
  683. # define USAGE_FIND_PERM(a)
  684. #endif
  685. #ifdef CONFIG_FEATURE_FIND_MTIME
  686. # define USAGE_FIND_MTIME(a) a
  687. #else
  688. # define USAGE_FIND_MTIME(a)
  689. #endif
  690. #ifdef CONFIG_FEATURE_FIND_MMIN
  691. #define USAGE_FIND_MMIN(a) a
  692. #else
  693. #define USAGE_FIND_MMIN(a)
  694. #endif
  695. #ifdef CONFIG_FEATURE_FIND_NEWER
  696. # define USAGE_FIND_NEWER(a) a
  697. #else
  698. # define USAGE_FIND_NEWER(a)
  699. #endif
  700. #ifdef CONFIG_FEATURE_FIND_INUM
  701. # define USAGE_FIND_INUM(a) a
  702. #else
  703. # define USAGE_FIND_INUM(a)
  704. #endif
  705. #ifdef CONFIG_FEATURE_FIND_EXEC
  706. # define USAGE_FIND_EXEC(a) a
  707. #else
  708. # define USAGE_FIND_EXEC(a)
  709. #endif
  710. #define find_trivial_usage \
  711. "[PATH...] [EXPRESSION]"
  712. #define find_full_usage \
  713. "Search for files in a directory hierarchy. The default PATH is\n" \
  714. "the current directory; default EXPRESSION is '-print'\n" \
  715. "\nEXPRESSION may consist of:\n" \
  716. "\t-follow\t\tDereference symbolic links\n" \
  717. "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN\n" \
  718. "\t-print\t\tPrint (default and assumed)\n" \
  719. USAGE_FIND_TYPE( \
  720. "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
  721. ) USAGE_FIND_PERM( \
  722. "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \
  723. ) USAGE_FIND_MTIME( \
  724. "\n\t-mtime DAYS\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days" \
  725. ) USAGE_FIND_MMIN( \
  726. "\n\t-mmin MINS\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) minutes" \
  727. ) USAGE_FIND_NEWER( \
  728. "\n\t-newer FILE\tModified time is more recent than FILE's" \
  729. ) USAGE_FIND_INUM( \
  730. "\n\t-inum N\t\tFile has inode number N" \
  731. ) USAGE_FIND_EXEC( \
  732. "\n\t-exec CMD\tExecute CMD with all instances of {} replaced by the" \
  733. "\n\t\t\tfiles matching EXPRESSION")
  734. #define find_example_usage \
  735. "$ find / -name passwd\n" \
  736. "/etc/passwd\n"
  737. #define fold_trivial_usage \
  738. "[-bs] [-w WIDTH] [FILE]"
  739. #define fold_full_usage \
  740. "Wrap input lines in each FILE (standard input by default), writing to\n" \
  741. "standard output.\n\n" \
  742. "Options:\n" \
  743. "\t-b\tcount bytes rather than columns\n" \
  744. "\t-s\tbreak at spaces\n" \
  745. "\t-w\tuse WIDTH columns instead of 80"
  746. #define free_trivial_usage \
  747. ""
  748. #define free_full_usage \
  749. "Displays the amount of free and used system memory"
  750. #define free_example_usage \
  751. "$ free\n" \
  752. " total used free shared buffers\n" \
  753. " Mem: 257628 248724 8904 59644 93124\n" \
  754. " Swap: 128516 8404 120112\n" \
  755. "Total: 386144 257128 129016\n" \
  756. #define freeramdisk_trivial_usage \
  757. "DEVICE"
  758. #define freeramdisk_full_usage \
  759. "Frees all memory used by the specified ramdisk."
  760. #define freeramdisk_example_usage \
  761. "$ freeramdisk /dev/ram2\n"
  762. #define fsck_trivial_usage \
  763. "[-ANPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]"
  764. #define fsck_full_usage \
  765. "Check and repair filesystems.\n\n" \
  766. "Options:\n" \
  767. "\t-A\tWalk /etc/fstab and check all filesystems\n" \
  768. "\t-N\tDon't execute, just show what would be done\n" \
  769. "\t-P\tWhen using -A, check filesystems in parallel\n" \
  770. "\t-R\tWhen using -A, skip the root filesystem\n" \
  771. "\t-T\tDon't show title on startup\n" \
  772. "\t-V\tVerbose mode\n" \
  773. "\t-C\tWrite status information to specified filedescriptor\n" \
  774. "\t-t\tList of filesystem types to check"
  775. #define fsck_minix_trivial_usage \
  776. "[-larvsmf] /dev/name"
  777. #define fsck_minix_full_usage \
  778. "Performs a consistency check for MINIX filesystems.\n\n" \
  779. "Options:\n" \
  780. "\t-l\tLists all filenames\n" \
  781. "\t-r\tPerform interactive repairs\n" \
  782. "\t-a\tPerform automatic repairs\n" \
  783. "\t-v\tverbose\n" \
  784. "\t-s\tOutputs super-block information\n" \
  785. "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n" \
  786. "\t-f\tForce file system check"
  787. #define ftpget_trivial_usage \
  788. "[options] remote-host local-file remote-file"
  789. #define ftpget_full_usage \
  790. "Retrieve a remote file via FTP.\n\n" \
  791. "Options:\n" \
  792. "\t-c, --continue Continue a previous transfer\n" \
  793. "\t-v, --verbose Verbose\n" \
  794. "\t-u, --username Username to be used\n" \
  795. "\t-p, --password Password to be used\n" \
  796. "\t-P, --port Port number to be used"
  797. #define ftpput_trivial_usage \
  798. "[options] remote-host remote-file local-file"
  799. #define ftpput_full_usage \
  800. "Store a local file on a remote machine via FTP.\n\n" \
  801. "Options:\n" \
  802. "\t-v, --verbose Verbose\n" \
  803. "\t-u, --username Username to be used\n" \
  804. "\t-p, --password Password to be used\n" \
  805. "\t-P, --port Port number to be used"
  806. #define fuser_trivial_usage \
  807. "[options] file OR port/proto"
  808. #define fuser_full_usage \
  809. "Options:\n" \
  810. "\t-m Show all processes on the same mounted fs\n" \
  811. "\t-k Kill all processes that match.\n" \
  812. "\t-s Don't print or kill anything.\n" \
  813. "\t-4 When using port/proto only search IPv4 space\n" \
  814. "\t-6 When using port/proto only search IPv6 space\n" \
  815. "\t-SIGNAL When used with -k, this signal will be used to kill"
  816. #define getopt_trivial_usage \
  817. "[OPTIONS]..."
  818. #define getopt_full_usage \
  819. "Parse command options\n" \
  820. "\t-a, --alternative Allow long options starting with single -\n" \
  821. "\t-l, --longoptions=longopts Long options to be recognized\n" \
  822. "\t-n, --name=progname The name under which errors are reported\n" \
  823. "\t-o, --options=optstring Short options to be recognized\n" \
  824. "\t-q, --quiet Disable error reporting by getopt(3)\n" \
  825. "\t-Q, --quiet-output No normal output\n" \
  826. "\t-s, --shell=shell Set shell quoting conventions\n" \
  827. "\t-T, --test Test for getopt(1) version\n" \
  828. "\t-u, --unquoted Do not quote the output"
  829. #define getopt_example_usage \
  830. "$ cat getopt.test\n" \
  831. "#!/bin/sh\n" \
  832. "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
  833. " -n 'example.busybox' -- \"$@\"`\n" \
  834. "if [ $? != 0 ] ; then exit 1 ; fi\n" \
  835. "eval set -- \"$GETOPT\"\n" \
  836. "while true ; do\n" \
  837. " case $1 in\n" \
  838. " -a|--a-long) echo \"Option a\" ; shift ;;\n" \
  839. " -b|--b-long) echo \"Option b, argument `$2'\" ; shift 2 ;;\n" \
  840. " -c|--c-long)\n" \
  841. " case \"$2\" in\n" \
  842. " \"\") echo \"Option c, no argument\"; shift 2 ;;\n" \
  843. " *) echo \"Option c, argument `$2'\" ; shift 2 ;;\n" \
  844. " esac ;;\n" \
  845. " --) shift ; break ;;\n" \
  846. " *) echo \"Internal error!\" ; exit 1 ;;\n" \
  847. " esac\n" \
  848. "done\n"
  849. #define getty_trivial_usage \
  850. "[OPTIONS]... baud_rate,... line [termtype]"
  851. #define getty_full_usage \
  852. "Opens a tty, prompts for a login name, then invokes /bin/login\n\n" \
  853. "Options:\n" \
  854. "\t-h\t\tEnable hardware (RTS/CTS) flow control\n" \
  855. "\t-i\t\tDo not display /etc/issue before running login\n" \
  856. "\t-L\t\tLocal line, so do not do carrier detect\n" \
  857. "\t-m\t\tGet baud rate from modem's CONNECT status message\n" \
  858. "\t-w\t\tWait for a CR or LF before sending /etc/issue\n" \
  859. "\t-n\t\tDo not prompt the user for a login name\n" \
  860. "\t-f issue_file\tDisplay issue_file instead of /etc/issue\n" \
  861. "\t-l login_app\tInvoke login_app instead of /bin/login\n" \
  862. "\t-t timeout\tTerminate after timeout if no username is read\n" \
  863. "\t-I initstring\tSets the init string to send before anything else\n" \
  864. "\t-H login_host\tLog login_host into the utmp file as the hostname"
  865. #if ENABLE_FEATURE_GREP_EGREP_ALIAS
  866. #define USAGE_GREP_E(a) a
  867. #else
  868. #define USAGE_GREP_E(a)
  869. #endif
  870. #if ENABLE_FEATURE_GREP_CONTEXT
  871. #define USAGE_GREP_CTX(a) a
  872. #else
  873. #define USAGE_GREP_CTX(a)
  874. #endif
  875. #define grep_trivial_usage \
  876. "[-ihHnqvs" \
  877. USAGE_GREP_E("E") \
  878. USAGE_GREP_CTX("ABC") \
  879. "] PATTERN [FILEs...]"
  880. #define grep_full_usage \
  881. "Search for PATTERN in each FILE or standard input.\n\n" \
  882. "Options:\n" \
  883. "\t-H\tprefix output lines with filename where match was found\n" \
  884. "\t-h\tsuppress the prefixing filename on output\n" \
  885. "\t-i\tignore case distinctions\n" \
  886. "\t-l\tlist names of files that match\n" \
  887. "\t-L\tlist names of files that do not match\n" \
  888. "\t-n\tprint line number with output lines\n" \
  889. "\t-q\tbe quiet. Returns 0 if PATTERN was found, 1 otherwise\n" \
  890. "\t-v\tselect non-matching lines\n" \
  891. "\t-s\tsuppress file open/read error messages\n" \
  892. "\t-c\tonly print count of matching lines\n" \
  893. "\t-f\tread PATTERN from file\n" \
  894. "\t-e\tPATTERN is a regular expression\n" \
  895. "\t-F\tPATTERN is a set of newline-separated strings" \
  896. USAGE_GREP_E("\n\t-E\tPATTERN is an extended regular expression") \
  897. USAGE_GREP_CTX("\n\t-A\tprint NUM lines of trailing context") \
  898. USAGE_GREP_CTX("\n\t-B\tprint NUM lines of leading context") \
  899. USAGE_GREP_CTX("\n\t-C\tprint NUM lines of output context")
  900. #define grep_example_usage \
  901. "$ grep root /etc/passwd\n" \
  902. "root:x:0:0:root:/root:/bin/bash\n" \
  903. "$ grep ^[rR]oo. /etc/passwd\n" \
  904. "root:x:0:0:root:/root:/bin/bash\n"
  905. #define gunzip_trivial_usage \
  906. "[OPTION]... FILE"
  907. #define gunzip_full_usage \
  908. "Uncompress FILE (or standard input if FILE is '-').\n\n" \
  909. "Options:\n" \
  910. "\t-c\tWrite output to standard output\n" \
  911. "\t-f\tForce read when source is a terminal\n" \
  912. "\t-t\tTest compressed file integrity"
  913. #define gunzip_example_usage \
  914. "$ ls -la /tmp/BusyBox*\n" \
  915. "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
  916. "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
  917. "$ ls -la /tmp/BusyBox*\n" \
  918. "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
  919. #define gzip_trivial_usage \
  920. "[OPTION]... [FILE]..."
  921. #define gzip_full_usage \
  922. "Compress FILE(s) with maximum compression.\n" \
  923. "When FILE is '-' or unspecified, reads standard input. Implies -c.\n\n" \
  924. "Options:\n" \
  925. "\t-c\tWrite output to standard output instead of FILE.gz\n" \
  926. "\t-d\tDecompress\n" \
  927. "\t-f\tForce write when destination is a terminal"
  928. #define gzip_example_usage \
  929. "$ ls -la /tmp/busybox*\n" \
  930. "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
  931. "$ gzip /tmp/busybox.tar\n" \
  932. "$ ls -la /tmp/busybox*\n" \
  933. "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
  934. #define halt_trivial_usage \
  935. "[-d<delay>] [-n<nosync>] [-f<force>]"
  936. #define halt_full_usage \
  937. "Halt the system.\n" \
  938. "Options:\n" \
  939. "\t-d\t\tdelay interval for halting\n" \
  940. "\t-n\t\tno call to sync()\n" \
  941. "\t-f\t\tforce halt (don't go through init)"
  942. #ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
  943. #define USAGE_HDPARM_IDENT(a) a
  944. #else
  945. #define USAGE_HDPARM_IDENT(a)
  946. #endif
  947. #ifdef CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
  948. #define USAGE_SCAN_HWIF(a) a
  949. #else
  950. #define USAGE_SCAN_HWIF(a)
  951. #endif
  952. #ifdef CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
  953. #define USAGE_UNREGISTER_HWIF(a) a
  954. #else
  955. #define USAGE_UNREGISTER_HWIF(a)
  956. #endif
  957. #ifdef CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET
  958. #define USAGE_DRIVE_RESET(a) a
  959. #else
  960. #define USAGE_DRIVE_RESET(a)
  961. #endif
  962. #ifdef CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
  963. #define USAGE_TRISTATE_HWIF(a) a
  964. #else
  965. #define USAGE_TRISTATE_HWIF(a)
  966. #endif
  967. #ifdef CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
  968. #define USAGE_GETSET_DMA(a) a
  969. #else
  970. #define USAGE_GETSET_DMA(a)
  971. #endif
  972. #define hdparm_trivial_usage \
  973. "[options] [device] .."
  974. #define hdparm_full_usage \
  975. "Options:" \
  976. "\t-a get/set fs readahead\n" \
  977. "\t-A set drive read-lookahead flag (0/1)\n" \
  978. "\t-b get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \
  979. "\t-B set Advanced Power Management setting (1-255)\n" \
  980. "\t-c get/set IDE 32-bit IO setting\n" \
  981. "\t-C check IDE power mode status\n" \
  982. USAGE_GETSET_DMA("\t-d get/set using_dma flag\n") \
  983. "\t-D enable/disable drive defect-mgmt\n" \
  984. "\t-f flush buffer cache for device on exit\n" \
  985. "\t-g display drive geometry\n" \
  986. "\t-h display terse usage information\n" \
  987. "\t-i display drive identification\n" \
  988. USAGE_HDPARM_IDENT("\t-I detailed/current information directly from drive\n") \
  989. USAGE_HDPARM_IDENT("\t-Istdin similar to -I, but wants /proc/ide/" "*" "/hd?/identify as input\n") \
  990. "\t-k get/set keep_settings_over_reset flag (0/1)\n" \
  991. "\t-K set drive keep_features_over_reset flag (0/1)\n" \
  992. "\t-L set drive doorlock (0/1) (removable harddisks only)\n" \
  993. "\t-m get/set multiple sector count\n" \
  994. "\t-n get/set ignore-write-errors flag (0/1)\n" \
  995. "\t-p set PIO mode on IDE interface chipset (0,1,2,3,4,...)\n" \
  996. "\t-P set drive prefetch count\n" \
  997. "\t-q change next setting quietly\n" \
  998. "\t-Q get/set DMA tagged-queuing depth (if supported)\n" \
  999. "\t-r get/set readonly flag (DANGEROUS to set)\n" \
  1000. USAGE_SCAN_HWIF("\t-R register an IDE interface (DANGEROUS)\n") \
  1001. "\t-S set standby (spindown) timeout\n" \
  1002. "\t-t perform device read timings\n" \
  1003. "\t-T perform cache read timings\n" \
  1004. "\t-u get/set unmaskirq flag (0/1)\n" \
  1005. USAGE_UNREGISTER_HWIF("\t-U un-register an IDE interface (DANGEROUS)\n") \
  1006. "\t-v defaults; same as -mcudkrag for IDE drives\n" \
  1007. "\t-V display program version and exit immediately\n" \
  1008. USAGE_DRIVE_RESET("\t-w perform device reset (DANGEROUS)\n") \
  1009. "\t-W set drive write-caching flag (0/1) (DANGEROUS)\n" \
  1010. USAGE_TRISTATE_HWIF("\t-x tristate device for hotswap (0/1) (DANGEROUS)\n") \
  1011. "\t-X set IDE xfer mode (DANGEROUS)\n" \
  1012. "\t-y put IDE drive in standby mode\n" \
  1013. "\t-Y put IDE drive to sleep\n" \
  1014. "\t-Z disable Seagate auto-powersaving mode\n" \
  1015. "\t-z re-read partition table"
  1016. #ifdef CONFIG_FEATURE_FANCY_HEAD
  1017. #define USAGE_FANCY_HEAD(a) a
  1018. #else
  1019. #define USAGE_FANCY_HEAD(a)
  1020. #endif
  1021. #define head_trivial_usage \
  1022. "[OPTION]... [FILE]..."
  1023. #define head_full_usage \
  1024. "Print first 10 lines of each FILE to standard output.\n" \
  1025. "With more than one FILE, precede each with a header giving the\n" \
  1026. "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
  1027. "Options:\n" \
  1028. "\t-n NUM\t\tPrint first NUM lines instead of first 10" \
  1029. USAGE_FANCY_HEAD( \
  1030. "\n\t-c NUM\t\toutput the first NUM bytes\n" \
  1031. "\t-q\t\tnever output headers giving file names\n" \
  1032. "\t-v\t\talways output headers giving file names" )
  1033. #define head_example_usage \
  1034. "$ head -n 2 /etc/passwd\n" \
  1035. "root:x:0:0:root:/root:/bin/bash\n" \
  1036. "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
  1037. #define hexdump_trivial_usage \
  1038. "[-[bcCdefnosvx]] [OPTION] FILE"
  1039. #define hexdump_full_usage \
  1040. "The hexdump utility is a filter which displays the specified files,\n" \
  1041. "or the standard input, if no files are specified, in a user specified\n" \
  1042. "format\n" \
  1043. "\t-b\t\tOne-byte octal display\n" \
  1044. "\t-c\t\tOne-byte character display\n" \
  1045. "\t-C\t\tCanonical hex+ASCII, 16 bytes per line\n" \
  1046. "\t-d\t\tTwo-byte decimal display\n" \
  1047. "\t-e FORMAT STRING\n" \
  1048. "\t-f FORMAT FILE\n" \
  1049. "\t-n LENGTH\tInterpret only length bytes of input\n" \
  1050. "\t-o\t\tTwo-byte octal display\n" \
  1051. "\t-s OFFSET\tSkip offset byte\n" \
  1052. "\t-v\t\tdisplay all input data\n" \
  1053. "\t-x\t\tTwo-byte hexadecimal display"
  1054. #define hostid_trivial_usage \
  1055. ""
  1056. #define hostid_full_usage \
  1057. "Print out a unique 32-bit identifier for the machine."
  1058. #define hostname_trivial_usage \
  1059. "[OPTION] {hostname | -F FILE}"
  1060. #define hostname_full_usage \
  1061. "Get or set the hostname or DNS domain name. If a hostname is given\n" \
  1062. "(or FILE with the -F parameter), the host name will be set.\n\n" \
  1063. "Options:\n" \
  1064. "\t-s\tShort\n" \
  1065. "\t-i\tAddresses for the hostname\n" \
  1066. "\t-d\tDNS domain name\n" \
  1067. "\t-f\tFully qualified domain name\n" \
  1068. "\t-F FILE\tUse the contents of FILE to specify the hostname"
  1069. #define hostname_example_usage \
  1070. "$ hostname\n" \
  1071. "sage\n"
  1072. #ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH
  1073. # define USAGE_HTTPD_BASIC_AUTH(a) a
  1074. # ifdef CONFIG_FEATURE_HTTPD_AUTH_MD5
  1075. # define USAGE_HTTPD_AUTH_MD5(a) a
  1076. # else
  1077. # define USAGE_HTTPD_AUTH_MD5(a)
  1078. # endif
  1079. #else
  1080. # define USAGE_HTTPD_BASIC_AUTH(a)
  1081. # define USAGE_HTTPD_AUTH_MD5(a)
  1082. #endif
  1083. #ifdef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY
  1084. # define USAGE_HTTPD_STANDALONE(a)
  1085. # define USAGE_HTTPD_SETUID(a)
  1086. #else
  1087. # define USAGE_HTTPD_STANDALONE(a) a
  1088. # ifdef CONFIG_FEATURE_HTTPD_SETUID
  1089. # define USAGE_HTTPD_SETUID(a) a
  1090. # else
  1091. # define USAGE_HTTPD_SETUID(a)
  1092. # endif
  1093. #endif
  1094. #define httpd_trivial_usage \
  1095. "[-c <conf file>]" \
  1096. USAGE_HTTPD_STANDALONE(" [-p <port>]") \
  1097. USAGE_HTTPD_SETUID(" [-u user]") \
  1098. USAGE_HTTPD_BASIC_AUTH(" [-r <realm>]") \
  1099. USAGE_HTTPD_AUTH_MD5(" [-m pass]") \
  1100. " [-h home]" \
  1101. " [-d/-e <string>]"
  1102. #define httpd_full_usage \
  1103. "Listens for incoming http server requests.\n\n" \
  1104. "Options:\n" \
  1105. "\t-c FILE\t\tSpecifies configuration file. (default httpd.conf)\n" \
  1106. USAGE_HTTPD_STANDALONE("\t-p PORT\tServer port (default 80)\n") \
  1107. USAGE_HTTPD_SETUID("\t-u USER\tSet uid to USER after listening privileges port\n") \
  1108. USAGE_HTTPD_BASIC_AUTH("\t-r REALM\tAuthentication Realm for Basic Authentication\n") \
  1109. USAGE_HTTPD_AUTH_MD5("\t-m PASS\t\tCrypt PASS with md5 algorithm\n") \
  1110. "\t-h HOME \tSpecifies http HOME directory (default ./)\n" \
  1111. "\t-e STRING\tHtml encode STRING\n" \
  1112. "\t-d STRING\tURL decode STRING"
  1113. #define hwclock_trivial_usage \
  1114. "[-r|--show] [-s|--hctosys] [-w|--systohc] [-l|--localtime] [-u|--utc]"
  1115. #define hwclock_full_usage \
  1116. "Query and set the hardware clock (RTC)\n\n" \
  1117. "Options:\n" \
  1118. "\t-r\tread hardware clock and print result\n" \
  1119. "\t-s\tset the system time from the hardware clock\n" \
  1120. "\t-w\tset the hardware clock to the current system time\n" \
  1121. "\t-u\tthe hardware clock is kept in coordinated universal time\n" \
  1122. "\t-l\tthe hardware clock is kept in local time"
  1123. #ifdef CONFIG_SELINUX
  1124. # define USAGE_SELINUX(a) a
  1125. #else
  1126. # define USAGE_SELINUX(a)
  1127. #endif
  1128. #define id_trivial_usage \
  1129. "[OPTIONS]... [USERNAME]"
  1130. #define id_full_usage \
  1131. "Print information for USERNAME or the current user\n\n" \
  1132. "Options:\n" \
  1133. USAGE_SELINUX("\t-c\tprints only the security context\n") \
  1134. "\t-g\tprints only the group ID\n" \
  1135. "\t-u\tprints only the user ID\n" \
  1136. "\t-n\tprint a name instead of a number\n" \
  1137. "\t-r\tprints the real user ID instead of the effective ID"
  1138. #define id_example_usage \
  1139. "$ id\n" \
  1140. "uid=1000(andersen) gid=1000(andersen)\n"
  1141. #ifdef CONFIG_FEATURE_IFCONFIG_SLIP
  1142. # define USAGE_SIOCSKEEPALIVE(a) a
  1143. #else
  1144. # define USAGE_SIOCSKEEPALIVE(a)
  1145. #endif
  1146. #ifdef CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
  1147. # define USAGE_IFCONFIG_MII(a) a
  1148. #else
  1149. # define USAGE_IFCONFIG_MII(a)
  1150. #endif
  1151. #ifdef CONFIG_FEATURE_IFCONFIG_HW
  1152. # define USAGE_IFCONFIG_HW(a) a
  1153. #else
  1154. # define USAGE_IFCONFIG_HW(a)
  1155. #endif
  1156. #ifdef CONFIG_FEATURE_IFCONFIG_STATUS
  1157. # define USAGE_IFCONFIG_OPT_A(a) a
  1158. #else
  1159. # define USAGE_IFCONFIG_OPT_A(a)
  1160. #endif
  1161. #ifdef CONFIG_FEATURE_IPV6
  1162. # define USAGE_IPV6(a) a
  1163. #else
  1164. # define USAGE_IPV6(a)
  1165. #endif
  1166. #define ifconfig_trivial_usage \
  1167. USAGE_IFCONFIG_OPT_A("[-a]") " <interface> [<address>]"
  1168. #define ifconfig_full_usage \
  1169. "configure a network interface\n\n" \
  1170. "Options:\n" \
  1171. USAGE_IPV6("[add <address>[/<prefixlen>]]\n") \
  1172. USAGE_IPV6("[del <address>[/<prefixlen>]]\n") \
  1173. "\t[[-]broadcast [<address>]] [[-]pointopoint [<address>]]\n" \
  1174. "\t[netmask <address>] [dstaddr <address>]\n" \
  1175. USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
  1176. "\t" USAGE_IFCONFIG_HW("[hw ether <address>] ") \
  1177. "[metric <NN>] [mtu <NN>]\n" \
  1178. "\t[[-]trailers] [[-]arp] [[-]allmulti]\n" \
  1179. "\t[multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic]\n" \
  1180. USAGE_IFCONFIG_MII("\t[mem_start <NN>] [io_addr <NN>] [irq <NN>]\n") \
  1181. "\t[up|down] ..."
  1182. #define ifup_trivial_usage \
  1183. "<-ahinv> <ifaces...>"
  1184. #define ifup_full_usage \
  1185. "ifup <options> <ifaces...>\n\n" \
  1186. "Options:\n" \
  1187. "\t-h\tthis help\n" \
  1188. "\t-a\tde/configure all interfaces automatically\n" \
  1189. "\t-i FILE\tuse FILE for interface definitions\n" \
  1190. "\t-n\tprint out what would happen, but don't do it\n" \
  1191. "\t\t\t(note that this option doesn't disable mappings)\n" \
  1192. "\t-v\tprint out what would happen before doing it\n" \
  1193. "\t-m\tdon't run any mappings\n" \
  1194. "\t-f\tforce de/configuration"
  1195. #define ifdown_trivial_usage \
  1196. "<-ahinv> <ifaces...>"
  1197. #define ifdown_full_usage \
  1198. "ifdown <options> <ifaces...>\n\n" \
  1199. "Options:\n" \
  1200. "\t-h\tthis help\n" \
  1201. "\t-a\tde/configure all interfaces automatically\n" \
  1202. "\t-i FILE\tuse FILE for interface definitions\n" \
  1203. "\t-n\tprint out what would happen, but don't do it\n" \
  1204. "\t\t(note that this option doesn't disable mappings)\n" \
  1205. "\t-v\tprint out what would happen before doing it\n" \
  1206. "\t-m\tdon't run any mappings\n" \
  1207. "\t-f\tforce de/configuration"
  1208. #define inetd_trivial_usage \
  1209. "[-f] [-q len] [conf]"
  1210. #define inetd_full_usage \
  1211. "Listens for network connections and launches programs\n\n" \
  1212. "Option:\n" \
  1213. "\t-f\tRun as a foreground progress\n" \
  1214. "\t-q\tSets the size of the socket listen queue to\n" \
  1215. "\t\tthe specified value. Default is 128"
  1216. #define init_trivial_usage \
  1217. ""
  1218. #define init_full_usage \
  1219. "Init is the parent of all processes."
  1220. #define init_notes_usage \
  1221. "This version of init is designed to be run only by the kernel.\n" \
  1222. "\n" \
  1223. "BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
  1224. "the /etc/inittab file is completely ignored by BusyBox init. If you want \n" \
  1225. "runlevels, use sysvinit.\n" \
  1226. "\n" \
  1227. "BusyBox init works just fine without an inittab. If no inittab is found, \n" \
  1228. "it has the following default behavior:\n" \
  1229. "\n" \
  1230. " ::sysinit:/etc/init.d/rcS\n" \
  1231. " ::askfirst:/bin/sh\n" \
  1232. " ::ctrlaltdel:/sbin/reboot\n" \
  1233. " ::shutdown:/sbin/swapoff -a\n" \
  1234. " ::shutdown:/bin/umount -a -r\n" \
  1235. " ::restart:/sbin/init\n" \
  1236. "\n" \
  1237. "if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
  1238. "\n" \
  1239. " tty2::askfirst:/bin/sh\n" \
  1240. " tty3::askfirst:/bin/sh\n" \
  1241. " tty4::askfirst:/bin/sh\n" \
  1242. "\n" \
  1243. "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
  1244. "\n" \
  1245. " <id>:<runlevels>:<action>:<process>\n" \
  1246. "\n" \
  1247. " <id>:\n" \
  1248. "\n" \
  1249. " WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
  1250. " The id field is used by BusyBox init to specify the controlling tty for\n" \
  1251. " the specified process to run on. The contents of this field are\n" \
  1252. " appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
  1253. " be unique, although if it isn't you may have strange results. If this\n" \
  1254. " field is left blank, the controlling tty is set to the console. Also\n" \
  1255. " note that if BusyBox detects that a serial console is in use, then only\n" \
  1256. " entries whose controlling tty is either the serial console or /dev/null\n" \
  1257. " will be run. BusyBox init does nothing with utmp. We don't need no\n" \
  1258. " stinkin' utmp.\n" \
  1259. "\n" \
  1260. " <runlevels>:\n" \
  1261. "\n" \
  1262. " The runlevels field is completely ignored.\n" \
  1263. "\n" \
  1264. " <action>:\n" \
  1265. "\n" \
  1266. " Valid actions include: sysinit, respawn, askfirst, wait,\n" \
  1267. " once, restart, ctrlaltdel, and shutdown.\n" \
  1268. "\n" \
  1269. " The available actions can be classified into two groups: actions\n" \
  1270. " that are run only once, and actions that are re-run when the specified\n" \
  1271. " process exits.\n" \
  1272. "\n" \
  1273. " Run only-once actions:\n" \
  1274. "\n" \
  1275. " 'sysinit' is the first item run on boot. init waits until all\n" \
  1276. " sysinit actions are completed before continuing. Following the\n" \
  1277. " completion of all sysinit actions, all 'wait' actions are run.\n" \
  1278. " 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
  1279. " the specified task completes. 'once' actions are asynchronous,\n" \
  1280. " therefore, init does not wait for them to complete. 'restart' is\n" \
  1281. " the action taken to restart the init process. By default this should\n" \
  1282. " simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
  1283. " can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
  1284. " actions are run when the system detects that someone on the system\n" \
  1285. " console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
  1286. " wants to run 'reboot' at this point to cause the system to reboot.\n" \
  1287. " Finally the 'shutdown' action specifies the actions to taken when\n" \
  1288. " init is told to reboot. Unmounting filesystems and disabling swap\n" \
  1289. " is a very good here\n" \
  1290. "\n" \
  1291. " Run repeatedly actions:\n" \
  1292. "\n" \
  1293. " 'respawn' actions are run after the 'once' actions. When a process\n" \
  1294. " started with a 'respawn' action exits, init automatically restarts\n" \
  1295. " it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
  1296. " respawning out of control. The 'askfirst' actions acts just like\n" \
  1297. " respawn, except that before running the specified process it\n" \
  1298. " displays the line \"Please press Enter to activate this console.\"\n" \
  1299. " and then waits for the user to press enter before starting the\n" \
  1300. " specified process.\n" \
  1301. "\n" \
  1302. " Unrecognized actions (like initdefault) will cause init to emit an\n" \
  1303. " error message, and then go along with its business. All actions are\n" \
  1304. " run in the order they appear in /etc/inittab.\n" \
  1305. "\n" \
  1306. " <process>:\n" \
  1307. "\n" \
  1308. " Specifies the process to be executed and its command line.\n" \
  1309. "\n" \
  1310. "Example /etc/inittab file:\n" \
  1311. "\n" \
  1312. " # This is run first except when booting in single-user mode.\n" \
  1313. " #\n" \
  1314. " ::sysinit:/etc/init.d/rcS\n" \
  1315. " \n" \
  1316. " # /bin/sh invocations on selected ttys\n" \
  1317. " #\n" \
  1318. " # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
  1319. " ::askfirst:-/bin/sh\n" \
  1320. " # Start an \"askfirst\" shell on /dev/tty2-4\n" \
  1321. " tty2::askfirst:-/bin/sh\n" \
  1322. " tty3::askfirst:-/bin/sh\n" \
  1323. " tty4::askfirst:-/bin/sh\n" \
  1324. " \n" \
  1325. " # /sbin/getty invocations for selected ttys\n" \
  1326. " #\n" \
  1327. " tty4::respawn:/sbin/getty 38400 tty4\n" \
  1328. " tty5::respawn:/sbin/getty 38400 tty5\n" \
  1329. " \n" \
  1330. " \n" \
  1331. " # Example of how to put a getty on a serial line (for a terminal)\n" \
  1332. " #\n" \
  1333. " #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
  1334. " #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
  1335. " #\n" \
  1336. " # Example how to put a getty on a modem line.\n" \
  1337. " #::respawn:/sbin/getty 57600 ttyS2\n" \
  1338. " \n" \
  1339. " # Stuff to do when restarting the init process\n" \
  1340. " ::restart:/sbin/init\n" \
  1341. " \n" \
  1342. " # Stuff to do before rebooting\n" \
  1343. " ::ctrlaltdel:/sbin/reboot\n" \
  1344. " ::shutdown:/bin/umount -a -r\n" \
  1345. " ::shutdown:/sbin/swapoff -a\n"
  1346. #ifdef CONFIG_FEATURE_INSMOD_LOAD_MAP
  1347. # define USAGE_INSMOD_MAP(a) a
  1348. #else
  1349. # define USAGE_INSMOD_MAP(a)
  1350. #endif
  1351. #define insmod_trivial_usage \
  1352. "[OPTION]... MODULE [symbol=value]..."
  1353. #define insmod_full_usage \
  1354. "Loads the specified kernel modules into the kernel.\n\n" \
  1355. "Options:\n" \
  1356. "\t-f\tForce module to load into the wrong kernel version\n" \
  1357. "\t-k\tMake module autoclean-able\n" \
  1358. "\t-v\tverbose output\n" \
  1359. "\t-q\tquiet output\n" \
  1360. "\t-L\tLock to prevent simultaneous loads of a module\n" \
  1361. USAGE_INSMOD_MAP("\t-m\tOutput load map to stdout\n") \
  1362. "\t-o NAME\tSet internal module name to NAME\n" \
  1363. "\t-x\tdo not export externs"
  1364. #define install_trivial_usage \
  1365. "[-cgmops] [sources] <dest|directory>"
  1366. #define install_full_usage \
  1367. "Copies files and set attributes\n\n" \
  1368. "Options:\n" \
  1369. "\t-c\tcopy the file, default\n" \
  1370. "\t-d\tcreate directories\n" \
  1371. "\t-g\tset group ownership\n" \
  1372. "\t-m\tset permission modes\n" \
  1373. "\t-o\tset ownership\n" \
  1374. "\t-p\tpreserve date\n" \
  1375. "\t-s\tstrip symbol tables"
  1376. #define ip_trivial_usage \
  1377. "[ OPTIONS ] { address | link | route | tunnel } { COMMAND | help }"
  1378. #define ip_full_usage \
  1379. "ip [ OPTIONS ] OBJECT { COMMAND | help }\n" \
  1380. "where OBJECT := { link | addr | route | tunnel }\n" \
  1381. "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }"
  1382. #define ipaddr_trivial_usage \
  1383. "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
  1384. "\t\t[ dev STRING ] [ to PREFIX ] }"
  1385. #define ipaddr_full_usage \
  1386. "ipaddr {add|del} IFADDR dev STRING\n" \
  1387. "ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n" \
  1388. "\t\t\t[ to PREFIX ] [ label PATTERN ]\n" \
  1389. "\t\t\tIFADDR := PREFIX | ADDR peer PREFIX\n" \
  1390. "\t\t\t[ broadcast ADDR ] [ anycast ADDR ]\n" \
  1391. "\t\t\t[ label STRING ] [ scope SCOPE-ID ]\n" \
  1392. "\t\t\tSCOPE-ID := [ host | link | global | NUMBER ]"
  1393. #ifdef CONFIG_FEATURE_IPCALC_FANCY
  1394. # define XUSAGE_IPCALC_FANCY(a) a
  1395. #else
  1396. # define XUSAGE_IPCALC_FANCY(a)
  1397. #endif
  1398. #define ipcalc_trivial_usage \
  1399. "[OPTION]... <ADDRESS>[[/]<NETMASK>] [NETMASK]"
  1400. #define ipcalc_full_usage \
  1401. "Calculate IP network settings from a IP address\n\n" \
  1402. "Options:\n" \
  1403. "\t-b\t--broadcast\tDisplay calculated broadcast address\n" \
  1404. "\t-n\t--network\tDisplay calculated network address\n" \
  1405. "\t-m\t--netmask\tDisplay default netmask for IP" \
  1406. XUSAGE_IPCALC_FANCY( \
  1407. "\n\t-p\t--prefix\tDisplay the prefix for IP/NETMASK\n" \
  1408. "\t-h\t--hostname\tDisplay first resolved host name\n" \
  1409. "\t-s\t--silent\tDon't ever display error messages")
  1410. #define ipcrm_trivial_usage \
  1411. "[-[MQS] key] [-[mqs] id]"
  1412. #define ipcrm_full_usage \
  1413. "The upper-case options MQS are used to remove a shared memory\n" \
  1414. "segment by an shmkey value. The lower-case options mqs are used\n" \
  1415. "to remove a segment by shmid value.\n" \
  1416. "\t-m | -M\tRemove the memory segment after the last detatch\n" \
  1417. "\t-q | -Q\tRemove the message queue\n" \
  1418. "\t-s | -S\tRemove the semaphore"
  1419. #define ipcs_trivial_usage \
  1420. "[[-smq] -i shmid] | [[-asmq] [-tclup]]"
  1421. #define ipcs_full_usage \
  1422. "\t-i\tspecify a specific resource id\n" \
  1423. "Resource specification:\n" \
  1424. "\t-m\tshared memory segments\n" \
  1425. "\t-q\tmessage queues\n" \
  1426. "\t-s\tsempahore arrays\n" \
  1427. "\t-a\tall (default)\n" \
  1428. "Output format:\n" \
  1429. "\t-t\ttime\n" \
  1430. "\t-p\tpid\n" \
  1431. "\t-s\tcreator\n" \
  1432. "\t-a\tlimits\n" \
  1433. "\t-i\tsummary"
  1434. #define iplink_trivial_usage \
  1435. "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }"
  1436. #define iplink_full_usage \
  1437. "iplink set DEVICE { up | down | arp { on | off } |\n" \
  1438. "\t\t\tdynamic { on | off } |\n" \
  1439. "\t\t\tmtu MTU }\n" \
  1440. "\tiplink show [ DEVICE ]"
  1441. #define iproute_trivial_usage \
  1442. "{ list | flush | { add | del | change | append |\n" \
  1443. "\t\treplace | monitor } ROUTE }"
  1444. #define iproute_full_usage \
  1445. "iproute { list | flush } SELECTOR\n" \
  1446. "iproute get ADDRESS [ from ADDRESS iif STRING ]\n" \
  1447. "\t\t\t[ oif STRING ] [ tos TOS ]\n" \
  1448. "\tiproute { add | del | change | append | replace | monitor } ROUTE\n" \
  1449. "\t\t\tSELECTOR := [ root PREFIX ] [ match PREFIX ] [ proto RTPROTO ]\n" \
  1450. "\t\t\tROUTE := [ TYPE ] PREFIX [ tos TOS ] [ proto RTPROTO ]"
  1451. #define iptunnel_trivial_usage \
  1452. "{ add | change | del | show } [ NAME ]\n" \
  1453. "\t\t[ mode { ipip | gre | sit } ]\n" \
  1454. "\t\t[ remote ADDR ] [ local ADDR ] [ ttl TTL ]"
  1455. #define iptunnel_full_usage \
  1456. "iptunnel { add | change | del | show } [ NAME ]\n" \
  1457. "\t\t\t[ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" \
  1458. "\t\t\t[ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" \
  1459. "\t\t\t[ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]"
  1460. #define kill_trivial_usage \
  1461. "[-signal] process-id [process-id ...]"
  1462. #define kill_full_usage \
  1463. "Send a signal (default is SIGTERM) to the specified process(es).\n\n" \
  1464. "Options:\n" \
  1465. "\t-l\tList all signal names and numbers"
  1466. #define kill_example_usage \
  1467. "$ ps | grep apache\n" \
  1468. "252 root root S [apache]\n" \
  1469. "263 www-data www-data S [apache]\n" \
  1470. "264 www-data www-data S [apache]\n" \
  1471. "265 www-data www-data S [apache]\n" \
  1472. "266 www-data www-data S [apache]\n" \
  1473. "267 www-data www-data S [apache]\n" \
  1474. "$ kill 252\n"
  1475. #define killall_trivial_usage \
  1476. "[-q] [-signal] process-name [process-name ...]"
  1477. #define killall_full_usage \
  1478. "Send a signal (default is SIGTERM) to the specified process(es).\n\n" \
  1479. "Options:\n" \
  1480. "\t-l\tList all signal names and numbers\n" \
  1481. "\t-q\tDo not complain if no processes were killed"
  1482. #define killall_example_usage \
  1483. "$ killall apache\n"
  1484. #define klogd_trivial_usage \
  1485. "[-c n] [-n]"
  1486. #define klogd_full_usage \
  1487. "Kernel logger.\n" \
  1488. "Options:\n" \
  1489. "\t-c n\tSets the default log level of console messages to n\n" \
  1490. "\t-n\tRun as a foreground process"
  1491. #define length_trivial_usage \
  1492. "STRING"
  1493. #define length_full_usage \
  1494. "Prints out the length of the specified STRING."
  1495. #define length_example_usage \
  1496. "$ length Hello\n" \
  1497. "5\n"
  1498. #define less_trivial_usage \
  1499. "[-EMNmh~?] FILE1 FILE2..."
  1500. #define less_full_usage \
  1501. "View a file or list of files. The position within files can be\n" \
  1502. "changed, and files can be manipulated in various ways with the\n" \
  1503. "following options:\n\n" \
  1504. "\t-E\tQuit once the end of a file is reached\n" \
  1505. "\t-M\tDisplay a status line containing the current line numbers\n" \
  1506. "\t\tand the percentage through the file\n" \
  1507. "\t-N\tPrefix line numbers to each line\n" \
  1508. "\t-m\tDisplay a status line containing the percentage through the\n" \
  1509. "\t\tfile\n" \
  1510. "\t-~\tSuppress ~s displayed when input past the end of the file is\n" \
  1511. "\t\treached.\n" \
  1512. "\t-h, -?\tDisplay this help message"
  1513. #define setarch_trivial_usage \
  1514. "<personality> <program> [args ...]"
  1515. #define setarch_full_usage \
  1516. "Personality may be:\n" \
  1517. "\tlinux32\tSet 32bit uname emulation\n" \
  1518. "\tlinux64\tSet 64bit uname emulation"
  1519. #define ln_trivial_usage \
  1520. "[OPTION] TARGET... LINK_NAME|DIRECTORY"
  1521. #define ln_full_usage \
  1522. "Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n" \
  1523. "\nYou may use '--' to indicate that all following arguments are non-options.\n\n" \
  1524. "Options:\n" \
  1525. "\t-s\tmake symbolic links instead of hard links\n" \
  1526. "\t-f\tremove existing destination files\n" \
  1527. "\t-n\tno dereference symlinks - treat like normal file\n" \
  1528. "\t-b\tmake a backup of the target (if exists) before link operation\n" \
  1529. "\t-S suffix\tuse suffix instead of ~ when making backup files"
  1530. #define ln_example_usage \
  1531. "$ ln -s BusyBox /tmp/ls\n" \
  1532. "$ ls -l /tmp/ls\n" \
  1533. "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
  1534. #define loadfont_trivial_usage \
  1535. "< font"
  1536. #define loadfont_full_usage \
  1537. "Loads a console font from standard input."
  1538. #define loadfont_example_usage \
  1539. "$ loadfont < /etc/i18n/fontname\n"
  1540. #define loadkmap_trivial_usage \
  1541. "< keymap"
  1542. #define loadkmap_full_usage \
  1543. "Loads a binary keyboard translation table from standard input."
  1544. #define loadkmap_example_usage \
  1545. "$ loadkmap < /etc/i18n/lang-keymap\n"
  1546. #define logger_trivial_usage \
  1547. "[OPTION]... [MESSAGE]"
  1548. #define logger_full_usage \
  1549. "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n\n" \
  1550. "Options:\n" \
  1551. "\t-s\tLog to stderr as well as the system log\n" \
  1552. "\t-t TAG\tLog using the specified tag (defaults to user name)\n" \
  1553. "\t-p PRIORITY\tEnter the message with the specified priority\n" \
  1554. "\t\tThis may be numerical or a ``facility.level'' pair"
  1555. #define logger_example_usage \
  1556. "$ logger \"hello\"\n"
  1557. #define login_trivial_usage \
  1558. "[OPTION]... [username] [ENV=VAR ...]"
  1559. #define login_full_usage \
  1560. "Begin a new session on the system\n\n" \
  1561. "Options:\n" \
  1562. "\t-f\tDo not authenticate (user already authenticated)\n" \
  1563. "\t-h\tName of the remote host for this login\n" \
  1564. "\t-p\tPreserve environment"
  1565. #define logname_trivial_usage \
  1566. ""
  1567. #define logname_full_usage \
  1568. "Print the name of the current user."
  1569. #define logname_example_usage \
  1570. "$ logname\n" \
  1571. "root\n"
  1572. #define logread_trivial_usage \
  1573. "[OPTION]..."
  1574. #define logread_full_usage \
  1575. "Shows the messages from syslogd (using circular buffer).\n\n" \
  1576. "Options:\n" \
  1577. "\t-f\t\toutput data as the log grows"
  1578. #define losetup_trivial_usage \
  1579. "[-od] LOOPDEVICE [FILE]"
  1580. #define losetup_full_usage \
  1581. "Associate LOOPDEVICE with FILE, or display current association.\n\n" \
  1582. "Options:\n" \
  1583. "\t-d\t\tDisassociate LOOPDEVICE\n" \
  1584. "\t-o OFFSET\tStart OFFSET bytes into FILE"
  1585. #define losetup_notes_usage \
  1586. "One argument (losetup /dev/loop1) will display the current association\n" \
  1587. "(if any), or disassociate it (with -d). The display shows the offset\n" \
  1588. "and filename of the file the loop device is currently bound to.\n\n" \
  1589. "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
  1590. "with an optional offset (-o 12345). Encryption is not yet supported.\n\n"
  1591. #ifdef CONFIG_FEATURE_LS_TIMESTAMPS
  1592. # define USAGE_LS_TIMESTAMPS(a) a
  1593. #else
  1594. # define USAGE_LS_TIMESTAMPS(a)
  1595. #endif
  1596. #ifdef CONFIG_FEATURE_LS_FILETYPES
  1597. # define USAGE_LS_FILETYPES(a) a
  1598. #else
  1599. # define USAGE_LS_FILETYPES(a)
  1600. #endif
  1601. #ifdef CONFIG_FEATURE_LS_FOLLOWLINKS
  1602. # define USAGE_LS_FOLLOWLINKS(a) a
  1603. #else
  1604. # define USAGE_LS_FOLLOWLINKS(a)
  1605. #endif
  1606. #ifdef CONFIG_FEATURE_LS_RECURSIVE
  1607. # define USAGE_LS_RECURSIVE(a) a
  1608. #else
  1609. # define USAGE_LS_RECURSIVE(a)
  1610. #endif
  1611. #ifdef CONFIG_FEATURE_LS_SORTFILES
  1612. # define USAGE_LS_SORTFILES(a) a
  1613. #else
  1614. # define USAGE_LS_SORTFILES(a)
  1615. #endif
  1616. #ifdef CONFIG_FEATURE_AUTOWIDTH
  1617. # define USAGE_AUTOWIDTH(a) a
  1618. #else
  1619. # define USAGE_AUTOWIDTH(a)
  1620. #endif
  1621. #ifdef CONFIG_FEATURE_LS_COLOR
  1622. #define USAGE_LS_COLOR(a) a
  1623. #else
  1624. #define USAGE_LS_COLOR(a)
  1625. #endif
  1626. #define ls_trivial_usage \
  1627. "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k" USAGE_SELINUX("K") "] [filenames...]"
  1628. #define ls_full_usage \
  1629. "List directory contents\n\n" \
  1630. "Options:\n" \
  1631. "\t-1\tlist files in a single column\n" \
  1632. "\t-A\tdo not list implied . and ..\n" \
  1633. "\t-a\tdo not hide entries starting with .\n" \
  1634. "\t-C\tlist entries by columns\n" \
  1635. USAGE_LS_TIMESTAMPS("\t-c\twith -l: show ctime\n") \
  1636. USAGE_LS_COLOR("\t--color[={always,never,auto}]\tto control coloring\n") \
  1637. "\t-d\tlist directory entries instead of contents\n" \
  1638. USAGE_LS_TIMESTAMPS("\t-e\tlist both full date and full time\n") \
  1639. USAGE_LS_FILETYPES("\t-F\tappend indicator (one of */=@|) to entries\n") \
  1640. "\t-i\tlist the i-node for each file\n" \
  1641. "\t-l\tuse a long listing format\n" \
  1642. "\t-n\tlist numeric UIDs and GIDs instead of names\n" \
  1643. USAGE_LS_FILETYPES("\t-p\tappend indicator (one of /=@|) to entries\n") \
  1644. USAGE_LS_FOLLOWLINKS("\t-L\tlist entries pointed to by symbolic links\n") \
  1645. USAGE_LS_RECURSIVE("\t-R\tlist subdirectories recursively\n") \
  1646. USAGE_LS_SORTFILES("\t-r\tsort the listing in reverse order\n") \
  1647. USAGE_LS_SORTFILES("\t-S\tsort the listing by file size\n") \
  1648. "\t-s\tlist the size of each file, in blocks\n" \
  1649. USAGE_AUTOWIDTH("\t-T NUM\tassume Tabstop every NUM columns\n") \
  1650. USAGE_LS_TIMESTAMPS("\t-t\twith -l: show modification time\n") \
  1651. USAGE_LS_TIMESTAMPS("\t-u\twith -l: show access time\n") \
  1652. USAGE_LS_SORTFILES("\t-v\tsort the listing by version\n") \
  1653. USAGE_AUTOWIDTH("\t-w NUM\tassume the terminal is NUM columns wide\n") \
  1654. "\t-x\tlist entries by lines instead of by columns\n" \
  1655. USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
  1656. USAGE_HUMAN_READABLE( \
  1657. "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n") \
  1658. USAGE_SELINUX("\t-k\tprint security context\n") \
  1659. USAGE_SELINUX("\t-K\tprint security context in long format\n")
  1660. #define lsattr_trivial_usage \
  1661. "[-Radlv] [files...]"
  1662. #define lsattr_full_usage \
  1663. "list file attributes on an ext2 fs\n\n" \
  1664. "Options:\n" \
  1665. "\t-R\trecursively list subdirectories\n" \
  1666. "\t-a\tdo not hide entries starting with .\n" \
  1667. "\t-d\tlist directory entries instead of contents\n" \
  1668. "\t-l\tprint long flag names\n" \
  1669. "\t-v\tlist the file's version/generation number"
  1670. #define lsmod_trivial_usage \
  1671. ""
  1672. #define lsmod_full_usage \
  1673. "List the currently loaded kernel modules."
  1674. #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF
  1675. #define makedevs_trivial_usage \
  1676. "NAME TYPE MAJOR MINOR FIRST LAST [s]"
  1677. #define makedevs_full_usage \
  1678. "Creates a range of block or character special files\n\n" \
  1679. "TYPEs include:\n" \
  1680. "\tb:\tMake a block (buffered) device.\n" \
  1681. "\tc or u:\tMake a character (un-buffered) device.\n" \
  1682. "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n" \
  1683. "FIRST specifies the number appended to NAME to create the first device.\n" \
  1684. "LAST specifies the number of the last item that should be created\n" \
  1685. "If 's' is the last argument, the base device is created as well.\n\n" \
  1686. "For example:\n" \
  1687. "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \
  1688. "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
  1689. #define makedevs_example_usage \
  1690. "# makedevs /dev/ttyS c 4 66 2 63\n" \
  1691. "[creates ttyS2-ttyS63]\n" \
  1692. "# makedevs /dev/hda b 3 0 0 8 s\n" \
  1693. "[creates hda,hda1-hda8]\n"
  1694. #endif
  1695. #ifdef CONFIG_FEATURE_MAKEDEVS_TABLE
  1696. #define makedevs_trivial_usage \
  1697. "[-d device_table] rootdir"
  1698. #define makedevs_full_usage \
  1699. "Creates a range of special files as specified in a device table.\n" \
  1700. "Device table entries take the form of:\n" \
  1701. "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
  1702. "Where name is the file name, type can be one of:\n" \
  1703. " f A regular file\n" \
  1704. " d Directory\n" \
  1705. " c Character special device file\n" \
  1706. " b Block special device file\n" \
  1707. " p Fifo (named pipe)\n" \
  1708. "uid is the user id for the target file, gid is the group id for the\n" \
  1709. "target file. The rest of the entries (major, minor, etc) apply to\n" \
  1710. "to device special files. A '-' may be used for blank entries."
  1711. #define makedevs_example_usage \
  1712. "For example:\n" \
  1713. "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
  1714. "/dev d 755 0 0 - - - - -\n" \
  1715. "/dev/console c 666 0 0 5 1 - - -\n" \
  1716. "/dev/null c 666 0 0 1 3 0 0 -\n" \
  1717. "/dev/zero c 666 0 0 1 5 0 0 -\n" \
  1718. "/dev/hda b 640 0 0 3 0 0 0 -\n" \
  1719. "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \
  1720. "Will Produce:\n" \
  1721. "/dev\n" \
  1722. "/dev/console\n" \
  1723. "/dev/null\n" \
  1724. "/dev/zero\n" \
  1725. "/dev/hda\n" \
  1726. "/dev/hda[0-15]\n"
  1727. #endif
  1728. #ifdef CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
  1729. #define USAGE_MD5_SHA1_SUM_CHECK(a) a
  1730. #else
  1731. #define USAGE_MD5_SHA1_SUM_CHECK(a)
  1732. #endif
  1733. #define md5sum_trivial_usage \
  1734. "[OPTION] [FILEs...]" \
  1735. USAGE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
  1736. #define md5sum_full_usage \
  1737. "Print" USAGE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums.\n\n" \
  1738. "Options:\n" \
  1739. "With no FILE, or when FILE is -, read standard input." \
  1740. USAGE_MD5_SHA1_SUM_CHECK("\n\n" \
  1741. "\t-c\tcheck MD5 sums against given list\n" \
  1742. "\nThe following two options are useful only when verifying checksums:\n" \
  1743. "\t-s\tdon't output anything, status code shows success\n" \
  1744. "\t-w\twarn about improperly formated MD5 checksum lines")
  1745. #define md5sum_example_usage \
  1746. "$ md5sum < busybox\n" \
  1747. "6fd11e98b98a58f64ff3398d7b324003\n" \
  1748. "$ md5sum busybox\n" \
  1749. "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
  1750. "$ md5sum -c -\n" \
  1751. "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
  1752. "busybox: OK\n" \
  1753. "^D\n"
  1754. #define mdev_trivial_usage \
  1755. "[-s]"
  1756. #define mdev_full_usage \
  1757. "\t-s\tScan /sys and populate /dev during system boot\n\n" \
  1758. "Called with no options (via hotplug) it uses environment variables\n" \
  1759. "to determine which device to add/remove."
  1760. #ifdef CONFIG_FEATURE_MDEV_CONFIG
  1761. #define mdev_notes_usage \
  1762. "The mdev config file contains lines that look like:\n" \
  1763. " hd[a-z][0-9]* 0:3 660\n\n" \
  1764. "That's device name (with regex match), uid:gid, and permissions.\n\n" \
  1765. "Optionally, that can be followed (on the same line) by an asterisk\n" \
  1766. "and a command line to run after creating the corresponding device(s),\n"\
  1767. "ala:\n\n" \
  1768. " hdc root:cdrom 660 *ln -s hdc cdrom\n\n" \
  1769. "Config file parsing stops on the first matching line. If no config\n"\
  1770. "entry is matched, devices are created with default 0:0 660. (Make\n"\
  1771. "the last line match .* to override this.)\n\n"
  1772. #endif
  1773. #define mesg_trivial_usage \
  1774. "[y|n]"
  1775. #define mesg_full_usage \
  1776. "mesg controls write access to your terminal\n" \
  1777. "\ty\tAllow write access to your terminal\n" \
  1778. "\tn\tDisallow write access to your terminal"
  1779. #define mkdir_trivial_usage \
  1780. "[OPTION] DIRECTORY..."
  1781. #define mkdir_full_usage \
  1782. "Create the DIRECTORY(ies) if they do not already exist\n\n" \
  1783. "Options:\n" \
  1784. "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" \
  1785. "\t-p\tno error if existing, make parent directories as needed"
  1786. #define mkdir_example_usage \
  1787. "$ mkdir /tmp/foo\n" \
  1788. "$ mkdir /tmp/foo\n" \
  1789. "/tmp/foo: File exists\n" \
  1790. "$ mkdir /tmp/foo/bar/baz\n" \
  1791. "/tmp/foo/bar/baz: No such file or directory\n" \
  1792. "$ mkdir -p /tmp/foo/bar/baz\n"
  1793. #define mke2fs_trivial_usage \
  1794. "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \
  1795. "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \
  1796. "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \
  1797. "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \
  1798. "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
  1799. "device [blocks-count]"
  1800. #define mke2fs_full_usage \
  1801. "\t-b size\tblock size in bytes\n" \
  1802. "\t-c\tcheck for bad blocks before creating\n" \
  1803. "\t-E opts\tset extended options\n" \
  1804. "\t-f size\tfragment size in bytes\n" \
  1805. "\t-F\tforce (ignore sanity checks)\n" \
  1806. "\t-g num\tnumber of blocks in a block group\n" \
  1807. "\t-i ratio\tthe bytes/inode ratio\n" \
  1808. "\t-j\tcreate a journal (ext3)\n" \
  1809. "\t-J opts\tset journal options (size/device)\n" \
  1810. "\t-l file\tread bad blocks list from file\n" \
  1811. "\t-L lbl\tset the volume label\n" \
  1812. "\t-m percent\tpercent of fs blocks to reserve for admin\n" \
  1813. "\t-M dir\tset last mounted directory\n" \
  1814. "\t-n\tdo not actually create anything\n" \
  1815. "\t-N num\tnumber of inodes to create\n" \
  1816. "\t-o os\tset the 'creator os' field\n" \
  1817. "\t-O features\tdir_index/filetype/has_journal/journal_dev/sparse_super\n" \
  1818. "\t-q\tquiet execution\n" \
  1819. "\t-r rev\tset filesystem revision\n" \
  1820. "\t-S\twrite superblock and group descriptors only\n" \
  1821. "\t-T fs-type\tset usage type (news/largefile/largefile4)\n" \
  1822. "\t-v\tverbose execution"
  1823. #define mkfifo_trivial_usage \
  1824. "[OPTIONS] name"
  1825. #define mkfifo_full_usage \
  1826. "Creates a named pipe (identical to 'mknod name p')\n\n" \
  1827. "Options:\n" \
  1828. "\t-m\tcreate the pipe using the specified mode (default a=rw)"
  1829. #define mkfs_minix_trivial_usage \
  1830. "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
  1831. #define mkfs_minix_full_usage \
  1832. "Make a MINIX filesystem.\n\n" \
  1833. "Options:\n" \
  1834. "\t-c\t\tCheck the device for bad blocks\n" \
  1835. "\t-n [14|30]\tSpecify the maximum length of filenames\n" \
  1836. "\t-i INODES\tSpecify the number of inodes for the filesystem\n" \
  1837. "\t-l FILENAME\tRead the bad blocks list from FILENAME\n" \
  1838. "\t-v\t\tMake a Minix version 2 filesystem"
  1839. #define mknod_trivial_usage \
  1840. "[OPTIONS] NAME TYPE MAJOR MINOR"
  1841. #define mknod_full_usage \
  1842. "Create a special file (block, character, or pipe).\n\n" \
  1843. "Options:\n" \
  1844. "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n" \
  1845. "TYPEs include:\n" \
  1846. "\tb:\tMake a block (buffered) device\n" \
  1847. "\tc or u:\tMake a character (un-buffered) device\n" \
  1848. "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes"
  1849. #define mknod_example_usage \
  1850. "$ mknod /dev/fd0 b 2 0\n" \
  1851. "$ mknod -m 644 /tmp/pipe p\n"
  1852. #define mkswap_trivial_usage \
  1853. "[-c] [-v0|-v1] device [block-count]"
  1854. #define mkswap_full_usage \
  1855. "Prepare a disk partition to be used as a swap partition.\n\n" \
  1856. "Options:\n" \
  1857. "\t-c\t\tCheck for read-ability\n" \
  1858. "\t-v0\t\tMake version 0 swap [max 128 Megs]\n" \
  1859. "\t-v1\t\tMake version 1 swap [big!] (default for kernels >\n\t\t\t2.1.117)\n" \
  1860. "\tblock-count\tNumber of block to use (default is entire partition)"
  1861. #define mktemp_trivial_usage \
  1862. "[-dq] TEMPLATE"
  1863. #define mktemp_full_usage \
  1864. "Creates a temporary file with its name based on TEMPLATE.\n" \
  1865. "TEMPLATE is any name with six `Xs' (i.e., /tmp/temp.XXXXXX).\n\n" \
  1866. "Options:\n" \
  1867. "\t-d\t\tMake a directory instead of a file\n" \
  1868. "\t-q\t\tFail silently if an error occurs"
  1869. #define mktemp_example_usage \
  1870. "$ mktemp /tmp/temp.XXXXXX\n" \
  1871. "/tmp/temp.mWiLjM\n" \
  1872. "$ ls -la /tmp/temp.mWiLjM\n" \
  1873. "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
  1874. #define modprobe_trivial_usage \
  1875. "[-knqrsv] MODULE [symbol=value ...]"
  1876. #define modprobe_full_usage \
  1877. "Options:\n" \
  1878. "\t-k\tMake module autoclean-able\n" \
  1879. "\t-n\tJust show what would be done\n" \
  1880. "\t-q\tQuiet output\n" \
  1881. "\t-r\tRemove module (stacks) or do autoclean\n" \
  1882. "\t-s\tReport via syslog instead of stderr\n" \
  1883. "\t-v\tVerbose output"
  1884. #define modprobe_notes_usage \
  1885. "modprobe can (un)load a stack of modules, passing each module options (when\n" \
  1886. "loading). modprobe uses a configuration file to determine what option(s) to\n" \
  1887. "pass each module it loads.\n" \
  1888. "\n" \
  1889. "The configuration file is searched (in order) amongst:\n" \
  1890. "\n" \
  1891. " /etc/modprobe.conf (2.6 only)\n" \
  1892. " /etc/modules.conf\n" \
  1893. " /etc/conf.modules (deprecated)\n" \
  1894. "\n" \
  1895. "They all have the same syntax (see below). If none is present, it is\n" \
  1896. "_not_ an error; each loaded module is then expected to load without\n" \
  1897. "options. Once a file is found, the others are tested for.\n" \
  1898. "\n" \
  1899. "/etc/modules.conf entry format:\n" \
  1900. "\n" \
  1901. " alias <alias_name> <mod_name>\n" \
  1902. " Makes it possible to modprobe alias_name, when there is no such module.\n" \
  1903. " It makes sense if your mod_name is long, or you want a more reprenstative\n" \
  1904. " name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
  1905. " This makes it also possible to use a different set of options (below) for\n" \
  1906. " the module and the alias.\n" \
  1907. " A module can be aliased more than once.\n" \
  1908. "\n" \
  1909. " options <mod_name|alias_name> <symbol=value ...>\n" \
  1910. " When loading module mod_name (or the module aliased by alias_name), pass\n" \
  1911. " the \"symbol=value\" pairs as option to that module.\n" \
  1912. "\n" \
  1913. "Sample /etc/modules.conf file:\n" \
  1914. "\n" \
  1915. " options tulip irq=3\n" \
  1916. " alias tulip tulip2\n" \
  1917. " options tulip2 irq=4 io=0x308\n" \
  1918. "\n" \
  1919. "Other functionality offered by 'classic' modprobe is not available in\n" \
  1920. "this implementation.\n" \
  1921. "\n" \
  1922. "If module options are present both in the config file, and on the command line,\n" \
  1923. "then the options from the command line will be passed to the module _after_\n" \
  1924. "the options from the config file. That way, you can have defaults in the config\n" \
  1925. "file, and override them for a specific usage from the command line.\n"
  1926. #define modprobe_example_usage \
  1927. "(with the above /etc/modules.conf):\n\n" \
  1928. "$ modprobe tulip\n" \
  1929. " will load the module 'tulip' with default option 'irq=3'\n\n" \
  1930. "$ modprobe tulip irq=5\n" \
  1931. " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
  1932. "$ modprobe tulip2\n" \
  1933. " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
  1934. " which are the default for alias 'tulip2'\n\n" \
  1935. "$ modprobe tulip2 irq=8\n" \
  1936. " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
  1937. " which are the default for alias 'tulip2' overriden by the option 'irq=8'\n\n" \
  1938. " from the command line\n\n" \
  1939. "$ modprobe tulip2 irq=2 io=0x210\n" \
  1940. " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
  1941. " which are the default for alias 'tulip2' overriden by the options 'irq=2 io=0x210'\n\n" \
  1942. " from the command line\n"
  1943. #define more_trivial_usage \
  1944. "[FILE ...]"
  1945. #define more_full_usage \
  1946. "More is a filter for viewing FILE one screenful at a time."
  1947. #define more_example_usage \
  1948. "$ dmesg | more\n"
  1949. #ifdef CONFIG_FEATURE_MOUNT_LOOP
  1950. # define USAGE_MOUNT_LOOP(a) a
  1951. #else
  1952. # define USAGE_MOUNT_LOOP(a)
  1953. #endif
  1954. #ifdef CONFIG_FEATURE_MTAB_SUPPORT
  1955. # define USAGE_MTAB(a) a
  1956. #else
  1957. # define USAGE_MTAB(a)
  1958. #endif
  1959. #define mount_trivial_usage \
  1960. "[flags] DEVICE NODE [-o options,more-options]"
  1961. #define mount_full_usage \
  1962. "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n\n" \
  1963. "Flags:\n" \
  1964. "\t-a:\t\tMount all filesystems in fstab\n" \
  1965. USAGE_MTAB( \
  1966. "\t-f:\t\t\"Fake\" Add entry to mount table but don't mount it\n" \
  1967. "\t-n:\t\tDon't write a mount table entry\n" \
  1968. ) \
  1969. "\t-o option:\tOne of many filesystem options, listed below\n" \
  1970. "\t-r:\t\tMount the filesystem read-only\n" \
  1971. "\t-t fs-type:\tSpecify the filesystem type\n" \
  1972. "\t-w:\t\tMount for reading and writing (default)\n" \
  1973. "\n" \
  1974. "Options for use with the \"-o\" flag:\n" \
  1975. "\tasync/sync:\tWrites are asynchronous / synchronous\n" \
  1976. "\tatime/noatime:\tEnable / disable updates to inode access times\n" \
  1977. "\tdev/nodev:\tAllow use of special device files / disallow them\n" \
  1978. "\texec/noexec:\tAllow use of executable files / disallow them\n" \
  1979. USAGE_MOUNT_LOOP( \
  1980. "\tloop:\t\t Ignored (loop devices are autodetected)\n" \
  1981. ) \
  1982. "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them\n" \
  1983. "\tremount:\tRe-mount a mounted filesystem, changing its flags\n" \
  1984. "\tro/rw:\t\tMount for read-only / read-write\n" \
  1985. "\tbind:\t\tBind a directory to an additional location\n" \
  1986. "\tmove:\t\tRelocate an existing mount point.\n" \
  1987. "\nThere are EVEN MORE flags that are specific to each filesystem\n" \
  1988. "You'll have to see the written documentation for those filesystems"
  1989. #define mount_example_usage \
  1990. "$ mount\n" \
  1991. "/dev/hda3 on / type minix (rw)\n" \
  1992. "proc on /proc type proc (rw)\n" \
  1993. "devpts on /dev/pts type devpts (rw)\n" \
  1994. "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
  1995. "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
  1996. "$ mount cd_image.iso mydir\n"
  1997. #define mountpoint_trivial_usage \
  1998. "[-q] <[-d] DIR | -x DEVICE>"
  1999. #define mountpoint_full_usage \
  2000. "mountpoint checks if the directory is a mountpoint\n\n" \
  2001. "Options:\n" \
  2002. "\t-q:\t\tBe more quiet\n" \
  2003. "\t-d:\t\tPrint major/minor device number of the filesystem\n" \
  2004. "\t-x:\t\tPrint major/minor device number of the blockdevice"
  2005. #define mountpoint_example_usage \
  2006. "$ mountpoint /proc\n" \
  2007. "/proc is not a mountpoint\n" \
  2008. "$ mountpoint /sys\n" \
  2009. "/sys is a mountpoint\n"
  2010. #define mt_trivial_usage \
  2011. "[-f device] opcode value"
  2012. #define mt_full_usage \
  2013. "Control magnetic tape drive operation\n" \
  2014. "\nAvailable Opcodes:\n\n" \
  2015. "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
  2016. "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
  2017. "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
  2018. "setpart tell unload unlock weof wset"
  2019. #define mv_trivial_usage \
  2020. "[OPTION]... SOURCE DEST\n" \
  2021. "or: mv [OPTION]... SOURCE... DIRECTORY"
  2022. #define mv_full_usage \
  2023. "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\n" \
  2024. "Options:\n" \
  2025. "\t-f\tdon't prompt before overwriting\n" \
  2026. "\t-i\tinteractive, prompt before overwrite"
  2027. #define mv_example_usage \
  2028. "$ mv /tmp/foo /bin/bar\n"
  2029. #define nameif_trivial_usage \
  2030. "[-s] [-c FILE] [{IFNAME MACADDR}]"
  2031. #define nameif_full_usage \
  2032. "Nameif renaming network interface while it in the down state.\n\n" \
  2033. "Options:\n" \
  2034. "\t-c FILE\t\tUse configuration file (default is /etc/mactab)\n" \
  2035. "\t-s\t\tUse syslog (LOCAL0 facility)\n" \
  2036. "\tIFNAME MACADDR\tnew_interface_name interface_mac_address"
  2037. #define nameif_example_usage \
  2038. "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
  2039. " or\n" \
  2040. "$ nameif -c /etc/my_mactab_file\n" \
  2041. #ifdef CONFIG_NC_GAPING_SECURITY_HOLE
  2042. # define USAGE_NC_EXEC(a) a
  2043. #else
  2044. # define USAGE_NC_EXEC(a)
  2045. #endif
  2046. #define nc_trivial_usage \
  2047. "[OPTIONS] [IP] [port]"
  2048. #define nc_full_usage \
  2049. "Netcat opens a pipe to IP:port\n\n" \
  2050. "Options:\n" \
  2051. "\t-l\t\tlisten mode, for inbound connects\n" \
  2052. "\t-p PORT\t\tlocal port number\n" \
  2053. "\t-i SECS\t\tdelay interval for lines sent\n" \
  2054. USAGE_NC_EXEC( \
  2055. "\t-e PROG\t\tprogram to exec after connect (dangerous!)\n" \
  2056. ) \
  2057. "\t-w SECS\t\ttimeout for connects and final net reads"
  2058. #define nc_example_usage \
  2059. "$ nc foobar.somedomain.com 25\n" \
  2060. "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
  2061. "help\n" \
  2062. "214-Commands supported:\n" \
  2063. "214- HELO EHLO MAIL RCPT DATA AUTH\n" \
  2064. "214 NOOP QUIT RSET HELP\n" \
  2065. "quit\n" \
  2066. "221 foobar closing connection\n"
  2067. #define netstat_trivial_usage \
  2068. "[-laenrtuwx]"
  2069. #define netstat_full_usage \
  2070. "Netstat displays Linux networking information.\n\n" \
  2071. "Options:\n" \
  2072. "\t-l display listening server sockets\n" \
  2073. "\t-a display all sockets (default: connected)\n" \
  2074. "\t-e display other/more information\n" \
  2075. "\t-n don't resolve names\n" \
  2076. "\t-r display routing table\n" \
  2077. "\t-t tcp sockets\n" \
  2078. "\t-u udp sockets\n" \
  2079. "\t-w raw sockets\n" \
  2080. "\t-x unix sockets"
  2081. #define nice_trivial_usage \
  2082. "[-n ADJUST] [COMMAND [ARG] ...]"
  2083. #define nice_full_usage \
  2084. "Nice runs a program with modified scheduling priority.\n\n" \
  2085. "Options:\n" \
  2086. "\t-n ADJUST\tAdjust the scheduling priority by ADJUST"
  2087. #define nohup_trivial_usage \
  2088. "COMMAND [ARGS]"
  2089. #define nohup_full_usage \
  2090. "run a command immune to hangups, with output to a non-tty"
  2091. #define nohup_example_usage \
  2092. "$ nohup make &"
  2093. #define nslookup_trivial_usage \
  2094. "[HOST] [SERVER]"
  2095. #define nslookup_full_usage \
  2096. "Queries the nameserver for the IP address of the given HOST\n" \
  2097. "optionally using a specified DNS server"
  2098. #define nslookup_example_usage \
  2099. "$ nslookup localhost\n" \
  2100. "Server: default\n" \
  2101. "Address: default\n" \
  2102. "\n" \
  2103. "Name: debian\n" \
  2104. "Address: 127.0.0.1\n"
  2105. #define od_trivial_usage \
  2106. "[-aBbcDdeFfHhIiLlOovXx] [FILE]"
  2107. #define od_full_usage \
  2108. "Write an unambiguous representation, octal bytes by default, of FILE\n" \
  2109. "to standard output. With no FILE, or when FILE is -, read standard input."
  2110. #define openvt_trivial_usage \
  2111. "<vtnum> <COMMAND> [ARGS...]"
  2112. #define openvt_full_usage \
  2113. "Start a command on a new virtual terminal"
  2114. #define openvt_example_usage \
  2115. "openvt 2 /bin/ash\n"
  2116. #ifdef CONFIG_FEATURE_SHA1_PASSWORDS
  2117. # define PASSWORD_ALG_TYPES(a) a
  2118. #else
  2119. # define PASSWORD_ALG_TYPES(a)
  2120. #endif
  2121. #define passwd_trivial_usage \
  2122. "[OPTION] [name]"
  2123. #define passwd_full_usage \
  2124. "Change a user password. If no name is specified,\n" \
  2125. "changes the password for the current user.\n" \
  2126. "Options:\n" \
  2127. "\t-a\tDefine which algorithm shall be used for the password\n" \
  2128. "\t\t\t(Choices: des, md5" \
  2129. PASSWORD_ALG_TYPES(", sha1") \
  2130. ")\n\t-d\tDelete the password for the specified user account\n" \
  2131. "\t-l\tLocks (disables) the specified user account\n" \
  2132. "\t-u\tUnlocks (re-enables) the specified user account"
  2133. #define patch_trivial_usage \
  2134. "[-p<num>] [-i<patch.diff>]"
  2135. #define patch_full_usage \
  2136. "[-p<num>]\n" \
  2137. "[-i<diff>]"
  2138. #define patch_example_usage \
  2139. "$ patch -p1 <example.diff\n" \
  2140. "$ patch -p0 -i example.diff"
  2141. #if ENABLE_FEATURE_PIDOF_SINGLE
  2142. #define USAGE_FEATURE_PIDOF_SINGLE(a) a
  2143. #else
  2144. #define USAGE_FEATURE_PIDOF_SINGLE(a)
  2145. #endif
  2146. #if ENABLE_FEATURE_PIDOF_OMIT
  2147. #define USAGE_FEATURE_PIDOF_OMIT(a) a
  2148. #else
  2149. #define USAGE_FEATURE_PIDOF_OMIT(a)
  2150. #endif
  2151. #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
  2152. #define USAGE_PIDOF "Options:"
  2153. #else
  2154. #define USAGE_PIDOF "\n\tThis version of pidof accepts no options."
  2155. #endif
  2156. #define pidof_trivial_usage \
  2157. "process-name [OPTION] [process-name ...]"
  2158. #define pidof_full_usage \
  2159. "Lists the PIDs of all processes with names that match the\n" \
  2160. "names on the command line.\n" \
  2161. USAGE_PIDOF \
  2162. USAGE_FEATURE_PIDOF_SINGLE("\n\t-s\t\tdisplay only a single PID") \
  2163. USAGE_FEATURE_PIDOF_OMIT("\n\t-o\t\tomit given pid.") \
  2164. USAGE_FEATURE_PIDOF_OMIT("\n\t\t\tUse %PPID to omit the parent pid of pidof itself")
  2165. #define pidof_example_usage \
  2166. "$ pidof init\n" \
  2167. "1\n" \
  2168. USAGE_FEATURE_PIDOF_OMIT("$ pidof /bin/sh\n20351 5973 5950\n") \
  2169. USAGE_FEATURE_PIDOF_OMIT("$ pidof /bin/sh -o %PPID\n20351 5950")
  2170. #ifndef CONFIG_FEATURE_FANCY_PING
  2171. #define ping_trivial_usage "host"
  2172. #define ping_full_usage "Send ICMP ECHO_REQUEST packets to network hosts"
  2173. #else
  2174. #define ping_trivial_usage \
  2175. "[OPTION]... host"
  2176. #define ping_full_usage \
  2177. "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" \
  2178. "Options:\n" \
  2179. "\t-c COUNT\tSend only COUNT pings\n" \
  2180. "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56)\n" \
  2181. "\t-q\t\tQuiet mode, only displays output at start\n" \
  2182. "\t\t\tand when finished"
  2183. #endif
  2184. #define ping_example_usage \
  2185. "$ ping localhost\n" \
  2186. "PING slag (127.0.0.1): 56 data bytes\n" \
  2187. "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
  2188. "\n" \
  2189. "--- debian ping statistics ---\n" \
  2190. "1 packets transmitted, 1 packets received, 0% packet loss\n" \
  2191. "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
  2192. #ifndef CONFIG_FEATURE_FANCY_PING6
  2193. #define ping6_trivial_usage "host"
  2194. #define ping6_full_usage "Send ICMP ECHO_REQUEST packets to network hosts"
  2195. #else
  2196. #define ping6_trivial_usage \
  2197. "[OPTION]... host"
  2198. #define ping6_full_usage \
  2199. "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" \
  2200. "Options:\n" \
  2201. "\t-c COUNT\tSend only COUNT pings\n" \
  2202. "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56)\n" \
  2203. "\t-q\t\tQuiet mode, only displays output at start\n" \
  2204. "\t\t\tand when finished"
  2205. #endif
  2206. #define ping6_example_usage \
  2207. "$ ping6 ip6-localhost\n" \
  2208. "PING ip6-localhost (::1): 56 data bytes\n" \
  2209. "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
  2210. "\n" \
  2211. "--- ip6-localhost ping statistics ---\n" \
  2212. "1 packets transmitted, 1 packets received, 0% packet loss\n" \
  2213. "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
  2214. #define pivot_root_trivial_usage \
  2215. "NEW_ROOT PUT_OLD"
  2216. #define pivot_root_full_usage \
  2217. "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
  2218. "the new root file system."
  2219. #define poweroff_trivial_usage \
  2220. "[-d<delay>] [-n<nosync>] [-f<force>]"
  2221. #define poweroff_full_usage \
  2222. "Halt and shut off power.\n" \
  2223. "Options:\n" \
  2224. "\t-d\t\tdelay interval for halting\n" \
  2225. "\t-n\t\tno call to sync()\n" \
  2226. "\t-f\t\tforce power off (don't go through init)"
  2227. #define printenv_trivial_usage \
  2228. "[VARIABLES...]"
  2229. #define printenv_full_usage \
  2230. "print all or part of environment\n\n" \
  2231. "If no environment VARIABLE specified, print them all."
  2232. #define printf_trivial_usage \
  2233. "FORMAT [ARGUMENT...]"
  2234. #define printf_full_usage \
  2235. "Formats and prints ARGUMENT(s) according to FORMAT,\n" \
  2236. "Where FORMAT controls the output exactly as in C printf."
  2237. #define printf_example_usage \
  2238. "$ printf \"Val=%d\\n\" 5\n" \
  2239. "Val=5\n"
  2240. #if !defined CONFIG_SELINUX && !ENABLE_FEATURE_PS_WIDE
  2241. #define USAGE_PS "\n\tThis version of ps accepts no options."
  2242. #else
  2243. #define USAGE_PS "\nOptions:"
  2244. #endif
  2245. #if ENABLE_FEATURE_PS_WIDE
  2246. #define USAGE_PS_WIDE(a) a
  2247. #else
  2248. #define USAGE_PS_WIDE(a)
  2249. #endif
  2250. #define ps_trivial_usage \
  2251. ""
  2252. #define ps_full_usage \
  2253. "Report process status\n" \
  2254. USAGE_PS \
  2255. USAGE_SELINUX("\n\t-c\tshow SE Linux context") \
  2256. USAGE_PS_WIDE("\n\tw\twide output")
  2257. #define ps_example_usage \
  2258. "$ ps\n" \
  2259. " PID Uid Gid State Command\n" \
  2260. " 1 root root S init\n" \
  2261. " 2 root root S [kflushd]\n" \
  2262. " 3 root root S [kupdate]\n" \
  2263. " 4 root root S [kpiod]\n" \
  2264. " 5 root root S [kswapd]\n" \
  2265. " 742 andersen andersen S [bash]\n" \
  2266. " 743 andersen andersen S -bash\n" \
  2267. " 745 root root S [getty]\n" \
  2268. " 2990 andersen andersen R ps\n"
  2269. #define pwd_trivial_usage \
  2270. ""
  2271. #define pwd_full_usage \
  2272. "Print the full filename of the current working directory."
  2273. #define pwd_example_usage \
  2274. "$ pwd\n" \
  2275. "/root\n"
  2276. #define rdate_trivial_usage \
  2277. "[-sp] HOST"
  2278. #define rdate_full_usage \
  2279. "Get and possibly set the system date and time from a remote HOST.\n\n" \
  2280. "Options:\n" \
  2281. "\t-s\tSet the system date and time (default)\n" \
  2282. "\t-p\tPrint the date and time"
  2283. #ifdef CONFIG_FEATURE_READLINK_FOLLOW
  2284. #define USAGE_READLINK_FOLLOW(a) a
  2285. #else
  2286. #define USAGE_READLINK_FOLLOW(a)
  2287. #endif
  2288. #define readlink_trivial_usage \
  2289. USAGE_READLINK_FOLLOW("[-f] ") "FILE"
  2290. #define readlink_full_usage \
  2291. "Displays the value of a symbolic link." \
  2292. USAGE_READLINK_FOLLOW("\n\nOptions:\n" \
  2293. "\t-f\tcanonicalize by following all symlinks")
  2294. #define readprofile_trivial_usage \
  2295. "[OPTIONS]..."
  2296. #define readprofile_full_usage \
  2297. "Options:\n" \
  2298. "\t -m <mapfile> (default: /boot/System.map)\n" \
  2299. "\t -p <profile> (default: /proc/profile)\n" \
  2300. "\t -M <mult> set the profiling multiplier to <mult>\n" \
  2301. "\t -i print only info about the sampling step\n" \
  2302. "\t -v print verbose data\n" \
  2303. "\t -a print all symbols, even if count is 0\n" \
  2304. "\t -b print individual histogram-bin counts\n" \
  2305. "\t -s print individual counters within functions\n" \
  2306. "\t -r reset all the counters (root only)\n" \
  2307. "\t -n disable byte order auto-detection"
  2308. #define realpath_trivial_usage \
  2309. "pathname ..."
  2310. #define realpath_full_usage \
  2311. "Returns the absolute pathnames of given argument."
  2312. #define reboot_trivial_usage \
  2313. "[-d<delay>] [-n<nosync>] [-f<force>]"
  2314. #define reboot_full_usage \
  2315. "Reboot the system.\n" \
  2316. "Options:\n" \
  2317. "\t-d\t\tdelay interval for rebooting\n" \
  2318. "\t-n\t\tno call to sync()\n" \
  2319. "\t-f\t\tforce reboot (don't go through init)"
  2320. #define renice_trivial_usage \
  2321. "{{-n INCREMENT} | PRIORITY} [[ -p | -g | -u ] ID ...]"
  2322. #define renice_full_usage \
  2323. "Changes priority of running processes.\n\n" \
  2324. "Options:\n" \
  2325. "\t-n\tadjusts current nice value (smaller is faster)\n" \
  2326. "\t-p\tprocess id(s) (default)\n" \
  2327. "\t-g\tprocess group id(s)\n" \
  2328. "\t-u\tprocess user name(s) and/or id(s)"
  2329. #define reset_trivial_usage \
  2330. ""
  2331. #define reset_full_usage \
  2332. "Resets the screen."
  2333. #define rm_trivial_usage \
  2334. "[OPTION]... FILE..."
  2335. #define rm_full_usage \
  2336. "Remove (unlink) the FILE(s). You may use '--' to\n" \
  2337. "indicate that all following arguments are non-options.\n\n" \
  2338. "Options:\n" \
  2339. "\t-i\t\talways prompt before removing each destination\n" \
  2340. "\t-f\t\tremove existing destinations, never prompt\n" \
  2341. "\t-r or -R\tremove the contents of directories recursively"
  2342. #define rm_example_usage \
  2343. "$ rm -rf /tmp/foo\n"
  2344. #define rmdir_trivial_usage \
  2345. "[OPTION]... DIRECTORY..."
  2346. #define rmdir_full_usage \
  2347. "Remove the DIRECTORY(ies), if they are empty."
  2348. #define rmdir_example_usage \
  2349. "# rmdir /tmp/foo\n"
  2350. #define rmmod_trivial_usage \
  2351. "[OPTION]... [MODULE]..."
  2352. #define rmmod_full_usage \
  2353. "Unloads the specified kernel modules from the kernel.\n\n" \
  2354. "Options:\n" \
  2355. "\t-a\tRemove all unused modules (recursively)"
  2356. #define rmmod_example_usage \
  2357. "$ rmmod tulip\n"
  2358. #ifdef CONFIG_FEATURE_IPV6
  2359. # define USAGE_ROUTE_IPV6(a) a
  2360. #else
  2361. # define USAGE_ROUTE_IPV6(a) "\t"
  2362. #endif
  2363. #define route_trivial_usage \
  2364. "[{add|del|delete}]"
  2365. #define route_full_usage \
  2366. "Edit the kernel's routing tables.\n\n" \
  2367. "Options:\n" \
  2368. "\t-n\t\tDont resolve names\n" \
  2369. "\t-e\t\tDisplay other/more information\n" \
  2370. "\t-A inet" USAGE_ROUTE_IPV6("{6}") "\tSelect address family"
  2371. #define rpm_trivial_usage \
  2372. "-i -q[ildc]p package.rpm"
  2373. #define rpm_full_usage \
  2374. "Manipulates RPM packages" \
  2375. "\n\nOptions:" \
  2376. "\n\t-i Install package" \
  2377. "\n\t-q Query package" \
  2378. "\n\t-p Query uninstalled package" \
  2379. "\n\t-i Show information" \
  2380. "\n\t-l List contents" \
  2381. "\n\t-d List documents" \
  2382. "\n\t-c List config files"
  2383. #define rpm2cpio_trivial_usage \
  2384. "package.rpm"
  2385. #define rpm2cpio_full_usage \
  2386. "Outputs a cpio archive of the rpm file."
  2387. #define run_parts_trivial_usage \
  2388. "[-t] [-a ARG] [-u MASK] DIRECTORY"
  2389. #define run_parts_full_usage \
  2390. "Run a bunch of scripts in a directory.\n\n" \
  2391. "Options:\n" \
  2392. "\t-t\tPrints what would be run, but does not actually run anything\n" \
  2393. "\t-a ARG\tPass ARG as an argument for every program invoked\n" \
  2394. "\t-u MASK\tSet the umask to MASK before executing every program"
  2395. #define runlevel_trivial_usage \
  2396. "[utmp]"
  2397. #define runlevel_full_usage \
  2398. "Find the current and previous system runlevel.\n\n" \
  2399. "If no utmp file exists or if no runlevel record can be found,\n" \
  2400. "runlevel prints \"unknown\""
  2401. #define runlevel_example_usage \
  2402. "$ runlevel /var/run/utmp\n" \
  2403. "N 2"
  2404. #define rx_trivial_usage \
  2405. "FILE"
  2406. #define rx_full_usage \
  2407. "Receive a file using the xmodem protocol."
  2408. #define rx_example_usage \
  2409. "$ rx /tmp/foo\n"
  2410. #define sed_trivial_usage \
  2411. "[-efinr] pattern [files...]"
  2412. #define sed_full_usage \
  2413. "Options:\n" \
  2414. "\t-e script\tadd the script to the commands to be executed\n" \
  2415. "\t-f scriptfile\tadd script-file contents to the\n" \
  2416. "\t\t\tcommands to be executed\n" \
  2417. "\t-i\t\tedit files in-place\n" \
  2418. "\t-n\t\tsuppress automatic printing of pattern space\n" \
  2419. "\t-r\t\tuse extended regular expression syntax\n" \
  2420. "\n" \
  2421. "If no -e or -f is given, the first non-option argument is taken as the sed\n" \
  2422. "script to interpret. All remaining arguments are names of input files; if no\n" \
  2423. "input files are specified, then the standard input is read. Source files\n" \
  2424. "will not be modified unless -i option is given."
  2425. #define sed_example_usage \
  2426. "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
  2427. "bar\n"
  2428. #define seq_trivial_usage \
  2429. "[first [increment]] last"
  2430. #define seq_full_usage \
  2431. "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \
  2432. "FIRST, INCREMENT default to 1\n" \
  2433. "Arguments:\n" \
  2434. "\tLAST\n" \
  2435. "\tFIRST\tLAST\n" \
  2436. "\tFIRST\tINCREMENT\tLAST"
  2437. #define setconsole_trivial_usage \
  2438. "[-r|--reset] [DEVICE]"
  2439. #define setconsole_full_usage \
  2440. "Redirects system console output to DEVICE (default: /dev/tty).\n\n" \
  2441. "Options:\n" \
  2442. "\t-r\tReset output to /dev/console."
  2443. #define setkeycodes_trivial_usage \
  2444. "SCANCODE KEYCODE ..."
  2445. #define setkeycodes_full_usage \
  2446. "Set entries into the kernel's scancode-to-keycode map,\n" \
  2447. "allowing unusual keyboards to generate usable keycodes.\n\n" \
  2448. "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
  2449. "and KEYCODE is given in decimal"
  2450. #define setkeycodes_example_usage \
  2451. "$ setkeycodes e030 127\n"
  2452. #define setlogcons_trivial_usage \
  2453. "N"
  2454. #define setlogcons_full_usage \
  2455. "Redirects the kernel output to console N (0 for current)."
  2456. #define setsid_trivial_usage \
  2457. "program [arg ...]"
  2458. #define setsid_full_usage \
  2459. "Runs any program in a new session by calling setsid() before\n" \
  2460. "exec'ing the rest of its arguments. See setsid(2) for details."
  2461. #define lash_trivial_usage \
  2462. "[FILE]...\n" \
  2463. "or: sh -c command [args]..."
  2464. #define lash_full_usage \
  2465. "The BusyBox LAme SHell (command interpreter)"
  2466. #define lash_notes_usage \
  2467. "This command does not yet have proper documentation.\n\n" \
  2468. "Use lash just as you would use any other shell. It properly handles pipes,\n" \
  2469. "redirects, job control, can be used as the shell for scripts, and has a\n" \
  2470. "sufficient set of builtins to do what is needed. It does not (yet) support\n" \
  2471. "Bourne Shell syntax. If you need things like \"if-then-else\", \"while\", and such\n" \
  2472. "use ash or bash. If you just need a very simple and extremely small shell,\n" \
  2473. "this will do the job."
  2474. #define last_trivial_usage \
  2475. ""
  2476. #define last_full_usage \
  2477. "Shows listing of the last users that logged into the system"
  2478. #define sha1sum_trivial_usage \
  2479. "[OPTION] [FILEs...]" \
  2480. USAGE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
  2481. #define sha1sum_full_usage \
  2482. "Print" USAGE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums.\n\n" \
  2483. "Options:\n" \
  2484. "With no FILE, or when FILE is -, read standard input." \
  2485. USAGE_MD5_SHA1_SUM_CHECK("\n\n" \
  2486. "\t-c\tcheck SHA1 sums against given list\n" \
  2487. "\nThe following two options are useful only when verifying checksums:\n" \
  2488. "\t-s\tdon't output anything, status code shows success\n" \
  2489. "\t-w\twarn about improperly formated SHA1 checksum lines")
  2490. #ifdef CONFIG_FEATURE_FANCY_SLEEP
  2491. # define USAGE_FANCY_SLEEP(a) a
  2492. # define USAGE_NOT_FANCY_SLEEP(a)
  2493. #else
  2494. # define USAGE_FANCY_SLEEP(a)
  2495. # define USAGE_NOT_FANCY_SLEEP(a) a
  2496. #endif
  2497. #define sleep_trivial_usage \
  2498. USAGE_FANCY_SLEEP("[") "N" USAGE_FANCY_SLEEP("]...")
  2499. #define sleep_full_usage \
  2500. USAGE_NOT_FANCY_SLEEP("Pause for N seconds.") \
  2501. USAGE_FANCY_SLEEP( \
  2502. "Pause for a time equal to the total of the args given, where each arg can\n" \
  2503. "\t\thave an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays.")
  2504. #define sleep_example_usage \
  2505. "$ sleep 2\n" \
  2506. "[2 second delay results]\n" \
  2507. USAGE_FANCY_SLEEP("$ sleep 1d 3h 22m 8s\n" \
  2508. "[98528 second delay results]\n")
  2509. #if ENABLE_FEATURE_SORT_BIG
  2510. # define USAGE_SORT_BIG(a) a
  2511. #else
  2512. # define USAGE_SORT_BIG(a)
  2513. #endif
  2514. #define sort_trivial_usage \
  2515. "[-nru" USAGE_SORT_BIG("gMcszbdfimSTokt] [-o outfile] [-k start[.offset][opts][,end[.offset][opts]] [-t char") "] [FILE]..."
  2516. #define sort_full_usage \
  2517. "Sorts lines of text in the specified files\n\n" \
  2518. "Options:\n" \
  2519. USAGE_SORT_BIG( \
  2520. "\t-b\tignore leading blanks\n" \
  2521. "\t-c\tcheck whether input is sorted\n" \
  2522. "\t-d\tdictionary order (blank or alphanumeric only)\n" \
  2523. "\t-f\tignore case\n" \
  2524. "\t-g\tgeneral numerical sort\n" \
  2525. "\t-i\tignore unprintable characters\n" \
  2526. "\t-k\tspecify sort key\n" \
  2527. "\t-M\tsort month\n" \
  2528. ) \
  2529. "\t-n\tsort numbers\n" \
  2530. USAGE_SORT_BIG( \
  2531. "\t-o\toutput to file\n" \
  2532. "\t-k\tsort by key\n" \
  2533. "\t-t\tuse key separator other than whitespace\n" \
  2534. ) \
  2535. "\t-r\treverse sort order\n" \
  2536. USAGE_SORT_BIG("\t-s\tstable (don't sort ties alphabetically)\n") \
  2537. "\t-u\tsuppress duplicate lines" \
  2538. USAGE_SORT_BIG("\n\t-z\tinput terminated by nulls, not newlines\n") \
  2539. USAGE_SORT_BIG("\t-mST\tignored for GNU compatability") \
  2540. ""
  2541. #define sort_example_usage \
  2542. "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
  2543. "a\n" \
  2544. "b\n" \
  2545. "c\n" \
  2546. "d\n" \
  2547. "e\n" \
  2548. "f\n" \
  2549. USAGE_SORT_BIG( \
  2550. "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
  2551. "d 2\n" \
  2552. "b 2\n" \
  2553. "c 3\n" \
  2554. ) \
  2555. ""
  2556. #define start_stop_daemon_trivial_usage \
  2557. "[OPTIONS] [--start|--stop] ... [-- arguments...]"
  2558. #define start_stop_daemon_full_usage \
  2559. "Program to start and stop services." \
  2560. "\n\nOptions:" \
  2561. "\n\t-S|--start\t\t\tstart" \
  2562. "\n\t-K|--stop\t\t\tstop" \
  2563. "\n\t-a|--startas <pathname>\t\tstarts process specified by pathname" \
  2564. "\n\t-b|--background\t\t\tforce process into background" \
  2565. "\n\t-u|--user <username>|<uid>\tstop this user's processes" \
  2566. "\n\t-x|--exec <executable>\t\tprogram to either start or check" \
  2567. "\n\t-m|--make-pidfile <filename>\tcreate the -p file and enter pid in it" \
  2568. "\n\t-n|--name <process-name>\tstop processes with this name" \
  2569. "\n\t-p|--pidfile <pid-file>\t\tsave or load pid using a pid-file" \
  2570. "\n\t-q|--quiet\t\t\tbe quiet" \
  2571. "\n\t-s|--signal <signal>\t\tsignal to send (default TERM)"
  2572. #ifdef CONFIG_FEATURE_STAT_FORMAT
  2573. # define USAGE_STAT_FORMAT(a) a
  2574. #else
  2575. # define USAGE_STAT_FORMAT(a)
  2576. #endif
  2577. #define stat_trivial_usage \
  2578. "[OPTION] FILE..."
  2579. #define stat_full_usage \
  2580. "display file (default) or filesystem status.\n\n" \
  2581. "Options:\n" \
  2582. USAGE_STAT_FORMAT("\t-c fmt\tuse the specified format\n") \
  2583. "\t-f\tdisplay filesystem status\n" \
  2584. "\t-L,-l\tdereference links\n" \
  2585. "\t-t\tdisplay info in terse form\n" \
  2586. USAGE_STAT_FORMAT( \
  2587. "\nValid format sequences for files:\n" \
  2588. " %a Access rights in octal\n" \
  2589. " %A Access rights in human readable form\n" \
  2590. " %b Number of blocks allocated (see %B)\n" \
  2591. " %B The size in bytes of each block reported by %b\n" \
  2592. " %d Device number in decimal\n" \
  2593. " %D Device number in hex\n" \
  2594. " %f Raw mode in hex\n" \
  2595. " %F File type\n" \
  2596. " %g Group ID of owner\n" \
  2597. " %G Group name of owner\n" \
  2598. " %h Number of hard links\n" \
  2599. " %i Inode number\n" \
  2600. " %n File name\n" \
  2601. " %N Quoted file name with dereference if symbolic link\n" \
  2602. " %o I/O block size\n" \
  2603. " %s Total size, in bytes\n" \
  2604. " %t Major device type in hex\n" \
  2605. " %T Minor device type in hex\n" \
  2606. " %u User ID of owner\n" \
  2607. " %U User name of owner\n" \
  2608. " %x Time of last access\n" \
  2609. " %X Time of last access as seconds since Epoch\n" \
  2610. " %y Time of last modification\n" \
  2611. " %Y Time of last modification as seconds since Epoch\n" \
  2612. " %z Time of last change\n" \
  2613. " %Z Time of last change as seconds since Epoch\n" \
  2614. "\nValid format sequences for file systems:\n" \
  2615. " %a Free blocks available to non-superuser\n" \
  2616. " %b Total data blocks in file system\n" \
  2617. " %c Total file nodes in file system\n" \
  2618. " %d Free file nodes in file system\n" \
  2619. " %f Free blocks in file system\n" \
  2620. " %i File System ID in hex\n" \
  2621. " %l Maximum length of filenames\n" \
  2622. " %n File name\n" \
  2623. " %s Block size (for faster transfers)\n" \
  2624. " %S Fundamental block size (for block counts)\n" \
  2625. " %t Type in hex\n" \
  2626. " %T Type in human readable form\n" \
  2627. )
  2628. #define strings_trivial_usage \
  2629. "[-afo] [-n length] [file ... ]"
  2630. #define strings_full_usage \
  2631. "Display printable strings in a binary file." \
  2632. "\n\nOptions:" \
  2633. "\n\t-a\tScan the whole files (this is the default)." \
  2634. "\n\t-f\tPrecede each string with the name of the file where it was found." \
  2635. "\n\t-n N\tSpecifies that at least N characters forms a sequence (default 4)" \
  2636. "\n\t-o\tEach string is preceded by its decimal offset in the file"
  2637. #define stty_trivial_usage \
  2638. "[-a|g] [-F DEVICE] [SETTING]..."
  2639. #define stty_full_usage \
  2640. "Without arguments, prints baud rate, line discipline," \
  2641. "\nand deviations from stty sane." \
  2642. "\n\nOptions:" \
  2643. "\n\t-F DEVICE\topen device instead of stdin" \
  2644. "\n\t-a\t\tprint all current settings in human-readable form" \
  2645. "\n\t-g\t\tprint in stty-readable form" \
  2646. "\n\t[SETTING]\tsee manpage"
  2647. #define su_trivial_usage \
  2648. "[OPTION]... [-] [username]"
  2649. #define su_full_usage \
  2650. "Change user id or become root.\n" \
  2651. "Options:\n" \
  2652. "\t-p, -m\tPreserve environment" \
  2653. "\n\t-c\tCommand to pass to 'sh -c'" \
  2654. "\n\t-s\tShell to use instead of default shell"
  2655. #define sulogin_trivial_usage \
  2656. "[OPTION]... [tty-device]"
  2657. #define sulogin_full_usage \
  2658. "Single user login\n" \
  2659. "Options:\n" \
  2660. "\t-f\tDo not authenticate (user already authenticated)\n" \
  2661. "\t-h\tName of the remote host for this login\n" \
  2662. "\t-p\tPreserve environment"
  2663. #define sum_trivial_usage \
  2664. "[rs] [files...]"
  2665. #define sum_full_usage \
  2666. "checksum and count the blocks in a file\n\n" \
  2667. "Options:\n" \
  2668. "\t-r\tuse BSD sum algorithm (1K blocks)\n" \
  2669. "\t-s\tuse System V sum algorithm (512byte blocks)"
  2670. #define swapoff_trivial_usage \
  2671. "[-a] [DEVICE]"
  2672. #define swapoff_full_usage \
  2673. "Stop swapping virtual memory pages on DEVICE.\n\n" \
  2674. "Options:\n" \
  2675. "\t-a\tStop swapping on all swap devices"
  2676. #define swapon_trivial_usage \
  2677. "[-a] [DEVICE]"
  2678. #define swapon_full_usage \
  2679. "Start swapping virtual memory pages on DEVICE.\n\n" \
  2680. "Options:\n" \
  2681. "\t-a\tStart swapping on all swap devices"
  2682. #define switch_root_trivial_usage \
  2683. "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
  2684. #define switch_root_full_usage \
  2685. "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
  2686. "and exec NEW_INIT.\n\n" \
  2687. "Options:\n" \
  2688. "\t-c\tRedirect console to device on new root"
  2689. #define sync_trivial_usage \
  2690. ""
  2691. #define sync_full_usage \
  2692. "Write all buffered filesystem blocks to disk."
  2693. #ifdef CONFIG_FEATURE_ROTATE_LOGFILE
  2694. # define USAGE_ROTATE_LOGFILE(a) a
  2695. #else
  2696. # define USAGE_ROTATE_LOGFILE(a)
  2697. #endif
  2698. #ifdef CONFIG_FEATURE_REMOTE_LOG
  2699. # define USAGE_REMOTE_LOG(a) a
  2700. #else
  2701. # define USAGE_REMOTE_LOG(a)
  2702. #endif
  2703. #ifdef CONFIG_FEATURE_IPC_SYSLOG
  2704. # define USAGE_IPC_LOG(a) a
  2705. #else
  2706. # define USAGE_IPC_LOG(a)
  2707. #endif
  2708. #define sysctl_trivial_usage \
  2709. "[OPTIONS]... [VALUE]..."
  2710. #define sysctl_full_usage \
  2711. "configure kernel parameters at runtime\n\n" \
  2712. "Options:\n" \
  2713. "\t-n\tUse this option to disable printing of the key name when printing values\n" \
  2714. "\t-w\tUse this option when you want to change a sysctl setting\n" \
  2715. "\t-p\tLoad in sysctl settings from the file specified or /etc/sysctl.conf if none given\n" \
  2716. "\t-a\tDisplay all values currently available\n" \
  2717. "\t-A\tDisplay all values currently available in table form"
  2718. #define sysctl_example_usage \
  2719. "sysctl [-n] variable ...\n" \
  2720. "sysctl [-n] -w variable=value ...\n" \
  2721. "sysctl [-n] -a\n" \
  2722. "sysctl [-n] -p <file>\t(default /etc/sysctl.conf)\n" \
  2723. "sysctl [-n] -A\n"
  2724. #define syslogd_trivial_usage \
  2725. "[OPTION]..."
  2726. #define syslogd_full_usage \
  2727. "Linux system and kernel logging utility.\n" \
  2728. "Note that this version of syslogd ignores /etc/syslog.conf.\n\n" \
  2729. "Options:\n" \
  2730. "\t-m MIN\t\tMinutes between MARK lines (default=20, 0=off)\n" \
  2731. "\t-n\t\tRun as a foreground process\n" \
  2732. "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n" \
  2733. "\t-S\t\tMake logging output smaller." \
  2734. USAGE_ROTATE_LOGFILE( \
  2735. "\n\t-s SIZE\t\tMax size (KB) before rotate (default=200KB, 0=off)\n" \
  2736. "\t-b NUM\t\tNumber of rotated logs to keep (default=1, max=99, 0=purge)") \
  2737. USAGE_REMOTE_LOG( \
  2738. "\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \
  2739. "\t-L\t\tLog locally and via network logging (default is network only)") \
  2740. USAGE_IPC_LOG( \
  2741. "\n\t-C [size(KiB)]\tLog to a circular buffer (read the buffer using logread)")
  2742. #define syslogd_example_usage \
  2743. "$ syslogd -R masterlog:514\n" \
  2744. "$ syslogd -R 192.168.1.1:601\n"
  2745. #ifndef CONFIG_FEATURE_FANCY_TAIL
  2746. # define USAGE_UNSIMPLE_TAIL(a)
  2747. #else
  2748. # define USAGE_UNSIMPLE_TAIL(a) a
  2749. #endif
  2750. #define tail_trivial_usage \
  2751. "[OPTION]... [FILE]..."
  2752. #define tail_full_usage \
  2753. "Print last 10 lines of each FILE to standard output.\n" \
  2754. "With more than one FILE, precede each with a header giving the\n" \
  2755. "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
  2756. "Options:\n" \
  2757. USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \
  2758. "\t-n N[kbm]\tprint last N lines instead of last 10\n" \
  2759. "\t-f\t\toutput data as the file grows" \
  2760. USAGE_UNSIMPLE_TAIL( "\n\t-q\t\tnever output headers giving file names\n" \
  2761. "\t-s SEC\t\twait SEC seconds between reads with -f\n" \
  2762. "\t-v\t\talways output headers giving file names\n\n" \
  2763. "If the first character of N (bytes or lines) is a '+', output begins with \n" \
  2764. "the Nth item from the start of each file, otherwise, print the last N items\n" \
  2765. "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." )
  2766. #define tail_example_usage \
  2767. "$ tail -n 1 /etc/resolv.conf\n" \
  2768. "nameserver 10.0.0.1\n"
  2769. #ifdef CONFIG_FEATURE_TAR_CREATE
  2770. # define USAGE_TAR_CREATE(a) a
  2771. #else
  2772. # define USAGE_TAR_CREATE(a)
  2773. #endif
  2774. #ifdef CONFIG_FEATURE_TAR_EXCLUDE
  2775. # define USAGE_TAR_EXCLUDE(a) a
  2776. #else
  2777. # define USAGE_TAR_EXCLUDE(a)
  2778. #endif
  2779. #ifdef CONFIG_FEATURE_TAR_GZIP
  2780. # define USAGE_TAR_GZIP(a) a
  2781. #else
  2782. # define USAGE_TAR_GZIP(a)
  2783. #endif
  2784. #ifdef CONFIG_FEATURE_TAR_BZIP2
  2785. # define USAGE_TAR_BZIP2(a) a
  2786. #else
  2787. # define USAGE_TAR_BZIP2(a)
  2788. #endif
  2789. #ifdef CONFIG_FEATURE_TAR_LZMA
  2790. # define USAGE_TAR_LZMA(a) a
  2791. #else
  2792. # define USAGE_TAR_LZMA(a)
  2793. #endif
  2794. #ifdef CONFIG_FEATURE_TAR_COMPRESS
  2795. # define USAGE_TAR_COMPRESS(a) a
  2796. #else
  2797. # define USAGE_TAR_COMPRESS(a)
  2798. #endif
  2799. #define tar_trivial_usage \
  2800. "-[" USAGE_TAR_CREATE("c") USAGE_TAR_GZIP("z") USAGE_TAR_BZIP2("j") USAGE_TAR_LZMA("a") USAGE_TAR_COMPRESS("Z") "xtvO] " \
  2801. USAGE_TAR_EXCLUDE("[-X FILE]") \
  2802. "[-f TARFILE] [-C DIR] [FILE(s)] ..."
  2803. #define tar_full_usage \
  2804. "Create, extract, or list files from a tar file.\n\n" \
  2805. "Options:\n" \
  2806. USAGE_TAR_CREATE("\tc\t\tcreate\n") \
  2807. "\tx\t\textract\n" \
  2808. "\tt\t\tlist\n" \
  2809. "\nArchive format selection:\n" \
  2810. USAGE_TAR_GZIP("\tz\t\tFilter the archive through gzip\n") \
  2811. USAGE_TAR_BZIP2("\tj\t\tFilter the archive through bzip2\n") \
  2812. USAGE_TAR_LZMA("\ta\t\tFilter the archive through lzma\n") \
  2813. USAGE_TAR_COMPRESS("\tZ\t\tFilter the archive through compress\n") \
  2814. "\nFile selection:\n" \
  2815. "\tf\t\tname of TARFILE or \"-\" for stdin\n" \
  2816. "\tO\t\textract to stdout\n" \
  2817. USAGE_TAR_EXCLUDE( \
  2818. "\texclude\t\tfile to exclude\n" \
  2819. "\tX\t\tfile with names to exclude\n" \
  2820. ) \
  2821. "\tC\t\tchange to directory DIR before operation\n" \
  2822. "\tv\t\tverbosely list files processed"
  2823. #define tar_example_usage \
  2824. "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
  2825. "$ tar -cf /tmp/tarball.tar /usr/local\n"
  2826. #define tee_trivial_usage \
  2827. "[OPTION]... [FILE]..."
  2828. #define tee_full_usage \
  2829. "Copy standard input to each FILE, and also to standard output.\n\n" \
  2830. "Options:\n" \
  2831. "\t-a\tappend to the given FILEs, do not overwrite\n" \
  2832. "\t-i\tignore interrupt signals (SIGINT)"
  2833. #define tee_example_usage \
  2834. "$ echo \"Hello\" | tee /tmp/foo\n" \
  2835. "$ cat /tmp/foo\n" \
  2836. "Hello\n"
  2837. #ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN
  2838. #define telnet_trivial_usage \
  2839. "[-a] [-l USER] HOST [PORT]"
  2840. #define telnet_full_usage \
  2841. "Telnet is used to establish interactive communication with another\n" \
  2842. "computer over a network using the TELNET protocol.\n\n" \
  2843. "Options:\n" \
  2844. "\t-a\t\tAttempt an automatic login with the USER variable\n" \
  2845. "\t-l USER\t\tAttempt an automatic login with the USER argument\n" \
  2846. "\tHOST\t\tThe official name, alias or the IP address of the\n" \
  2847. "\t\t\tremote host.\n" \
  2848. "\tPORT\t\tThe remote port number to connect to. If it is not\n" \
  2849. "\t\t\tspecified, the default telnet (23) port is used."
  2850. #else
  2851. #define telnet_trivial_usage \
  2852. "HOST [PORT]"
  2853. #define telnet_full_usage \
  2854. "Telnet is used to establish interactive communication with another\n" \
  2855. "computer over a network using the TELNET protocol."
  2856. #endif
  2857. #ifdef CONFIG_FEATURE_TELNETD_INETD
  2858. #define telnetd_trivial_usage \
  2859. "(inetd mode) [OPTION]"
  2860. #define telnetd_full_usage \
  2861. "Telnetd uses incoming TELNET connections via inetd.\n" \
  2862. "Options:\n" \
  2863. "\t-l LOGIN\texec LOGIN on connect (default /bin/sh)\n" \
  2864. "\t-f issue_file\tDisplay issue_file instead of /etc/issue"
  2865. #else
  2866. #define telnetd_trivial_usage \
  2867. "[OPTION]"
  2868. #define telnetd_full_usage \
  2869. "Telnetd listens for incoming TELNET connections on PORT.\n" \
  2870. "Options:\n" \
  2871. "\t-p PORT\tlisten for connections on PORT (default 23)\n" \
  2872. "\t-l LOGIN\texec LOGIN on connect (default /bin/sh)\n" \
  2873. "\t-f issue_file\tDisplay issue_file instead of /etc/issue"
  2874. #endif
  2875. #define test_trivial_usage \
  2876. "EXPRESSION\n or [ EXPRESSION ]"
  2877. #define test_full_usage \
  2878. "Checks file types and compares values returning an exit\n" \
  2879. "code determined by the value of EXPRESSION."
  2880. #define test_example_usage \
  2881. "$ test 1 -eq 2\n" \
  2882. "$ echo $?\n" \
  2883. "1\n" \
  2884. "$ test 1 -eq 1\n" \
  2885. "$ echo $?\n" \
  2886. "0\n" \
  2887. "$ [ -d /etc ]\n" \
  2888. "$ echo $?\n" \
  2889. "0\n" \
  2890. "$ [ -d /junk ]\n" \
  2891. "$ echo $?\n" \
  2892. "1\n"
  2893. #ifdef CONFIG_FEATURE_TFTP_GET
  2894. # define USAGE_TFTP_GET(a) a
  2895. #else
  2896. # define USAGE_TFTP_GET(a)
  2897. #endif
  2898. #ifdef CONFIG_FEATURE_TFTP_PUT
  2899. # define USAGE_TFTP_PUT(a) a
  2900. #else
  2901. # define USAGE_TFTP_PUT(a)
  2902. #endif
  2903. #ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
  2904. # define USAGE_TFTP_BS(a) a
  2905. #else
  2906. # define USAGE_TFTP_BS(a)
  2907. #endif
  2908. #define tftp_trivial_usage \
  2909. "[OPTION]... HOST [PORT]"
  2910. #define tftp_full_usage \
  2911. "Transfers a file from/to a tftp server using \"octet\" mode.\n\n" \
  2912. "Options:\n" \
  2913. "\t-l FILE\tLocal FILE\n" \
  2914. "\t-r FILE\tRemote FILE" \
  2915. USAGE_TFTP_GET( \
  2916. "\n\t-g\tGet file" \
  2917. ) \
  2918. USAGE_TFTP_PUT( \
  2919. "\n\t-p\tPut file" \
  2920. ) \
  2921. USAGE_TFTP_BS( \
  2922. "\n\t-b SIZE\tTransfer blocks of SIZE octets" \
  2923. )
  2924. #define time_trivial_usage \
  2925. "[OPTION]... COMMAND [ARGS...]"
  2926. #define time_full_usage \
  2927. "Runs the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \
  2928. "COMMAND's resource usage information is displayed\n\n" \
  2929. "Options:\n" \
  2930. "\t-v\tDisplays verbose resource usage information"
  2931. #define top_trivial_usage \
  2932. "[-d <seconds>]"
  2933. #define top_full_usage \
  2934. "top provides an view of processor activity in real time.\n" \
  2935. "This utility reads the status for all processes in /proc each <seconds>\n" \
  2936. "and shows the status for however many processes will fit on the screen.\n" \
  2937. "This utility will not show processes that are started after program startup,\n" \
  2938. "but it will show the EXIT status for and PIDs that exit while it is running."
  2939. #define touch_trivial_usage \
  2940. "[-c] FILE [FILE ...]"
  2941. #define touch_full_usage \
  2942. "Update the last-modified date on the given FILE[s].\n\n" \
  2943. "Options:\n" \
  2944. "\t-c\tDo not create any files"
  2945. #define touch_example_usage \
  2946. "$ ls -l /tmp/foo\n" \
  2947. "/bin/ls: /tmp/foo: No such file or directory\n" \
  2948. "$ touch /tmp/foo\n" \
  2949. "$ ls -l /tmp/foo\n" \
  2950. "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n"
  2951. #define tr_trivial_usage \
  2952. "[-cds] STRING1 [STRING2]"
  2953. #define tr_full_usage \
  2954. "Translate, squeeze, and/or delete characters from\n" \
  2955. "standard input, writing to standard output.\n\n" \
  2956. "Options:\n" \
  2957. "\t-c\ttake complement of STRING1\n" \
  2958. "\t-d\tdelete input characters coded STRING1\n" \
  2959. "\t-s\tsqueeze multiple output characters of STRING2 into one character"
  2960. #define tr_example_usage \
  2961. "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
  2962. "hello world\n"
  2963. #define traceroute_trivial_usage \
  2964. "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
  2965. "\t[-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
  2966. "\t[-z pausemsecs] host [data size]"
  2967. #define traceroute_full_usage \
  2968. "trace the route ip packets follow going to \"host\"\n" \
  2969. "Options:\n" \
  2970. "\t-F\tSet the don't fragment bit\n" \
  2971. "\t-I\tUse ICMP ECHO instead of UDP datagrams\n" \
  2972. "\t-l\tDisplay the ttl value of the returned packet\n" \
  2973. "\t-d\tSet SO_DEBUG options to socket\n" \
  2974. "\t-n\tPrint hop addresses numerically rather than symbolically\n" \
  2975. "\t-r\tBypass the normal routing tables and send directly to a host\n" \
  2976. "\t-v\tVerbose output\n" \
  2977. "\t-m max_ttl\tSet the max time-to-live (max number of hops)\n" \
  2978. "\t-p port#\tSet the base UDP port number used in probes\n" \
  2979. "\t\t(default is 33434)\n" \
  2980. "\t-q nqueries\tSet the number of probes per ``ttl'' to nqueries\n" \
  2981. "\t\t(default is 3)\n" \
  2982. "\t-s src_addr\tUse the following IP address as the source address\n" \
  2983. "\t-t tos\tSet the type-of-service in probe packets to the following value\n" \
  2984. "\t\t(default 0)\n" \
  2985. "\t-w wait\tSet the time (in seconds) to wait for a response to a probe\n" \
  2986. "\t\t(default 3 sec)\n" \
  2987. "\t-g\tSpecify a loose source route gateway (8 maximum)"
  2988. #define true_trivial_usage \
  2989. ""
  2990. #define true_full_usage \
  2991. "Return an exit code of TRUE (0)."
  2992. #define true_example_usage \
  2993. "$ true\n" \
  2994. "$ echo $?\n" \
  2995. "0\n"
  2996. #define tty_trivial_usage \
  2997. ""
  2998. #define tty_full_usage \
  2999. "Print the file name of the terminal connected to standard input.\n\n" \
  3000. "Options:\n" \
  3001. "\t-s\tprint nothing, only return an exit status"
  3002. #define tty_example_usage \
  3003. "$ tty\n" \
  3004. "/dev/tty2\n"
  3005. #define tune2fs_trivial_usage \
  3006. "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
  3007. "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
  3008. "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
  3009. "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
  3010. "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
  3011. "[-T last-check-time] [-U UUID] device"
  3012. #define tune2fs_full_usage \
  3013. "Adjust filesystem options on ext[23] filesystems."
  3014. #define udhcpc_trivial_usage \
  3015. "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]"
  3016. #define udhcpc_full_usage \
  3017. "\t-c,\t--clientid=CLIENTID\tSet client identifier\n" \
  3018. "\t-C,\t--clientid-none\tSuppress default client identifier\n" \
  3019. "\t-V,\t--vendorclass=CLASSID\tSet vendor class identifier\n" \
  3020. "\t-H,\t--hostname=HOSTNAME\tClient hostname\n" \
  3021. "\t-h,\t \tAlias for -H\n" \
  3022. "\t-f,\t--foreground\tDo not fork after getting lease\n" \
  3023. "\t-b,\t--background\tFork to background if lease cannot be immediately negotiated\n" \
  3024. "\t-i,\t--interface=INTERFACE\tInterface to use (default: eth0)\n" \
  3025. "\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \
  3026. "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \
  3027. "\t-q,\t--quit\tQuit after obtaining lease\n" \
  3028. "\t-r,\t--request=IP\tIP address to request (default: none)\n" \
  3029. "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
  3030. "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\
  3031. "\t-v,\t--version\tDisplay version"
  3032. #define udhcpd_trivial_usage \
  3033. "[configfile]\n" \
  3034. #define udhcpd_full_usage \
  3035. ""
  3036. #ifdef CONFIG_FEATURE_MOUNT_FORCE
  3037. # define USAGE_MOUNT_FORCE(a) a
  3038. #else
  3039. # define USAGE_MOUNT_FORCE(a)
  3040. #endif
  3041. #define umount_trivial_usage \
  3042. "[flags] FILESYSTEM|DIRECTORY"
  3043. #define umount_full_usage \
  3044. "Unmount file systems\n" \
  3045. "\nFlags:\n" "\t-a\tUnmount all file systems" \
  3046. USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \
  3047. "\n\t-r\tTry to remount devices as read-only if mount is busy" \
  3048. "\n\t-l\tLazy umount (detach filesystem)" \
  3049. "\n\t-f\tForce umount (i.e., unreachable NFS server)" \
  3050. USAGE_MOUNT_LOOP("\n\t-D\tDo not free loop device (if a loop device has been used)")
  3051. #define umount_example_usage \
  3052. "$ umount /dev/hdc1 \n"
  3053. #define uname_trivial_usage \
  3054. "[OPTION]..."
  3055. #define uname_full_usage \
  3056. "Print certain system information. With no OPTION, same as -s.\n\n" \
  3057. "Options:\n" \
  3058. "\t-a\tprint all information\n" \
  3059. "\t-m\tthe machine (hardware) type\n" \
  3060. "\t-n\tprint the machine's network node hostname\n" \
  3061. "\t-r\tprint the operating system release\n" \
  3062. "\t-s\tprint the operating system name\n" \
  3063. "\t-p\tprint the host processor type\n" \
  3064. "\t-v\tprint the operating system version"
  3065. #define uname_example_usage \
  3066. "$ uname -a\n" \
  3067. "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
  3068. #define uncompress_trivial_usage \
  3069. "[-c] [-f] [ name ... ]"
  3070. #define uncompress_full_usage \
  3071. "Uncompress .Z file[s]\n" \
  3072. "Options:\n" \
  3073. "\t-c\textract to stdout\n" \
  3074. "\t-f\tforce overwrite an existing file"
  3075. #define uniq_trivial_usage \
  3076. "[-fscdu]... [INPUT [OUTPUT]]"
  3077. #define uniq_full_usage \
  3078. "Discard all but one of successive identical lines from INPUT\n" \
  3079. "(or standard input), writing to OUTPUT (or standard output).\n\n" \
  3080. "Options:\n" \
  3081. "\t-c\tprefix lines by the number of occurrences\n" \
  3082. "\t-d\tonly print duplicate lines\n" \
  3083. "\t-u\tonly print unique lines\n" \
  3084. "\t-f N\tskip the first N fields\n" \
  3085. "\t-s N\tskip the first N chars (after any skipped fields)"
  3086. #define uniq_example_usage \
  3087. "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
  3088. "a\n" \
  3089. "b\n" \
  3090. "c\n"
  3091. #define unix2dos_trivial_usage \
  3092. "[option] [FILE]"
  3093. #define unix2dos_full_usage \
  3094. "Converts FILE from unix format to dos format. When no option\n" \
  3095. "is given, the input is converted to the opposite output format.\n" \
  3096. "When no file is given, uses stdin for input and stdout for output.\n" \
  3097. "Options:\n" \
  3098. "\t-u\toutput will be in UNIX format\n" \
  3099. "\t-d\toutput will be in DOS format"
  3100. #define unzip_trivial_usage \
  3101. "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
  3102. #define unzip_full_usage \
  3103. "Extracts files from ZIP archives.\n\n" \
  3104. "Options:\n" \
  3105. "\t-l\tlist archive contents (short form)\n" \
  3106. "\t-n\tnever overwrite existing files (default)\n" \
  3107. "\t-o\toverwrite files without prompting\n" \
  3108. "\t-p\tsend output to stdout\n" \
  3109. "\t-q\tbe quiet\n" \
  3110. "\t-x\texclude these files\n" \
  3111. "\t-d\textract files into this directory"
  3112. #define uptime_trivial_usage \
  3113. ""
  3114. #define uptime_full_usage \
  3115. "Display the time since the last boot."
  3116. #define uptime_example_usage \
  3117. "$ uptime\n" \
  3118. " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
  3119. #define usleep_trivial_usage \
  3120. "N"
  3121. #define usleep_full_usage \
  3122. "Pause for N microseconds."
  3123. #define usleep_example_usage \
  3124. "$ usleep 1000000\n" \
  3125. "[pauses for 1 second]\n"
  3126. #define uudecode_trivial_usage \
  3127. "[FILE]..."
  3128. #define uudecode_full_usage \
  3129. "Uudecode a file that is uuencoded.\n\n" \
  3130. "Options:\n" \
  3131. "\t-o FILE\tdirect output to FILE"
  3132. #define uudecode_example_usage \
  3133. "$ uudecode -o busybox busybox.uu\n" \
  3134. "$ ls -l busybox\n" \
  3135. "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
  3136. #define uuencode_trivial_usage \
  3137. "[OPTION] [INFILE] REMOTEFILE"
  3138. #define uuencode_full_usage \
  3139. "Uuencode a file.\n\n" \
  3140. "Options:\n" \
  3141. "\t-m\tuse base64 encoding per RFC1521"
  3142. #define uuencode_example_usage \
  3143. "$ uuencode busybox busybox\n" \
  3144. "begin 755 busybox\n" \
  3145. "<encoded file snipped>\n" \
  3146. "$ uudecode busybox busybox > busybox.uu\n" \
  3147. "$\n"
  3148. #define vconfig_trivial_usage \
  3149. "COMMAND [OPTIONS] ..."
  3150. #define vconfig_full_usage \
  3151. "vconfig lets you create and remove virtual ethernet devices.\n\n" \
  3152. "Options:\n" \
  3153. "\tadd [interface-name] [vlan_id]\n" \
  3154. "\trem [vlan-name]\n" \
  3155. "\tset_flag [interface-name] [flag-num] [0 | 1]\n" \
  3156. "\tset_egress_map [vlan-name] [skb_priority] [vlan_qos]\n" \
  3157. "\tset_ingress_map [vlan-name] [skb_priority] [vlan_qos]\n" \
  3158. "\tset_name_type [name-type]"
  3159. #define vi_trivial_usage \
  3160. "[OPTION] [FILE]..."
  3161. #define vi_full_usage \
  3162. "edit FILE.\n\n" \
  3163. "Options:\n" \
  3164. "\t-R\tRead-only- do not write to the file"
  3165. #define vlock_trivial_usage \
  3166. "[OPTIONS]"
  3167. #define vlock_full_usage \
  3168. "Lock a virtual terminal. A password is required to unlock\n" \
  3169. "Options:\n" \
  3170. "\t-a\tLock all VTs"
  3171. #define watch_trivial_usage \
  3172. "[-n <seconds>] COMMAND..."
  3173. #define watch_full_usage \
  3174. "Executes a program periodically.\n" \
  3175. "Options:\n" \
  3176. "\t-n\tLoop period in seconds - default is 2"
  3177. #define watch_example_usage \
  3178. "$ watch date\n" \
  3179. "Mon Dec 17 10:31:40 GMT 2000\n" \
  3180. "Mon Dec 17 10:31:42 GMT 2000\n" \
  3181. "Mon Dec 17 10:31:44 GMT 2000"
  3182. #define watchdog_trivial_usage \
  3183. "[-t <seconds>] DEV"
  3184. #define watchdog_full_usage \
  3185. "Periodically write to watchdog device DEV.\n" \
  3186. "Options:\n" \
  3187. "\t-t\tTimer period in seconds - default is 30"
  3188. #define wc_trivial_usage \
  3189. "[OPTION]... [FILE]..."
  3190. #define wc_full_usage \
  3191. "Print line, word, and byte counts for each FILE, and a total line if\n" \
  3192. "more than one FILE is specified. With no FILE, read standard input.\n\n" \
  3193. "Options:\n" \
  3194. "\t-c\tprint the byte counts\n" \
  3195. "\t-l\tprint the newline counts\n" \
  3196. "\t-L\tprint the length of the longest line\n" \
  3197. "\t-w\tprint the word counts"
  3198. #define wc_example_usage \
  3199. "$ wc /etc/passwd\n" \
  3200. " 31 46 1365 /etc/passwd\n"
  3201. #define wget_trivial_usage \
  3202. "[-c|--continue] [-q|--quiet] [-O|--output-document file]\n" \
  3203. "\t\t[--header 'header: value'] [-Y|--proxy on/off] [-P DIR] url"
  3204. #define wget_full_usage \
  3205. "wget retrieves files via HTTP or FTP\n\n" \
  3206. "Options:\n" \
  3207. "\t-c\tcontinue retrieval of aborted transfers\n" \
  3208. "\t-q\tquiet mode - do not print\n" \
  3209. "\t-P\tSet directory prefix to DIR\n" \
  3210. "\t-O\tsave to filename ('-' for stdout)\n" \
  3211. "\t-Y\tuse proxy ('on' or 'off')"
  3212. #define which_trivial_usage \
  3213. "[COMMAND ...]"
  3214. #define which_full_usage \
  3215. "Locates a COMMAND."
  3216. #define which_example_usage \
  3217. "$ which login\n" \
  3218. "/bin/login\n"
  3219. #define who_trivial_usage \
  3220. " "
  3221. #define who_full_usage \
  3222. "Prints the current user names and related information"
  3223. #define whoami_trivial_usage \
  3224. ""
  3225. #define whoami_full_usage \
  3226. "Prints the user name associated with the current effective user id."
  3227. #ifdef CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION
  3228. #define USAGE_XARGS_CONFIRMATION(a) a
  3229. #else
  3230. #define USAGE_XARGS_CONFIRMATION(a)
  3231. #endif
  3232. #ifdef CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT
  3233. #define USAGE_XARGS_TERMOPT(a) a
  3234. #else
  3235. #define USAGE_XARGS_TERMOPT(a)
  3236. #endif
  3237. #ifdef CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
  3238. #define USAGE_XARGS_ZERO_TERM(a) a
  3239. #else
  3240. #define USAGE_XARGS_ZERO_TERM(a)
  3241. #endif
  3242. #define xargs_trivial_usage \
  3243. "[COMMAND] [OPTIONS] [ARGS...]"
  3244. #define xargs_full_usage \
  3245. "Executes COMMAND on every item given by standard input.\n\n" \
  3246. "Options:\n" \
  3247. USAGE_XARGS_CONFIRMATION("\t-p\tPrompt the user about whether to run each command\n") \
  3248. "\t-r\tDo not run command for empty readed lines\n" \
  3249. USAGE_XARGS_TERMOPT("\t-x\tExit if the size is exceeded\n") \
  3250. USAGE_XARGS_ZERO_TERM("\t-0\tInput filenames are terminated by a null character\n") \
  3251. "\t-t\tPrint the command line on stderr before executing it"
  3252. #define xargs_example_usage \
  3253. "$ ls | xargs gzip\n" \
  3254. "$ find . -name '*.c' -print | xargs rm\n"
  3255. #define yes_trivial_usage \
  3256. "[OPTION]... [STRING]..."
  3257. #define yes_full_usage \
  3258. "Repeatedly outputs a line with all specified STRING(s), or 'y'."
  3259. #define zcat_trivial_usage \
  3260. "FILE"
  3261. #define zcat_full_usage \
  3262. "Uncompress to stdout."
  3263. #define zcip_trivial_usage \
  3264. "[OPTIONS] ifname script"
  3265. #define zcip_full_usage \
  3266. "zcip manages a ZeroConf IPv4 link-local address.\n" \
  3267. "Options:\n" \
  3268. "\t-f foreground mode\n" \
  3269. "\t-q quit after address (no daemon)\n" \
  3270. "\t-r 169.254.x.x request this address first\n" \
  3271. "\t-v verbose; show version"
  3272. #endif /* __BB_USAGE_H__ */