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