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