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