215871b5a27be7a44ea9cdfd533e0e3fd4c7196d
[oweals/busybox.git] / applets / usage.c
1 #include "busybox.h"
2
3 #if defined BB_AR
4 const char ar_usage[] =
5         "ar -[ovR]{ptx} archive filenames"
6 #ifndef BB_FEATURE_TRIVIAL_HELP
7         "\n\nExtract or list files from an ar archive.\n\n"
8         "Options:\n"
9         "\t-o\t\tpreserve original dates\n"
10         "\t-p\t\textract to stdout\n"
11         "\t-t\t\tlist\n"
12         "\t-x\t\textract\n"
13         "\t-v\t\tverbosely list files processed\n"
14         "\t-R\t\trecursive action"
15 #endif
16         ;
17 #endif
18
19 #if defined BB_BASENAME
20 const char basename_usage[] =
21         "basename FILE [SUFFIX]"
22 #ifndef BB_FEATURE_TRIVIAL_HELP
23         "\n\nStrips directory path and suffixes from FILE.\n"
24         "If specified, also removes any trailing SUFFIX."
25 #endif
26         ;
27 #endif
28
29 #if defined BB_CAT
30 const char cat_usage[] =
31         "cat [FILE]..."
32 #ifndef BB_FEATURE_TRIVIAL_HELP
33         "\n\nConcatenates FILE(s) and prints them to stdout."
34 #endif
35         ;
36 #endif
37
38 #if defined BB_CHMOD_CHOWN_CHGRP
39 const char chgrp_usage[] =
40         "chgrp [OPTION]... GROUP FILE..."
41 #ifndef BB_FEATURE_TRIVIAL_HELP
42         "\n\nChange the group membership of each FILE to GROUP.\n"
43         "\nOptions:\n\t-R\tChanges files and directories recursively."
44 #endif
45         ;
46 #endif
47
48 #if defined BB_CHMOD_CHOWN_CHGRP
49 const char chmod_usage[] =
50         "chmod [-R] MODE[,MODE]... FILE..."
51 #ifndef BB_FEATURE_TRIVIAL_HELP
52         "\n\nEach MODE is one or more of the letters ugoa, one of the symbols +-= and\n"
53         "one or more of the letters rwxst.\n\n"
54         "\nOptions:\n\t-R\tChanges files and directories recursively."
55 #endif
56         ;
57 #endif
58
59 #if defined BB_CHMOD_CHOWN_CHGRP
60 const char chown_usage[] =
61         "chown [OPTION]...  OWNER[<.|:>[GROUP] FILE..."
62 #ifndef BB_FEATURE_TRIVIAL_HELP
63         "\n\nChange the owner and/or group of each FILE to OWNER and/or GROUP.\n"
64         "\nOptions:\n\t-R\tChanges files and directories recursively."
65 #endif
66         ;
67 #endif
68
69 #if defined BB_CHROOT
70 const char chroot_usage[] =
71         "chroot NEWROOT [COMMAND...]"
72 #ifndef BB_FEATURE_TRIVIAL_HELP
73         "\n\nRun COMMAND with root directory set to NEWROOT."
74 #endif
75         ;
76 #endif
77
78 #if defined BB_CHVT
79 const char chvt_usage[] =
80         "chvt N"
81 #ifndef BB_FEATURE_TRIVIAL_HELP
82         "\n\nChanges the foreground virtual terminal to /dev/ttyN"
83 #endif
84         ;
85 #endif
86
87 #if defined BB_CLEAR
88 const char clear_usage[] =
89         "clear"
90 #ifndef BB_FEATURE_TRIVIAL_HELP
91         "\n\nClear screen."
92 #endif
93         ;
94 #endif
95
96 #if defined BB_CMP
97 const char cmp_usage[] =
98         "cmp FILE1 [FILE2]"
99 #ifndef BB_FEATURE_TRIVIAL_HELP
100         "\n\nCompare files."
101 #endif
102         ;
103 #endif
104
105 #if defined BB_CP_MV
106 const char cp_usage[] =
107         "cp [OPTION]... SOURCE DEST\n"
108         "   or: cp [OPTION]... SOURCE... DIRECTORY"
109 #ifndef BB_FEATURE_TRIVIAL_HELP
110         "\n\nCopies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
111         "\n"
112         "\t-a\tSame as -dpR\n"
113         "\t-d\tPreserves links\n"
114         "\t-p\tPreserves file attributes if possible\n"
115         "\t-f\tforce (implied; ignored) - always set\n"
116         "\t-R\tCopies directories recursively"
117 #endif
118         ;
119 #endif
120
121 #if defined BB_CUT
122 const char cut_usage[] =
123         "cut [OPTION]... [FILE]..."
124 #ifndef BB_FEATURE_TRIVIAL_HELP
125         "\n\nPrints selected fields from each input FILE to standard output.\n\n"
126         "Options:\n"
127         "\t-b LIST\tOutput only bytes from LIST\n"
128         "\t-c LIST\tOutput only characters from LIST\n"
129         "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n"
130         "\t-s\tOutput only the lines containing delimiter\n"
131         "\t-f N\tPrint only these fields\n"
132         "\t-n\tIgnored"
133 #endif
134         ;
135 #endif
136
137 #if defined BB_DATE
138 const char date_usage[] =
139         "date [OPTION]... [+FORMAT]\n"
140         "  or:  date [OPTION] [MMDDhhmm[[CC]YY][.ss]]"
141 #ifndef BB_FEATURE_TRIVIAL_HELP
142         "\n\nDisplays the current time in the given FORMAT, or sets the system date.\n"
143         "\nOptions:\n\t-R\t\tOutputs RFC-822 compliant date string\n"
144         "\t-d STRING\tdisplay time described by STRING, not `now'\n"
145         "\t-s\t\tSets time described by STRING\n"
146         "\t-u\t\tPrints or sets Coordinated Universal Time"
147 #endif
148         ;
149 #endif
150
151 #if defined BB_DC
152 const char dc_usage[] =
153         "dc expression ..."
154 #ifndef BB_FEATURE_TRIVIAL_HELP
155         "\n\nThis is a Tiny RPN calculator that understands the\n"
156         "following operations: +, -, /, *, and, or, not, eor.\n"
157         "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16"
158 #endif
159         ;
160 #endif
161
162 #if defined BB_DD
163 const char dd_usage[] =
164         "dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] [seek=N] [conv=notrunc|sync]"
165 #ifndef BB_FEATURE_TRIVIAL_HELP
166         "\n\nCopy a file, converting and formatting according to options\n\n"
167         "\tif=FILE\tread from FILE instead of stdin\n"
168         "\tof=FILE\twrite to FILE instead of stdout\n"
169         "\tbs=N\tread and write N bytes at a time\n"
170         "\tcount=N\tcopy only N input blocks\n"
171         "\tskip=N\tskip N input blocks\n"
172         "\tseek=N\tskip N output blocks\n"
173         "\tconv=notrunc\tdon't truncate output file\n"
174         "\tconv=sync\tpad blocks with zeros\n"
175         "\n"
176         "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n"
177         "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)."
178 #endif
179         ;
180 #endif
181
182 #if defined BB_DEALLOCVT
183 const char deallocvt_usage[] =
184         "deallocvt N"
185 #ifndef BB_FEATURE_TRIVIAL_HELP
186          "\n\nDeallocate unused virtual terminal /dev/ttyN"
187 #endif
188          ;
189 #endif
190
191 #if defined BB_DF
192 const char df_usage[] =
193         "df [-?"
194 #ifdef BB_FEATURE_HUMAN_READABLE
195         "hm"
196 #endif
197         "k] [filesystem ...]\n"
198 #ifndef BB_FEATURE_TRIVIAL_HELP
199         "\n\nPrint the filesystem space used and space available."
200         "Options:\n"
201         "\t-?\tshow usage information\n"
202 #ifdef BB_FEATURE_HUMAN_READABLE
203         "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n"
204         "\t-m\tprint sizes in megabytes\n"
205         "\t-k\tprint sizes in kilobytes(default)\n"
206 #else
207         "\t-k\tprint sizes in kilobytes(compatability)\n"
208 #endif
209 #endif
210         ;
211 #endif
212
213 #if defined BB_DIRNAME
214 const char dirname_usage[] =
215         "dirname [FILENAME ...]"
216 #ifndef BB_FEATURE_TRIVIAL_HELP
217         "\n\nStrips non-directory suffix from FILENAME"
218 #endif
219         ;
220 #endif
221
222 #if defined BB_DMESG
223 const char dmesg_usage[] =
224         "dmesg [-c] [-n LEVEL] [-s SIZE]"
225 #ifndef BB_FEATURE_TRIVIAL_HELP
226         "\n\nPrints or controls the kernel ring buffer\n\n"
227         "Options:\n"
228         "\t-c\t\tClears the ring buffer's contents after printing\n"
229         "\t-n LEVEL\tSets console logging level\n"
230         "\t-s SIZE\t\tUse a buffer of size SIZE"
231 #endif
232         ;
233 #endif
234
235 #if defined BB_DOS2UNIX
236 const char dos2unix_usage[] =
237         "dos2unix < dosfile > unixfile"
238 #ifndef BB_FEATURE_TRIVIAL_HELP
239         "\n\nConverts a text file from dos format to unix format."
240 #endif
241         ;
242 #endif
243
244 #if defined BB_DPKG_DEB
245 const char dpkg_deb_usage[] =
246         "dpkg-deb [-cexX] file directory"
247 #ifndef BB_FEATURE_TRIVIAL_HELP
248         "\n\nPerform actions on debian packages (.debs)\n\n"
249         "Options:\n"
250         "\t-c\tList contents of filesystem tree\n"
251         "\t-e\tExtract control files to directory\n"    
252         "\t-x\tExctract packages filesystem tree to directory\n"
253         "\t-X\tVerbose extract"
254 #endif
255         ;
256 #endif
257
258 #if defined BB_DU
259 const char du_usage[] =
260         "du [-?ls"
261 #ifdef BB_FEATURE_HUMAN_READABLE
262         "hm"
263 #endif
264         "k] [FILE]...\n"
265 #ifndef BB_FEATURE_TRIVIAL_HELP
266         "\n\nSummarizes disk space used for each FILE and/or directory.\n"
267         "Disk space is printed in units of 1024 bytes.\n\n"
268         "Options:\n"
269         "\t-?\tshow usage information\n"
270         "\t-l\tcount sizes many times if hard linked\n"
271         "\t-s\tdisplay only a total for each argument"
272 #ifdef BB_FEATURE_HUMAN_READABLE
273         "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n"
274         "\t-m\tprint sizes in megabytes\n"
275         "\t-k\tprint sizes in kilobytes(default)\n"
276 #else
277         "\t-k\tprint sizes in kilobytes(compatability)\n"
278 #endif
279 #endif
280         ;
281 #endif
282
283 #if defined BB_DUMPKMAP
284 const char dumpkmap_usage[] =
285         "dumpkmap > keymap"
286 #ifndef BB_FEATURE_TRIVIAL_HELP
287         "\n\nPrints out a binary keyboard translation table to standard input."
288 #endif
289         ;
290 #endif
291
292 #if defined BB_DUTMP
293 const char dutmp_usage[] =
294         "dutmp [FILE]"
295 #ifndef BB_FEATURE_TRIVIAL_HELP
296         "\n\nDump utmp file format (pipe delimited) from FILE\n"
297         "or stdin to stdout.  (i.e. 'dutmp /var/run/utmp')"
298 #endif
299         ;
300 #endif
301
302 #if defined BB_ECHO
303 const char echo_usage[] =
304         "echo [-neE] [ARG ...]"
305 #ifndef BB_FEATURE_TRIVIAL_HELP
306         "\n\nPrints the specified ARGs to stdout\n\n"
307         "Options:\n"
308         "\t-n\tsuppress trailing newline\n"
309         "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n"
310         "\t-E\tdisable interpretation of backslash-escaped characters"
311 #endif
312         ;
313 #endif
314
315 #if defined BB_EXPR
316 const char expr_usage[] =
317         "expr EXPRESSION"
318 #ifndef BB_FEATURE_TRIVIAL_HELP
319 "\n\nPrints the value of EXPRESSION to standard output.\n\n"
320 "EXPRESSION may be:\n"
321 "ARG1 |  ARG2   ARG1 if it is neither null nor 0, otherwise ARG2\n"
322 "ARG1 &  ARG2   ARG1 if neither argument is null or 0, otherwise 0\n"
323 "ARG1 <  ARG2   ARG1 is less than ARG2\n"
324 "ARG1 <= ARG2   ARG1 is less than or equal to ARG2\n"
325 "ARG1 =  ARG2   ARG1 is equal to ARG2\n"
326 "ARG1 != ARG2   ARG1 is unequal to ARG2\n"
327 "ARG1 >= ARG2   ARG1 is greater than or equal to ARG2\n"
328 "ARG1 >  ARG2   ARG1 is greater than ARG2\n"
329 "ARG1 +  ARG2   arithmetic sum of ARG1 and ARG2\n"
330 "ARG1 -  ARG2   arithmetic difference of ARG1 and ARG2\n"
331 "ARG1 *  ARG2   arithmetic product of ARG1 and ARG2\n"
332 "ARG1 /  ARG2   arithmetic quotient of ARG1 divided by ARG2\n"
333 "ARG1 %  ARG2   arithmetic remainder of ARG1 divided by ARG2\n"
334 "STRING : REGEXP                    anchored pattern match of REGEXP in STRING\n"
335 "match STRING REGEXP        same as STRING : REGEXP\n"
336 "substr STRING POS LENGTH    substring of STRING, POS counted from 1\n"
337 "index STRING CHARS         index in STRING where any CHARS is found, or 0\n"
338 "length STRING              length of STRING\n"
339 "quote TOKEN                interpret TOKEN as a string, even if it is a \n"
340 "                               keyword like `match' or an operator like `/'\n"
341 "( EXPRESSION )             value of EXPRESSION\n\n"
342 "Beware that many operators need to be escaped or quoted for shells.\n"
343 "Comparisons are arithmetic if both ARGs are numbers, else\n"
344 "lexicographical.  Pattern matches return the string matched between \n"
345 "\\( and \\) or null; if \\( and \\) are not used, they return the number \n"
346 "of characters matched or 0."
347
348 #endif
349         ;
350 #endif
351
352
353 #if defined BB_TRUE_FALSE
354 const char false_usage[] =
355         "false"
356 #ifndef BB_FEATURE_TRIVIAL_HELP
357         "\n\nReturn an exit code of FALSE (1)."
358 #endif
359         ;
360 #endif
361
362 #if defined BB_FDFLUSH
363 const char fdflush_usage[] =
364         "fdflush DEVICE"
365 #ifndef BB_FEATURE_TRIVIAL_HELP
366         "\n\nForces floppy disk drive to detect disk change"
367 #endif
368         ;
369 #endif
370
371 #if defined BB_FIND
372 const char find_usage[] =
373         "find [PATH...] [EXPRESSION]"
374 #ifndef BB_FEATURE_TRIVIAL_HELP
375         "\n\nSearch for files in a directory hierarchy.  The default PATH is\n"
376         "the current directory; default EXPRESSION is '-print'\n\n"
377         "\nEXPRESSION may consist of:\n"
378         "\t-follow\t\tDereference symbolic links.\n"
379         "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n"
380 #ifdef BB_FEATURE_FIND_TYPE
381         "\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)\n"
382 #endif
383 #ifdef BB_FEATURE_FIND_PERM
384         "\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN); or exactly (NNN)\n"
385 #endif
386 #ifdef BB_FEATURE_FIND_MTIME
387         "\t-mtime TIME\tModified time is greater than (+N); less than (-N); or exactly (N) days\n"
388 #endif
389 #endif
390         ;
391 #endif
392
393 #if defined BB_FREE
394 const char free_usage[] =
395         "free"
396 #ifndef BB_FEATURE_TRIVIAL_HELP
397         "\n\nDisplays the amount of free and used system memory"
398 #endif
399         ;
400 #endif
401
402 #if defined BB_FREERAMDISK
403 const char freeramdisk_usage[] =
404         "freeramdisk DEVICE"
405 #ifndef BB_FEATURE_TRIVIAL_HELP
406         "\n\nFrees all memory used by the specified ramdisk."
407 #endif
408         ;
409 #endif
410
411 #if defined BB_FSCK_MINIX
412 const char fsck_minix_usage[] =
413         "Usage: fsck.minix [-larvsmf] /dev/name"
414 #ifndef BB_FEATURE_TRIVIAL_HELP
415         "\n\nPerforms a consistency check for MINIX filesystems.\n\n"
416         "Options:\n"
417         "\t-l\tLists all filenames\n"
418         "\t-r\tPerform interactive repairs\n"
419         "\t-a\tPerform automatic repairs\n"
420         "\t-v\tverbose\n"
421         "\t-s\tOutputs super-block information\n"
422         "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n"
423         "\t-f\tForce file system check."
424 #endif
425         ;
426 #endif
427
428 #if defined BB_GETOPT
429 const char getopt_usage[] =
430 "getopt [OPTIONS]..."
431 #ifndef BB_FEATURE_TRIVIAL_HELP
432 "\nParse command options\n"
433 "  -a, --alternative            Allow long options starting with single -\n"
434 "  -l, --longoptions=longopts   Long options to be recognized\n"
435 "  -n, --name=progname          The name under which errors are reported\n"
436 "  -o, --options=optstring      Short options to be recognized\n"
437 "  -q, --quiet                  Disable error reporting by getopt(3)\n"
438 "  -Q, --quiet-output           No normal output\n"
439 "  -s, --shell=shell            Set shell quoting conventions\n"
440 "  -T, --test                   Test for getopt(1) version\n"
441 "  -u, --unqote                 Do not quote the output"
442 #endif
443 ;
444 #endif
445
446 #if defined BB_GREP
447 const char grep_usage[] =
448         "grep [-ihHnqvs] pattern [files...]"
449 #ifndef BB_FEATURE_TRIVIAL_HELP
450         "\n\nSearch for PATTERN in each FILE or standard input.\n\n"
451         "Options:\n"
452         "\t-H\tprefix output lines with filename where match was found\n"
453         "\t-h\tsuppress the prefixing filename on output\n"
454         "\t-i\tignore case distinctions\n"
455         "\t-n\tprint line number with output lines\n"
456         "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n"
457         "\t-v\tselect non-matching lines\n"
458         "\t-s\tsuppress file open/read error messages"
459 #endif
460         ;
461 #endif
462
463 #if defined BB_GUNZIP
464 const char gunzip_usage[] =
465         "gunzip [OPTION]... FILE"
466 #ifndef BB_FEATURE_TRIVIAL_HELP
467         "\n\nUncompress FILE (or standard input if FILE is '-').\n\n"
468         "Options:\n"
469         "\t-c\tWrite output to standard output\n"
470         "\t-t\tTest compressed file integrity"
471 #endif
472         ;
473 #endif
474
475 #if defined BB_GZIP
476 const char gzip_usage[] =
477         "gzip [OPTION]... FILE"
478 #ifndef BB_FEATURE_TRIVIAL_HELP
479         "\n\nCompress FILE with maximum compression.\n"
480         "When FILE is '-', reads standard input.  Implies -c.\n\n"
481         "Options:\n"
482         "\t-c\tWrite output to standard output instead of FILE.gz\n"
483         "\t-d\tdecompress"
484 #endif
485         ;
486 #endif
487
488 #if defined BB_HALT
489 const char halt_usage[] =
490         "halt"
491 #ifndef BB_FEATURE_TRIVIAL_HELP
492         "\n\nHalt the system."
493 #endif
494         ;
495 #endif
496
497 #if defined BB_HEAD
498 const char head_usage[] =
499         "head [OPTION] [FILE]..."
500 #ifndef BB_FEATURE_TRIVIAL_HELP
501         "\n\nPrint first 10 lines of each FILE to standard output.\n"
502         "With more than one FILE, precede each with a header giving the\n"
503         "file name. With no FILE, or when FILE is -, read standard input.\n\n"
504
505         "Options:\n" "\t-n NUM\t\tPrint first NUM lines instead of first 10"
506 #endif
507         ;
508 #endif
509
510 #if defined BB_HOSTID
511 const char hostid_usage[] =
512         "hostid"
513 #ifndef BB_FEATURE_TRIVIAL_HELP
514         "\n\nPrint out a unique 32-bit identifier for the machine."
515 #endif
516         ;
517 #endif
518
519 #if defined BB_HOSTNAME
520 const char hostname_usage[] =
521         "hostname [OPTION] {hostname | -F file}"
522 #ifndef BB_FEATURE_TRIVIAL_HELP
523         "\n\nGet or set the hostname or DNS domain name. If a hostname is given\n"
524         "(or a file with the -F parameter), the host name will be set.\n\n"
525
526         "Options:\n"
527         "\t-s\t\tShort\n"
528         "\t-i\t\tAddresses for the hostname\n"
529         "\t-d\t\tDNS domain name\n"
530         "\t-F, --file FILE\tUse the contents of FILE to specify the hostname"
531 #endif
532         ;
533 #endif
534
535 #if defined BB_ID
536 const char id_usage[] =
537         "id [OPTIONS]... [USERNAME]"
538 #ifndef BB_FEATURE_TRIVIAL_HELP
539         "\n\nPrint information for USERNAME or the current user\n\n"
540         "Options:\n"
541         "\t-g\tprints only the group ID\n"
542         "\t-u\tprints only the user ID\n"
543         "\t-n\tprint a name instead of a number (with for -ug)\n"
544         "\t-r\tprints the real user ID instead of the effective ID (with -ug)"
545 #endif
546         ;
547 #endif
548
549 #if defined BB_INSMOD
550 const char insmod_usage[] =
551         "insmod [OPTION]... MODULE [symbol=value]..."
552 #ifndef BB_FEATURE_TRIVIAL_HELP
553         "\n\nLoads the specified kernel modules into the kernel.\n\n"
554         "Options:\n"
555         "\t-f\tForce module to load into the wrong kernel version.\n"
556         "\t-k\tMake module autoclean-able.\n"
557         "\t-v\tverbose output\n" 
558         "\t-L\tLock to prevent simultaneous loads of a module\n"
559         "\t-x\tdo not export externs"
560 #endif
561         ;
562 #endif
563
564 #if defined BB_KILL
565 const char kill_usage[] =
566         "kill [-signal] process-id [process-id ...]"
567 #ifndef BB_FEATURE_TRIVIAL_HELP
568         "\n\nSend a signal (default is SIGTERM) to the specified process(es).\n\n"
569         "Options:\n" "\t-l\tList all signal names and numbers."
570 #endif
571         ;
572 #endif
573
574 #if defined BB_KILLALL
575 const char killall_usage[] =
576         "killall [-signal] process-name [process-name ...]"
577 #ifndef BB_FEATURE_TRIVIAL_HELP
578         "\n\nSend a signal (default is SIGTERM) to the specified process(es).\n\n"
579         "Options:\n" "\t-l\tList all signal names and numbers."
580 #endif
581         ;
582 #endif
583
584 #if defined BB_LENGTH
585 const char length_usage[] =
586         "length STRING"
587 #ifndef BB_FEATURE_TRIVIAL_HELP
588         "\n\nPrints out the length of the specified STRING."
589 #endif
590         ;
591 #endif
592
593 #if defined BB_LN
594 const char ln_usage[] =
595         "ln [OPTION] TARGET... LINK_NAME|DIRECTORY"
596 #ifndef BB_FEATURE_TRIVIAL_HELP
597         "\n\nCreate a link named LINK_NAME or DIRECTORY to the specified TARGET\n"
598         "\nYou may use '--' to indicate that all following arguments are non-options.\n\n"
599         "Options:\n"
600         "\t-s\tmake symbolic links instead of hard links\n"
601         "\t-f\tremove existing destination files\n"
602         "\t-n\tno dereference symlinks - treat like normal file"
603 #endif
604         ;
605 #endif
606
607 #if defined BB_LOADACM
608 const char loadacm_usage[] =
609         "loadacm < mapfile"
610 #ifndef BB_FEATURE_TRIVIAL_HELP
611         "\n\nLoads an acm from standard input."
612 #endif
613         ;
614 #endif
615
616 #if defined BB_LOADFONT
617 const char loadfont_usage[] =
618         "loadfont < font"
619 #ifndef BB_FEATURE_TRIVIAL_HELP
620         "\n\nLoads a console font from standard input."
621 #endif
622         ;
623 #endif
624
625 #if defined BB_LOADKMAP
626 const char loadkmap_usage[] =
627         "loadkmap < keymap"
628 #ifndef BB_FEATURE_TRIVIAL_HELP
629         "\n\nLoads a binary keyboard translation table from standard input."
630 #endif
631         ;
632 #endif
633
634 #if defined BB_LOGGER
635 const char logger_usage[] =
636         "logger [OPTION]... [MESSAGE]"
637 #ifndef BB_FEATURE_TRIVIAL_HELP
638         "\n\nWrite MESSAGE to the system log.  If MESSAGE is omitted, log stdin.\n\n"
639         "Options:\n"
640         "\t-s\tLog to stderr as well as the system log.\n"
641         "\t-t\tLog using the specified tag (defaults to user name).\n"
642         "\t-p\tEnter the message with the specified priority.\n"
643         "\t\tThis may be numerical or a ``facility.level'' pair."
644 #endif
645         ;
646 #endif
647
648 #if defined BB_LOGNAME
649 const char logname_usage[] =
650         "logname"
651 #ifndef BB_FEATURE_TRIVIAL_HELP
652         "\n\nPrint the name of the current user."
653 #endif
654         ;
655 #endif
656
657 #if defined BB_LS
658 const char ls_usage[] =
659         "ls [-1Aa"
660 #ifdef BB_FEATURE_LS_TIMESTAMPS
661         "c"
662 #endif
663         "Cd"
664 #ifdef BB_FEATURE_LS_TIMESTAMPS
665         "e"
666 #endif
667 #ifdef BB_FEATURE_LS_FILETYPES
668         "F"
669 #endif
670         "iln"
671 #ifdef BB_FEATURE_LS_FILETYPES
672         "p"
673 #endif
674 #ifdef BB_FEATURE_LS_FOLLOWLINKS
675     "L"
676 #endif
677 #ifdef BB_FEATURE_LS_RECURSIVE
678         "R"
679 #endif
680 #ifdef BB_FEATURE_LS_SORTFILES
681         "rS"
682 #endif
683         "s"
684 #ifdef BB_FEATURE_AUTOWIDTH
685         "T"
686 #endif
687 #ifdef BB_FEATURE_LS_TIMESTAMPS
688         "tu"
689 #endif
690 #ifdef BB_FEATURE_LS_SORTFILES
691         "v"
692 #endif
693 #ifdef BB_FEATURE_AUTOWIDTH
694         "w"
695 #endif
696         "x"
697 #ifdef BB_FEATURE_LS_SORTFILES
698         "X"
699 #endif
700 #ifdef BB_FEATURE_HUMAN_READABLE
701         "h"
702 #endif
703         "k] [filenames...]\n"
704 #ifndef BB_FEATURE_TRIVIAL_HELP
705         "\n\nList directory contents\n\n"
706         "Options:\n"
707         "\t-1\tlist files in a single column\n"
708         "\t-A\tdo not list implied . and ..\n"
709         "\t-a\tdo not hide entries starting with .\n"
710         "\t-C\tlist entries by columns\n"
711 #ifdef BB_FEATURE_LS_TIMESTAMPS
712         "\t-c\twith -l: show ctime (the time of last\n"
713         "\t\tmodification of file status information)\n"
714 #endif
715         "\t-d\tlist directory entries instead of contents\n"
716 #ifdef BB_FEATURE_LS_TIMESTAMPS
717         "\t-e\tlist both full date and full time\n"
718 #endif
719 #ifdef BB_FEATURE_LS_FILETYPES
720         "\t-F\tappend indicator (one of */=@|) to entries\n"
721 #endif
722         "\t-i\tlist the i-node for each file\n"
723         "\t-l\tuse a long listing format\n"
724         "\t-n\tlist numeric UIDs and GIDs instead of names\n"
725 #ifdef BB_FEATURE_LS_FILETYPES
726         "\t-p\tappend indicator (one of /=@|) to entries\n"
727 #endif
728 #ifdef BB_FEATURE_LS_FOLLOWLINKS
729         "\t-L\tlist entries pointed to by symbolic links\n"
730 #endif
731 #ifdef BB_FEATURE_LS_RECURSIVE
732         "\t-R\tlist subdirectories recursively\n"
733 #endif
734 #ifdef BB_FEATURE_LS_SORTFILES
735         "\t-r\tsort the listing in reverse order\n"
736         "\t-S\tsort the listing by file size\n"
737 #endif
738         "\t-s\tlist the size of each file, in blocks\n"
739 #ifdef BB_FEATURE_AUTOWIDTH
740         "\t-T NUM\tassume Tabstop every NUM columns\n"
741 #endif
742 #ifdef BB_FEATURE_LS_TIMESTAMPS
743         "\t-t\twith -l: show modification time (the time of last\n"
744         "\t\tchange of the file)\n"
745         "\t-u\twith -l: show access time (the time of last\n"
746         "\t\taccess of the file)\n"
747 #endif
748 #ifdef BB_FEATURE_LS_SORTFILES
749         "\t-v\tsort the listing by version\n"
750 #endif
751 #ifdef BB_FEATURE_AUTOWIDTH
752         "\t-w NUM\tassume the terminal is NUM columns wide\n"
753 #endif
754         "\t-x\tlist entries by lines instead of by columns\n"
755 #ifdef BB_FEATURE_LS_SORTFILES
756         "\t-X\tsort the listing by extension\n"
757 #endif
758
759 #ifdef BB_FEATURE_HUMAN_READABLE
760         "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n"
761         "\t-k\tprint sizes in kilobytes(default)\n"
762 #else
763         "\t-k\tprint sizes in kilobytes(compatability)"
764 #endif
765
766 #endif /*  BB_FEATURE_TRIVIAL_HELP */
767         ;
768 #endif /* BB_LS */
769
770 #if defined BB_LSMOD
771 const char lsmod_usage[] =
772         "lsmod"
773 #ifndef BB_FEATURE_TRIVIAL_HELP
774         "\n\nList the currently loaded kernel modules."
775 #endif
776         ;
777 #endif
778
779 #if defined BB_MAKEDEVS
780 const char makedevs_usage[] =
781         "makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]"
782 #ifndef BB_FEATURE_TRIVIAL_HELP
783         "\n\nCreates a range of block or character special files\n\n"
784         "TYPEs include:\n"
785         "\tb:\tMake a block (buffered) device.\n"
786         "\tc or u:\tMake a character (un-buffered) device.\n"
787         "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n"
788         "FIRST specifies the number appended to NAME to create the first device.\n"
789         "LAST specifies the number of the last item that should be created.\n"
790         "If 's' is the last argument, the base device is created as well.\n\n"
791         "For example:\n"
792         "\tmakedevs /dev/ttyS c 4 66 2 63   ->  ttyS2-ttyS63\n"
793         "\tmakedevs /dev/hda b 3 0 0 8 s    ->  hda,hda1-hda8"
794 #endif
795         ;
796 #endif
797
798 #if defined BB_MD5SUM
799 const char md5sum_usage[] =
800         "md5sum [OPTION] [FILE]...\n"
801         "or:    md5sum [OPTION] -c [FILE]"
802 #ifndef BB_FEATURE_TRIVIAL_HELP
803         "\n\nPrint or check MD5 checksums.\n\n"
804         "Options:\n"
805         "With no FILE, or when FILE is -, read standard input.\n\n"
806         "\t-b\tread files in binary mode\n"
807         "\t-c\tcheck MD5 sums against given list\n"
808         "\t-t\tread files in text mode (default)\n"
809         "\t-g\tread a string\n"
810         "\nThe following two options are useful only when verifying checksums:\n"
811         "\t-s,\tdon't output anything, status code shows success\n"
812         "\t-w,\twarn about improperly formated MD5 checksum lines"
813 #endif
814         ;
815 #endif
816
817 #if defined BB_MKDIR
818 const char mkdir_usage[] =
819         "mkdir [OPTION] DIRECTORY..."
820 #ifndef BB_FEATURE_TRIVIAL_HELP
821         "\n\nCreate the DIRECTORY(ies), if they do not already exist\n\n"
822         
823         "Options:\n"
824         "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n"
825         "\t-p\tno error if existing, make parent directories as needed"
826 #endif
827         ;
828 #endif
829
830 #if defined BB_MKFIFO
831 const char mkfifo_usage[] =
832         "mkfifo [OPTIONS] name"
833 #ifndef BB_FEATURE_TRIVIAL_HELP
834         "\n\nCreates a named pipe (identical to 'mknod name p')\n\n"
835         "Options:\n"
836         "\t-m\tcreate the pipe using the specified mode (default a=rw)"
837 #endif
838         ;
839 #endif
840
841 #if defined BB_MKFS_MINIX
842 const char mkfs_minix_usage[] =
843         "mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
844 #ifndef BB_FEATURE_TRIVIAL_HELP
845         "\n\nMake a MINIX filesystem.\n\n"
846         "Options:\n"
847         "\t-c\t\tCheck the device for bad blocks\n"
848         "\t-n [14|30]\tSpecify the maximum length of filenames\n"
849         "\t-i INODES\tSpecify the number of inodes for the filesystem\n"
850         "\t-l FILENAME\tRead the bad blocks list from FILENAME\n"
851         "\t-v\t\tMake a Minix version 2 filesystem"
852 #endif
853         ;
854 #endif
855
856 #if defined BB_MKNOD
857 const char mknod_usage[] =
858         "mknod [OPTIONS] NAME TYPE MAJOR MINOR"
859 #ifndef BB_FEATURE_TRIVIAL_HELP
860         "\n\nCreate a special file (block, character, or pipe).\n\n"
861         "Options:\n"
862         "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n"
863         "TYPEs include:\n"
864         "\tb:\tMake a block (buffered) device.\n"
865         "\tc or u:\tMake a character (un-buffered) device.\n"
866         "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes."
867 #endif
868         ;
869 #endif
870
871 #if defined BB_MKSWAP
872 const char mkswap_usage[] =
873         "mkswap [-c] [-v0|-v1] device [block-count]"
874 #ifndef BB_FEATURE_TRIVIAL_HELP
875         "\n\nPrepare a disk partition to be used as a swap partition.\n\n"
876         "Options:\n" "\t-c\t\tCheck for read-ability.\n"
877         "\t-v0\t\tMake version 0 swap [max 128 Megs].\n"
878         "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n"
879         "\tblock-count\tNumber of block to use (default is entire partition)."
880 #endif
881         ;
882 #endif
883
884 #if defined BB_MKTEMP
885 const char mktemp_usage[] =
886         "mktemp [-q] TEMPLATE"
887 #ifndef BB_FEATURE_TRIVIAL_HELP
888         "\n\nCreates a temporary file with its name based on TEMPLATE.\n"
889         "TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX)."
890 #endif
891         ;
892 #endif
893
894 #if defined BB_MORE
895 const char more_usage[] =
896         "more [FILE ...]"
897 #ifndef BB_FEATURE_TRIVIAL_HELP
898         "\n\nMore is a filter for viewing FILE one screenful at a time."
899 #endif
900         ;
901 #endif
902
903 #if defined BB_MOUNT
904 const char mount_usage[] = 
905         "mount [flags] device directory [-o options,more-options]"
906 #ifndef BB_FEATURE_TRIVIAL_HELP
907         "\n\nMount a filesystem\n\n"
908         "Flags:\n" 
909         "\t-a:\t\tMount all filesystems in fstab.\n"
910 #ifdef BB_MTAB
911         "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n"
912         "\t-n:\t\tDon't write a mount table entry.\n"
913 #endif
914         "\t-o option:\tOne of many filesystem options, listed below.\n"
915         "\t-r:\t\tMount the filesystem read-only.\n"
916         "\t-t fs-type:\tSpecify the filesystem type.\n"
917         "\t-w:\t\tMount for reading and writing (default).\n"
918         "\n"
919         "Options for use with the \"-o\" flag:\n"
920         "\tasync/sync:\tWrites are asynchronous / synchronous.\n"
921         "\tatime/noatime:\tEnable / disable updates to inode access times.\n"
922         "\tdev/nodev:\tAllow use of special device files / disallow them.\n"
923         "\texec/noexec:\tAllow use of executable files / disallow them.\n"
924 #if defined BB_FEATURE_MOUNT_LOOP
925         "\tloop:\t\tMounts a file via loop device.\n"
926 #endif
927         "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n"
928         "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n"
929         "\tro/rw:\t\tMount for read-only / read-write.\n"
930         "\nThere are EVEN MORE flags that are specific to each filesystem.\n"
931         "You'll have to see the written documentation for those."
932 #endif
933         ;
934 #endif
935
936 #if defined BB_MT
937 const char mt_usage[] =
938         "mt [-f device] opcode value"
939 #ifndef BB_FEATURE_TRIVIAL_HELP
940         "\n\nControl magnetic tape drive operation\n"
941         "\nAvailable Opcodes:\n\n"
942         "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n"
943         "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n"
944         "ras3 reset retension rew rewoffline seek setblk setdensity\n"
945         "setpart tell unload unlock weof wset"
946 #endif
947         ;
948 #endif
949
950 #if defined BB_CP_MV
951 const char mv_usage[] =
952         "mv SOURCE DEST\n"
953         "   or: mv SOURCE... DIRECTORY"
954 #ifndef BB_FEATURE_TRIVIAL_HELP
955         "\n\nRename SOURCE to DEST, or move SOURCE(s) to DIRECTORY."
956 #endif
957         ;
958 #endif
959
960 #if defined BB_NC
961 const char nc_usage[] =
962         "nc [IP] [port]" 
963 #ifndef BB_FEATURE_TRIVIAL_HELP
964         "\n\nNetcat opens a pipe to IP:port"
965 #endif
966         ;
967 #endif
968
969 #if defined BB_NSLOOKUP
970 const char nslookup_usage[] =
971         "nslookup [HOST]"
972 #ifndef BB_FEATURE_TRIVIAL_HELP
973         "\n\nQueries the nameserver for the IP address of the given HOST"
974 #endif
975 ;
976 #endif
977
978 #if defined BB_PING
979 #if defined BB_FEATURE_SIMPLE_PING
980 const char ping_usage[] =
981         "ping host"
982 #ifndef BB_FEATURE_TRIVIAL_HELP
983         "\n\nSend ICMP ECHO_REQUEST packets to network hosts"
984 #endif
985         ;
986 #else /* ! defined BB_FEATURE_SIMPLE_PING */
987 const char ping_usage[] =
988         "ping [OPTION]... host"
989 #ifndef BB_FEATURE_TRIVIAL_HELP
990         "\n\nSend ICMP ECHO_REQUEST packets to network hosts.\n\n"
991         "Options:\n"
992         "\t-c COUNT\tSend only COUNT pings.\n"
993         "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56).\n"
994         "\t-q\t\tQuiet mode, only displays output at start\n"
995         "\t\t\tand when finished."
996 #endif
997         ;
998 #endif
999 #endif
1000
1001 #if defined BB_POWEROFF
1002 const char poweroff_usage[] =
1003         "poweroff"
1004 #ifndef BB_FEATURE_TRIVIAL_HELP
1005         "\n\nHalt the system and request that the kernel shut off the power."
1006 #endif
1007         ;
1008 #endif
1009
1010 #if defined BB_PRINTF
1011 const char printf_usage[] =
1012         "printf FORMAT [ARGUMENT...]"
1013 #ifndef BB_FEATURE_TRIVIAL_HELP
1014         "\n\nFormats and prints ARGUMENT(s) according to FORMAT,\n"
1015         "Where FORMAT controls the output exactly as in C printf."
1016 #endif
1017         ;
1018 #endif
1019
1020 #if defined BB_PS
1021 const char ps_usage[] =
1022         "ps"
1023 #ifndef BB_FEATURE_TRIVIAL_HELP
1024         "\n\nReport process status\n"
1025         "\nThis version of ps accepts no options."
1026 #endif
1027         ;
1028 #endif
1029
1030 #if defined BB_PWD
1031 const char pwd_usage[] =
1032         "pwd"
1033 #ifndef BB_FEATURE_TRIVIAL_HELP
1034         "\n\nPrint the full filename of the current working directory."
1035 #endif
1036         ;
1037 #endif
1038
1039 #if defined BB_RDATE
1040 const char rdate_usage[] =
1041         "rdate [OPTION] HOST"
1042 #ifndef BB_FEATURE_TRIVIAL_HELP
1043         "\n\nGet and possibly set the system date and time from a remote HOST.\n"
1044         "Options:\n"
1045         "\t-s\tSet the system date and time (default).\n"
1046         "\t-p\tPrint the date and time."
1047 #endif
1048         ;
1049 #endif
1050
1051 #if defined BB_READLINK
1052 const char readlink_usage[] =
1053         "readlink"
1054 #ifndef BB_FEATURE_TRIVIAL_HELP
1055         "\n\nRead a symbolic link."
1056 #endif
1057         ;
1058 #endif
1059
1060 #if defined BB_REBOOT
1061 const char reboot_usage[] =
1062         "reboot"
1063 #ifndef BB_FEATURE_TRIVIAL_HELP
1064         "\n\nReboot the system."
1065 #endif
1066         ;
1067 #endif
1068         
1069 #if defined BB_RENICE
1070 const char renice_usage[] =
1071         "renice priority pid [pid ...]"
1072 #ifndef BB_FEATURE_TRIVIAL_HELP
1073         "\n\nChanges priority of running processes. Allowed priorities range\n"
1074         "from 20 (the process runs only when nothing else is running) to 0\n"
1075         "(default priority) to -20 (almost nothing else ever gets to run)."
1076 #endif
1077         ;
1078 #endif
1079
1080
1081 #if defined BB_RESET
1082 const char reset_usage[] =
1083         "reset"
1084 #ifndef BB_FEATURE_TRIVIAL_HELP
1085         "\n\nResets the screen."
1086 #endif
1087         ;
1088 #endif
1089
1090 #if defined BB_RM
1091 const char rm_usage[] =
1092         "rm [OPTION]... FILE..."
1093 #ifndef BB_FEATURE_TRIVIAL_HELP
1094         "\n\nRemove (unlink) the FILE(s).  You may use '--' to\n"
1095         "indicate that all following arguments are non-options.\n\n"
1096         "Options:\n"
1097         "\t-f\t\tremove existing destinations, never prompt\n"
1098         "\t-r or -R\tremove the contents of directories recursively"
1099 #endif
1100         ;
1101 #endif
1102
1103 #if defined BB_RMDIR
1104 const char rmdir_usage[] =
1105         "rmdir [OPTION]... DIRECTORY..."
1106 #ifndef BB_FEATURE_TRIVIAL_HELP
1107         "\n\nRemove the DIRECTORY(ies), if they are empty."
1108 #endif
1109         ;
1110 #endif
1111
1112 #if defined BB_RMMOD
1113 const char rmmod_usage[] =
1114         "rmmod [OPTION]... [MODULE]..."
1115 #ifndef BB_FEATURE_TRIVIAL_HELP
1116         "\n\nUnloads the specified kernel modules from the kernel.\n\n"
1117         "Options:\n" 
1118         "\t-a\tTry to remove all unused kernel modules."
1119 #endif
1120         ;
1121 #endif
1122
1123 #if defined BB_RPMUNPACK
1124 const char rpmunpack_usage[] =
1125         "rpmunpack < package.rpm | gunzip | cpio -idmuv"
1126 #ifndef BB_FEATURE_TRIVIAL_HELP
1127         "\n\nExtracts an rpm archive."
1128 #endif
1129         ;
1130 #endif
1131
1132 #if defined BB_SED
1133 const char sed_usage[] =
1134         "sed [-Vhnef] pattern [files...]"
1135 #ifndef BB_FEATURE_TRIVIAL_HELP
1136         "\n\n"
1137         "-n\t\tsuppress automatic printing of pattern space\n"
1138         "-e script\tadd the script to the commands to be executed\n"
1139         "-f scriptfile\tadd the contents of script-file to the commands to be executed\n"
1140         "-h\t\tdisplay this help message\n"
1141         "\n"
1142         "If no -e or -f is given, the first non-option argument is taken as the\n"
1143         "sed script to interpret. All remaining arguments are names of input\n"
1144         "files; if no input files are specified, then the standard input is read."
1145 #endif
1146         ;
1147 #endif
1148
1149 #if defined BB_SETKEYCODES
1150 const char setkeycodes_usage[] =
1151         "setkeycodes SCANCODE KEYCODE ..."
1152 #ifndef BB_FEATURE_TRIVIAL_HELP
1153         "\n\nSet entries into the kernel's scancode-to-keycode map,\n"
1154         "allowing unusual keyboards to generate usable keycodes.\n\n" 
1155         "SCANCODE may be either xx or e0xx (hexadecimal),\n"
1156         "and KEYCODE is given in decimal"
1157 #endif
1158         ;
1159 #endif
1160
1161 #if defined BB_SH
1162 const char shell_usage[] =
1163         "sh [FILE]...\n"
1164         "   or: sh -c command [args]..."
1165 #ifndef BB_FEATURE_TRIVIAL_HELP
1166         "\n\nlash: The BusyBox command interpreter (shell)."
1167 #endif
1168         ;
1169 #endif
1170
1171 #if defined BB_SLEEP
1172 const char sleep_usage[] =
1173         "sleep N" 
1174 #ifndef BB_FEATURE_TRIVIAL_HELP
1175         "\n\nPause for N seconds."
1176 #endif
1177         ;
1178 #endif
1179
1180 #if defined BB_SORT
1181 const char sort_usage[] =
1182         "sort [-n]"
1183 #ifdef BB_FEATURE_SORT_REVERSE
1184         " [-r]"
1185 #endif
1186         " [FILE]..."
1187 #ifndef BB_FEATURE_TRIVIAL_HELP
1188         "\n\nSorts lines of text in the specified files"
1189 #endif
1190         ;
1191 #endif
1192
1193 #if defined BB_SWAPONOFF
1194 const char swapoff_usage[] =
1195         "swapoff [OPTION] [device]"
1196 #ifndef BB_FEATURE_TRIVIAL_HELP
1197         "\n\nStop swapping virtual memory pages on the given device.\n\n"
1198         "Options:\n"
1199         "\t-a\tStop swapping on all swap devices"
1200 #endif
1201         ;
1202 #endif
1203
1204 #if defined BB_SWAPONOFF
1205 const char swapon_usage[] =
1206         "swapon [OPTION] [device]"
1207 #ifndef BB_FEATURE_TRIVIAL_HELP
1208         "\n\nStart swapping virtual memory pages on the given device.\n\n"
1209         "Options:\n"
1210         "\t-a\tStart swapping on all swap devices"
1211 #endif
1212         ;
1213 #endif
1214
1215 #if defined BB_SYNC
1216 const char sync_usage[] =
1217         "sync"
1218 #ifndef BB_FEATURE_TRIVIAL_HELP
1219         "\n\nWrite all buffered filesystem blocks to disk."
1220 #endif
1221         ;
1222 #endif
1223
1224 #if defined BB_SYSLOGD
1225 const char syslogd_usage[] =
1226         "syslogd [OPTION]..."
1227 #ifndef BB_FEATURE_TRIVIAL_HELP
1228         "\n\nLinux system and kernel (provides klogd) logging utility.\n"
1229         "Note that this version of syslogd/klogd ignores /etc/syslog.conf.\n\n"
1230         "Options:\n"
1231         "\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n"
1232         "\t-n\t\tRun as a foreground process\n"
1233 #ifdef BB_FEATURE_KLOGD
1234         "\t-K\t\tDo not start up the klogd process\n"
1235 #endif
1236         "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)"
1237 #ifdef BB_FEATURE_REMOTE_LOG
1238         "\n\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
1239         "\t-L\t\tLog locally as well as network logging (default is network only)"
1240 #endif
1241 #endif
1242         ;
1243 #endif
1244
1245 #if defined BB_TAIL
1246 const char tail_usage[] =
1247         "tail [OPTION]... [FILE]..."
1248 #ifndef BB_FEATURE_TRIVIAL_HELP
1249         "\n\nPrint last 10 lines of each FILE to standard output.\n"
1250         "With more than one FILE, precede each with a header giving the\n"
1251         "file name. With no FILE, or when FILE is -, read standard input.\n\n"
1252         "Options:\n"
1253 #ifndef BB_FEATURE_SIMPLE_TAIL
1254         "\t-c N[kbm]\toutput the last N bytes\n"
1255 #endif
1256         "\t-n N[kbm]\tprint last N lines instead of last 10\n"
1257         "\t-f\t\toutput data as the file grows"
1258 #ifndef BB_FEATURE_SIMPLE_TAIL
1259         "\n\t-q\t\tnever output headers giving file names\n"
1260         "\t-s SEC\t\twait SEC seconds between reads with -f\n"
1261         "\t-v\t\talways output headers giving file names\n\n"
1262         "If the first character of N (bytes or lines) is a `+', output begins with \n"
1263         "the Nth item from the start of each file, otherwise, print the last N items\n"
1264         "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)."
1265 //#else
1266 //      "\nIf the first character of N (bytes or lines) is a `+', output begins with \n"
1267 //      "the Nth item from the start of each file."
1268 #endif
1269 #endif
1270         ;
1271 #endif
1272
1273 #if defined BB_TAR
1274 const char tar_usage[] =
1275 #ifdef BB_FEATURE_TAR_CREATE
1276         "tar -[cxtvO] "
1277 #else
1278         "tar -[xtvO] "
1279 #endif
1280 #if defined BB_FEATURE_TAR_EXCLUDE
1281         "[--exclude File] "
1282         "[-X File]"
1283 #endif
1284         "[-f tarFile] [FILE(s)] ..."
1285 #ifndef BB_FEATURE_TRIVIAL_HELP
1286         "\n\nCreate, extract, or list files from a tar file.\n\n"
1287         "Main operation mode:\n"
1288 #ifdef BB_FEATURE_TAR_CREATE
1289         "\tc\t\tcreate\n"
1290 #endif
1291         "\tx\t\textract\n"
1292         "\tt\t\tlist\n"
1293         "\nFile selection:\n"
1294         "\tf\t\tname of tarfile or \"-\" for stdin\n"
1295         "\tO\t\textract to stdout\n"
1296 #if defined BB_FEATURE_TAR_EXCLUDE
1297         "\texclude\t\tfile to exclude\n"
1298         "\tX\t\tfile with names to exclude\n"
1299 #endif
1300         "\nInformative output:\n"
1301         "\tv\t\tverbosely list files processed"
1302 #endif
1303         ;
1304 #endif
1305
1306 #if defined BB_TEE
1307 const char tee_usage[] =
1308         "tee [OPTION]... [FILE]..."
1309 #ifndef BB_FEATURE_TRIVIAL_HELP
1310         "\n\nCopy standard input to each FILE, and also to standard output.\n\n"
1311         "Options:\n" "\t-a\tappend to the given FILEs, do not overwrite"
1312 #endif
1313         ;
1314 #endif
1315
1316 #if defined BB_TELNET
1317 const char telnet_usage[] =
1318         "telnet host [port]"
1319 #ifndef BB_FEATURE_TRIVIAL_HELP
1320         "\n\nTelnet is used to establish interactive communication with another\n"
1321         "computer over a network using the TELNET protocol."
1322 #endif
1323         ;
1324 #endif
1325
1326 #if defined BB_TEST
1327 const char test_usage[] =
1328         "test EXPRESSION\n"
1329         "or   [ EXPRESSION ]"
1330 #ifndef BB_FEATURE_TRIVIAL_HELP
1331         "\n\nChecks file types and compares values returning an exit\n"
1332         "code determined by the value of EXPRESSION."
1333 #endif
1334         ;
1335 #endif
1336
1337 #if defined BB_TOUCH
1338 const char touch_usage[] =
1339         "touch [-c] file [file ...]"
1340 #ifndef BB_FEATURE_TRIVIAL_HELP
1341         "\n\nUpdate the last-modified date on the given file[s].\n\n"
1342         "Options:\n"
1343         "\t-c\tDo not create any files"
1344 #endif
1345         ;
1346 #endif
1347
1348 #if defined BB_TR
1349 const char tr_usage[] =
1350         "tr [-cds] STRING1 [STRING2]"
1351 #ifndef BB_FEATURE_TRIVIAL_HELP
1352         "\n\nTranslate, squeeze, and/or delete characters from\n"
1353         "standard input, writing to standard output.\n\n"
1354         "Options:\n"
1355         "\t-c\ttake complement of STRING1\n"
1356         "\t-d\tdelete input characters coded STRING1\n"
1357         "\t-s\tsqueeze multiple output characters of STRING2 into one character"
1358 #endif
1359         ;
1360 #endif
1361
1362 #if defined BB_TRUE_FALSE
1363 const char true_usage[] =
1364         "true"
1365 #ifndef BB_FEATURE_TRIVIAL_HELP
1366         "\n\nReturn an exit code of TRUE (0)."
1367 #endif
1368         ;
1369 #endif
1370
1371 #if defined BB_TTY
1372 const char tty_usage[] =
1373         "tty"
1374 #ifndef BB_FEATURE_TRIVIAL_HELP
1375         "\n\nPrint the file name of the terminal connected to standard input.\n\n"
1376         "Options:\n"
1377         "\t-s\tprint nothing, only return an exit status"
1378 #endif
1379         ;
1380 #endif
1381
1382 #if defined BB_UMOUNT
1383 const char umount_usage[] =
1384         "umount [flags] filesystem|directory"
1385 #ifndef BB_FEATURE_TRIVIAL_HELP
1386         "\nUnmount file systems\n"
1387         "\nFlags:\n" "\t-a:\tUnmount all file systems"
1388 #ifdef BB_MTAB
1389         " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
1390 #else
1391         "\n"
1392 #endif
1393         "\t-r:\tTry to remount devices as read-only if mount is busy"
1394 #if defined BB_FEATURE_MOUNT_FORCE
1395         "\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)"
1396 #endif
1397 #if defined BB_FEATURE_MOUNT_LOOP
1398         "\n\t-l:\tDo not free loop device (if a loop device has been used)"
1399 #endif
1400 #endif
1401         ;
1402 #endif
1403
1404 #if defined BB_UNAME
1405 const char uname_usage[] =
1406         "uname [OPTION]..."
1407 #ifndef BB_FEATURE_TRIVIAL_HELP
1408         "\n\nPrint certain system information.  With no OPTION, same as -s.\n\n"
1409         "Options:\n"
1410         "\t-a\tprint all information\n"
1411         "\t-m\tthe machine (hardware) type\n"
1412         "\t-n\tprint the machine's network node hostname\n"
1413         "\t-r\tprint the operating system release\n"
1414         "\t-s\tprint the operating system name\n"
1415
1416         "\t-p\tprint the host processor type\n"
1417         "\t-v\tprint the operating system version"
1418 #endif
1419         ;
1420 #endif
1421
1422 #if defined BB_UNIQ
1423 const char uniq_usage[] =
1424         "uniq [OPTION]... [INPUT [OUTPUT]]"
1425 #ifndef BB_FEATURE_TRIVIAL_HELP
1426         "\n\nDiscard all but one of successive identical lines from INPUT\n"
1427         "(or standard input), writing to OUTPUT (or standard output).\n"
1428         "Options:\n"
1429         "\t-c\tprefix lines by the number of occurrences\n"
1430         "\t-d\tonly print duplicate lines\n"
1431         "\t-u\tonly print unique lines"
1432 #endif
1433         ;
1434 #endif
1435
1436 #if defined BB_UNIX2DOS
1437 const char unix2dos_usage[] =
1438         "unix2dos < unixfile > dosfile"
1439 #ifndef BB_FEATURE_TRIVIAL_HELP
1440         "\n\nConverts a text file from unix format to dos format."
1441 #endif
1442         ;
1443 #endif
1444
1445 #if defined BB_UPDATE
1446 const char update_usage[] =
1447         "update [options]"
1448 #ifndef BB_FEATURE_TRIVIAL_HELP
1449         "\n\nPeriodically flushes filesystem buffers.\n\n"
1450         "Options:\n"
1451         "\t-S\tforce use of sync(2) instead of flushing\n"
1452         "\t-s SECS\tcall sync this often (default 30)\n"
1453         "\t-f SECS\tflush some buffers this often (default 5)"
1454 #endif
1455         ;
1456 #endif
1457
1458 #if defined BB_UPTIME
1459 const char uptime_usage[] =
1460         "uptime"
1461 #ifndef BB_FEATURE_TRIVIAL_HELP
1462         "\n\nDisplay the time since the last boot."
1463 #endif
1464         ;
1465 #endif
1466
1467 #if defined BB_USLEEP
1468 const char usleep_usage[] =
1469         "usleep N" 
1470 #ifndef BB_FEATURE_TRIVIAL_HELP
1471         "\n\nPause for N microseconds."
1472 #endif
1473         ;
1474 #endif
1475
1476 #if defined BB_UUDECODE
1477 const char uudecode_usage[] =
1478         "uudecode [FILE]..."
1479 #ifndef BB_FEATURE_TRIVIAL_HELP
1480         "\n\nUudecode a file that is uuencoded.\n\n"
1481         "Options:\n"
1482         "\t-o FILE\tdirect output to FILE"
1483 #endif
1484         ;
1485 #endif
1486
1487 #if defined BB_UUENCODE
1488 const char uuencode_usage[] =
1489         "uuencode [OPTION] [INFILE] REMOTEFILE"
1490 #ifndef BB_FEATURE_TRIVIAL_HELP
1491         "\n\nUuencode a file.\n\n"
1492         "Options:\n"
1493         "\t-m\tuse base64 encoding as of RFC1521"
1494 #endif
1495         ;
1496 #endif
1497
1498 #if defined BB_WATCHDOG
1499 const char watchdog_usage[] =
1500         "watchdog dev\n"
1501 #ifndef BB_FEATURE_TRIVIAL_HELP
1502         "\nPeriodically write to watchdog device \"dev\".\n"
1503 #endif
1504         ;
1505 #endif
1506
1507 #if defined BB_WC
1508 const char wc_usage[] =
1509         "wc [OPTION]... [FILE]..."
1510 #ifndef BB_FEATURE_TRIVIAL_HELP
1511         "\n\nPrint line, word, and byte counts for each FILE, and a total line if\n"
1512         "more than one FILE is specified.  With no FILE, read standard input.\n\n"
1513         "Options:\n"
1514         "\t-c\tprint the byte counts\n"
1515         "\t-l\tprint the newline counts\n"
1516
1517         "\t-L\tprint the length of the longest line\n"
1518         "\t-w\tprint the word counts"
1519 #endif
1520         ;
1521 #endif
1522
1523 #if defined BB_WGET
1524 const char wget_usage[] = "wget [-c] [-O file] url"
1525 #ifndef BB_FEATURE_TRIVIAL_HELP
1526         "\n\nwget retrieves files via HTTP\n\n"
1527         "Options:\n"
1528         "\t-c\tcontinue retrieval of aborted transfers\n"
1529         "\t-O\tsave to filename ('-' for stdout)"
1530 #endif
1531         ;
1532 #endif
1533
1534 #if defined BB_WHICH
1535 const char which_usage[] =
1536         "which [COMMAND ...]"
1537 #ifndef BB_FEATURE_TRIVIAL_HELP
1538         "\n\nLocates a COMMAND."
1539 #endif
1540         ;
1541 #endif
1542
1543 #if defined BB_WHOAMI
1544 const char whoami_usage[] =
1545         "whoami"
1546 #ifndef BB_FEATURE_TRIVIAL_HELP
1547         "\n\nPrints the user name associated with the current effective user id."
1548 #endif
1549         ;
1550 #endif
1551
1552 #if defined BB_XARGS
1553 const char xargs_usage[] = "xargs [COMMAND] [ARGS...]"
1554 #ifndef BB_FEATURE_TRIVIAL_HELP
1555         "\n\nExecutes COMMAND on every item given by standard input." 
1556 #endif
1557         ;
1558 #endif
1559
1560 #if defined BB_YES
1561 const char yes_usage[] =
1562         "yes [OPTION]... [STRING]..."
1563 #ifndef BB_FEATURE_TRIVIAL_HELP
1564         "\n\nRepeatedly outputs a line with all specified STRING(s), or `y'."
1565 #endif
1566         ;
1567 #endif
1568