blob: b23f2714126d34fb54a39a5413ba9c1c4a55abc1 [file] [log] [blame]
Matt Kraaibf181b92000-07-16 20:57:15 +00001#include "internal.h"
2
3#if defined BB_AR
4const char ar_usage[] =
Glenn L McGrath06aeb6c2000-08-25 03:50:10 +00005 "ar [[-ov] -tpv archive] filenames \n"
Matt Kraaibf181b92000-07-16 20:57:15 +00006#ifndef BB_FEATURE_TRIVIAL_HELP
7 "\nExtract or list files from an ar archive.\n\n"
8 "Options:\n"
Glenn L McGrath06aeb6c2000-08-25 03:50:10 +00009 "\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"
Matt Kraaibf181b92000-07-16 20:57:15 +000014#endif
15 ;
16#endif
17
18#if defined BB_BASENAME
19const 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"
24#endif
25 ;
26#endif
27
28#if defined BB_CAT
29const char cat_usage[] =
30 "cat [FILE]...\n"
31#ifndef BB_FEATURE_TRIVIAL_HELP
32 "\nConcatenates FILE(s) and prints them to stdout.\n"
33#endif
34 ;
35#endif
36
37#if defined BB_CHMOD_CHOWN_CHGRP
38const 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"
43#endif
44 ;
45#endif
46
47#if defined BB_CHMOD_CHOWN_CHGRP
48const 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"
54#endif
55 ;
56#endif
57
58#if defined BB_CHMOD_CHOWN_CHGRP
59const 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"
64#endif
65 ;
66#endif
67
68#if defined BB_CHROOT
69const char chroot_usage[] =
70 "chroot NEWROOT [COMMAND...]\n"
71#ifndef BB_FEATURE_TRIVIAL_HELP
72 "\nRun COMMAND with root directory set to NEWROOT.\n"
73#endif
74 ;
75#endif
76
77#if defined BB_CHVT
78const char chvt_usage[] =
79 "chvt N\n"
80#ifndef BB_FEATURE_TRIVIAL_HELP
81 "\nChanges the foreground virtual terminal to /dev/ttyN\n"
82#endif
83 ;
84#endif
85
Matt Kraai2f46b662000-07-19 18:01:00 +000086#if defined BB_CLEAR
87const char clear_usage[] =
88 "clear\n"
89#ifndef BB_FEATURE_TRIVIAL_HELP
90 "\nClear screen.\n"
91#endif
92 ;
93#endif
94
Matt Kraaibf181b92000-07-16 20:57:15 +000095#if defined BB_CP_MV
96const 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"
101 "\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"
107#endif
108 ;
109#endif
110
111#if defined BB_CUT
112const 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"
116 "Options:\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"
Pavel Roskin0010ee42000-07-21 15:10:57 +0000120 "\t-s\tOutput only the lines containing delimiter\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000121 "\t-f N\tPrint only these fields\n"
122 "\t-n\tIgnored\n"
123#endif
124 ;
125#endif
126
127#if defined BB_DATE
128const 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"
136#endif
137 ;
138#endif
139
140#if defined BB_DC
141const 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"
147#endif
148 ;
149#endif
150
151#if defined BB_DD
152const 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"
162 "\n"
163 "Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)\n"
164#endif
165 ;
166#endif
167
168#if defined BB_DEALLOCVT
169const char deallocvt_usage[] =
170 "deallocvt N\n"
171#ifndef BB_FEATURE_TRIVIAL_HELP
172 "\nDeallocate unused virtual terminal /dev/ttyN\n"
173#endif
174 ;
175#endif
176
177#if defined BB_DF
178const char df_usage[] =
179 "df [filesystem ...]\n"
180#ifndef BB_FEATURE_TRIVIAL_HELP
181 "\nPrint the filesystem space used and space available.\n"
182#endif
183 ;
184#endif
185
186#if defined BB_DIRNAME
187const char dirname_usage[] =
188 "dirname [FILENAME ...]\n"
189#ifndef BB_FEATURE_TRIVIAL_HELP
190 "\nStrips non-directory suffix from FILENAME\n"
191#endif
192 ;
193#endif
194
195#if defined BB_DMESG
196const 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"
200 "Options:\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"
204#endif
205 ;
206#endif
207
208#if defined BB_DU
209const 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"
214 "Options:\n"
215 "\t-l\tcount sizes many times if hard linked\n"
216 "\t-s\tdisplay only a total for each argument\n"
217#endif
218 ;
219#endif
220
221#if defined BB_DUMPKMAP
222const char dumpkmap_usage[] =
Eric Andersen18a10142000-09-01 16:12:57 +0000223 "dumpkmap > keymap\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000224#ifndef BB_FEATURE_TRIVIAL_HELP
225 "\nPrints out a binary keyboard translation table to standard input.\n"
226#endif
227 ;
228#endif
229
230#if defined BB_DUTMP
231const char dutmp_usage[] =
232 "dutmp [FILE]\n"
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"
236#endif
237 ;
238#endif
239
240#if defined BB_ECHO
241const char echo_usage[] =
242 "echo [-neE] [ARG ...]\n"
243#ifndef BB_FEATURE_TRIVIAL_HELP
244 "\nPrints the specified ARGs to stdout\n\n"
245 "Options:\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"
249#endif
250 ;
251#endif
252
Eric Andersen1b355eb2000-09-05 17:37:48 +0000253#if defined BB_EXPR
254const char expr_usage[] =
255 "expr EXPRESSION\n"
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"
285
286#endif
287 ;
288#endif
289
290
Matt Kraai2f46b662000-07-19 18:01:00 +0000291#if defined BB_TRUE_FALSE
292const char false_usage[] =
293 "false\n"
294#ifndef BB_FEATURE_TRIVIAL_HELP
295 "\nReturn an exit code of FALSE (1).\n"
296#endif
297 ;
298#endif
299
Matt Kraaibf181b92000-07-16 20:57:15 +0000300#if defined BB_FDFLUSH
301const char fdflush_usage[] =
302 "fdflush DEVICE\n"
303#ifndef BB_FEATURE_TRIVIAL_HELP
304 "\nForces floppy disk drive to detect disk change\n"
305#endif
306 ;
307#endif
308
309#if defined BB_FIND
310const 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"
319#endif
320 ;
321#endif
322
323#if defined BB_FREE
324const char free_usage[] =
325 "free\n"
326#ifndef BB_FEATURE_TRIVIAL_HELP
327 "\nDisplays the amount of free and used system memory\n"
328#endif
329 ;
330#endif
331
332#if defined BB_FREERAMDISK
333const char freeramdisk_usage[] =
334 "freeramdisk DEVICE\n"
335#ifndef BB_FEATURE_TRIVIAL_HELP
336 "\nFrees all memory used by the specified ramdisk.\n"
337#endif
338 ;
339#endif
340
341#if defined BB_FSCK_MINIX
342const 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"
346 "Options:\n"
347 "\t-l\tLists all filenames\n"
348 "\t-r\tPerform interactive repairs\n"
349 "\t-a\tPerform automatic repairs\n"
350 "\t-v\tverbose\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"
354#endif
355 ;
356#endif
357
358#if defined BB_GREP
359const 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"
363 "Options:\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"
371#endif
372 ;
373#endif
374
375#if defined BB_GUNZIP
376const 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"
380 "Options:\n"
381 "\t-c\tWrite output to standard output\n"
382 "\t-t\tTest compressed file integrity\n"
383#endif
384 ;
385#endif
386
387#if defined BB_GZIP
388const 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"
393 "Options:\n"
394 "\t-c\tWrite output to standard output instead of FILE.gz\n"
395#endif
396 ;
397#endif
398
Matt Kraai2f46b662000-07-19 18:01:00 +0000399#if defined BB_HALT
400const char halt_usage[] =
401 "halt\n"
402#ifndef BB_FEATURE_TRIVIAL_HELP
403 "\nHalt the system.\n"
404#endif
405 ;
Matt Kraai86905722000-07-19 18:20:02 +0000406#endif
Matt Kraai2f46b662000-07-19 18:01:00 +0000407
Matt Kraaibf181b92000-07-16 20:57:15 +0000408#if defined BB_HEAD
409const 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"
415
416 "Options:\n" "\t-n NUM\t\tPrint first NUM lines instead of first 10\n"
417#endif
418 ;
419#endif
420
Matt Kraai2f46b662000-07-19 18:01:00 +0000421#if defined BB_HOSTID
422const char hostid_usage[] =
423 "hostid\n"
424#ifndef BB_FEATURE_TRIVIAL_HELP
425 "\nPrint out a unique 32-bit identifier for the machine.\n"
426#endif
427 ;
428#endif
429
Matt Kraaibf181b92000-07-16 20:57:15 +0000430#if defined BB_HOSTNAME
431const 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"
436 "Options:\n"
437 "\t-s\t\tShort\n"
438
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"
442#endif
443 ;
444#endif
445
446#if defined BB_ID
447const 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"
451 "Options:\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"
455#endif
456 ;
457#endif
458
459#if defined BB_INSMOD
460const 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"
464 "Options:\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"
468#endif
469 ;
470#endif
471
472#if defined BB_KILL
473const 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"
478#endif
479 ;
480#endif
481
482#if defined BB_KILLALL
483const 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"
488#endif
489 ;
490#endif
491
492#if defined BB_LENGTH
493const char length_usage[] =
494 "length STRING\n"
495#ifndef BB_FEATURE_TRIVIAL_HELP
496 "\nPrints out the length of the specified STRING.\n"
497#endif
498 ;
499#endif
500
501#if defined BB_LN
502const 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"
507 "Options:\n"
508 "\t-s\tmake symbolic links instead of hard links\n"
509
510 "\t-f\tremove existing destination files\n"
511 "\t-n\tno dereference symlinks - treat like normal file\n"
512#endif
513 ;
514#endif
515
516#if defined BB_LOADACM
517const char loadacm_usage[] =
Eric Andersen18a10142000-09-01 16:12:57 +0000518 "loadacm < mapfile\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000519#ifndef BB_FEATURE_TRIVIAL_HELP
520 "\nLoads an acm from standard input.\n"
521#endif
522 ;
523#endif
524
525#if defined BB_LOADFONT
526const char loadfont_usage[] =
Eric Andersen18a10142000-09-01 16:12:57 +0000527 "loadfont < font\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000528#ifndef BB_FEATURE_TRIVIAL_HELP
529 "Loads a console font from standard input.\n"
530#endif
531 ;
532#endif
533
534#if defined BB_LOADKMAP
535const char loadkmap_usage[] =
Eric Andersen18a10142000-09-01 16:12:57 +0000536 "loadkmap < keymap\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000537#ifndef BB_FEATURE_TRIVIAL_HELP
538 "\nLoads a binary keyboard translation table from standard input.\n"
539#endif
540 ;
541#endif
542
543#if defined BB_LOGGER
544const 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"
548 "Options:\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"
551
552 "\t-p\tEnter the message with the specified priority.\n"
553 "\t\tThis may be numerical or a ``facility.level'' pair.\n"
554#endif
555 ;
556#endif
557
558#if defined BB_LOGNAME
559const char logname_usage[] =
560 "logname\n"
561#ifndef BB_FEATURE_TRIVIAL_HELP
562 "\nPrint the name of the current user.\n"
563#endif
564 ;
565#endif
566
567#if defined BB_LS
568const char ls_usage[] =
Eric Andersen11c65522000-09-07 17:24:47 +0000569 "ls [-1Aa"
Matt Kraaibf181b92000-07-16 20:57:15 +0000570#ifdef BB_FEATURE_LS_TIMESTAMPS
571 "c"
572#endif
Eric Andersen11c65522000-09-07 17:24:47 +0000573 "Cd"
Matt Kraaibf181b92000-07-16 20:57:15 +0000574#ifdef BB_FEATURE_LS_TIMESTAMPS
575 "e"
576#endif
Matt Kraaibf181b92000-07-16 20:57:15 +0000577#ifdef BB_FEATURE_LS_FILETYPES
578 "F"
579#endif
Eric Andersen11c65522000-09-07 17:24:47 +0000580 "iln"
581#ifdef BB_FEATURE_LS_FILETYPES
582 "p"
583#endif
Matt Kraaibf181b92000-07-16 20:57:15 +0000584#ifdef BB_FEATURE_LS_RECURSIVE
585 "R"
586#endif
Eric Andersen11c65522000-09-07 17:24:47 +0000587#ifdef BB_FEATURE_LS_SORTFILES
588 "rS"
589#endif
590 "s"
591#ifdef BB_FEATURE_AUTOWIDTH
592 "T"
593#endif
594#ifdef BB_FEATURE_LS_TIMESTAMPS
595 "tu"
596#endif
597#ifdef BB_FEATURE_LS_SORTFILES
598 "v"
599#endif
600#ifdef BB_FEATURE_AUTOWIDTH
601 "w"
602#endif
603 "x"
604#ifdef BB_FEATURE_LS_SORTFILES
605 "X"
606#endif
Matt Kraaibf181b92000-07-16 20:57:15 +0000607 "] [filenames...]\n"
608#ifndef BB_FEATURE_TRIVIAL_HELP
609 "\nList directory contents\n\n"
610 "Options:\n"
Eric Andersen11c65522000-09-07 17:24:47 +0000611 "\t-1\tlist files in a single column\n"
612 "\t-A\tdo not list implied . and ..\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000613 "\t-a\tdo not hide entries starting with .\n"
Eric Andersen11c65522000-09-07 17:24:47 +0000614 "\t-C\tlist entries by columns\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000615#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"
618#endif
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"
622#endif
Eric Andersen11c65522000-09-07 17:24:47 +0000623#ifdef BB_FEATURE_LS_FILETYPES
624 "\t-F\tappend indicator (one of */=@|) to entries\n"
625#endif
626 "\t-i\tlist the i-node for each file\n"
Matt Kraaibf181b92000-07-16 20:57:15 +0000627 "\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"
631#endif
Matt Kraaibf181b92000-07-16 20:57:15 +0000632#ifdef BB_FEATURE_LS_RECURSIVE
633 "\t-R\tlist subdirectories recursively\n"
634#endif
Eric Andersen11c65522000-09-07 17:24:47 +0000635#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"
Matt Kraaibf181b92000-07-16 20:57:15 +0000638#endif
Eric Andersen11c65522000-09-07 17:24:47 +0000639 "\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"
642#endif
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"
648#endif
649#ifdef BB_FEATURE_LS_SORTFILES
650 "\t-v\tsort the listing by version\n"
651#endif
652#ifdef BB_FEATURE_AUTOWIDTH
653 "\t-w NUM\tassume the terminal is NUM columns wide\n"
654#endif
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"
658#endif
659#endif /* BB_FEATURE_TRIVIAL_HELP */
Matt Kraaibf181b92000-07-16 20:57:15 +0000660 ;
Eric Andersen11c65522000-09-07 17:24:47 +0000661#endif /* BB_LS */
Matt Kraaibf181b92000-07-16 20:57:15 +0000662
Matt Kraai2f46b662000-07-19 18:01:00 +0000663#if defined BB_LSMOD
664const char lsmod_usage[] =
665 "lsmod\n"
666#ifndef BB_FEATURE_TRIVIAL_HELP
667 "\nList the currently loaded kernel modules.\n"
668#endif
669 ;
670#endif
671
Matt Kraaibf181b92000-07-16 20:57:15 +0000672#if defined BB_MAKEDEVS
673const 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"
677 "TYPEs include:\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"
684 "For example:\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"
687#endif
688 ;
689#endif
690
691#if defined BB_MD5SUM
692const 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"
697 "Options:\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"
706#endif
707 ;
708#endif
709
710#if defined BB_MKDIR
711const 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"
715 "Options:\n"
716
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"
719#endif
720 ;
721#endif
722
723#if defined BB_MKFIFO
724const 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"
728 "Options:\n"
729 "\t-m\tcreate the pipe using the specified mode (default a=rw)\n"
730#endif
731 ;
732#endif
733
734#if defined BB_MKFS_MINIX
735const 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"
739 "Options:\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"
745#endif
746 ;
747#endif
748
749#if defined BB_MKNOD
750const 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"
754 "Options:\n"
755 "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n"
756 "TYPEs include:\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"
760#endif
761 ;
762#endif
763
764#if defined BB_MKSWAP
765const 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"
772
773 "\tblock-count\tNumber of block to use (default is entire partition).\n"
774#endif
775 ;
776#endif
777
778#if defined BB_MKTEMP
779const 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"
784#endif
785 ;
786#endif
787
788#if defined BB_MORE
789const char more_usage[] =
790 "more [FILE ...]\n"
791#ifndef BB_FEATURE_TRIVIAL_HELP
792 "\nMore is a filter for viewing FILE one screenful at a time.\n"
793#endif
794 ;
795#endif
796
797#if defined BB_MOUNT
798const 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"
802 "Flags:\n"
803 "\t-a:\t\tMount all filesystems in fstab.\n"
804#ifdef BB_MTAB
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"
807#endif
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"
812 "\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"
820#endif
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"
826#endif
827 ;
828#endif
829
830#if defined BB_MT
831const char mt_usage[] =
832 "mt [-f device] opcode value\n"
833#ifndef BB_FEATURE_TRIVIAL_HELP
834 "\nControl magnetic tape drive operation\n"
Eric Andersen8cbac442000-08-11 20:14:11 +0000835 "\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"
Matt Kraaibf181b92000-07-16 20:57:15 +0000840#endif
841 ;
842#endif
843
844#if defined BB_CP_MV
845const char mv_usage[] =
846 "mv SOURCE DEST\n"
847 " or: mv SOURCE... DIRECTORY\n"
848#ifndef BB_FEATURE_TRIVIAL_HELP
849 "\nRename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"
850#endif
851 ;
852#endif
853
854#if defined BB_NC
855const char nc_usage[] =
856 "nc [IP] [port]\n"
857#ifndef BB_FEATURE_TRIVIAL_HELP
858 "\nNetcat opens a pipe to IP:port\n"
859#endif
860 ;
861#endif
862
863#if defined BB_NSLOOKUP
864const char nslookup_usage[] =
865 "nslookup [HOST]\n"
866#ifndef BB_FEATURE_TRIVIAL_HELP
867 "\nQueries the nameserver for the IP address of the given HOST\n"
868#endif
869;
870#endif
871
872#if defined BB_PING
873#if defined BB_FEATURE_SIMPLE_PING
874const char ping_usage[] =
875 "ping host\n"
876#ifndef BB_FEATURE_TRIVIAL_HELP
877 "\nSend ICMP ECHO_REQUEST packets to network hosts\n"
878#endif
879 ;
880#else /* ! defined BB_FEATURE_SIMPLE_PING */
881const 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"
885 "Options:\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"
890#endif
891 ;
892#endif
893#endif
894
Matt Kraai2f46b662000-07-19 18:01:00 +0000895#if defined BB_POWEROFF
896const char poweroff_usage[] =
897 "poweroff\n"
898#ifndef BB_FEATURE_TRIVIAL_HELP
899 "\nHalt the system and request that the kernel shut off the power.\n"
900#endif
901 ;
902#endif
903
Matt Kraaibf181b92000-07-16 20:57:15 +0000904#if defined BB_PRINTF
905const 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"
910#endif
911 ;
912#endif
913
914#if defined BB_PS
915const char ps_usage[] =
916 "ps\n"
917#ifndef BB_FEATURE_TRIVIAL_HELP
918 "\nReport process status\n"
919 "\nThis version of ps accepts no options.\n"
920#endif
921 ;
922#endif
923
Matt Kraai2f46b662000-07-19 18:01:00 +0000924#if defined BB_PWD
925const char pwd_usage[] =
926 "pwd\n"
927#ifndef BB_FEATURE_TRIVIAL_HELP
928 "\nPrint the full filename of the current working directory.\n"
929#endif
930 ;
931#endif
932
Eric Andersen918507e2000-08-21 22:46:33 +0000933#if defined BB_RDATE
934const 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"
938 "Options:\n"
939 "\t-s\tSet the system date and time (default).\n"
940 "\t-p\tPrint the date and time.\n"
941#endif
942 ;
943#endif
944
Matt Kraai2f46b662000-07-19 18:01:00 +0000945#if defined BB_REBOOT
946const char reboot_usage[] =
947 "reboot\n"
948#ifndef BB_FEATURE_TRIVIAL_HELP
949 "\nReboot the system.\n"
950#endif
951 ;
952#endif
953
Eric Andersenbf960f52000-07-21 21:32:12 +0000954
955#if defined BB_RENICE
956const 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"
962#endif
963 ;
964#endif
965
Eric Andersenfa405d02000-08-21 21:18:52 +0000966
967#if defined BB_RESET
968const char reset_usage[] =
969 "reset\n"
970#ifndef BB_FEATURE_TRIVIAL_HELP
971 "\nResets the screen.\n"
972#endif
973 ;
974#endif
975
Matt Kraaibf181b92000-07-16 20:57:15 +0000976#if defined BB_RM
977const 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"
982 "Options:\n"
983 "\t-f\t\tremove existing destinations, never prompt\n"
984 "\t-r or -R\tremove the contents of directories recursively\n"
985#endif
986 ;
987#endif
988
989#if defined BB_RMDIR
990const char rmdir_usage[] =
991 "rmdir [OPTION]... DIRECTORY...\n"
992#ifndef BB_FEATURE_TRIVIAL_HELP
993 "\nRemove the DIRECTORY(ies), if they are empty.\n"
994#endif
995 ;
996#endif
997
998#if defined BB_RMMOD
999const 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"
1003 "Options:\n"
1004 "\t-a\tTry to remove all unused kernel modules.\n"
1005#endif
1006 ;
1007#endif
1008
1009#if defined BB_SED
1010const char sed_usage[] =
1011 "sed [-Vhnef] pattern [files...]\n"
1012#ifndef BB_FEATURE_TRIVIAL_HELP
1013 "\n"
Eric Andersen4d5ac2f2000-08-25 00:23:36 +00001014 "-n\t\tsuppress automatic printing of pattern space\n"
Matt Kraaibf181b92000-07-16 20:57:15 +00001015 "-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"
Eric Andersen4d5ac2f2000-08-25 00:23:36 +00001017 "-h\t\tdisplay this help message\n"
Matt Kraaibf181b92000-07-16 20:57:15 +00001018 "\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"
1022#endif
1023 ;
1024#endif
1025
1026#if defined BB_SETKEYCODES
1027const 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"
1034#endif
1035 ;
1036#endif
1037
1038#if defined BB_SH
1039const char shell_usage[] =
1040 "sh [FILE]...\n"
1041 " or: sh -c command [args]...\n"
1042#ifndef BB_FEATURE_TRIVIAL_HELP
1043 "\nlash: The BusyBox command interpreter (shell).\n\n"
1044#endif
1045 ;
1046#endif
1047
1048#if defined BB_SLEEP
1049const char sleep_usage[] =
1050 "sleep N\n"
1051#ifndef BB_FEATURE_TRIVIAL_HELP
1052 "\nPause for N seconds.\n"
1053#endif
1054 ;
1055#endif
1056
1057#if defined BB_SORT
1058const char sort_usage[] =
1059 "sort [-n]"
1060#ifdef BB_FEATURE_SORT_REVERSE
1061 " [-r]"
1062#endif
1063 " [FILE]...\n"
1064#ifndef BB_FEATURE_TRIVIAL_HELP
1065 "\nSorts lines of text in the specified files\n"
1066#endif
1067 ;
1068#endif
1069
1070#if defined BB_SWAPONOFF
1071const 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"
1075 "Options:\n"
1076 "\t-a\tStop swapping on all swap devices\n"
1077#endif
1078 ;
1079#endif
1080
1081#if defined BB_SWAPONOFF
1082const 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"
1086 "Options:\n"
1087 "\t-a\tStart swapping on all swap devices\n"
1088#endif
1089 ;
1090#endif
1091
1092#if defined BB_SYNC
1093const char sync_usage[] =
1094 "sync\n"
1095#ifndef BB_FEATURE_TRIVIAL_HELP
1096 "\nWrite all buffered filesystem blocks to disk.\n"
1097#endif
1098 ;
1099#endif
1100
1101#if defined BB_SYSLOGD
1102const 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"
1107 "Options:\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"
1112#endif
1113 "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n"
Eric Andersenced2cef2000-07-20 23:41:24 +00001114#ifdef BB_FEATURE_REMOTE_LOG
1115 "\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
1116#endif
Matt Kraaibf181b92000-07-16 20:57:15 +00001117#endif
1118 ;
1119#endif
1120
1121#if defined BB_TAIL
Matt Kraaibf181b92000-07-16 20:57:15 +00001122const 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"
1128 "Options:\n"
Eric Andersend5fa3e32000-08-02 16:42:58 +00001129#ifndef BB_FEATURE_SIMPLE_TAIL
1130 "\t-c=N[kbm]\toutput the last N bytes\n"
Matt Kraaibf181b92000-07-16 20:57:15 +00001131#endif
Eric Andersend5fa3e32000-08-02 16:42:58 +00001132 "\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"
Matt Kraaibf181b92000-07-16 20:57:15 +00001139 "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"
Eric Andersend5fa3e32000-08-02 16:42:58 +00001141 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).\n"
1142//#else
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"
1145#endif
Matt Kraaibf181b92000-07-16 20:57:15 +00001146#endif
1147 ;
1148#endif
Matt Kraaibf181b92000-07-16 20:57:15 +00001149
1150#if defined BB_TAR
1151const char tar_usage[] =
1152#ifdef BB_FEATURE_TAR_CREATE
1153 "tar -[cxtvO] "
1154#else
1155 "tar -[xtvO] "
1156#endif
1157#if defined BB_FEATURE_TAR_EXCLUDE
Eric Andersenfdd51032000-08-02 18:48:26 +00001158 "[--exclude File] "
Matt Kraaibf181b92000-07-16 20:57:15 +00001159#endif
Eric Andersend5fa3e32000-08-02 16:42:58 +00001160 "[-f tarFile] [FILE(s)] ...\n"
Matt Kraaibf181b92000-07-16 20:57:15 +00001161#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
1166 "\tc\t\tcreate\n"
1167#endif
1168 "\tx\t\textract\n"
1169 "\tt\t\tlist\n"
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
Eric Andersenfdd51032000-08-02 18:48:26 +00001174 "\texclude\t\tfile to exclude\n"
Matt Kraaibf181b92000-07-16 20:57:15 +00001175#endif
1176 "\nInformative output:\n"
1177 "\tv\t\tverbosely list files processed\n"
1178#endif
1179 ;
1180#endif
1181
1182#if defined BB_TEE
1183const 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"
1188#endif
1189 ;
1190#endif
1191
1192#if defined BB_TELNET
1193const 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"
1198#endif
1199 ;
1200#endif
1201
1202#if defined BB_TEST
1203const char test_usage[] =
1204 "test EXPRESSION\n"
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"
1209#endif
1210 ;
1211#endif
1212
1213#if defined BB_TOUCH
1214const 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"
1218 "Options:\n"
1219 "\t-c\tDo not create any files\n"
1220#endif
1221 ;
1222#endif
1223
1224#if defined BB_TR
1225const 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"
1230 "Options:\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"
1234#endif
1235 ;
1236#endif
1237
Matt Kraai2f46b662000-07-19 18:01:00 +00001238#if defined BB_TRUE_FALSE
1239const char true_usage[] =
1240 "true\n"
1241#ifndef BB_FEATURE_TRIVIAL_HELP
1242 "\nReturn an exit code of TRUE (0).\n"
1243#endif
1244 ;
1245#endif
1246
Matt Kraaibf181b92000-07-16 20:57:15 +00001247#if defined BB_TTY
1248const char tty_usage[] =
1249 "tty\n"
1250#ifndef BB_FEATURE_TRIVIAL_HELP
1251 "\nPrint the file name of the terminal connected to standard input.\n\n"
1252 "Options:\n"
1253 "\t-s\tprint nothing, only return an exit status\n"
1254#endif
1255 ;
1256#endif
1257
1258#if defined BB_UMOUNT
1259const 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"
1264#ifdef BB_MTAB
1265 " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
1266#else
1267 "\n"
1268#endif
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"
1272#endif
1273#if defined BB_FEATURE_MOUNT_LOOP
1274 "\t-l:\tDo not free loop device (if a loop device has been used)\n"
1275#endif
1276#endif
1277 ;
1278#endif
1279
1280#if defined BB_UNAME
1281const 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"
1285 "Options:\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"
1291
1292 "\t-p\tprint the host processor type\n"
1293 "\t-v\tprint the operating system version\n"
1294#endif
1295 ;
1296#endif
1297
1298#if defined BB_UNIQ
1299const 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"
1304#endif
1305 ;
1306#endif
1307
1308#if defined BB_UPDATE
1309const char update_usage[] =
1310 "update [options]\n"
1311#ifndef BB_FEATURE_TRIVIAL_HELP
1312 "\nPeriodically flushes filesystem buffers.\n\n"
1313 "Options:\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"
1317#endif
1318 ;
1319#endif
1320
Matt Kraai2f46b662000-07-19 18:01:00 +00001321#if defined BB_UPTIME
1322const char uptime_usage[] =
1323 "uptime\n"
1324#ifndef BB_FEATURE_TRIVIAL_HELP
1325 "\nDisplay the time since the last boot.\n"
1326#endif
1327 ;
1328#endif
1329
Matt Kraaibf181b92000-07-16 20:57:15 +00001330#if defined BB_USLEEP
1331const char usleep_usage[] =
1332 "usleep N\n"
1333#ifndef BB_FEATURE_TRIVIAL_HELP
1334 "\nPause for N microseconds.\n"
1335#endif
1336 ;
1337#endif
1338
1339#if defined BB_UUDECODE
1340const char uudecode_usage[] =
1341 "uudecode [FILE]...\n"
1342#ifndef BB_FEATURE_TRIVIAL_HELP
1343 "\nUudecode a file that is uuencoded.\n\n"
1344 "Options:\n"
1345 "\t-o FILE\tdirect output to FILE\n"
1346#endif
1347 ;
1348#endif
1349
1350#if defined BB_UUENCODE
1351const char uuencode_usage[] =
1352 "uuencode [OPTION] [INFILE] REMOTEFILE\n"
1353#ifndef BB_FEATURE_TRIVIAL_HELP
1354 "\nUuencode a file.\n\n"
1355 "Options:\n"
1356 "\t-m\tuse base64 encoding as of RFC1521\n"
1357#endif
1358 ;
1359#endif
1360
1361#if defined BB_WC
1362const 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"
1367 "Options:\n"
1368 "\t-c\tprint the byte counts\n"
1369 "\t-l\tprint the newline counts\n"
1370
1371 "\t-L\tprint the length of the longest line\n"
1372 "\t-w\tprint the word counts\n"
1373#endif
1374 ;
1375#endif
1376
Eric Andersen61a9d8d2000-09-04 15:16:51 +00001377#if defined BB_WGET
1378const char wget_usage[] = "wget [-c] [-O file] url\n"
1379#ifndef BB_FEATURE_TRIVIAL_HELP
1380 "\nwget retrieves files via HTTP\n\n"
1381 "Options:\n"
1382 "\t-c\tcontinue retrieval of aborted transfers\n"
1383 "\t-O\tsave to filename ('-' for stdout)\n"
1384#endif
1385 ;
1386#endif
1387
Matt Kraaibf181b92000-07-16 20:57:15 +00001388#if defined BB_WHICH
1389const char which_usage[] =
1390 "which [COMMAND ...]\n"
1391#ifndef BB_FEATURE_TRIVIAL_HELP
1392 "\nLocates a COMMAND.\n"
1393#endif
1394 ;
1395#endif
1396
1397#if defined BB_WHOAMI
1398const char whoami_usage[] =
1399 "whoami\n"
1400#ifndef BB_FEATURE_TRIVIAL_HELP
1401 "\nPrints the user name associated with the current effective user id.\n"
1402#endif
1403 ;
1404#endif
1405
1406#if defined BB_YES
1407const 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"
1411#endif
1412 ;
1413#endif