4 const char ar_usage[] =
5 "ar [[-ov] -tpv archive] filenames \n"
6 #ifndef BB_FEATURE_TRIVIAL_HELP
7 "\nExtract or list files from an ar archive.\n\n"
9 "\t-o\t\tpreserve original dates\n"
10 "\t-p\t\textract to stdout\n"
13 "\t-v\t\tverbosely list files processed\n"
18 #if defined BB_BASENAME
19 const char basename_usage[] =
20 "basename FILE [SUFFIX]\n"
21 #ifndef BB_FEATURE_TRIVIAL_HELP
22 "\nStrips directory path and suffixes from FILE.\n"
23 "If specified, also removes any trailing SUFFIX.\n"
29 const char cat_usage[] =
31 #ifndef BB_FEATURE_TRIVIAL_HELP
32 "\nConcatenates FILE(s) and prints them to stdout.\n"
37 #if defined BB_CHMOD_CHOWN_CHGRP
38 const char chgrp_usage[] =
39 "chgrp [OPTION]... GROUP FILE...\n"
40 #ifndef BB_FEATURE_TRIVIAL_HELP
41 "\nChange the group membership of each FILE to GROUP.\n"
42 "\nOptions:\n\t-R\tChanges files and directories recursively.\n"
47 #if defined BB_CHMOD_CHOWN_CHGRP
48 const char chmod_usage[] =
49 "chmod [-R] MODE[,MODE]... FILE...\n"
50 #ifndef BB_FEATURE_TRIVIAL_HELP
51 "\nEach MODE is one or more of the letters ugoa, one of the symbols +-= and\n"
52 "one or more of the letters rwxst.\n\n"
53 "\nOptions:\n\t-R\tChanges files and directories recursively.\n"
58 #if defined BB_CHMOD_CHOWN_CHGRP
59 const char chown_usage[] =
60 "chown [OPTION]... OWNER[<.|:>[GROUP] FILE...\n"
61 #ifndef BB_FEATURE_TRIVIAL_HELP
62 "\nChange the owner and/or group of each FILE to OWNER and/or GROUP.\n"
63 "\nOptions:\n\t-R\tChanges files and directories recursively.\n"
69 const char chroot_usage[] =
70 "chroot NEWROOT [COMMAND...]\n"
71 #ifndef BB_FEATURE_TRIVIAL_HELP
72 "\nRun COMMAND with root directory set to NEWROOT.\n"
78 const char chvt_usage[] =
80 #ifndef BB_FEATURE_TRIVIAL_HELP
81 "\nChanges the foreground virtual terminal to /dev/ttyN\n"
87 const char clear_usage[] =
89 #ifndef BB_FEATURE_TRIVIAL_HELP
96 const char cp_usage[] =
97 "cp [OPTION]... SOURCE DEST\n"
98 " or: cp [OPTION]... SOURCE... DIRECTORY\n"
99 #ifndef BB_FEATURE_TRIVIAL_HELP
100 "\nCopies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
102 "\t-a\tSame as -dpR\n"
103 "\t-d\tPreserves links\n"
104 "\t-p\tPreserves file attributes if possible\n"
105 "\t-f\tforce (implied; ignored) - always set\n"
106 "\t-R\tCopies directories recursively\n"
112 const char cut_usage[] =
113 "cut [OPTION]... [FILE]...\n"
114 #ifndef BB_FEATURE_TRIVIAL_HELP
115 "\nPrints selected fields from each input FILE to standard output.\n\n"
117 "\t-b LIST\tOutput only bytes from LIST\n"
118 "\t-c LIST\tOutput only characters from LIST\n"
119 "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n"
120 "\t-s\tOutput only the lines containing delimiter\n"
121 "\t-f N\tPrint only these fields\n"
128 const char date_usage[] =
129 "date [OPTION]... [+FORMAT]\n"
130 " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n"
131 #ifndef BB_FEATURE_TRIVIAL_HELP
132 "\nDisplays the current time in the given FORMAT, or sets the system date.\n"
133 "\nOptions:\n\t-R\tOutputs RFC-822 compliant date string\n"
134 "\t-s\tSets time described by STRING\n"
135 "\t-u\tPrints or sets Coordinated Universal Time\n"
141 const char dc_usage[] =
142 "dc expression ...\n"
143 #ifndef BB_FEATURE_TRIVIAL_HELP
144 "\nThis is a Tiny RPN calculator that understands the\n"
145 "following operations: +, -, /, *, and, or, not, eor.\n"
146 "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16\n"
152 const char dd_usage[] =
153 "dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] [seek=N]\n"
154 #ifndef BB_FEATURE_TRIVIAL_HELP
155 "\nCopy a file, converting and formatting according to options\n\n"
156 "\tif=FILE\tread from FILE instead of stdin\n"
157 "\tof=FILE\twrite to FILE instead of stdout\n"
158 "\tbs=N\tread and write N bytes at a time\n"
159 "\tcount=N\tcopy only N input blocks\n"
160 "\tskip=N\tskip N input blocks\n"
161 "\tseek=N\tskip N output blocks\n"
163 "Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)\n"
168 #if defined BB_DEALLOCVT
169 const char deallocvt_usage[] =
171 #ifndef BB_FEATURE_TRIVIAL_HELP
172 "\nDeallocate unused virtual terminal /dev/ttyN\n"
178 const char df_usage[] =
179 "df [filesystem ...]\n"
180 #ifndef BB_FEATURE_TRIVIAL_HELP
181 "\nPrint the filesystem space used and space available.\n"
186 #if defined BB_DIRNAME
187 const char dirname_usage[] =
188 "dirname [FILENAME ...]\n"
189 #ifndef BB_FEATURE_TRIVIAL_HELP
190 "\nStrips non-directory suffix from FILENAME\n"
196 const char dmesg_usage[] =
197 "dmesg [-c] [-n LEVEL] [-s SIZE]\n"
198 #ifndef BB_FEATURE_TRIVIAL_HELP
199 "\nPrints or controls the kernel ring buffer\n\n"
201 "\t-c\t\tClears the ring buffer's contents after printing\n"
202 "\t-n LEVEL\tSets console logging level\n"
203 "\t-s SIZE\t\tUse a buffer of size SIZE\n"
209 const char du_usage[] =
210 "du [OPTION]... [FILE]...\n"
211 #ifndef BB_FEATURE_TRIVIAL_HELP
212 "\nSummarizes disk space used for each FILE and/or directory.\n"
213 "Disk space is printed in units of 1024 bytes.\n\n"
215 "\t-l\tcount sizes many times if hard linked\n"
216 "\t-s\tdisplay only a total for each argument\n"
221 #if defined BB_DUMPKMAP
222 const char dumpkmap_usage[] =
223 "dumpkmap > keymap\n"
224 #ifndef BB_FEATURE_TRIVIAL_HELP
225 "\nPrints out a binary keyboard translation table to standard input.\n"
231 const char dutmp_usage[] =
233 #ifndef BB_FEATURE_TRIVIAL_HELP
234 "\nDump utmp file format (pipe delimited) from FILE\n"
235 "or stdin to stdout. (i.e. 'dutmp /var/run/utmp')\n"
241 const char echo_usage[] =
242 "echo [-neE] [ARG ...]\n"
243 #ifndef BB_FEATURE_TRIVIAL_HELP
244 "\nPrints the specified ARGs to stdout\n\n"
246 "\t-n\tsuppress trailing newline\n"
247 "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n"
248 "\t-E\tdisable interpretation of backslash-escaped characters\n"
254 const char expr_usage[] =
256 #ifndef BB_FEATURE_TRIVIAL_HELP
257 "\nPrints the value of EXPRESSION to standard output.\n\n"
258 "EXPRESSION may be:\n"
259 "ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n"
260 "ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n"
261 "ARG1 < ARG2 ARG1 is less than ARG2\n"
262 "ARG1 <= ARG2 ARG1 is less than or equal to ARG2\n"
263 "ARG1 = ARG2 ARG1 is equal to ARG2\n"
264 "ARG1 != ARG2 ARG1 is unequal to ARG2\n"
265 "ARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n"
266 "ARG1 > ARG2 ARG1 is greater than ARG2\n"
267 "ARG1 + ARG2 arithmetic sum of ARG1 and ARG2\n"
268 "ARG1 - ARG2 arithmetic difference of ARG1 and ARG2\n"
269 "ARG1 * ARG2 arithmetic product of ARG1 and ARG2\n"
270 "ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2\n"
271 "ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2\n"
272 "STRING : REGEXP anchored pattern match of REGEXP in STRING\n"
273 "match STRING REGEXP same as STRING : REGEXP\n"
274 "substr STRING POS LENGTH substring of STRING, POS counted from 1\n"
275 "index STRING CHARS index in STRING where any CHARS is found, or 0\n"
276 "length STRING length of STRING\n"
277 "quote TOKEN interpret TOKEN as a string, even if it is a \n"
278 " keyword like `match' or an operator like `/'\n"
279 "( EXPRESSION ) value of EXPRESSION\n\n"
280 "Beware that many operators need to be escaped or quoted for shells.\n"
281 "Comparisons are arithmetic if both ARGs are numbers, else\n"
282 "lexicographical. Pattern matches return the string matched between \n"
283 "\\( and \\) or null; if \\( and \\) are not used, they return the number \n"
284 "of characters matched or 0.\n"
291 #if defined BB_TRUE_FALSE
292 const char false_usage[] =
294 #ifndef BB_FEATURE_TRIVIAL_HELP
295 "\nReturn an exit code of FALSE (1).\n"
300 #if defined BB_FDFLUSH
301 const char fdflush_usage[] =
303 #ifndef BB_FEATURE_TRIVIAL_HELP
304 "\nForces floppy disk drive to detect disk change\n"
310 const char find_usage[] =
311 "find [PATH...] [EXPRESSION]\n"
312 #ifndef BB_FEATURE_TRIVIAL_HELP
313 "\nSearch for files in a directory hierarchy. The default PATH is\n"
314 "the current directory; default EXPRESSION is '-print'\n\n"
315 "\nEXPRESSION may consist of:\n"
316 "\t-follow\t\tDereference symbolic links.\n"
317 "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n"
318 "\t-print\t\tprint the full file name followed by a newline to stdout.\n"
324 const char free_usage[] =
326 #ifndef BB_FEATURE_TRIVIAL_HELP
327 "\nDisplays the amount of free and used system memory\n"
332 #if defined BB_FREERAMDISK
333 const char freeramdisk_usage[] =
334 "freeramdisk DEVICE\n"
335 #ifndef BB_FEATURE_TRIVIAL_HELP
336 "\nFrees all memory used by the specified ramdisk.\n"
341 #if defined BB_FSCK_MINIX
342 const char fsck_minix_usage[] =
343 "Usage: fsck.minix [-larvsmf] /dev/name\n"
344 #ifndef BB_FEATURE_TRIVIAL_HELP
345 "\nPerforms a consistency check for MINIX filesystems.\n\n"
347 "\t-l\tLists all filenames\n"
348 "\t-r\tPerform interactive repairs\n"
349 "\t-a\tPerform automatic repairs\n"
351 "\t-s\tOutputs super-block information\n"
352 "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n"
353 "\t-f\tForce file system check.\n\n"
359 const char grep_usage[] =
360 "grep [-ihHnqvs] pattern [files...]\n"
361 #ifndef BB_FEATURE_TRIVIAL_HELP
362 "\nSearch for PATTERN in each FILE or standard input.\n\n"
364 "\t-H\tprefix output lines with filename where match was found\n"
365 "\t-h\tsuppress the prefixing filename on output\n"
366 "\t-i\tignore case distinctions\n"
367 "\t-n\tprint line number with output lines\n"
368 "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n"
369 "\t-v\tselect non-matching lines\n"
370 "\t-s\tsuppress file open/read error messages\n\n"
375 #if defined BB_GUNZIP
376 const char gunzip_usage[] =
377 "gunzip [OPTION]... FILE\n"
378 #ifndef BB_FEATURE_TRIVIAL_HELP
379 "\nUncompress FILE (or standard input if FILE is '-').\n\n"
381 "\t-c\tWrite output to standard output\n"
382 "\t-t\tTest compressed file integrity\n"
388 const char gzip_usage[] =
389 "gzip [OPTION]... FILE\n"
390 #ifndef BB_FEATURE_TRIVIAL_HELP
391 "\nCompress FILE with maximum compression.\n"
392 "When FILE is '-', reads standard input. Implies -c.\n\n"
394 "\t-c\tWrite output to standard output instead of FILE.gz\n"
400 const char halt_usage[] =
402 #ifndef BB_FEATURE_TRIVIAL_HELP
403 "\nHalt the system.\n"
409 const char head_usage[] =
410 "head [OPTION] [FILE]...\n"
411 #ifndef BB_FEATURE_TRIVIAL_HELP
412 "\nPrint first 10 lines of each FILE to standard output.\n"
413 "With more than one FILE, precede each with a header giving the\n"
414 "file name. With no FILE, or when FILE is -, read standard input.\n\n"
416 "Options:\n" "\t-n NUM\t\tPrint first NUM lines instead of first 10\n"
421 #if defined BB_HOSTID
422 const char hostid_usage[] =
424 #ifndef BB_FEATURE_TRIVIAL_HELP
425 "\nPrint out a unique 32-bit identifier for the machine.\n"
430 #if defined BB_HOSTNAME
431 const char hostname_usage[] =
432 "hostname [OPTION] {hostname | -F file}\n"
433 #ifndef BB_FEATURE_TRIVIAL_HELP
434 "\nGet or set the hostname or DNS domain name. If a hostname is given\n"
435 "(or a file with the -F parameter), the host name will be set.\n\n"
439 "\t-i\t\tAddresses for the hostname\n"
440 "\t-d\t\tDNS domain name\n"
441 "\t-F FILE\t\tUse the contents of FILE to specify the hostname\n"
447 const char id_usage[] =
448 "id [OPTIONS]... [USERNAME]\n"
449 #ifndef BB_FEATURE_TRIVIAL_HELP
450 "\nPrint information for USERNAME or the current user\n\n"
452 "\t-g\tprints only the group ID\n"
453 "\t-u\tprints only the user ID\n"
454 "\t-r\tprints the real user ID instead of the effective ID (with -ug)\n\n"
459 #if defined BB_INSMOD
460 const char insmod_usage[] =
461 "insmod [OPTION]... MODULE [symbol=value]...\n"
462 #ifndef BB_FEATURE_TRIVIAL_HELP
463 "\nLoads the specified kernel modules into the kernel.\n\n"
465 "\t-f\tForce module to load into the wrong kernel version.\n"
466 "\t-k\tMake module autoclean-able.\n"
467 "\t-v\tverbose output\n" "\t-x\tdo not export externs\n"
473 const char kill_usage[] =
474 "kill [-signal] process-id [process-id ...]\n"
475 #ifndef BB_FEATURE_TRIVIAL_HELP
476 "\nSend a signal (default is SIGTERM) to the specified process(es).\n\n"
477 "Options:\n" "\t-l\tList all signal names and numbers.\n\n"
482 #if defined BB_KILLALL
483 const char killall_usage[] =
484 "killall [-signal] process-name [process-name ...]\n"
485 #ifndef BB_FEATURE_TRIVIAL_HELP
486 "\nSend a signal (default is SIGTERM) to the specified process(es).\n\n"
487 "Options:\n" "\t-l\tList all signal names and numbers.\n\n"
492 #if defined BB_LENGTH
493 const char length_usage[] =
495 #ifndef BB_FEATURE_TRIVIAL_HELP
496 "\nPrints out the length of the specified STRING.\n"
502 const char ln_usage[] =
503 "ln [OPTION] TARGET... LINK_NAME|DIRECTORY\n"
504 #ifndef BB_FEATURE_TRIVIAL_HELP
505 "\nCreate a link named LINK_NAME or DIRECTORY to the specified TARGET\n"
506 "\nYou may use '--' to indicate that all following arguments are non-options.\n\n"
508 "\t-s\tmake symbolic links instead of hard links\n"
510 "\t-f\tremove existing destination files\n"
511 "\t-n\tno dereference symlinks - treat like normal file\n"
516 #if defined BB_LOADACM
517 const char loadacm_usage[] =
518 "loadacm < mapfile\n"
519 #ifndef BB_FEATURE_TRIVIAL_HELP
520 "\nLoads an acm from standard input.\n"
525 #if defined BB_LOADFONT
526 const char loadfont_usage[] =
528 #ifndef BB_FEATURE_TRIVIAL_HELP
529 "Loads a console font from standard input.\n"
534 #if defined BB_LOADKMAP
535 const char loadkmap_usage[] =
536 "loadkmap < keymap\n"
537 #ifndef BB_FEATURE_TRIVIAL_HELP
538 "\nLoads a binary keyboard translation table from standard input.\n"
543 #if defined BB_LOGGER
544 const char logger_usage[] =
545 "logger [OPTION]... [MESSAGE]\n"
546 #ifndef BB_FEATURE_TRIVIAL_HELP
547 "\nWrite MESSAGE to the system log. If MESSAGE is '-', log stdin.\n\n"
549 "\t-s\tLog to stderr as well as the system log.\n"
550 "\t-t\tLog using the specified tag (defaults to user name).\n"
552 "\t-p\tEnter the message with the specified priority.\n"
553 "\t\tThis may be numerical or a ``facility.level'' pair.\n"
558 #if defined BB_LOGNAME
559 const char logname_usage[] =
561 #ifndef BB_FEATURE_TRIVIAL_HELP
562 "\nPrint the name of the current user.\n"
568 const char ls_usage[] =
570 #ifdef BB_FEATURE_LS_TIMESTAMPS
574 #ifdef BB_FEATURE_LS_TIMESTAMPS
577 #ifdef BB_FEATURE_LS_FILETYPES
581 #ifdef BB_FEATURE_LS_FILETYPES
584 #ifdef BB_FEATURE_LS_RECURSIVE
587 #ifdef BB_FEATURE_LS_SORTFILES
591 #ifdef BB_FEATURE_AUTOWIDTH
594 #ifdef BB_FEATURE_LS_TIMESTAMPS
597 #ifdef BB_FEATURE_LS_SORTFILES
600 #ifdef BB_FEATURE_AUTOWIDTH
604 #ifdef BB_FEATURE_LS_SORTFILES
608 #ifndef BB_FEATURE_TRIVIAL_HELP
609 "\nList directory contents\n\n"
611 "\t-1\tlist files in a single column\n"
612 "\t-A\tdo not list implied . and ..\n"
613 "\t-a\tdo not hide entries starting with .\n"
614 "\t-C\tlist entries by columns\n"
615 #ifdef BB_FEATURE_LS_TIMESTAMPS
616 "\t-c\twith -l: show ctime (the time of last\n"
617 "\t\tmodification of file status information)\n"
619 "\t-d\tlist directory entries instead of contents\n"
620 #ifdef BB_FEATURE_LS_TIMESTAMPS
621 "\t-e\tlist both full date and full time\n"
623 #ifdef BB_FEATURE_LS_FILETYPES
624 "\t-F\tappend indicator (one of */=@|) to entries\n"
626 "\t-i\tlist the i-node for each file\n"
627 "\t-l\tuse a long listing format\n"
628 "\t-n\tlist numeric UIDs and GIDs instead of names\n"
629 #ifdef BB_FEATURE_LS_FILETYPES
630 "\t-p\tappend indicator (one of /=@|) to entries\n"
632 #ifdef BB_FEATURE_LS_RECURSIVE
633 "\t-R\tlist subdirectories recursively\n"
635 #ifdef BB_FEATURE_LS_SORTFILES
636 "\t-r\tsort the listing in reverse order\n"
637 "\t-S\tsort the listing by file size\n"
639 "\t-s\tlist the size of each file, in blocks\n"
640 #ifdef BB_FEATURE_AUTOWIDTH
641 "\t-T NUM\tassume Tabstop every NUM columns\n"
643 #ifdef BB_FEATURE_LS_TIMESTAMPS
644 "\t-t\twith -l: show modification time (the time of last\n"
645 "\t\tchange of the file)\n"
646 "\t-u\twith -l: show access time (the time of last\n"
647 "\t\taccess of the file)\n"
649 #ifdef BB_FEATURE_LS_SORTFILES
650 "\t-v\tsort the listing by version\n"
652 #ifdef BB_FEATURE_AUTOWIDTH
653 "\t-w NUM\tassume the terminal is NUM columns wide\n"
655 "\t-x\tlist entries by lines instead of by columns\n"
656 #ifdef BB_FEATURE_LS_SORTFILES
657 "\t-X\tsort the listing by extension\n"
659 #endif /* BB_FEATURE_TRIVIAL_HELP */
664 const char lsmod_usage[] =
666 #ifndef BB_FEATURE_TRIVIAL_HELP
667 "\nList the currently loaded kernel modules.\n"
672 #if defined BB_MAKEDEVS
673 const char makedevs_usage[] =
674 "makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]\n"
675 #ifndef BB_FEATURE_TRIVIAL_HELP
676 "\nCreates a range of block or character special files\n\n"
678 "\tb:\tMake a block (buffered) device.\n"
679 "\tc or u:\tMake a character (un-buffered) device.\n"
680 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n"
681 "FIRST specifies the number appended to NAME to create the first device.\n"
682 "LAST specifies the number of the last item that should be created.\n"
683 "If 's' is the last argument, the base device is created as well.\n\n"
685 "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n"
686 "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8\n"
691 #if defined BB_MD5SUM
692 const char md5sum_usage[] =
693 "md5sum [OPTION] [FILE]...\n"
694 "or: md5sum [OPTION] -c [FILE]\n"
695 #ifndef BB_FEATURE_TRIVIAL_HELP
696 "\nPrint or check MD5 checksums.\n\n"
698 "With no FILE, or when FILE is -, read standard input.\n\n"
699 "\t-b\tread files in binary mode\n"
700 "\t-c\tcheck MD5 sums against given list\n"
701 "\t-t\tread files in text mode (default)\n"
702 "\t-g\tread a string\n"
703 "\nThe following two options are useful only when verifying checksums:\n"
704 "\t-s,\tdon't output anything, status code shows success\n"
705 "\t-w,\twarn about improperly formated MD5 checksum lines\n"
711 const char mkdir_usage[] =
712 "mkdir [OPTION] DIRECTORY...\n"
713 #ifndef BB_FEATURE_TRIVIAL_HELP
714 "\nCreate the DIRECTORY(ies), if they do not already exist\n\n"
717 "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n"
718 "\t-p\tno error if existing, make parent directories as needed\n"
723 #if defined BB_MKFIFO
724 const char mkfifo_usage[] =
725 "mkfifo [OPTIONS] name\n"
726 #ifndef BB_FEATURE_TRIVIAL_HELP
727 "\nCreates a named pipe (identical to 'mknod name p')\n\n"
729 "\t-m\tcreate the pipe using the specified mode (default a=rw)\n"
734 #if defined BB_MKFS_MINIX
735 const char mkfs_minix_usage[] =
736 "mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n"
737 #ifndef BB_FEATURE_TRIVIAL_HELP
738 "\nMake a MINIX filesystem.\n\n"
740 "\t-c\t\tCheck the device for bad blocks\n"
741 "\t-n [14|30]\tSpecify the maximum length of filenames\n"
742 "\t-i INODES\tSpecify the number of inodes for the filesystem\n"
743 "\t-l FILENAME\tRead the bad blocks list from FILENAME\n"
744 "\t-v\t\tMake a Minix version 2 filesystem\n\n"
750 const char mknod_usage[] =
751 "mknod [OPTIONS] NAME TYPE MAJOR MINOR\n"
752 #ifndef BB_FEATURE_TRIVIAL_HELP
753 "\nCreate a special file (block, character, or pipe).\n\n"
755 "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n"
757 "\tb:\tMake a block (buffered) device.\n"
758 "\tc or u:\tMake a character (un-buffered) device.\n"
759 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n"
764 #if defined BB_MKSWAP
765 const char mkswap_usage[] =
766 "mkswap [-c] [-v0|-v1] device [block-count]\n"
767 #ifndef BB_FEATURE_TRIVIAL_HELP
768 "\nPrepare a disk partition to be used as a swap partition.\n\n"
769 "Options:\n" "\t-c\t\tCheck for read-ability.\n"
770 "\t-v0\t\tMake version 0 swap [max 128 Megs].\n"
771 "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n"
773 "\tblock-count\tNumber of block to use (default is entire partition).\n"
778 #if defined BB_MKTEMP
779 const char mktemp_usage[] =
780 "mktemp [-q] TEMPLATE\n"
781 #ifndef BB_FEATURE_TRIVIAL_HELP
782 "\nCreates a temporary file with its name based on TEMPLATE.\n"
783 "TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).\n"
789 const char more_usage[] =
791 #ifndef BB_FEATURE_TRIVIAL_HELP
792 "\nMore is a filter for viewing FILE one screenful at a time.\n"
798 const char mount_usage[] =
799 "mount [flags] device directory [-o options,more-options]\n"
800 #ifndef BB_FEATURE_TRIVIAL_HELP
801 "\nMount a filesystem\n\n"
803 "\t-a:\t\tMount all filesystems in fstab.\n"
805 "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n"
806 "\t-n:\t\tDon't write a mount table entry.\n"
808 "\t-o option:\tOne of many filesystem options, listed below.\n"
809 "\t-r:\t\tMount the filesystem read-only.\n"
810 "\t-t fs-type:\tSpecify the filesystem type.\n"
811 "\t-w:\t\tMount for reading and writing (default).\n"
813 "Options for use with the \"-o\" flag:\n"
814 "\tasync/sync:\tWrites are asynchronous / synchronous.\n"
815 "\tatime/noatime:\tEnable / disable updates to inode access times.\n"
816 "\tdev/nodev:\tAllow use of special device files / disallow them.\n"
817 "\texec/noexec:\tAllow use of executable files / disallow them.\n"
818 #if defined BB_FEATURE_MOUNT_LOOP
819 "\tloop:\t\tMounts a file via loop device.\n"
821 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n"
822 "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n"
823 "\tro/rw:\t\tMount for read-only / read-write.\n"
824 "\nThere are EVEN MORE flags that are specific to each filesystem.\n"
825 "You'll have to see the written documentation for those.\n"
831 const char mt_usage[] =
832 "mt [-f device] opcode value\n"
833 #ifndef BB_FEATURE_TRIVIAL_HELP
834 "\nControl magnetic tape drive operation\n"
835 "\nAvailable Opcodes:\n\n"
836 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n"
837 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n"
838 "ras3 reset retension rew rewoffline seek setblk setdensity\n"
839 "setpart tell unload unlock weof wset\n"
845 const char mv_usage[] =
847 " or: mv SOURCE... DIRECTORY\n"
848 #ifndef BB_FEATURE_TRIVIAL_HELP
849 "\nRename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"
855 const char nc_usage[] =
857 #ifndef BB_FEATURE_TRIVIAL_HELP
858 "\nNetcat opens a pipe to IP:port\n"
863 #if defined BB_NSLOOKUP
864 const char nslookup_usage[] =
866 #ifndef BB_FEATURE_TRIVIAL_HELP
867 "\nQueries the nameserver for the IP address of the given HOST\n"
873 #if defined BB_FEATURE_SIMPLE_PING
874 const char ping_usage[] =
876 #ifndef BB_FEATURE_TRIVIAL_HELP
877 "\nSend ICMP ECHO_REQUEST packets to network hosts\n"
880 #else /* ! defined BB_FEATURE_SIMPLE_PING */
881 const char ping_usage[] =
882 "ping [OPTION]... host\n"
883 #ifndef BB_FEATURE_TRIVIAL_HELP
884 "\nSend ICMP ECHO_REQUEST packets to network hosts.\n\n"
886 "\t-c COUNT\tSend only COUNT pings.\n"
887 "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56).\n"
888 "\t-q\t\tQuiet mode, only displays output at start\n"
889 "\t\t\tand when finished.\n"
895 #if defined BB_POWEROFF
896 const char poweroff_usage[] =
898 #ifndef BB_FEATURE_TRIVIAL_HELP
899 "\nHalt the system and request that the kernel shut off the power.\n"
904 #if defined BB_PRINTF
905 const char printf_usage[] =
906 "printf FORMAT [ARGUMENT...]\n"
907 #ifndef BB_FEATURE_TRIVIAL_HELP
908 "\nFormats and prints ARGUMENT(s) according to FORMAT,\n"
909 "Where FORMAT controls the output exactly as in C printf.\n"
915 const char ps_usage[] =
917 #ifndef BB_FEATURE_TRIVIAL_HELP
918 "\nReport process status\n"
919 "\nThis version of ps accepts no options.\n"
925 const char pwd_usage[] =
927 #ifndef BB_FEATURE_TRIVIAL_HELP
928 "\nPrint the full filename of the current working directory.\n"
934 const char rdate_usage[] =
935 "rdate [OPTION] HOST\n"
936 #ifndef BB_FEATURE_TRIVIAL_HELP
937 "\nGet and possibly set the system date and time from a remote HOST.\n"
939 "\t-s\tSet the system date and time (default).\n"
940 "\t-p\tPrint the date and time.\n"
945 #if defined BB_REBOOT
946 const char reboot_usage[] =
948 #ifndef BB_FEATURE_TRIVIAL_HELP
949 "\nReboot the system.\n"
955 #if defined BB_RENICE
956 const char renice_usage[] =
957 "renice priority pid [pid ...]\n"
958 #ifndef BB_FEATURE_TRIVIAL_HELP
959 "\nChanges priority of running processes. Allowed priorities range\n"
960 "from 20 (the process runs only when nothing else is running) to 0\n"
961 "(default priority) to -20 (almost nothing else ever gets to run).\n"
968 const char reset_usage[] =
970 #ifndef BB_FEATURE_TRIVIAL_HELP
971 "\nResets the screen.\n"
977 const char rm_usage[] =
978 "rm [OPTION]... FILE...\n"
979 #ifndef BB_FEATURE_TRIVIAL_HELP
980 "\nRemove (unlink) the FILE(s). You may use '--' to\n"
981 "indicate that all following arguments are non-options.\n\n"
983 "\t-f\t\tremove existing destinations, never prompt\n"
984 "\t-r or -R\tremove the contents of directories recursively\n"
990 const char rmdir_usage[] =
991 "rmdir [OPTION]... DIRECTORY...\n"
992 #ifndef BB_FEATURE_TRIVIAL_HELP
993 "\nRemove the DIRECTORY(ies), if they are empty.\n"
999 const char rmmod_usage[] =
1000 "rmmod [OPTION]... [MODULE]...\n"
1001 #ifndef BB_FEATURE_TRIVIAL_HELP
1002 "\nUnloads the specified kernel modules from the kernel.\n\n"
1004 "\t-a\tTry to remove all unused kernel modules.\n"
1010 const char sed_usage[] =
1011 "sed [-Vhnef] pattern [files...]\n"
1012 #ifndef BB_FEATURE_TRIVIAL_HELP
1014 "-n\t\tsuppress automatic printing of pattern space\n"
1015 "-e script\tadd the script to the commands to be executed\n"
1016 "-f scriptfile\tadd the contents of script-file to the commands to be executed\n"
1017 "-h\t\tdisplay this help message\n"
1019 "If no -e or -f is given, the first non-option argument is taken as the\n"
1020 "sed script to interpret. All remaining arguments are names of input\n"
1021 "files; if no input files are specified, then the standard input is read.\n"
1026 #if defined BB_SETKEYCODES
1027 const char setkeycodes_usage[] =
1028 "setkeycodes SCANCODE KEYCODE ...\n"
1029 #ifndef BB_FEATURE_TRIVIAL_HELP
1030 "\nSet entries into the kernel's scancode-to-keycode map,\n"
1031 "allowing unusual keyboards to generate usable keycodes.\n\n"
1032 "SCANCODE may be either xx or e0xx (hexadecimal),\n"
1033 "and KEYCODE is given in decimal\n"
1039 const char shell_usage[] =
1041 " or: sh -c command [args]...\n"
1042 #ifndef BB_FEATURE_TRIVIAL_HELP
1043 "\nlash: The BusyBox command interpreter (shell).\n\n"
1048 #if defined BB_SLEEP
1049 const char sleep_usage[] =
1051 #ifndef BB_FEATURE_TRIVIAL_HELP
1052 "\nPause for N seconds.\n"
1058 const char sort_usage[] =
1060 #ifdef BB_FEATURE_SORT_REVERSE
1064 #ifndef BB_FEATURE_TRIVIAL_HELP
1065 "\nSorts lines of text in the specified files\n"
1070 #if defined BB_SWAPONOFF
1071 const char swapoff_usage[] =
1072 "swapoff [OPTION] [device]\n"
1073 #ifndef BB_FEATURE_TRIVIAL_HELP
1074 "\nStop swapping virtual memory pages on the given device.\n\n"
1076 "\t-a\tStop swapping on all swap devices\n"
1081 #if defined BB_SWAPONOFF
1082 const char swapon_usage[] =
1083 "swapon [OPTION] [device]\n"
1084 #ifndef BB_FEATURE_TRIVIAL_HELP
1085 "\nStart swapping virtual memory pages on the given device.\n\n"
1087 "\t-a\tStart swapping on all swap devices\n"
1093 const char sync_usage[] =
1095 #ifndef BB_FEATURE_TRIVIAL_HELP
1096 "\nWrite all buffered filesystem blocks to disk.\n"
1101 #if defined BB_SYSLOGD
1102 const char syslogd_usage[] =
1103 "syslogd [OPTION]...\n"
1104 #ifndef BB_FEATURE_TRIVIAL_HELP
1105 "\nLinux system and kernel (provides klogd) logging utility.\n"
1106 "Note that this version of syslogd/klogd ignores /etc/syslog.conf.\n\n"
1108 "\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n"
1109 "\t-n\t\tRun as a foreground process\n"
1110 #ifdef BB_FEATURE_KLOGD
1111 "\t-K\t\tDo not start up the klogd process\n"
1113 "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n"
1114 #ifdef BB_FEATURE_REMOTE_LOG
1115 "\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
1122 const char tail_usage[] =
1123 "tail [OPTION] [FILE]...\n"
1124 #ifndef BB_FEATURE_TRIVIAL_HELP
1125 "\nPrint last 10 lines of each FILE to standard output.\n"
1126 "With more than one FILE, precede each with a header giving the\n"
1127 "file name. With no FILE, or when FILE is -, read standard input.\n\n"
1129 #ifndef BB_FEATURE_SIMPLE_TAIL
1130 "\t-c=N[kbm]\toutput the last N bytes\n"
1132 "\t-n NUM\t\tPrint last NUM lines instead of first 10\n"
1133 "\t\t\tAlso can be -NUM or +NUM.\n"
1134 "\t-f\t\tOutput data as the file grows.\n"
1135 #ifndef BB_FEATURE_SIMPLE_TAIL
1136 "\t-q\t\tnever output headers giving file names\n"
1137 "\t-s SEC\t\tWait SEC seconds between reads with -f\n"
1138 "\t-v\t\talways output headers giving file names\n\n"
1139 "If the first character of N (bytes or lines) is a `+', output begins with \n"
1140 "the Nth item from the start of each file, otherwise, print the last N items\n"
1141 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).\n"
1143 // "\nIf the first character of N (bytes or lines) is a `+', output begins with \n"
1144 // "the Nth item from the start of each file.\n"
1151 const char tar_usage[] =
1152 #ifdef BB_FEATURE_TAR_CREATE
1157 #if defined BB_FEATURE_TAR_EXCLUDE
1160 "[-f tarFile] [FILE(s)] ...\n"
1161 #ifndef BB_FEATURE_TRIVIAL_HELP
1162 "\nCreate, extract, or list files from a tar file. Note that\n"
1163 "this version of tar treats hard links as separate files.\n\n"
1164 "Main operation mode:\n"
1165 #ifdef BB_FEATURE_TAR_CREATE
1170 "\nFile selection:\n"
1171 "\tf\t\tname of tarfile or \"-\" for stdin\n"
1172 "\tO\t\textract to stdout\n"
1173 #if defined BB_FEATURE_TAR_EXCLUDE
1174 "\texclude\t\tfile to exclude\n"
1176 "\nInformative output:\n"
1177 "\tv\t\tverbosely list files processed\n"
1183 const char tee_usage[] =
1184 "tee [OPTION]... [FILE]...\n"
1185 #ifndef BB_FEATURE_TRIVIAL_HELP
1186 "\nCopy standard input to each FILE, and also to standard output.\n\n"
1187 "Options:\n" "\t-a\tappend to the given FILEs, do not overwrite\n"
1192 #if defined BB_TELNET
1193 const char telnet_usage[] =
1194 "telnet host [port]\n"
1195 #ifndef BB_FEATURE_TRIVIAL_HELP
1196 "\nTelnet is used to establish interactive communication with another\n"
1197 "computer over a network using the TELNET protocol.\n"
1203 const char test_usage[] =
1205 "or [ EXPRESSION ]\n"
1206 #ifndef BB_FEATURE_TRIVIAL_HELP
1207 "\nChecks file types and compares values returning an exit\n"
1208 "code determined by the value of EXPRESSION.\n"
1213 #if defined BB_TOUCH
1214 const char touch_usage[] =
1215 "touch [-c] file [file ...]\n"
1216 #ifndef BB_FEATURE_TRIVIAL_HELP
1217 "\nUpdate the last-modified date on the given file[s].\n\n"
1219 "\t-c\tDo not create any files\n"
1225 const char tr_usage[] =
1226 "tr [-cds] STRING1 [STRING2]\n"
1227 #ifndef BB_FEATURE_TRIVIAL_HELP
1228 "\nTranslate, squeeze, and/or delete characters from\n"
1229 "standard input, writing to standard output.\n\n"
1231 "\t-c\ttake complement of STRING1\n"
1232 "\t-d\tdelete input characters coded STRING1\n"
1233 "\t-s\tsqueeze multiple output characters of STRING2 into one character\n"
1238 #if defined BB_TRUE_FALSE
1239 const char true_usage[] =
1241 #ifndef BB_FEATURE_TRIVIAL_HELP
1242 "\nReturn an exit code of TRUE (0).\n"
1248 const char tty_usage[] =
1250 #ifndef BB_FEATURE_TRIVIAL_HELP
1251 "\nPrint the file name of the terminal connected to standard input.\n\n"
1253 "\t-s\tprint nothing, only return an exit status\n"
1258 #if defined BB_UMOUNT
1259 const char umount_usage[] =
1260 "umount [flags] filesystem|directory\n"
1261 #ifndef BB_FEATURE_TRIVIAL_HELP
1262 "Unmount file systems\n"
1263 "\nFlags:\n" "\t-a:\tUnmount all file systems"
1265 " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
1269 "\t-r:\tTry to remount devices as read-only if mount is busy\n"
1270 #if defined BB_FEATURE_MOUNT_FORCE
1271 "\t-f:\tForce filesystem umount (i.e. unreachable NFS server)\n"
1273 #if defined BB_FEATURE_MOUNT_LOOP
1274 "\t-l:\tDo not free loop device (if a loop device has been used)\n"
1280 #if defined BB_UNAME
1281 const char uname_usage[] =
1282 "uname [OPTION]...\n"
1283 #ifndef BB_FEATURE_TRIVIAL_HELP
1284 "\nPrint certain system information. With no OPTION, same as -s.\n\n"
1286 "\t-a\tprint all information\n"
1287 "\t-m\tthe machine (hardware) type\n"
1288 "\t-n\tprint the machine's network node hostname\n"
1289 "\t-r\tprint the operating system release\n"
1290 "\t-s\tprint the operating system name\n"
1292 "\t-p\tprint the host processor type\n"
1293 "\t-v\tprint the operating system version\n"
1299 const char uniq_usage[] =
1300 "uniq [OPTION]... [INPUT [OUTPUT]]\n"
1301 #ifndef BB_FEATURE_TRIVIAL_HELP
1302 "\nDiscard all but one of successive identical lines from INPUT\n"
1303 "(or standard input), writing to OUTPUT (or standard output).\n"
1308 #if defined BB_UPDATE
1309 const char update_usage[] =
1310 "update [options]\n"
1311 #ifndef BB_FEATURE_TRIVIAL_HELP
1312 "\nPeriodically flushes filesystem buffers.\n\n"
1314 "\t-S\tforce use of sync(2) instead of flushing\n"
1315 "\t-s SECS\tcall sync this often (default 30)\n"
1316 "\t-f SECS\tflush some buffers this often (default 5)\n"
1321 #if defined BB_UPTIME
1322 const char uptime_usage[] =
1324 #ifndef BB_FEATURE_TRIVIAL_HELP
1325 "\nDisplay the time since the last boot.\n"
1330 #if defined BB_USLEEP
1331 const char usleep_usage[] =
1333 #ifndef BB_FEATURE_TRIVIAL_HELP
1334 "\nPause for N microseconds.\n"
1339 #if defined BB_UUDECODE
1340 const char uudecode_usage[] =
1341 "uudecode [FILE]...\n"
1342 #ifndef BB_FEATURE_TRIVIAL_HELP
1343 "\nUudecode a file that is uuencoded.\n\n"
1345 "\t-o FILE\tdirect output to FILE\n"
1350 #if defined BB_UUENCODE
1351 const char uuencode_usage[] =
1352 "uuencode [OPTION] [INFILE] REMOTEFILE\n"
1353 #ifndef BB_FEATURE_TRIVIAL_HELP
1354 "\nUuencode a file.\n\n"
1356 "\t-m\tuse base64 encoding as of RFC1521\n"
1362 const char wc_usage[] =
1363 "wc [OPTION]... [FILE]...\n"
1364 #ifndef BB_FEATURE_TRIVIAL_HELP
1365 "\nPrint line, word, and byte counts for each FILE, and a total line if\n"
1366 "more than one FILE is specified. With no FILE, read standard input.\n\n"
1368 "\t-c\tprint the byte counts\n"
1369 "\t-l\tprint the newline counts\n"
1371 "\t-L\tprint the length of the longest line\n"
1372 "\t-w\tprint the word counts\n"
1378 const char wget_usage[] = "wget [-c] [-O file] url\n"
1379 #ifndef BB_FEATURE_TRIVIAL_HELP
1380 "\nwget retrieves files via HTTP\n\n"
1382 "\t-c\tcontinue retrieval of aborted transfers\n"
1383 "\t-O\tsave to filename ('-' for stdout)\n"
1388 #if defined BB_WHICH
1389 const char which_usage[] =
1390 "which [COMMAND ...]\n"
1391 #ifndef BB_FEATURE_TRIVIAL_HELP
1392 "\nLocates a COMMAND.\n"
1397 #if defined BB_WHOAMI
1398 const char whoami_usage[] =
1400 #ifndef BB_FEATURE_TRIVIAL_HELP
1401 "\nPrints the user name associated with the current effective user id.\n"
1407 const char yes_usage[] =
1408 "yes [OPTION]... [STRING]...\n"
1409 #ifndef BB_FEATURE_TRIVIAL_HELP
1410 "\nRepeatedly outputs a line with all specified STRING(s), or `y'.\n"