1 #define ar_trivial_usage \
2 "-[ovR]{ptx} archive filenames"
3 #define ar_full_usage \
4 "Extract or list files from an ar archive.\n\n" \
6 "\t-o\t\tpreserve original dates\n" \
7 "\t-p\t\textract to stdout\n" \
10 "\t-v\t\tverbosely list files processed\n" \
11 "\t-R\t\trecursive action"
13 #define basename_trivial_usage \
15 #define basename_full_usage \
16 "Strips directory path and suffixes from FILE.\n" \
17 "If specified, also removes any trailing SUFFIX."
19 #define cat_trivial_usage \
21 #define cat_full_usage \
22 "Concatenates FILE(s) and prints them to stdout."
24 #define chgrp_trivial_usage \
25 "[OPTION]... GROUP FILE..."
26 #define chgrp_full_usage \
27 "Change the group membership of each FILE to GROUP.\n" \
28 "\nOptions:\n\t-R\tChanges files and directories recursively."
30 #define chmod_trivial_usage \
31 "[-R] MODE[,MODE]... FILE..."
32 #define chmod_full_usage \
33 "Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n" \
34 "one or more of the letters rwxst.\n\n" \
35 "Options:\n\t-R\tChanges files and directories recursively."
37 #define chown_trivial_usage \
38 "[OPTION]... OWNER[<.|:>[GROUP] FILE..."
39 #define chown_full_usage \
40 "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \
41 "\nOptions:\n\t-R\tChanges files and directories recursively."
43 #define chroot_trivial_usage \
44 "NEWROOT [COMMAND...]"
45 #define chroot_full_usage \
46 "Run COMMAND with root directory set to NEWROOT."
48 #define chvt_trivial_usage \
50 #define chvt_full_usage \
51 "Changes the foreground virtual terminal to /dev/ttyN"
53 #define clear_trivial_usage \
55 #define clear_full_usage \
58 #define cmp_trivial_usage \
60 #define cmp_full_usage \
63 #define cp_trivial_usage \
64 "[OPTION]... SOURCE DEST\n"
65 #define cp_full_usage \
66 "Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" \
68 "\t-a\tSame as -dpR\n" \
69 "\t-d\tPreserves links\n" \
70 "\t-p\tPreserves file attributes if possible\n" \
71 "\t-f\tforce (implied; ignored) - always set\n" \
72 "\t-R\tCopies directories recursively"
74 #define cut_trivial_usage \
75 "[OPTION]... [FILE]..."
76 #define cut_full_usage \
77 "Prints selected fields from each input FILE to standard output.\n\n" \
79 "\t-b LIST\tOutput only bytes from LIST\n" \
80 "\t-c LIST\tOutput only characters from LIST\n" \
81 "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n" \
82 "\t-s\tOutput only the lines containing delimiter\n" \
83 "\t-f N\tPrint only these fields\n" \
86 #define date_trivial_usage \
87 "[OPTION]... [+FORMAT]\n"
88 #define date_full_usage \
89 "Displays the current time in the given FORMAT, or sets the system date.\n" \
90 "\nOptions:\n\t-R\t\tOutputs RFC-822 compliant date string\n" \
91 "\t-d STRING\tdisplay time described by STRING, not `now'\n" \
92 "\t-s\t\tSets time described by STRING\n" \
93 "\t-u\t\tPrints or sets Coordinated Universal Time"
95 #define dc_trivial_usage \
97 #define dc_full_usage \
98 "This is a Tiny RPN calculator that understands the\n" \
99 "following operations: +, -, /, *, and, or, not, eor.\n" \
100 "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16"
102 #define dd_trivial_usage \
103 "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] [seek=N] [conv=notrunc|sync]"
104 #define dd_full_usage \
105 "Copy a file, converting and formatting according to options\n\n" \
106 "\tif=FILE\tread from FILE instead of stdin\n" \
107 "\tof=FILE\twrite to FILE instead of stdout\n" \
108 "\tbs=N\tread and write N bytes at a time\n" \
109 "\tcount=N\tcopy only N input blocks\n" \
110 "\tskip=N\tskip N input blocks\n" \
111 "\tseek=N\tskip N output blocks\n" \
112 "\tconv=notrunc\tdon't truncate output file\n" \
113 "\tconv=sync\tpad blocks with zeros\n" \
115 "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \
116 "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)."
118 #define deallocvt_trivial_usage \
120 #define deallocvt_full_usage \
121 "Deallocate unused virtual terminal /dev/ttyN"
124 #ifdef BB_FEATURE_HUMAN_READABLE
125 #define USAGE_HUMAN_READABLE(a,b) a
127 #define USAGE_HUMAN_READABLE(a,b) b
129 #define df_trivial_usage \
131 USAGE_HUMAN_READABLE("hm", "") \
132 "k] [filesystem ...]\n"
133 #define df_full_usage \
134 "Print the filesystem space used and space available.\n\n" \
136 USAGE_HUMAN_READABLE( \
137 "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
138 "\t-m\tprint sizes in megabytes\n" \
139 "\t-k\tprint sizes in kilobytes(default)", \
140 "\n\t-k\tprint sizes in kilobytes(compatability)")
142 #define dirname_trivial_usage \
144 #define dirname_full_usage \
145 "Strips non-directory suffix from FILENAME"
147 #define dmesg_trivial_usage \
148 "[-c] [-n LEVEL] [-s SIZE]"
149 #define dmesg_full_usage \
150 "Prints or controls the kernel ring buffer\n\n" \
152 "\t-c\t\tClears the ring buffer's contents after printing\n" \
153 "\t-n LEVEL\tSets console logging level\n" \
154 "\t-s SIZE\t\tUse a buffer of size SIZE"
156 #define dos2unix_trivial_usage \
157 "< dosfile > unixfile"
158 #define dos2unix_full_usage \
159 "Converts a text file from dos format to unix format."
161 #define dpkg_trivial_usage \
162 "[-i|-r|--unpack|--configure] my.deb"
163 #define dpkg_full_usage \
164 "WORK IN PROGRESS, only usefull for debian-installer"
166 #define dpkg_deb_trivial_usage \
167 "[-cexX] file directory"
168 #define dpkg_deb_full_usage \
169 "Perform actions on debian packages (.debs)\n\n" \
171 "\t-c\tList contents of filesystem tree (verbose)\n" \
172 "\t-l\tList contents of filesystem tree (.list format)\n" \
173 "\t-e\tExtract control files to directory\n" \
174 "\t-x\tExctract packages filesystem tree to directory\n" \
175 "\t-X\tVerbose extract"
177 #define du_trivial_usage \
178 "[-ls" USAGE_HUMAN_READABLE("hm", "") "k] [FILE]..."
179 #define du_full_usage \
180 "Summarizes disk space used for each FILE and/or directory.\n" \
181 "Disk space is printed in units of 1024 bytes.\n\n" \
183 "\t-l\tcount sizes many times if hard linked\n" \
184 "\t-s\tdisplay only a total for each argument" \
185 USAGE_HUMAN_READABLE( \
186 "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
187 "\t-m\tprint sizes in megabytes\n" \
188 "\t-k\tprint sizes in kilobytes(default)" \
190 "\n\t-k\tprint sizes in kilobytes(compatability)" \
193 #define dumpkmap_trivial_usage \
195 #define dumpkmap_full_usage \
196 "Prints out a binary keyboard translation table to standard output."
198 #define dutmp_trivial_usage \
200 #define dutmp_full_usage \
201 "Dump utmp file format (pipe delimited) from FILE\n" \
202 "or stdin to stdout. (i.e. 'dutmp /var/run/utmp')"
204 #define echo_trivial_usage \
206 #define echo_full_usage \
207 "Prints the specified ARGs to stdout\n\n" \
209 "\t-n\tsuppress trailing newline\n" \
210 "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n" \
211 "\t-E\tdisable interpretation of backslash-escaped characters"
213 #define expr_trivial_usage \
215 #define expr_full_usage \
216 "Prints the value of EXPRESSION to standard output.\n\n" \
217 "EXPRESSION may be:\n" \
218 "ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
219 "ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
220 "ARG1 < ARG2 ARG1 is less than ARG2\n" \
221 "ARG1 <= ARG2 ARG1 is less than or equal to ARG2\n" \
222 "ARG1 = ARG2 ARG1 is equal to ARG2\n" \
223 "ARG1 != ARG2 ARG1 is unequal to ARG2\n" \
224 "ARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n" \
225 "ARG1 > ARG2 ARG1 is greater than ARG2\n" \
226 "ARG1 + ARG2 arithmetic sum of ARG1 and ARG2\n" \
227 "ARG1 - ARG2 arithmetic difference of ARG1 and ARG2\n" \
228 "ARG1 * ARG2 arithmetic product of ARG1 and ARG2\n" \
229 "ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2\n" \
230 "ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2\n" \
231 "STRING : REGEXP anchored pattern match of REGEXP in STRING\n" \
232 "match STRING REGEXP same as STRING : REGEXP\n" \
233 "substr STRING POS LENGTH substring of STRING, POS counted from 1\n" \
234 "index STRING CHARS index in STRING where any CHARS is found, or 0\n" \
235 "length STRING length of STRING\n" \
236 "quote TOKEN interpret TOKEN as a string, even if it is a \n" \
237 " keyword like `match' or an operator like `/'\n" \
238 "( EXPRESSION ) value of EXPRESSION\n\n" \
239 "Beware that many operators need to be escaped or quoted for shells.\n" \
240 "Comparisons are arithmetic if both ARGs are numbers, else\n" \
241 "lexicographical. Pattern matches return the string matched between \n" \
242 "\\( and \\) or null; if \\( and \\) are not used, they return the number \n" \
243 "of characters matched or 0."
245 #define false_trivial_usage \
247 #define false_full_usage \
248 "Return an exit code of FALSE (1)."
250 #define fdflush_trivial_usage \
252 #define fdflush_full_usage \
253 "Forces floppy disk drive to detect disk change"
255 #ifdef BB_FEATURE_FIND_TYPE
256 #define USAGE_FIND_TYPE(a) a
258 #define USAGE_FIND_TYPE(a)
260 #ifdef BB_FEATURE_FIND_PERM
261 #define USAGE_FIND_PERM(a) a
263 #define USAGE_FIND_PERM(a)
265 #ifdef BB_FEATURE_FIND_MTIME
266 #define USAGE_FIND_MTIME(a) a
268 #define USAGE_FIND_MTIME(a)
271 #define find_trivial_usage \
272 "[PATH...] [EXPRESSION]"
273 #define find_full_usage \
274 "Search for files in a directory hierarchy. The default PATH is\n" \
275 "the current directory; default EXPRESSION is '-print'\n\n" \
276 "\nEXPRESSION may consist of:\n" \
277 "\t-follow\t\tDereference symbolic links.\n" \
278 "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \
280 "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
282 "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \
283 ) USAGE_FIND_MTIME( \
284 "\n\t-mtime TIME\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days")
286 #define free_trivial_usage \
288 #define free_full_usage \
289 "Displays the amount of free and used system memory"
291 #define freeramdisk_trivial_usage \
293 #define freeramdisk_full_usage \
294 "Frees all memory used by the specified ramdisk."
296 #define fsck_minix_trivial_usage \
297 "[-larvsmf] /dev/name"
298 #define fsck_minix_full_usage \
299 "Performs a consistency check for MINIX filesystems.\n\n" \
301 "\t-l\tLists all filenames\n" \
302 "\t-r\tPerform interactive repairs\n" \
303 "\t-a\tPerform automatic repairs\n" \
305 "\t-s\tOutputs super-block information\n" \
306 "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n" \
307 "\t-f\tForce file system check."
309 #define getopt_trivial_usage \
311 #define getopt_full_usage \
312 "\nParse command options\n" \
313 "\t-a, --alternative Allow long options starting with single -\n" \
314 "\t-l, --longoptions=longopts Long options to be recognized\n" \
315 "\t-n, --name=progname The name under which errors are reported\n" \
316 "\t-o, --options=optstring Short options to be recognized\n" \
317 "\t-q, --quiet Disable error reporting by getopt(3)\n" \
318 "\t-Q, --quiet-output No normal output\n" \
319 "\t-s, --shell=shell Set shell quoting conventions\n" \
320 "\t-T, --test Test for getopt(1) version\n" \
321 "\t-u, --unqote Do not quote the output"
323 #define grep_trivial_usage \
324 "[-ihHnqvs] pattern [files...]"
325 #define grep_full_usage \
326 "Search for PATTERN in each FILE or standard input.\n\n" \
328 "\t-H\tprefix output lines with filename where match was found\n" \
329 "\t-h\tsuppress the prefixing filename on output\n" \
330 "\t-i\tignore case distinctions\n" \
331 "\t-n\tprint line number with output lines\n" \
332 "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n" \
333 "\t-v\tselect non-matching lines\n" \
334 "\t-s\tsuppress file open/read error messages"
336 #define gunzip_trivial_usage \
338 #define gunzip_full_usage \
339 "Uncompress FILE (or standard input if FILE is '-').\n\n" \
341 "\t-c\tWrite output to standard output\n" \
342 "\t-t\tTest compressed file integrity"
344 #define gzip_trivial_usage \
346 #define gzip_full_usage \
347 "Compress FILE with maximum compression.\n" \
348 "When FILE is '-', reads standard input. Implies -c.\n\n" \
350 "\t-c\tWrite output to standard output instead of FILE.gz\n" \
353 #define halt_trivial_usage \
355 #define halt_full_usage \
358 #define head_trivial_usage \
360 #define head_full_usage \
361 "Print first 10 lines of each FILE to standard output.\n" \
362 "With more than one FILE, precede each with a header giving the\n" \
363 "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
364 "Options:\n" "\t-n NUM\t\tPrint first NUM lines instead of first 10"
366 #define hostid_trivial_usage \
368 #define hostid_full_usage \
369 "Print out a unique 32-bit identifier for the machine."
371 #define hostname_trivial_usage \
372 "[OPTION] {hostname | -F file}"
373 #define hostname_full_usage \
374 "Get or set the hostname or DNS domain name. If a hostname is given\n" \
375 "(or a file with the -F parameter), the host name will be set.\n\n" \
378 "\t-i\t\tAddresses for the hostname\n" \
379 "\t-d\t\tDNS domain name\n" \
380 "\t-F, --file FILE\tUse the contents of FILE to specify the hostname"
382 #define id_trivial_usage \
383 "[OPTIONS]... [USERNAME]"
384 #define id_full_usage \
385 "Print information for USERNAME or the current user\n\n" \
387 "\t-g\tprints only the group ID\n" \
388 "\t-u\tprints only the user ID\n" \
389 "\t-n\tprint a name instead of a number (with for -ug)\n" \
390 "\t-r\tprints the real user ID instead of the effective ID (with -ug)"
392 #ifdef SIOCSKEEPALIVE
393 #define USAGE_SIOCSKEEPALIVE(a) a
395 #define USAGE_SIOCSKEEPALIVE(a)
397 #define ifconfig_trivial_usage \
398 "[-a] [-i] [-v] <interface> [<address>]"
399 #define ifconfig_full_usage \
400 "configure a network interface\n\n" \
402 "\t[[-]broadcast [<address>]] [[-]pointopoint [<address>]]\n" \
403 "\t[netmask <address>] [dstaddr <address>] [tunnel <adress>]\n" \
404 USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
405 "\t[hw ether <address>] [metric <NN>] [mtu <NN>]\n" \
406 "\t[[-]trailers] [[-]arp] [[-]allmulti]\n" \
407 "\t[multicast] [[-]promisc]\n" \
408 "\t[mem_start <NN>] [io_addr <NN>] [irq <NN>] [media <type>]\n" \
411 #define init_trivial_usage \
413 #define init_full_usage \
414 "Init is the parent of all processes.\n\n" \
415 "This version of init is designed to be run only by the kernel."
417 #define insmod_trivial_usage \
418 "[OPTION]... MODULE [symbol=value]..."
419 #define insmod_full_usage \
420 "Loads the specified kernel modules into the kernel.\n\n" \
422 "\t-f\tForce module to load into the wrong kernel version.\n" \
423 "\t-k\tMake module autoclean-able.\n" \
424 "\t-v\tverbose output\n" \
425 "\t-L\tLock to prevent simultaneous loads of a module\n" \
426 "\t-x\tdo not export externs"
428 #define kill_trivial_usage \
429 "[-signal] process-id [process-id ...]"
430 #define kill_full_usage \
431 "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\
432 "Options:\n" "\t-l\tList all signal names and numbers."
434 #define killall_trivial_usage \
435 "[-signal] process-name [process-name ...]"
436 #define killall_full_usage \
437 "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\
438 "Options:\n" "\t-l\tList all signal names and numbers."
440 #define length_trivial_usage \
442 #define length_full_usage \
443 "Prints out the length of the specified STRING."
445 #define ln_trivial_usage \
446 "[OPTION] TARGET... LINK_NAME|DIRECTORY"
447 #define ln_full_usage \
448 "Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n"\
449 "\nYou may use '--' to indicate that all following arguments are non-options.\n\n" \
451 "\t-s\tmake symbolic links instead of hard links\n" \
452 "\t-f\tremove existing destination files\n" \
453 "\t-n\tno dereference symlinks - treat like normal file"
455 #define loadacm_trivial_usage \
457 #define loadacm_full_usage \
458 "Loads an acm from standard input."
460 #define loadfont_trivial_usage \
462 #define loadfont_full_usage \
463 "Loads a console font from standard input."
465 #define loadkmap_trivial_usage \
467 #define loadkmap_full_usage \
468 "Loads a binary keyboard translation table from standard input."
470 #define logger_trivial_usage \
471 "[OPTION]... [MESSAGE]"
472 #define logger_full_usage \
473 "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n\n" \
475 "\t-s\tLog to stderr as well as the system log.\n" \
476 "\t-t\tLog using the specified tag (defaults to user name).\n" \
477 "\t-p\tEnter the message with the specified priority.\n" \
478 "\t\tThis may be numerical or a ``facility.level'' pair."
480 #define logname_trivial_usage \
482 #define logname_full_usage \
483 "Print the name of the current user."
485 #ifdef BB_FEATURE_LS_TIMESTAMPS
486 #define USAGE_LS_TIMESTAMPS(a) a
488 #define USAGE_LS_TIMESTAMPS(a)
490 #ifdef BB_FEATURE_LS_FILETYPES
491 #define USAGE_LS_FILETYPES(a) a
493 #define USAGE_LS_FILETYPES(a)
495 #ifdef BB_FEATURE_LS_FOLLOWLINKS
496 #define USAGE_LS_FOLLOWLINKS(a) a
498 #define USAGE_LS_FOLLOWLINKS(a)
500 #ifdef BB_FEATURE_LS_RECURSIVE
501 #define USAGE_LS_RECURSIVE(a) a
503 #define USAGE_LS_RECURSIVE(a)
505 #ifdef BB_FEATURE_LS_SORTFILES
506 #define USAGE_LS_SORTFILES(a) a
508 #define USAGE_LS_SORTFILES(a)
510 #ifdef BB_FEATURE_AUTOWIDTH
511 #define USAGE_AUTOWIDTH(a) a
513 #define USAGE_AUTOWIDTH(a)
515 #define ls_trivial_usage \
516 "[-1Aa" USAGE_LS_TIMESTAMPS("c") \
517 "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" \
518 USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") \
519 USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") \
520 "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") \
521 USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" \
522 USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h", "") \
524 #define ls_full_usage \
525 "List directory contents\n\n" \
527 "\t-1\tlist files in a single column\n" \
528 "\t-A\tdo not list implied . and ..\n" \
529 "\t-a\tdo not hide entries starting with .\n" \
530 "\t-C\tlist entries by columns\n" \
531 USAGE_LS_TIMESTAMPS( \
532 "\t-c\twith -l: show ctime (the time of last\n" \
533 "\t\tmodification of file status information)\n" \
535 "\t-d\tlist directory entries instead of contents\n" \
536 USAGE_LS_TIMESTAMPS( \
537 "\t-e\tlist both full date and full time\n" \
539 USAGE_LS_FILETYPES( \
540 "\t-F\tappend indicator (one of */=@|) to entries\n" \
542 "\t-i\tlist the i-node for each file\n" \
543 "\t-l\tuse a long listing format\n" \
544 "\t-n\tlist numeric UIDs and GIDs instead of names\n" \
545 USAGE_LS_FILETYPES( \
546 "\t-p\tappend indicator (one of /=@|) to entries\n" \
548 USAGE_LS_FOLLOWLINKS( \
549 "\t-L\tlist entries pointed to by symbolic links\n" \
551 USAGE_LS_RECURSIVE( \
552 "\t-R\tlist subdirectories recursively\n" \
554 USAGE_LS_SORTFILES( \
555 "\t-r\tsort the listing in reverse order\n" \
556 "\t-S\tsort the listing by file size\n" \
558 "\t-s\tlist the size of each file, in blocks\n" \
560 "\t-T NUM\tassume Tabstop every NUM columns\n" \
562 USAGE_LS_TIMESTAMPS( \
563 "\t-t\twith -l: show modification time (the time of last\n" \
564 "\t\tchange of the file)\n" \
565 "\t-u\twith -l: show access time (the time of last\n" \
566 "\t\taccess of the file)\n" \
568 USAGE_LS_SORTFILES( \
569 "\t-v\tsort the listing by version\n" \
572 "\t-w NUM\tassume the terminal is NUM columns wide\n" \
574 "\t-x\tlist entries by lines instead of by columns\n" \
575 USAGE_LS_SORTFILES( \
576 "\t-X\tsort the listing by extension\n" \
578 USAGE_HUMAN_READABLE( \
579 "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
580 "\t-k\tprint sizes in kilobytes(default)" \
582 "\t-k\tprint sizes in kilobytes(compatability)" \
585 #define lsmod_trivial_usage \
587 #define lsmod_full_usage \
588 "List the currently loaded kernel modules."
590 #define makedevs_trivial_usage \
591 "NAME TYPE MAJOR MINOR FIRST LAST [s]"
592 #define makedevs_full_usage \
593 "Creates a range of block or character special files\n\n" \
595 "\tb:\tMake a block (buffered) device.\n" \
596 "\tc or u:\tMake a character (un-buffered) device.\n" \
597 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n" \
598 "FIRST specifies the number appended to NAME to create the first device.\n" \
599 "LAST specifies the number of the last item that should be created.\n" \
600 "If 's' is the last argument, the base device is created as well.\n\n" \
602 "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \
603 "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
605 #define md5sum_trivial_usage \
606 "[OPTION] [FILE]...\nor: md5sum [OPTION] -c [FILE]"
607 #define md5sum_full_usage \
608 "Print or check MD5 checksums.\n\n" \
610 "With no FILE, or when FILE is -, read standard input.\n\n" \
611 "\t-b\tread files in binary mode\n" \
612 "\t-c\tcheck MD5 sums against given list\n" \
613 "\t-t\tread files in text mode (default)\n" \
614 "\t-g\tread a string\n" \
615 "\nThe following two options are useful only when verifying checksums:\n" \
616 "\t-s,\tdon't output anything, status code shows success\n" \
617 "\t-w,\twarn about improperly formated MD5 checksum lines"
619 #define mkdir_trivial_usage \
620 "[OPTION] DIRECTORY..."
621 #define mkdir_full_usage \
622 "Create the DIRECTORY(ies), if they do not already exist\n\n" \
624 "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" \
625 "\t-p\tno error if existing, make parent directories as needed"
627 #define mkfifo_trivial_usage \
629 #define mkfifo_full_usage \
630 "Creates a named pipe (identical to 'mknod name p')\n\n" \
632 "\t-m\tcreate the pipe using the specified mode (default a=rw)"
634 #define mkfs_minix_trivial_usage \
635 "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
636 #define mkfs_minix_full_usage \
637 "Make a MINIX filesystem.\n\n" \
639 "\t-c\t\tCheck the device for bad blocks\n" \
640 "\t-n [14|30]\tSpecify the maximum length of filenames\n" \
641 "\t-i INODES\tSpecify the number of inodes for the filesystem\n" \
642 "\t-l FILENAME\tRead the bad blocks list from FILENAME\n" \
643 "\t-v\t\tMake a Minix version 2 filesystem"
645 #define mknod_trivial_usage \
646 "[OPTIONS] NAME TYPE MAJOR MINOR"
647 #define mknod_full_usage \
648 "Create a special file (block, character, or pipe).\n\n" \
650 "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n" \
652 "\tb:\tMake a block (buffered) device.\n" \
653 "\tc or u:\tMake a character (un-buffered) device.\n" \
654 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes."
656 #define mkswap_trivial_usage \
657 "[-c] [-v0|-v1] device [block-count]"
658 #define mkswap_full_usage \
659 "Prepare a disk partition to be used as a swap partition.\n\n" \
660 "Options:\n" "\t-c\t\tCheck for read-ability.\n" \
661 "\t-v0\t\tMake version 0 swap [max 128 Megs].\n" \
662 "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n" \
663 "\tblock-count\tNumber of block to use (default is entire partition)."
665 #define mktemp_trivial_usage \
667 #define mktemp_full_usage \
668 "Creates a temporary file with its name based on TEMPLATE.\n" \
669 "TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX)."
671 #define more_trivial_usage \
673 #define more_full_usage \
674 "More is a filter for viewing FILE one screenful at a time."
676 #ifdef BB_FEATURE_MOUNT_LOOP
677 #define USAGE_MOUNT_LOOP(a) a
679 #define USAGE_MOUNT_LOOP(a)
682 #define USAGE_MTAB(a) a
684 #define USAGE_MTAB(a)
686 #define mount_trivial_usage \
687 "[flags] device directory [-o options,more-options]"
688 #define mount_full_usage \
689 "Mount a filesystem\n\n" \
691 "\t-a:\t\tMount all filesystems in fstab.\n" \
693 "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n" \
694 "\t-n:\t\tDon't write a mount table entry.\n" \
696 "\t-o option:\tOne of many filesystem options, listed below.\n" \
697 "\t-r:\t\tMount the filesystem read-only.\n" \
698 "\t-t fs-type:\tSpecify the filesystem type.\n" \
699 "\t-w:\t\tMount for reading and writing (default).\n" \
701 "Options for use with the \"-o\" flag:\n" \
702 "\tasync/sync:\tWrites are asynchronous / synchronous.\n" \
703 "\tatime/noatime:\tEnable / disable updates to inode access times.\n" \
704 "\tdev/nodev:\tAllow use of special device files / disallow them.\n" \
705 "\texec/noexec:\tAllow use of executable files / disallow them.\n" \
707 "\tloop:\t\tMounts a file via loop device.\n" \
709 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n" \
710 "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n" \
711 "\tro/rw:\t\tMount for read-only / read-write.\n" \
712 "\nThere are EVEN MORE flags that are specific to each filesystem.\n" \
713 "You'll have to see the written documentation for those."
715 #define mt_trivial_usage \
716 "[-f device] opcode value"
717 #define mt_full_usage \
718 "Control magnetic tape drive operation\n" \
719 "\nAvailable Opcodes:\n\n" \
720 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
721 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
722 "ras3 reset retension rew rewoffline seek setblk setdensity\n" \
723 "setpart tell unload unlock weof wset"
725 #define mv_trivial_usage \
726 "SOURCE DEST\n or: mv SOURCE... DIRECTORY"
727 #define mv_full_usage \
728 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY."
730 #define nc_trivial_usage \
732 #define nc_full_usage \
733 "Netcat opens a pipe to IP:port"
735 #define nslookup_trivial_usage \
737 #define nslookup_full_usage \
738 "Queries the nameserver for the IP address of the given HOST"
740 #ifdef BB_FEATURE_SIMPLE_PING
741 #define ping_trivial_usage "host"
742 #define ping_full_usage "Send ICMP ECHO_REQUEST packets to network hosts"
744 #define ping_trivial_usage \
746 #define ping_full_usage \
747 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" \
749 "\t-c COUNT\tSend only COUNT pings.\n" \
750 "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56).\n" \
751 "\t-q\t\tQuiet mode, only displays output at start\n" \
752 "\t\t\tand when finished."
755 #define pivot_root_trivial_usage \
757 #define pivot_root_full_usage \
758 "Move the current root file system to put_old and make new_root\n" \
759 "the new root file system."
761 #define poweroff_trivial_usage \
763 #define poweroff_full_usage \
764 "Halt the system and request that the kernel shut off the power."
766 #define printf_trivial_usage \
767 "FORMAT [ARGUMENT...]"
768 #define printf_full_usage \
769 "Formats and prints ARGUMENT(s) according to FORMAT,\n" \
770 "Where FORMAT controls the output exactly as in C printf."
772 #define ps_trivial_usage \
774 #define ps_full_usage \
775 "Report process status\n" \
776 "\nThis version of ps accepts no options."
778 #define pwd_trivial_usage \
780 #define pwd_full_usage \
781 "Print the full filename of the current working directory."
783 #define rdate_trivial_usage \
785 #define rdate_full_usage \
786 "Get and possibly set the system date and time from a remote HOST.\n" \
788 "\t-s\tSet the system date and time (default).\n" \
789 "\t-p\tPrint the date and time."
791 #define readlink_trivial_usage \
793 #define readlink_full_usage \
794 "Read a symbolic link."
796 #define reboot_trivial_usage \
798 #define reboot_full_usage \
801 #define renice_trivial_usage \
802 "priority pid [pid ...]"
803 #define renice_full_usage \
804 "Changes priority of running processes. Allowed priorities range\n" \
805 "from 20 (the process runs only when nothing else is running) to 0\n" \
806 "(default priority) to -20 (almost nothing else ever gets to run)."
808 #define reset_trivial_usage \
810 #define reset_full_usage \
813 #define rm_trivial_usage \
814 "[OPTION]... FILE..."
815 #define rm_full_usage \
816 "Remove (unlink) the FILE(s). You may use '--' to\n" \
817 "indicate that all following arguments are non-options.\n\n" \
819 "\t-f\t\tremove existing destinations, never prompt\n" \
820 "\t-r or -R\tremove the contents of directories recursively"
822 #define rmdir_trivial_usage \
823 "[OPTION]... DIRECTORY..."
824 #define rmdir_full_usage \
825 "Remove the DIRECTORY(ies), if they are empty."
827 #define rmmod_trivial_usage \
828 "[OPTION]... [MODULE]..."
829 #define rmmod_full_usage \
830 "Unloads the specified kernel modules from the kernel.\n\n" \
832 "\t-a\tTry to remove all unused kernel modules."
834 #define route_trivial_usage \
836 #define route_full_usage \
837 "Edit the kernel's routing tables"
839 #define rpmunpack_trivial_usage \
840 "< package.rpm | gunzip | cpio -idmuv"
841 #define rpmunpack_full_usage \
842 "Extracts an rpm archive."
844 #define sed_trivial_usage \
845 "[-Vhnef] pattern [files...]"
846 #define sed_full_usage \
847 "-n\t\tsuppress automatic printing of pattern space\n" \
848 "-e script\tadd the script to the commands to be executed\n" \
849 "-f scriptfile\tadd the contents of script-file to the commands to be executed\n" \
850 "-h\t\tdisplay this help message\n" \
852 "If no -e or -f is given, the first non-option argument is taken as the\n" \
853 "sed script to interpret. All remaining arguments are names of input\n" \
854 "files; if no input files are specified, then the standard input is read."
856 #define setkeycodes_trivial_usage \
857 "SCANCODE KEYCODE ..."
858 #define setkeycodes_full_usage \
859 "Set entries into the kernel's scancode-to-keycode map,\n" \
860 "allowing unusual keyboards to generate usable keycodes.\n\n" \
861 "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
862 "and KEYCODE is given in decimal"
864 #define sh_trivial_usage \
865 "[FILE]...\n or: sh -c command [args]..."
866 #define sh_full_usage \
867 "lash: The BusyBox command interpreter (shell)."
869 #define sleep_trivial_usage \
871 #define sleep_full_usage \
872 "Pause for N seconds."
875 #ifdef BB_FEATURE_SORT_REVERSE
876 #define USAGE_SORT_REVERSE(a) a
878 #define USAGE_SORT_REVERSE(a)
880 #define sort_trivial_usage \
881 "[-n]" USAGE_SORT_REVERSE(" [-r]") " [FILE]..."
882 #define sort_full_usage \
883 "Sorts lines of text in the specified files"
885 #define stty_trivial_usage \
886 "[-a|g] [-F device] [SETTING]..."
887 #define stty_full_usage \
888 "Without arguments, prints baud rate, line discipline," \
889 "\nand deviations from stty sane." \
890 "\n -F device open and use the specified device instead of stdin" \
891 "\n -a print all current settings in human-readable form. Or" \
892 "\n -g print in a stty-readable form" \
893 "\n [SETTING] see in documentation"
895 #define swapoff_trivial_usage \
897 #define swapoff_full_usage \
898 "Stop swapping virtual memory pages on the given device.\n\n" \
900 "\t-a\tStop swapping on all swap devices"
902 #define swapon_trivial_usage \
904 #define swapon_full_usage \
905 "Start swapping virtual memory pages on the given device.\n\n" \
907 "\t-a\tStart swapping on all swap devices"
909 #define sync_trivial_usage \
911 #define sync_full_usage \
912 "Write all buffered filesystem blocks to disk."
915 #ifdef BB_FEATURE_KLOGD
916 #define USAGE_KLOGD(a) a
918 #define USAGE_KLOGD(a)
920 #ifdef BB_FEATURE_REMOTE_LOG
921 #define USAGE_REMOTE_LOG(a) a
923 #define USAGE_REMOTE_LOG(a)
925 #define syslogd_trivial_usage \
927 #define syslogd_full_usage \
928 "Linux system and kernel (provides klogd) logging utility.\n" \
929 "Note that this version of syslogd/klogd ignores /etc/syslog.conf.\n\n" \
931 "\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n" \
932 "\t-n\t\tRun as a foreground process\n" \
933 USAGE_KLOGD("\t-K\t\tDo not start up the klogd process\n") \
934 "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)" \
936 "\n\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n" \
937 "\t-L\t\tLog locally as well as network logging (default is network only)")
940 #ifdef BB_FEATURE_SIMPLE_TAIL
941 #define USAGE_UNSIMPLE_TAIL(a)
943 #define USAGE_UNSIMPLE_TAIL(a) a
945 #define tail_trivial_usage \
946 "[OPTION]... [FILE]..."
947 #define tail_full_usage \
948 "Print last 10 lines of each FILE to standard output.\n" \
949 "With more than one FILE, precede each with a header giving the\n" \
950 "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
952 USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \
953 "\t-n N[kbm]\tprint last N lines instead of last 10\n" \
954 "\t-f\t\toutput data as the file grows" \
955 USAGE_UNSIMPLE_TAIL( \
956 "\n\t-q\t\tnever output headers giving file names\n" \
957 "\t-s SEC\t\twait SEC seconds between reads with -f\n" \
958 "\t-v\t\talways output headers giving file names\n\n" \
959 "If the first character of N (bytes or lines) is a `+', output begins with \n" \
960 "the Nth item from the start of each file, otherwise, print the last N items\n" \
961 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." \
964 #ifdef BB_FEATURE_TAR_CREATE
965 #define USAGE_TAR_CREATE(a) a
967 #define USAGE_TAR_CREATE(a)
969 #ifdef BB_FEATURE_TAR_EXCLUDE
970 #define USAGE_TAR_EXCLUDE(a) a
972 #define USAGE_TAR_EXCLUDE(a)
974 #define tar_trivial_usage \
975 "-[" USAGE_TAR_CREATE("c") "xtvO] " \
976 USAGE_TAR_EXCLUDE("[--exclude File] [-X File]") \
977 "[-f tarFile] [FILE(s)] ..."
978 #define tar_full_usage \
979 "Create, extract, or list files from a tar file.\n\n" \
980 "Main operation mode:\n" \
981 USAGE_TAR_CREATE("\tc\t\tcreate\n") \
984 "\nFile selection:\n" \
985 "\tf\t\tname of tarfile or \"-\" for stdin\n" \
986 "\tO\t\textract to stdout\n" \
988 "\texclude\t\tfile to exclude\n" \
989 "\tX\t\tfile with names to exclude\n" \
991 "\nInformative output:\n" \
992 "\tv\t\tverbosely list files processed"
994 #define tee_trivial_usage \
995 "[OPTION]... [FILE]..."
996 #define tee_full_usage \
997 "Copy standard input to each FILE, and also to standard output.\n\n" \
998 "Options:\n" "\t-a\tappend to the given FILEs, do not overwrite"
1000 #define telnet_trivial_usage \
1002 #define telnet_full_usage \
1003 "Telnet is used to establish interactive communication with another\n"\
1004 "computer over a network using the TELNET protocol."
1006 #define test_trivial_usage \
1007 "EXPRESSION\n or [ EXPRESSION ]"
1008 #define test_full_usage \
1009 "Checks file types and compares values returning an exit\n" \
1010 "code determined by the value of EXPRESSION."
1012 #define touch_trivial_usage \
1013 "[-c] file [file ...]"
1014 #define touch_full_usage \
1015 "Update the last-modified date on the given file[s].\n\n" \
1017 "\t-c\tDo not create any files"
1019 #define tr_trivial_usage \
1020 "[-cds] STRING1 [STRING2]"
1021 #define tr_full_usage \
1022 "Translate, squeeze, and/or delete characters from\n" \
1023 "standard input, writing to standard output.\n\n" \
1025 "\t-c\ttake complement of STRING1\n" \
1026 "\t-d\tdelete input characters coded STRING1\n" \
1027 "\t-s\tsqueeze multiple output characters of STRING2 into one character"
1029 #define true_trivial_usage \
1031 #define true_full_usage \
1032 "Return an exit code of TRUE (0)."
1034 #define tty_trivial_usage \
1036 #define tty_full_usage \
1037 "Print the file name of the terminal connected to standard input.\n\n"\
1039 "\t-s\tprint nothing, only return an exit status"
1041 #ifdef BB_FEATURE_MOUNT_FORCE
1042 #define USAGE_MOUNT_FORCE(a) a
1044 #define USAGE_MOUNT_FORCE(a)
1046 #define umount_trivial_usage \
1047 "[flags] filesystem|directory"
1048 #define umount_full_usage \
1049 "Unmount file systems\n" \
1050 "\nFlags:\n" "\t-a:\tUnmount all file systems" \
1051 USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
1052 "\n\t-r:\tTry to remount devices as read-only if mount is busy" \
1053 USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
1054 USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)" \
1057 #define uname_trivial_usage \
1059 #define uname_full_usage \
1060 "Print certain system information. With no OPTION, same as -s.\n\n" \
1062 "\t-a\tprint all information\n" \
1063 "\t-m\tthe machine (hardware) type\n" \
1064 "\t-n\tprint the machine's network node hostname\n" \
1065 "\t-r\tprint the operating system release\n" \
1066 "\t-s\tprint the operating system name\n" \
1067 "\t-p\tprint the host processor type\n" \
1068 "\t-v\tprint the operating system version"
1070 #define uniq_trivial_usage \
1071 "[OPTION]... [INPUT [OUTPUT]]"
1072 #define uniq_full_usage \
1073 "Discard all but one of successive identical lines from INPUT\n" \
1074 "(or standard input), writing to OUTPUT (or standard output).\n" \
1076 "\t-c\tprefix lines by the number of occurrences\n" \
1077 "\t-d\tonly print duplicate lines\n" \
1078 "\t-u\tonly print unique lines"
1080 #define unix2dos_trivial_usage \
1081 "< unixfile > dosfile"
1082 #define unix2dos_full_usage \
1083 "Converts a text file from unix format to dos format."
1085 #define update_trivial_usage \
1087 #define update_full_usage \
1088 "Periodically flushes filesystem buffers.\n\n" \
1090 "\t-S\tforce use of sync(2) instead of flushing\n" \
1091 "\t-s SECS\tcall sync this often (default 30)\n" \
1092 "\t-f SECS\tflush some buffers this often (default 5)"
1094 #define uptime_trivial_usage \
1096 #define uptime_full_usage \
1097 "Display the time since the last boot."
1099 #define usleep_trivial_usage \
1101 #define usleep_full_usage \
1102 "Pause for N microseconds."
1104 #define uudecode_trivial_usage \
1106 #define uudecode_full_usage \
1107 "Uudecode a file that is uuencoded.\n\n" \
1109 "\t-o FILE\tdirect output to FILE" \
1111 #define uuencode_trivial_usage \
1112 "[OPTION] [INFILE] REMOTEFILE"
1113 #define uuencode_full_usage \
1114 "Uuencode a file.\n\n" \
1116 "\t-m\tuse base64 encoding as of RFC1521"
1118 #define watchdog_trivial_usage \
1120 #define watchdog_full_usage \
1121 "Periodically write to watchdog device \"dev\""
1123 #define wc_trivial_usage \
1124 "[OPTION]... [FILE]..."
1125 #define wc_full_usage \
1126 "Print line, word, and byte counts for each FILE, and a total line if\n" \
1127 "more than one FILE is specified. With no FILE, read standard input.\n\n" \
1129 "\t-c\tprint the byte counts\n" \
1130 "\t-l\tprint the newline counts\n" \
1131 "\t-L\tprint the length of the longest line\n" \
1132 "\t-w\tprint the word counts"
1134 #define wget_trivial_usage \
1135 "[-c] [-O file] url"
1136 #define wget_full_usage \
1137 "wget retrieves files via HTTP\n\n" \
1139 "\t-c\tcontinue retrieval of aborted transfers\n" \
1140 "\t-O\tsave to filename ('-' for stdout)"
1142 #define which_trivial_usage \
1144 #define which_full_usage \
1145 "Locates a COMMAND."
1147 #define whoami_trivial_usage \
1149 #define whoami_full_usage \
1150 "Prints the user name associated with the current effective user id."
1152 #define xargs_trivial_usage \
1153 "[COMMAND] [ARGS...]"
1154 #define xargs_full_usage \
1155 "Executes COMMAND on every item given by standard input."
1157 #define yes_trivial_usage \
1158 "[OPTION]... [STRING]..."
1159 #define yes_full_usage \
1160 "Repeatedly outputs a line with all specified STRING(s), or `y'."
1162 #define zcat_trivial_usage \
1164 #define zcat_full_usage \
1165 "Uncompress to stdout."