telnetd: at Alexander Kriegisch <Alexander@kriegisch.name> insistence
[oweals/busybox.git] / include / usage.h
1 /* vi: set sw=8 ts=8: */
2 /*
3  * This file suffers from chronically incorrect tabification
4  * of messages. Before editing this file:
5  * 1. Switch you editor to 8-space tab mode.
6  * 2. Do not use \t in messages, use real tab character.
7  * 3. Start each source line with message as follows:
8  *    |<7 spaces>"text with tabs"....
9  */
10
11 #ifndef __BB_USAGE_H__
12 #define __BB_USAGE_H__
13
14 #define addgroup_trivial_usage \
15        "[-g GID]"USE_FEATURE_ADDUSER_TO_GROUP(" [user_name]")" group_name"
16 #define addgroup_full_usage \
17        "Add a group to the system"USE_FEATURE_ADDUSER_TO_GROUP(" or add an user to a group") \
18        "\n\nOptions:\n" \
19        "        -g GID  Group id"
20
21 #define adduser_trivial_usage \
22        "[OPTIONS] user_name"
23 #define adduser_full_usage \
24        "Add a user to the system" \
25        "\n\nOptions:\n" \
26        "        -h DIR          Home directory\n" \
27        "        -g GECOS        GECOS field\n" \
28        "        -s SHELL        Login shell\n" \
29        "        -G GROUP        Add user to existing group\n" \
30        "        -S              Create a system user (ignored)\n" \
31        "        -D              Do not assign a password\n" \
32        "        -H              Do not create home directory"
33
34 #define adjtimex_trivial_usage \
35        "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]"
36 #define adjtimex_full_usage \
37        "Read and optionally set system timebase parameters.\n" \
38        "See adjtimex(2)." \
39        "\n\nOptions:\n" \
40        "        -q              Quiet\n" \
41        "        -o offset       Time offset, microseconds\n" \
42        "        -f frequency    Frequency adjust, integer kernel units (65536 is 1ppm)\n" \
43        "                        (positive values make clock run faster)\n" \
44        "        -t tick         Microseconds per tick, usually 10000\n" \
45        "        -p timeconstant"
46
47 #define ar_trivial_usage \
48        "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
49 #define ar_full_usage \
50        "Extract or list FILES from an ar archive" \
51        "\n\nOptions:\n" \
52        "        -o      Preserve original dates\n" \
53        "        -p      Extract to stdout\n" \
54        "        -t      List\n" \
55        "        -x      Extract\n" \
56        "        -v      Verbose"
57
58 #define arp_trivial_usage \
59        "\n" \
60        "[-vn]   [-H type] [-i if] -a [hostname]\n" \
61        "[-v]              [-i if] -d hostname [pub]\n" \
62        "[-v]    [-H type] [-i if] -s hostname hw_addr [temp]\n" \
63        "[-v]    [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
64        "[-v]    [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
65 #define arp_full_usage \
66        "Manipulate the system ARP cache" \
67        "\n\nOptions:" \
68        "\n      -a              Display (all) hosts" \
69        "\n      -s              Set a new ARP entry" \
70        "\n      -d              Delete a specified entry" \
71        "\n      -v              Verbose" \
72        "\n      -n              Don't resolve names" \
73        "\n      -i if           Network interface (e.g. eth0)" \
74        "\n      -D              Read <hwaddr> from given device" \
75        "\n      -A, -p          Protocol family" \
76        "\n      -H hwtype       Hardware address type"
77
78 #define arping_trivial_usage \
79        "[-fqbDUA] [-c count] [-w timeout] [-i device] [-s sender] target"
80 #define arping_full_usage \
81        "Ping hosts by ARP requests/replies" \
82        "\n\nOptions:\n" \
83        "        -f              Quit on first ARP reply\n" \
84        "        -q              Quiet\n" \
85        "        -b              Keep broadcasting, don't go unicast\n" \
86        "        -D              Duplicated address detection mode\n" \
87        "        -U              Unsolicited ARP mode, update your neighbours\n" \
88        "        -A              ARP answer mode, update your neighbours\n" \
89        "        -c count        Stop after sending count ARP request packets\n" \
90        "        -w timeout      Time to wait for ARP reply, in seconds\n" \
91        "        -I device       Outgoing interface name, default is eth0\n" \
92        "        -s sender       Set specific sender IP address\n" \
93        "        target          Target IP address of ARP request"
94
95 #define ash_trivial_usage \
96        "[FILE]...\n" \
97        "or: ash -c command [args]..."
98 #define ash_full_usage \
99        "The ash shell (command interpreter)"
100
101 #define awk_trivial_usage \
102        "[OPTION]... [program-text] [FILE ...]"
103 #define awk_full_usage \
104        "Options:\n" \
105        "        -v var=val      Set variable\n" \
106        "        -F sep          Use sep as field separator\n" \
107        "        -f file         Read program from file"
108
109 #define basename_trivial_usage \
110        "FILE [SUFFIX]"
111 #define basename_full_usage \
112        "Strip directory path and suffixes from FILE.\n" \
113        "If specified, also remove any trailing SUFFIX."
114 #define basename_example_usage \
115        "$ basename /usr/local/bin/foo\n" \
116        "foo\n" \
117        "$ basename /usr/local/bin/\n" \
118        "bin\n" \
119        "$ basename /foo/bar.txt .txt\n" \
120        "bar"
121
122 #define bunzip2_trivial_usage \
123        "[OPTION]... [FILE]"
124 #define bunzip2_full_usage \
125        "Uncompress FILE (or standard input if FILE is '-' or omitted)" \
126        "\n\nOptions:\n" \
127        "        -c      Write output to standard output\n" \
128        "        -f      Force"
129
130 #define bzip2_trivial_usage \
131        "[OPTION]... [FILE]..."
132 #define bzip2_full_usage \
133        "Compress FILE(s) with bzip2 algorithm.\n" \
134        "When FILE is '-' or unspecified, reads standard input. Implies -c." \
135        "\n\nOptions:" \
136        "\n      -c      Write output to standard output instead of FILE.bz2" \
137        "\n      -d      Decompress" \
138        "\n      -f      Force" \
139        "\n      -1..-9  Compression level"
140
141 #define busybox_notes_usage \
142        "Hello world!\n"
143
144 #define bzcat_trivial_usage \
145        "FILE"
146 #define bzcat_full_usage \
147        "Uncompress to stdout"
148
149 #define unlzma_trivial_usage \
150        "[OPTION]... [FILE]"
151 #define unlzma_full_usage \
152        "Uncompress FILE (or standard input if FILE is '-' or omitted)" \
153        "\n\nOptions:\n" \
154        "        -c      Write output to standard output\n" \
155        "        -f      Force"
156
157 #define lzmacat_trivial_usage \
158        "FILE"
159 #define lzmacat_full_usage \
160        "Uncompress to stdout"
161
162 #define cal_trivial_usage \
163        "[-jy] [[month] year]"
164 #define cal_full_usage \
165        "Display a calendar" \
166        "\n\nOptions:" \
167        "\n      -j      Use julian dates" \
168        "\n      -y      Display the entire year"
169
170 #define cat_trivial_usage \
171        "[-u] [FILE]..."
172 #define cat_full_usage \
173        "Concatenate FILE(s) and print them to stdout" \
174        "\n\nOptions:" \
175        "\n      -u      Use unbuffered i/o (ignored)"
176 #define cat_example_usage \
177        "$ cat /proc/uptime\n" \
178        "110716.72 17.67"
179
180 #define catv_trivial_usage \
181        "[-etv] [FILE]..."
182 #define catv_full_usage \
183        "Display nonprinting characters as ^x or M-x" \
184        "\n\nOptions:\n" \
185        "        -e      End each line with $\n" \
186        "        -t      Show tabs as ^I\n" \
187        "        -v      Don't use ^x or M-x escapes"
188 #define chattr_trivial_usage \
189        "[-R] [-+=AacDdijsStTu] [-v version] files..."
190 #define chattr_full_usage \
191        "Change file attributes on an ext2 fs\n\n" \
192        "Modifiers:\n" \
193        "        -       Remove attributes\n" \
194        "        +       Add attributes\n" \
195        "        =       Set attributes\n" \
196        "Attributes:\n" \
197        "        A       Don't track atime\n" \
198        "        a       Append mode only\n" \
199        "        c       Enable compress\n" \
200        "        D       Write dir contents synchronously\n" \
201        "        d       Do not backup with dump\n" \
202        "        i       Cannot be modified (immutable)\n" \
203        "        j       Write all data to journal first\n" \
204        "        s       Zero disk storage when deleted\n" \
205        "        S       Write file contents synchronously\n" \
206        "        t       Disable tail-merging of partial blocks with other files\n" \
207        "        u       Allow file to be undeleted\n" \
208        "Options:\n" \
209        "        -R      Recursively list subdirectories\n" \
210        "        -v      Set the file's version/generation number"
211
212 #define chcon_trivial_usage \
213        "[OPTIONS] CONTEXT FILE...\n" \
214        "        chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...\n" \
215        "        chcon [OPTIONS] --reference=RFILE FILE...\n"
216 #define chcon_full_usage \
217        "Change the security context of each FILE to CONTEXT\n" \
218        "\n      -v, --verbose           Verbose" \
219        "\n      -c, --changes           Report changes made" \
220        "\n      -h, --no-dereference    Affect symlinks instead of their targets" \
221        "\n      -f, --silent, --quiet   Suppress most error messages" \
222        "\n      --reference=RFILE       Use RFILE's group instead of using a CONTEXT value" \
223        "\n      -u, --user=USER         Set user USER in the target security context" \
224        "\n      -r, --role=ROLE         Set role ROLE in the target security context" \
225        "\n      -t, --type=TYPE         Set type TYPE in the target security context" \
226        "\n      -l, --range=RANGE       Set range RANGE in the target security context" \
227        "\n      -R, --recursive         Recurse subdirectories" \
228
229 #define chmod_trivial_usage \
230        "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
231 #define chmod_full_usage \
232        "Each MODE is one or more of the letters ugoa, one of the\n" \
233        "symbols +-= and one or more of the letters rwxst" \
234        "\n\nOptions:" \
235        "\n      -R      Recurse directories" \
236         USE_DESKTOP( \
237        "\n      -c      List changed files" \
238        "\n      -v      List all files" \
239        "\n      -f      Hide errors" \
240         )
241 #define chmod_example_usage \
242        "$ ls -l /tmp/foo\n" \
243        "-rw-rw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo\n" \
244        "$ chmod u+x /tmp/foo\n" \
245        "$ ls -l /tmp/foo\n" \
246        "-rwxrw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo*\n" \
247        "$ chmod 444 /tmp/foo\n" \
248        "$ ls -l /tmp/foo\n" \
249        "-r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo\n"
250
251 #define chgrp_trivial_usage \
252        "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..."
253 #define chgrp_full_usage \
254        "Change the group membership of each FILE to GROUP" \
255        "\n\nOptions:" \
256        "\n      -R      Recurse directories" \
257        "\n      -h      Affect symlinks instead of symlink targets" \
258        "\n      -L      Traverse all symlinks to directories" \
259        "\n      -H      Traverse symlinks on command line only" \
260        "\n      -P      Do not traverse symlinks (default)" \
261         USE_DESKTOP( \
262        "\n      -c      List changed files" \
263        "\n      -v      Verbose" \
264        "\n      -f      Hide errors" \
265         )
266 #define chgrp_example_usage \
267        "$ ls -l /tmp/foo\n" \
268        "-r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo\n" \
269        "$ chgrp root /tmp/foo\n" \
270        "$ ls -l /tmp/foo\n" \
271        "-r--r--r--    1 andersen root            0 Apr 12 18:25 /tmp/foo\n"
272
273 #define chown_trivial_usage \
274        "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
275 #define chown_full_usage \
276        "Change the owner and/or group of each FILE to OWNER and/or GROUP" \
277        "\n\nOptions:" \
278        "\n      -R      Recurse directories" \
279        "\n      -h      Affect symlinks instead of symlink targets" \
280        "\n      -L      Traverse all symlinks to directories" \
281        "\n      -H      Traverse symlinks on command line only" \
282        "\n      -P      Do not traverse symlinks (default)" \
283         USE_DESKTOP( \
284        "\n      -c      List changed files" \
285        "\n      -v      List all files" \
286        "\n      -f      Hide errors" \
287         )
288 #define chown_example_usage \
289        "$ ls -l /tmp/foo\n" \
290        "-r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo\n" \
291        "$ chown root /tmp/foo\n" \
292        "$ ls -l /tmp/foo\n" \
293        "-r--r--r--    1 root     andersen        0 Apr 12 18:25 /tmp/foo\n" \
294        "$ chown root.root /tmp/foo\n" \
295        "ls -l /tmp/foo\n" \
296        "-r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo\n"
297
298 #define chpst_trivial_usage \
299        "[-vP012] [-u user[:group]] [-U user[:group]] [-e dir] " \
300        "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \
301        "[-p processes] [-f bytes] [-c bytes] prog args"
302 #define chpst_full_usage \
303        "Change the process state and run specified program" \
304        "\n\nOptions:\n" \
305        "        -u user[:grp]   Set uid and gid\n" \
306        "        -U user[:grp]   Set environment variables UID and GID\n" \
307        "        -e dir          Set environment variables as specified by files\n" \
308        "                        in the directory: file=1st_line_of_file\n" \
309        "        -/ dir          Chroot to dir\n" \
310        "        -n inc          Add inc to nice value\n" \
311        "        -m bytes        Limit data segment, stack segment, locked physical pages,\n" \
312        "                        and total of all segment per process to bytes bytes each\n" \
313        "        -d bytes        Limit data segment\n" \
314        "        -o n            Limit the number of open file descriptors per process to n\n" \
315        "        -p n            Limit number of processes per uid to n\n" \
316        "        -f bytes        Limit output file size to bytes bytes\n" \
317        "        -c bytes        Limit core file size to bytes bytes\n" \
318        "        -v              Verbose\n" \
319        "        -P              Run prog in a new process group\n" \
320        "        -0              Close standard input\n" \
321        "        -1              Close standard output\n" \
322        "        -2              Close standard error"
323 #define setuidgid_trivial_usage \
324        "account prog args"
325 #define setuidgid_full_usage \
326        "Set uid and gid to account's uid and gid, removing all supplementary\n" \
327        "groups, then run prog"
328 #define envuidgid_trivial_usage \
329        "account prog args"
330 #define envuidgid_full_usage \
331        "Set $UID to account's uid and $GID to account's gid, then run prog"
332 #define envdir_trivial_usage \
333        "dir prog args"
334 #define envdir_full_usage \
335        "Set various environment variables as specified by files\n" \
336        "in the directory dir, then run prog"
337 #define softlimit_trivial_usage \
338        "[-a allbytes] [-c corebytes] [-d databytes] [-f filebytes] " \
339        "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \
340        "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args"
341 #define softlimit_full_usage \
342        "Set soft resource limits, then run prog" \
343        "\n\nOptions:\n" \
344        "        -m n    Same as -d n -s n -l n -a n\n" \
345        "        -d n    Limit the data segment per process to n bytes\n" \
346        "        -s n    Limit the stack segment per process to n bytes\n" \
347        "        -l n    Limit the locked physical pages per process to n bytes\n" \
348        "        -a n    Limit the total of all segments per process to n bytes\n" \
349        "        -o n    Limit the number of open file descriptors per process to n\n" \
350        "        -p n    Limit the number of processes per uid to n\n" \
351        "Options controlling file sizes:\n" \
352        "        -f n    Limit output file sizes to n bytes\n" \
353        "        -c n    Limit core file sizes to n bytes\n" \
354        "Efficiency opts:\n" \
355        "        -r n    Limit the resident set size to n bytes. This limit is not\n" \
356        "                enforced unless physical memory is full\n" \
357        "        -t n    Limit the CPU time to n seconds. This limit is not enforced\n" \
358        "                except that the process receives a SIGXCPU signal after n seconds\n" \
359        "\n" \
360        "Some options may have no effect on some operating systems\n" \
361        "n may be =, indicating that soft limit should be set equal to hard limit"
362
363 #define chroot_trivial_usage \
364        "NEWROOT [COMMAND...]"
365 #define chroot_full_usage \
366        "Run COMMAND with root directory set to NEWROOT"
367 #define chroot_example_usage \
368        "$ ls -l /bin/ls\n" \
369        "lrwxrwxrwx    1 root     root          12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
370        "# mount /dev/hdc1 /mnt -t minix\n" \
371        "# chroot /mnt\n" \
372        "# ls -l /bin/ls\n" \
373        "-rwxr-xr-x    1 root     root        40816 Feb  5 07:45 /bin/ls*\n"
374
375 #define chvt_trivial_usage \
376        "N"
377 #define chvt_full_usage \
378        "Change the foreground virtual terminal to /dev/ttyN"
379
380 #define cksum_trivial_usage \
381        "FILES..."
382 #define cksum_full_usage \
383        "Calculate the CRC32 checksums of FILES"
384
385 #define clear_trivial_usage \
386        ""
387 #define clear_full_usage \
388        "Clear screen"
389
390 #define cmp_trivial_usage \
391        "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]"
392 #define cmp_full_usage \
393        "Compares FILE1 vs stdin if FILE2 is not specified" \
394        "\n\nOptions:\n" \
395        "        -l      Write the byte numbers (decimal) and values (octal)\n" \
396        "                for all differing bytes\n" \
397        "        -s      Quiet"
398
399 #define comm_trivial_usage \
400        "[-123] FILE1 FILE2"
401 #define comm_full_usage \
402        "Compare FILE1 to FILE2, or to stdin if - is specified" \
403        "\n\nOptions:\n" \
404        "        -1      Suppress lines unique to FILE1\n" \
405        "        -2      Suppress lines unique to FILE2\n" \
406        "        -3      Suppress lines common to both files"
407
408 #define bbconfig_trivial_usage \
409        ""
410 #define bbconfig_full_usage \
411        "Print the config file which built busybox"
412
413 #define bbsh_trivial_usage \
414        "[FILE]...\n" \
415        "or: bbsh -c command [args]..."
416 #define bbsh_full_usage \
417        "The bbsh shell (command interpreter)"
418
419 #define chrt_trivial_usage \
420        "[OPTION]... [prio] [pid | command [arg]...]"
421 #define chrt_full_usage \
422        "manipulate real-time attributes of a process" \
423        "\n\nOptions:\n" \
424        "        -p      operate on pid\n" \
425        "        -r      set scheduling policy to SCHED_RR\n" \
426        "        -f      set scheduling policy to SCHED_FIFO\n" \
427        "        -o      set scheduling policy to SCHED_OTHER\n" \
428        "        -m      show min and max priorities"
429
430 #define chrt_example_usage \
431        "$ chrt -r 4 sleep 900; x=$!\n" \
432        "$ chrt -f -p 3 $x\n" \
433        "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
434
435 #define cp_trivial_usage \
436        "[OPTION]... SOURCE DEST"
437 #define cp_full_usage \
438        "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY" \
439        "\n\nOptions:" \
440        "\n      -a      Same as -dpR" \
441         USE_SELINUX( \
442        "\n      -c      Preserves security context" \
443         ) \
444        "\n      -d,-P   Preserve links" \
445        "\n      -H,-L   Dereference all symlinks (default)" \
446        "\n      -p      Preserve file attributes if possible" \
447        "\n      -f      Force overwrite" \
448        "\n      -i      Prompt before overwrite" \
449        "\n      -R,-r   Recurse directories" \
450        "\n      -l,-s   Create (sym)links"
451
452 #define cpio_trivial_usage \
453        "-[dimtuv][F cpiofile]"
454 #define cpio_full_usage \
455        "Extract or list files from a cpio archive\n" \
456        "Main operation mode:\n" \
457        "        d       Make leading directories\n" \
458        "        i       Extract\n" \
459        "        m       Preserve mtime\n" \
460        "        t       List\n" \
461        "        v       Verbose\n" \
462        "        u       Unconditional overwrite\n" \
463        "        F       Input from file"
464
465 #define crond_trivial_usage \
466        "-d[#] -c crondir -f -b"
467 #define crond_full_usage \
468        "        -d [#] -l [#] -S -L logfile -f -b -c dir\n" \
469        "        -d num  Debug level\n" \
470        "        -l num  Log level (8 - default)\n" \
471        "        -S      Log to syslog (default)\n" \
472        "        -L file Log to file\n" \
473        "        -f      Run in foreground\n" \
474        "        -b      Run in background (default)\n" \
475        "        -c dir  Working dir"
476
477 #define crontab_trivial_usage \
478        "[-c dir] {file|-}|[-u|-l|-e|-d user]"
479 #define crontab_full_usage \
480        "        file [opts]     Replace crontab from file\n" \
481        "        - [opts]        Replace crontab from stdin\n" \
482        "        -u user         User\n" \
483        "        -l [user]       List crontab for user\n" \
484        "        -e [user]       Edit crontab for user\n" \
485        "        -d [user]       Delete crontab for user\n" \
486        "        -c dir          Crontab directory"
487
488 #define cryptpw_trivial_usage \
489        "[-a des|md5] [string]"
490 #define cryptpw_full_usage \
491        "Outputs crypted string.\n" \
492        "If string isn't supplied on cmdline, reads it from stdin.\n" \
493        "\nOptions:" \
494        "\n      -a      Algorithm to use (default: md5)"
495
496 #define cut_trivial_usage \
497        "[OPTION]... [FILE]..."
498 #define cut_full_usage \
499        "Print selected fields from each input FILE to standard output" \
500        "\n\nOptions:\n" \
501        "        -b LIST Output only bytes from LIST\n" \
502        "        -c LIST Output only characters from LIST\n" \
503        "        -d CHAR Use CHAR instead of tab as the field delimiter\n" \
504        "        -s      Output only the lines containing delimiter\n" \
505        "        -f N    Print only these fields\n" \
506        "        -n      Ignored"
507 #define cut_example_usage \
508        "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
509        "Hello\n" \
510        "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
511        "world\n"
512
513 #define date_trivial_usage \
514        "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]"
515 #define date_full_usage \
516        "Display current time in the given FORMAT, or set system date" \
517        "\n\nOptions:\n" \
518        "        -R              Outputs RFC-822 compliant date string\n" \
519        "        -d STRING       Displays time described by STRING, not 'now'\n" \
520         USE_FEATURE_DATE_ISOFMT( \
521        "        -I[TIMESPEC]    Outputs an ISO-8601 compliant date/time string\n" \
522        "                        TIMESPEC='date' (or missing) for date only,\n" \
523        "                        'hours', 'minutes', or 'seconds' for date and\n" \
524        "                        time to the indicated precision\n" \
525        "        -D hint         Use 'hint' as date format, via strptime()\n" \
526         ) \
527        "        -s STRING       Sets time described by STRING\n" \
528        "        -r FILE         Displays the last modification time of FILE\n" \
529        "        -u              Prints or sets Coordinated Universal Time"
530 #define date_example_usage \
531        "$ date\n" \
532        "Wed Apr 12 18:52:41 MDT 2000\n"
533
534 #define dc_trivial_usage \
535        "expression ..."
536 #define dc_full_usage \
537        "This is a Tiny RPN calculator that understands the\n" \
538        "following operations: +, add, -, sub, *, mul, /, div, %, mod, " \
539        "**, exp, and, or, not, eor.\n" \
540        "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16." \
541        "\n\nOptions:\n" \
542        "p - Prints the value on the top of the stack, without altering the stack\n" \
543        "f - Prints the entire contents of the stack without altering anything\n" \
544        "o - Pops the value off the top of the stack and uses it to set the output radix\n" \
545        "    Only 10 and 16 are supported"
546 #define dc_example_usage \
547        "$ dc 2 2 + p\n" \
548        "4\n" \
549        "$ dc 8 8 \\* 2 2 + / p\n" \
550        "16\n" \
551        "$ dc 0 1 and p\n" \
552        "0\n" \
553        "$ dc 0 1 or p\n" \
554        "1\n" \
555        "$ echo 72 9 div 8 mul p | dc\n" \
556        "64\n"
557
558 #define dd_trivial_usage \
559        "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
560        "        [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync]")
561 #define dd_full_usage \
562        "Copy a file with converting and formatting" \
563        "\n\nOptions:\n" \
564        "        if=FILE         Read from FILE instead of stdin\n" \
565        "        of=FILE         Write to FILE instead of stdout\n" \
566        "        bs=N            Read and write N bytes at a time\n" \
567         USE_FEATURE_DD_IBS_OBS( \
568        "        ibs=N           Read N bytes at a time\n") \
569         USE_FEATURE_DD_IBS_OBS( \
570        "        obs=N           Write N bytes at a time\n") \
571        "        count=N         Copy only N input blocks\n" \
572        "        skip=N          Skip N input blocks\n" \
573        "        seek=N          Skip N output blocks\n" \
574         USE_FEATURE_DD_IBS_OBS( \
575        "        conv=notrunc    Don't truncate output file\n" \
576        "        conv=noerror    Continue after read errors\n" \
577        "        conv=sync       Pad blocks with zeros\n") \
578        "\n" \
579        "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \
580        "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)"
581 #define dd_example_usage \
582        "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
583        "4+0 records in\n" \
584        "4+0 records out\n"
585
586 #define deallocvt_trivial_usage \
587        "[N]"
588 #define deallocvt_full_usage \
589        "Deallocate unused virtual terminal /dev/ttyN"
590
591 #define delgroup_trivial_usage \
592         USE_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
593 #define delgroup_full_usage \
594        "Delete group GROUP from the system" \
595         USE_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
596
597 #define deluser_trivial_usage \
598        "USER"
599 #define deluser_full_usage \
600        "Delete user USER from the system"
601
602 #define devfsd_trivial_usage \
603        "mntpnt [-v]" \
604         USE_DEVFSD_FG_NP("[-fg][-np]" )
605 #define devfsd_full_usage \
606        "Manage devfs permissions and old device name symlinks" \
607        "\n\nOptions:" \
608        "\n      mntpnt  The mount point where devfs is mounted" \
609        "\n      -v      Print the protocol version numbers for devfsd" \
610        "\n              and the kernel-side protocol version and exit" \
611         USE_DEVFSD_FG_NP( \
612        "\n      -fg     Run in foreground" \
613        "\n      -np     Exit after parsing the configuration file" \
614        "\n              and processing synthetic REGISTER events," \
615        "\n              do not poll for events")
616
617 #define df_trivial_usage \
618        "[-" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILESYSTEM ...]"
619 #define df_full_usage \
620        "Print the filesystem space used and space available" \
621         USE_FEATURE_HUMAN_READABLE( \
622        "\n\nOptions control size display:" \
623        "\n      -h      Human readable (e.g. 1K 243M 2G)" \
624        "\n      -m      1024*1024 blocks" \
625        "\n      -k      1024 blocks") \
626         SKIP_FEATURE_HUMAN_READABLE( \
627        "\n\nOptions:" \
628        "\n      -k      Ignored")
629 #define df_example_usage \
630        "$ df\n" \
631        "Filesystem           1k-blocks      Used Available Use% Mounted on\n" \
632        "/dev/sda3              8690864   8553540    137324  98% /\n" \
633        "/dev/sda1                64216     36364     27852  57% /boot\n" \
634        "$ df /dev/sda3\n" \
635        "Filesystem           1k-blocks      Used Available Use% Mounted on\n" \
636        "/dev/sda3              8690864   8553540    137324  98% /\n"
637
638 #define dhcprelay_trivial_usage \
639        "[client_device_list] [server_device]"
640 #define dhcprelay_full_usage \
641        "Relay dhcp requests from client devices to server device"
642
643 #define dhcprelay_trivial_usage \
644        "[client_device_list] [server_device]"
645 #define dhcprelay_full_usage \
646        "Relay dhcp requests from client devices to server device"
647
648 #define diff_trivial_usage \
649        "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
650 #define diff_full_usage \
651        "Compare files line by line and output the differences between them.\n" \
652        "This diff implementation only supports unified diffs." \
653        "\n\nOptions:\n" \
654        "        -a      Treat all files as text\n" \
655        "        -b      Ignore changes in the amount of whitespace\n" \
656        "        -d      Try hard to find a smaller set of changes\n" \
657        "        -i      Ignore case differences\n" \
658        "        -L      Use LABEL instead of the filename in the unified header\n" \
659        "        -N      Treat absent files as empty\n" \
660        "        -q      Output only whether files differ\n" \
661        "        -r      Recursively compare subdirectories\n" \
662        "        -S      Start with FILE when comparing directories\n" \
663        "        -T      Make tabs line up by prefixing a tab when necessary\n" \
664        "        -s      Report when two files are the same\n" \
665        "        -t      Expand tabs to spaces in output\n" \
666        "        -U      Output LINES lines of context\n" \
667        "        -w      Ignore all whitespace"
668
669 #define dirname_trivial_usage \
670        "FILENAME"
671 #define dirname_full_usage \
672        "Strip non-directory suffix from FILENAME"
673 #define dirname_example_usage \
674        "$ dirname /tmp/foo\n" \
675        "/tmp\n" \
676        "$ dirname /tmp/foo/\n" \
677        "/tmp\n"
678
679 #define dmesg_trivial_usage \
680        "[-c] [-n LEVEL] [-s SIZE]"
681 #define dmesg_full_usage \
682        "Print or control the kernel ring buffer" \
683        "\n\nOptions:\n" \
684        "        -c              Clear ring buffer after printing\n" \
685        "        -n LEVEL        Set console logging level\n" \
686        "        -s SIZE         Buffer size"
687
688 #define dnsd_trivial_usage \
689        "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
690 #define dnsd_full_usage \
691        "Small and static DNS server daemon" \
692        "\n\nOptions:\n" \
693        "        -c      Config filename\n" \
694        "        -t      TTL in seconds\n" \
695        "        -p      Listening port\n" \
696        "        -i      Listening ip (default all)\n" \
697        "        -d      Daemonize"
698
699 #define dos2unix_trivial_usage \
700        "[option] [FILE]"
701 #define dos2unix_full_usage \
702        "Convert FILE from dos format to unix format. When no option\n" \
703        "is given, the input is converted to the opposite output format.\n" \
704        "When no file is given, use stdin for input and stdout for output." \
705        "\n\nOptions:\n" \
706        "        -u      Output will be in UNIX format\n" \
707        "        -d      Output will be in DOS format"
708
709 #define dpkg_trivial_usage \
710        "[-ilCPru] [-F option] package_name"
711 #define dpkg_full_usage \
712        "Install, remove and manage Debian packages" \
713        "\n\nOptions:\n" \
714        "        -i              Install the package\n" \
715        "        -l              List of installed packages\n" \
716        "        -C              Configure an unpackaged package\n" \
717        "        -F depends      Ignore dependency problems\n" \
718        "        -P              Purge all files of a package\n" \
719        "        -r              Remove all but the configuration files for a package\n" \
720        "        -u              Unpack a package, but don't configure it"
721
722 #define dpkg_deb_trivial_usage \
723        "[-cefxX] FILE [argument]"
724 #define dpkg_deb_full_usage \
725        "Perform actions on Debian packages (.debs)" \
726        "\n\nOptions:\n" \
727        "        -c      List contents of filesystem tree\n" \
728        "        -e      Extract control files to [argument] directory\n" \
729        "        -f      Display control field name starting with [argument]\n" \
730        "        -x      Extract packages filesystem tree to directory\n" \
731        "        -X      Verbose extract"
732 #define dpkg_deb_example_usage \
733        "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
734
735 #define du_trivial_usage \
736        "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
737 #define du_full_usage \
738        "Summarize disk space used for each FILE and/or directory.\n" \
739        "Disk space is printed in units of " \
740         USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
741         SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
742        " bytes." \
743        "\n\nOptions:\n" \
744        "        -a      Show sizes of files in addition to directories\n" \
745        "        -H      Follow symlinks that are FILE command line args\n" \
746        "        -L      Follow all symlinks encountered\n" \
747        "        -d N    Limit output to directories (and files with -a) of depth < N\n" \
748        "        -c      Output a grand total\n" \
749        "        -l      Count sizes many times if hard linked\n" \
750        "        -s      Display only a total for each argument\n" \
751        "        -x      Skip directories on different filesystems\n" \
752         USE_FEATURE_HUMAN_READABLE( \
753        "        -h      Print sizes in human readable format (e.g., 1K 243M 2G )\n" \
754        "        -m      Print sizes in megabytes\n" \
755         ) \
756        "        -k      Print sizes in kilobytes" \
757         USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("(default)")
758 #define du_example_usage \
759        "$ du\n" \
760        "16      ./CVS\n" \
761        "12      ./kernel-patches/CVS\n" \
762        "80      ./kernel-patches\n" \
763        "12      ./tests/CVS\n" \
764        "36      ./tests\n" \
765        "12      ./scripts/CVS\n" \
766        "16      ./scripts\n" \
767        "12      ./docs/CVS\n" \
768        "104     ./docs\n" \
769        "2417    .\n"
770
771 #define dumpkmap_trivial_usage \
772        "> keymap"
773 #define dumpkmap_full_usage \
774        "Print out a binary keyboard translation table to standard output"
775 #define dumpkmap_example_usage \
776        "$ dumpkmap > keymap\n"
777
778 #define dumpleases_trivial_usage \
779        "[-r|-a] [-f LEASEFILE]"
780 #define dumpleases_full_usage \
781        "Display DHCP leases granted by udhcpd" \
782        "\n\nOptions:\n" \
783        "        -f, --file=FILENAME     Leases file to load\n" \
784        "        -r, --remaining         Interpret lease times as time remaining\n" \
785        "        -a, --absolute          Interpret lease times as expire time"
786
787 #define e2fsck_trivial_usage \
788        "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
789        "[-I inode_buffer_blocks] [-P process_inode_size] " \
790        "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
791        "[-E extended-options] device"
792 #define e2fsck_full_usage \
793        "Check ext2/ext3 file system" \
794        "\n\nOptions:\n" \
795        "        -p              Automatic repair (no questions)\n" \
796        "        -n              Make no changes to the filesystem\n" \
797        "        -y              Assume 'yes' to all questions\n" \
798        "        -c              Check for bad blocks and add them to the badblock list\n" \
799        "        -f              Force checking even if filesystem is marked clean\n" \
800        "        -v              Verbose\n" \
801        "        -b superblock   Use alternative superblock\n" \
802        "        -B blocksize    Force blocksize when looking for superblock\n" \
803        "        -j journal      Set location of the external journal\n" \
804        "        -l file         Add to badblocks list\n" \
805        "        -L file         Set badblocks list"
806
807 #define echo_trivial_usage \
808         USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG ...]"
809 #define echo_full_usage \
810        "Print the specified ARGs to stdout" \
811         USE_FEATURE_FANCY_ECHO( \
812        "\n\nOptions:\n" \
813        "        -n      Suppress trailing newline\n" \
814        "        -e      Interpret backslash-escaped characters (i.e., \\t=tab)\n" \
815        "        -E      Disable interpretation of backslash-escaped characters" \
816         )
817 #define echo_example_usage \
818        "$ echo \"Erik is cool\"\n" \
819        "Erik is cool\n" \
820         USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
821        "Erik\n" \
822        "is\n" \
823        "cool\n" \
824        "$ echo \"Erik\\nis\\ncool\"\n" \
825        "Erik\\nis\\ncool\n")
826
827 #define eject_trivial_usage \
828        "[-t] [-T] [DEVICE]"
829 #define eject_full_usage \
830        "Eject specified DEVICE (or default /dev/cdrom)" \
831        "\n\nOptions:\n" \
832        "        -t      Close tray\n" \
833        "        -T      Open/close tray (toggle)"
834
835 #define ed_trivial_usage ""
836 #define ed_full_usage ""
837
838 #define env_trivial_usage \
839        "[-iu] [-] [name=value]... [command]"
840 #define env_full_usage \
841        "Print the current environment or run a program after setting\n" \
842        "up the specified environment" \
843        "\n\nOptions:\n" \
844        "        -, -i   Start with an empty environment\n" \
845        "        -u      Remove variable from the environment"
846
847 #define ether_wake_trivial_usage \
848        "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
849 #define ether_wake_full_usage \
850        "Send a magic packet to wake up sleeping machines.\n" \
851        "MAC must be a station address (00:11:22:33:44:55) or\n" \
852        "a hostname with a known 'ethers' entry." \
853        "\n\nOptions:\n" \
854        "        -b              Send wake-up packet to the broadcast address\n" \
855        "        -i iface        Use interface ifname instead of the default \"eth0\"\n" \
856        "        -p pass         Append the four or six byte password PW to the packet"
857
858 #define expand_trivial_usage \
859        "[-i] [-t NUM] [FILE|-]"
860 #define expand_full_usage \
861        "Convert tabs to spaces, writing to standard output." \
862        "\n\nOptions:" \
863        "\n      -i" USE_FEATURE_EXPAND_LONG_OPTIONS(",--initial") \
864        "        Do not convert tabs after non blanks" \
865        "\n      -t" USE_FEATURE_EXPAND_LONG_OPTIONS(",--tabs=N") \
866        "        Tabstops every N chars"
867
868 #define expr_trivial_usage \
869        "EXPRESSION"
870 #define expr_full_usage \
871        "Print the value of EXPRESSION to standard output.\n\n" \
872        "EXPRESSION may be:\n" \
873        "        ARG1 | ARG2     ARG1 if it is neither null nor 0, otherwise ARG2\n" \
874        "        ARG1 & ARG2     ARG1 if neither argument is null or 0, otherwise 0\n" \
875        "        ARG1 < ARG2     1 if ARG1 is less than ARG2, else 0. Similarly:\n" \
876        "        ARG1 <= ARG2\n" \
877        "        ARG1 = ARG2\n" \
878        "        ARG1 != ARG2\n" \
879        "        ARG1 >= ARG2\n" \
880        "        ARG1 > ARG2\n" \
881        "        ARG1 + ARG2     Sum of ARG1 and ARG2. Similarly:\n" \
882        "        ARG1 - ARG2\n" \
883        "        ARG1 * ARG2\n" \
884        "        ARG1 / ARG2\n" \
885        "        ARG1 % ARG2\n" \
886        "        STRING : REGEXP         Anchored pattern match of REGEXP in STRING\n" \
887        "        match STRING REGEXP     Same as STRING : REGEXP\n" \
888        "        substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \
889        "        index STRING CHARS      Index in STRING where any CHARS is found, or 0\n" \
890        "        length STRING           Length of STRING\n" \
891        "        quote TOKEN             Interpret TOKEN as a string, even if\n" \
892        "                                it is a keyword like 'match' or an\n" \
893        "                                operator like '/'\n" \
894        "        (EXPRESSION)            Value of EXPRESSION\n\n" \
895        "Beware that many operators need to be escaped or quoted for shells.\n" \
896        "Comparisons are arithmetic if both ARGs are numbers, else\n" \
897        "lexicographical. Pattern matches return the string matched between\n" \
898        "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
899        "of characters matched or 0."
900
901 #define fakeidentd_trivial_usage \
902        "[-fiw] [-b ADDR] [STRING]"
903 #define fakeidentd_full_usage \
904        "Provide fake ident (auth) service" \
905        "\n\nOptions:" \
906        "\n      -f      Run in foreground" \
907        "\n      -i      Inetd mode" \
908        "\n      -w      Inetd 'wait' mode" \
909        "\n      -b ADDR Bind to specified address" \
910        "\n      STRING  Ident answer string (default is 'nobody')"
911
912 #define false_trivial_usage \
913        ""
914 #define false_full_usage \
915        "Return an exit code of FALSE (1)"
916 #define false_example_usage \
917        "$ false\n" \
918        "$ echo $?\n" \
919        "1\n"
920
921 #define fbset_trivial_usage \
922        "[options] [mode]"
923 #define fbset_full_usage \
924        "Show and modify frame buffer settings"
925 #define fbset_example_usage \
926        "$ fbset\n" \
927        "mode \"1024x768-76\"\n" \
928        "        # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
929        "        geometry 1024 768 1024 768 16\n" \
930        "        timings 12714 128 32 16 4 128 4\n" \
931        "        accel false\n" \
932        "        rgba 5/11,6/5,5/0,0/0\n" \
933        "endmode\n"
934
935 #define fdflush_trivial_usage \
936        "DEVICE"
937 #define fdflush_full_usage \
938        "Force floppy disk drive to detect disk change"
939
940 #define fdformat_trivial_usage \
941        "[-n] DEVICE"
942 #define fdformat_full_usage \
943        "Format floppy disk" \
944        "\n\nOptions:\n" \
945        "        -n      Don't verify after format"
946
947 #define fdisk_trivial_usage \
948        "[-luv] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
949 #define fdisk_full_usage \
950        "Change partition table" \
951        "\n\nOptions:\n" \
952        "        -l              List partition table(s)\n" \
953        "        -u              Give Start and End in sector (instead of cylinder) units\n" \
954        "        -s PARTITION    Give partition size(s) in blocks\n" \
955        "        -b 2048         (for certain MO disks) use 2048-byte sectors\n" \
956        "        -C CYLINDERS    Set the number of cylinders\n" \
957        "        -H HEADS        Set the number of heads\n" \
958        "        -S SECTORS      Set the number of sectors\n" \
959        "        -v              Give fdisk version"
960
961 #define find_trivial_usage \
962        "[PATH...] [EXPRESSION]"
963 #define find_full_usage \
964        "Search for files in a directory hierarchy. The default PATH is\n" \
965        "the current directory, default EXPRESSION is '-print'\n" \
966      "\nEXPRESSION may consist of:" \
967      "\n        -follow         Dereference symlinks" \
968         USE_FEATURE_FIND_XDEV( \
969      "\n        -xdev           Don't descend directories on other filesystems") \
970         USE_FEATURE_FIND_MAXDEPTH( \
971      "\n        -maxdepth N     Descend at most N levels. -maxdepth 0 applies" \
972      "\n                        tests/actions to command line arguments only") \
973      "\n        -name PATTERN   File name (w/o directory name) matches PATTERN" \
974         USE_FEATURE_FIND_PATH( \
975      "\n        -path PATTERN   Path matches PATTERN") \
976         USE_FEATURE_FIND_REGEX( \
977      "\n        -regex PATTERN  Path matches regex PATTERN") \
978         USE_FEATURE_FIND_TYPE( \
979      "\n        -type X         File type is X (X is one of: f,d,l,b,c,...)") \
980         USE_FEATURE_FIND_PERM( \
981      "\n        -perm NNN       Permissions match any of (+NNN), all of (-NNN)," \
982      "\n                        or exactly (NNN)") \
983         USE_FEATURE_FIND_MTIME( \
984      "\n        -mtime DAYS     Modified time is greater than (+N), less than (-N)," \
985      "\n                        or exactly (N) days") \
986         USE_FEATURE_FIND_MMIN( \
987      "\n        -mmin MINS      Modified time is greater than (+N), less than (-N)," \
988      "\n                        or exactly (N) minutes") \
989         USE_FEATURE_FIND_NEWER( \
990      "\n        -newer FILE     Modified time is more recent than FILE's") \
991         USE_FEATURE_FIND_INUM( \
992      "\n        -inum N         File has inode number N") \
993         USE_FEATURE_FIND_USER( \
994      "\n        -user NAME      File is owned by user NAME (numeric user ID allowed)") \
995         USE_FEATURE_FIND_GROUP( \
996      "\n        -group NAME     File belongs to group NAME (numeric group ID allowed)") \
997         USE_FEATURE_FIND_DEPTH( \
998      "\n        -depth          Process directory name after traversing it") \
999         USE_FEATURE_FIND_SIZE( \
1000      "\n        -size N[bck]    File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \
1001      "\n                        +/-N: file size is bigger/smaller than N") \
1002      "\n        -print          Print (default and assumed)" \
1003         USE_FEATURE_FIND_PRINT0( \
1004      "\n        -print0         Delimit output with null characters rather than" \
1005      "\n                        newlines") \
1006         USE_FEATURE_FIND_CONTEXT ( \
1007      "\n        -context        File has specified security context") \
1008         USE_FEATURE_FIND_EXEC( \
1009      "\n        -exec CMD ARG ; Execute CMD with all instances of {} replaced by the" \
1010      "\n                        matching files") \
1011         USE_FEATURE_FIND_PRUNE( \
1012      "\n        -prune          Stop traversing current subtree") \
1013         USE_FEATURE_FIND_DELETE( \
1014      "\n        -delete         Delete files, turns on -depth option") \
1015         USE_FEATURE_FIND_PAREN( \
1016      "\n        (EXPR)          Group an expression") \
1017
1018 #define find_example_usage \
1019        "$ find / -name passwd\n" \
1020        "/etc/passwd\n"
1021
1022 #define fold_trivial_usage \
1023        "[-bs] [-w WIDTH] [FILE]"
1024 #define fold_full_usage \
1025        "Wrap input lines in each FILE (standard input by default), writing to\n" \
1026        "standard output" \
1027        "\n\nOptions:\n" \
1028        "        -b      Count bytes rather than columns\n" \
1029        "        -s      Break at spaces\n" \
1030        "        -w      Use WIDTH columns instead of 80"
1031
1032 #define free_trivial_usage \
1033        ""
1034 #define free_full_usage \
1035        "Display the amount of free and used system memory"
1036 #define free_example_usage \
1037        "$ free\n" \
1038        "              total         used         free       shared      buffers\n" \
1039        "  Mem:       257628       248724         8904        59644        93124\n" \
1040        " Swap:       128516         8404       120112\n" \
1041        "Total:       386144       257128       129016\n" \
1042
1043 #define freeramdisk_trivial_usage \
1044        "DEVICE"
1045 #define freeramdisk_full_usage \
1046        "Free all memory used by the specified ramdisk"
1047 #define freeramdisk_example_usage \
1048        "$ freeramdisk /dev/ram2\n"
1049
1050 #define fsck_trivial_usage \
1051        "[-ANPRTV] [-C fd] [-t fstype] [fs-options] [filesys ...]"
1052 #define fsck_full_usage \
1053        "Check and repair filesystems" \
1054        "\n\nOptions:\n" \
1055        "        -A      Walk /etc/fstab and check all filesystems\n" \
1056        "        -N      Don't execute, just show what would be done\n" \
1057        "        -P      When using -A, check filesystems in parallel\n" \
1058        "        -R      When using -A, skip the root filesystem\n" \
1059        "        -T      Don't show title on startup\n" \
1060        "        -V      Verbose\n" \
1061        "        -C n    Write status information to specified filedescriptor\n" \
1062        "        -t type List of filesystem types to check"
1063
1064 #define fsck_minix_trivial_usage \
1065        "[-larvsmf] /dev/name"
1066 #define fsck_minix_full_usage \
1067        "Perform a consistency check for MINIX filesystems" \
1068        "\n\nOptions:\n" \
1069        "        -l      List all filenames\n" \
1070        "        -r      Perform interactive repairs\n" \
1071        "        -a      Perform automatic repairs\n" \
1072        "        -v      Verbose\n" \
1073        "        -s      Output super-block information\n" \
1074        "        -m      Activate MINIX-like \"mode not cleared\" warnings\n" \
1075        "        -f      Force file system check"
1076
1077 #define ftpget_trivial_usage \
1078        "[options] remote-host local-file remote-file"
1079 #define ftpget_full_usage \
1080        "Retrieve a remote file via FTP" \
1081        "\n\nOptions:\n" \
1082        "        -c, --continue  Continue a previous transfer\n" \
1083        "        -v, --verbose   Verbose\n" \
1084        "        -u, --username  Username to be used\n" \
1085        "        -p, --password  Password to be used\n" \
1086        "        -P, --port      Port number to be used"
1087
1088 #define ftpput_trivial_usage \
1089        "[options] remote-host remote-file local-file"
1090 #define ftpput_full_usage \
1091        "Store a local file on a remote machine via FTP" \
1092        "\n\nOptions:\n" \
1093        "        -v, --verbose   Verbose\n" \
1094        "        -u, --username  Username to be used\n" \
1095        "        -p, --password  Password to be used\n" \
1096        "        -P, --port      Port number to be used"
1097
1098 #define fuser_trivial_usage \
1099        "[options] file OR port/proto"
1100 #define fuser_full_usage \
1101        "Options:\n" \
1102        "        -m      Show all processes on the same mounted fs\n" \
1103        "        -k      Kill all processes that match\n" \
1104        "        -s      Don't print or kill anything\n" \
1105        "        -4      When using port/proto only search IPv4 space\n" \
1106        "        -6      When using port/proto only search IPv6 space\n" \
1107        "        -SIGNAL When used with -k, this signal will be used to kill"
1108
1109 #define getenforce_trivial_usage
1110 #define getenforce_full_usage
1111
1112 #define getopt_trivial_usage \
1113        "[OPTIONS]..."
1114 #define getopt_full_usage \
1115        "Parse command options\n" \
1116        "        -a, --alternative               Allow long options starting with single -\n" \
1117        "        -l, --longoptions=longopts      Long options to be recognized\n" \
1118        "        -n, --name=progname             The name under which errors are reported\n" \
1119        "        -o, --options=optstring         Short options to be recognized\n" \
1120        "        -q, --quiet                     Disable error reporting by getopt(3)\n" \
1121        "        -Q, --quiet-output              No normal output\n" \
1122        "        -s, --shell=shell               Set shell quoting conventions\n" \
1123        "        -T, --test                      Test for getopt(1) version\n" \
1124        "        -u, --unquoted                  Do not quote the output"
1125 #define getopt_example_usage \
1126        "$ cat getopt.test\n" \
1127        "#!/bin/sh\n" \
1128        "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
1129        "       -n 'example.busybox' -- \"$@\"`\n" \
1130        "if [ $? != 0 ]; then  exit 1; fi\n" \
1131        "eval set -- \"$GETOPT\"\n" \
1132        "while true; do\n" \
1133        " case $1 in\n" \
1134        "   -a|--a-long) echo \"Option a\"; shift;;\n" \
1135        "   -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
1136        "   -c|--c-long)\n" \
1137        "     case \"$2\" in\n" \
1138        "       \"\") echo \"Option c, no argument\"; shift 2;;\n" \
1139        "       *)  echo \"Option c, argument '$2'\"; shift 2;;\n" \
1140        "     esac;;\n" \
1141        "   --) shift; break;;\n" \
1142        "   *) echo \"Internal error!\"; exit 1;;\n" \
1143        " esac\n" \
1144        "done\n"
1145
1146 #define getsebool_trivial_usage \
1147        "-a or getsebool boolean..."
1148 #define getsebool_full_usage \
1149        "        -a      Show all SELinux booleans"
1150
1151 #define getty_trivial_usage \
1152        "[OPTIONS]... baud_rate,... line [termtype]"
1153 #define getty_full_usage \
1154        "Open a tty, prompt for a login name, then invoke /bin/login" \
1155        "\n\nOptions:\n" \
1156        "        -h              Enable hardware (RTS/CTS) flow control\n" \
1157        "        -i              Do not display /etc/issue before running login\n" \
1158        "        -L              Local line, so do not do carrier detect\n" \
1159        "        -m              Get baud rate from modem's CONNECT status message\n" \
1160        "        -w              Wait for a CR or LF before sending /etc/issue\n" \
1161        "        -n              Do not prompt the user for a login name\n" \
1162        "        -f issue_file   Display issue_file instead of /etc/issue\n" \
1163        "        -l login_app    Invoke login_app instead of /bin/login\n" \
1164        "        -t timeout      Terminate after timeout if no username is read\n" \
1165        "        -I initstring   Sets the init string to send before anything else\n" \
1166        "        -H login_host   Log login_host into the utmp file as the hostname"
1167
1168 #define grep_trivial_usage \
1169        "[-HhrilLnqvso" \
1170         USE_DESKTOP("w") \
1171        "eF" \
1172         USE_FEATURE_GREP_EGREP_ALIAS("E") \
1173         USE_FEATURE_GREP_CONTEXT("ABC") \
1174        "] PATTERN [FILEs...]"
1175 #define grep_full_usage \
1176        "Search for PATTERN in each FILE or standard input" \
1177        "\n\nOptions:" \
1178        "\n      -H      Prefix output lines with filename where match was found" \
1179        "\n      -h      Suppress the prefixing filename on output" \
1180        "\n      -r      Recurse subdirectories" \
1181        "\n      -i      Ignore case distinctions" \
1182        "\n      -l      List names of files that match" \
1183        "\n      -L      List names of files that do not match" \
1184        "\n      -n      Print line number with output lines" \
1185        "\n      -q      Quiet. Returns 0 if PATTERN was found, 1 otherwise" \
1186        "\n      -v      Select non-matching lines" \
1187        "\n      -s      Suppress file open/read error messages" \
1188        "\n      -c      Only print count of matching lines" \
1189        "\n      -o      Show only the part of a line that matches PATTERN" \
1190        "\n      -m MAX  Match up to MAX times per file" \
1191         USE_DESKTOP( \
1192        "\n      -w      Match whole words only") \
1193        "\n      -F      PATTERN is a set of newline-separated strings" \
1194         USE_FEATURE_GREP_EGREP_ALIAS( \
1195        "\n      -E      PATTERN is an extended regular expression") \
1196        "\n      -e PTRN Pattern to match" \
1197        "\n      -f FILE Read pattern from file" \
1198         USE_FEATURE_GREP_CONTEXT( \
1199        "\n      -A      Print NUM lines of trailing context" \
1200        "\n      -B      Print NUM lines of leading context" \
1201        "\n      -C      Print NUM lines of output context") \
1202
1203 #define grep_example_usage \
1204        "$ grep root /etc/passwd\n" \
1205        "root:x:0:0:root:/root:/bin/bash\n" \
1206        "$ grep ^[rR]oo. /etc/passwd\n" \
1207        "root:x:0:0:root:/root:/bin/bash\n"
1208
1209 #define gunzip_trivial_usage \
1210        "[OPTION]... FILE"
1211 #define gunzip_full_usage \
1212        "Uncompress FILE (or standard input if FILE is '-')" \
1213        "\n\nOptions:\n" \
1214        "        -c      Write output to standard output\n" \
1215        "        -f      Force\n" \
1216        "        -t      Test compressed file integrity"
1217 #define gunzip_example_usage \
1218        "$ ls -la /tmp/BusyBox*\n" \
1219        "-rw-rw-r--    1 andersen andersen   557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
1220        "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
1221        "$ ls -la /tmp/BusyBox*\n" \
1222        "-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
1223
1224 #define gzip_trivial_usage \
1225        "[OPTION]... [FILE]..."
1226 #define gzip_full_usage \
1227        "Compress FILE(s) with maximum compression.\n" \
1228        "When FILE is '-' or unspecified, reads standard input. Implies -c." \
1229        "\n\nOptions:\n" \
1230        "        -c      Write output to standard output instead of FILE.gz\n" \
1231        "        -d      Decompress\n" \
1232        "        -f      Force"
1233 #define gzip_example_usage \
1234        "$ ls -la /tmp/busybox*\n" \
1235        "-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
1236        "$ gzip /tmp/busybox.tar\n" \
1237        "$ ls -la /tmp/busybox*\n" \
1238        "-rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
1239
1240 #define halt_trivial_usage \
1241        "[-d delay] [-n] [-f]"
1242 #define halt_full_usage \
1243        "Halt the system" \
1244        "\n\nOptions:\n" \
1245        "        -d      Delay interval for halting\n" \
1246        "        -n      No call to sync()\n" \
1247        "        -f      Force halt (don't go through init)"
1248
1249 #define hdparm_trivial_usage \
1250        "[options] [device] .."
1251 #define hdparm_full_usage \
1252         USE_FEATURE_HDPARM_GET_IDENTITY( \
1253        "If no device name is specified try to read from stdin.\n\n") \
1254        "Options:\n" \
1255        "        -a      Get/set fs readahead\n" \
1256        "        -A      Set drive read-lookahead flag (0/1)\n" \
1257        "        -b      Get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \
1258        "        -B      Set Advanced Power Management setting (1-255)\n" \
1259        "        -c      Get/set IDE 32-bit IO setting\n" \
1260        "        -C      Check IDE power mode status\n" \
1261         USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \
1262        "        -d      Get/set using_dma flag\n") \
1263        "        -D      Enable/disable drive defect-mgmt\n" \
1264        "        -f      Flush buffer cache for device on exit\n" \
1265        "        -g      Display drive geometry\n" \
1266        "        -h      Display terse usage information\n" \
1267         USE_FEATURE_HDPARM_GET_IDENTITY( \
1268        "        -i      Display drive identification\n") \
1269         USE_FEATURE_HDPARM_GET_IDENTITY( \
1270        "        -I      Detailed/current information directly from drive\n") \
1271        "        -k      Get/set keep_settings_over_reset flag (0/1)\n" \
1272        "        -K      Set drive keep_features_over_reset flag (0/1)\n" \
1273        "        -L      Set drive doorlock (0/1) (removable harddisks only)\n" \
1274        "        -m      Get/set multiple sector count\n" \
1275        "        -n      Get/set ignore-write-errors flag (0/1)\n" \
1276        "        -p      Set PIO mode on IDE interface chipset (0,1,2,3,4,...)\n" \
1277        "        -P      Set drive prefetch count\n" \
1278        "        -q      Change next setting quietly\n" \
1279        "        -Q      Get/set DMA tagged-queuing depth (if supported)\n" \
1280        "        -r      Get/set readonly flag (DANGEROUS to set)\n" \
1281         USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
1282        "        -R      Register an IDE interface (DANGEROUS)\n") \
1283        "        -S      Set standby (spindown) timeout\n" \
1284        "        -t      Perform device read timings\n" \
1285        "        -T      Perform cache read timings\n" \
1286        "        -u      Get/set unmaskirq flag (0/1)\n" \
1287         USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
1288        "        -U      Un-register an IDE interface (DANGEROUS)\n") \
1289        "        -v      Defaults; same as -mcudkrag for IDE drives\n" \
1290        "        -V      Display program version and exit immediately\n" \
1291         USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
1292        "        -w      Perform device reset (DANGEROUS)\n") \
1293        "        -W      Set drive write-caching flag (0/1) (DANGEROUS)\n" \
1294         USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
1295        "        -x      Tristate device for hotswap (0/1) (DANGEROUS)\n") \
1296        "        -X      Set IDE xfer mode (DANGEROUS)\n" \
1297        "        -y      Put IDE drive in standby mode\n" \
1298        "        -Y      Put IDE drive to sleep\n" \
1299        "        -Z      Disable Seagate auto-powersaving mode\n" \
1300        "        -z      Re-read partition table"
1301
1302 #define head_trivial_usage \
1303        "[OPTION]... [FILE]..."
1304 #define head_full_usage \
1305        "Print first 10 lines of each FILE to standard output.\n" \
1306        "With more than one FILE, precede each with a header giving the\n" \
1307        "file name. With no FILE, or when FILE is -, read standard input." \
1308        "\n\nOptions:" \
1309        "\n      -n NUM  Print first NUM lines instead of first 10" \
1310         USE_FEATURE_FANCY_HEAD( \
1311        "\n      -c NUM  Output the first NUM bytes" \
1312        "\n      -q      Never output headers giving file names" \
1313        "\n      -v      Always output headers giving file names")
1314 #define head_example_usage \
1315        "$ head -n 2 /etc/passwd\n" \
1316        "root:x:0:0:root:/root:/bin/bash\n" \
1317        "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
1318
1319 #define hexdump_trivial_usage \
1320        "[-[bcCdefnosvx]] [OPTION] FILE"
1321 #define hexdump_full_usage \
1322        "Display file(s) or standard input in a user specified format" \
1323        "\n\nOptions:\n" \
1324        "        -b              One-byte octal display\n" \
1325        "        -c              One-byte character display\n" \
1326        "        -C              Canonical hex+ASCII, 16 bytes per line\n" \
1327        "        -d              Two-byte decimal display\n" \
1328        "        -e FORMAT STRING\n" \
1329        "        -f FORMAT FILE\n" \
1330        "        -n LENGTH       Interpret only length bytes of input\n" \
1331        "        -o              Two-byte octal display\n" \
1332        "        -s OFFSET       Skip offset bytes\n" \
1333        "        -v              Display all input data\n" \
1334        "        -x              Two-byte hexadecimal display"
1335
1336 #define hostid_trivial_usage \
1337        ""
1338 #define hostid_full_usage \
1339        "Print out a unique 32-bit identifier for the machine"
1340
1341 #define hostname_trivial_usage \
1342        "[OPTION] {hostname | -F FILE}"
1343 #define hostname_full_usage \
1344        "Get or set the hostname or DNS domain name. If a hostname is given\n" \
1345        "(or FILE with the -F parameter), the host name will be set." \
1346        "\n\nOptions:\n" \
1347        "        -s      Short\n" \
1348        "        -i      Addresses for the hostname\n" \
1349        "        -d      DNS domain name\n" \
1350        "        -f      Fully qualified domain name\n" \
1351        "        -F FILE Use the contents of FILE to specify the hostname"
1352 #define hostname_example_usage \
1353        "$ hostname\n" \
1354        "sage\n"
1355
1356 #define httpd_trivial_usage \
1357        "[-c conffile]" \
1358        " [-p [ip:]port]" \
1359        " [-i] [-f] [-v[v]]" \
1360         USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
1361         USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
1362         USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
1363        " [-h home]" \
1364        " [-d/-e string]"
1365 #define httpd_full_usage \
1366        "Listen for incoming HTTP requests" \
1367        "\n\nOptions:" \
1368        "\n      -c FILE         Configuration file (default httpd.conf)" \
1369        "\n      -p [IP:]PORT    Bind to ip:port (default *:80)" \
1370        "\n      -i              Inetd mode" \
1371        "\n      -f              Do not daemonize" \
1372        "\n      -v[v]           Verbose" \
1373         USE_FEATURE_HTTPD_SETUID( \
1374        "\n      -u USER[:GRP]   Set uid/gid after binding to port") \
1375         USE_FEATURE_HTTPD_BASIC_AUTH( \
1376        "\n      -r REALM        Authentication Realm for Basic Authentication") \
1377         USE_FEATURE_HTTPD_AUTH_MD5( \
1378        "\n      -m PASS         Crypt PASS with md5 algorithm") \
1379        "\n      -h HOME         Home directory (default .)" \
1380        "\n      -e STRING       HTML encode STRING" \
1381        "\n      -d STRING       URL decode STRING" \
1382
1383 #define hwclock_trivial_usage \
1384        "[-r|--show] [-s|--hctosys] [-w|--systohc]" \
1385        " [-l|--localtime] [-u|--utc]" \
1386        " [-f FILE]"
1387 #define hwclock_full_usage \
1388        "Query and set a hardware clock (RTC)" \
1389        "\n\nOptions:\n" \
1390        "        -r      Read hardware clock and print result\n" \
1391        "        -s      Set the system time from the hardware clock\n" \
1392        "        -w      Set the hardware clock to the current system time\n" \
1393        "        -u      The hardware clock is kept in coordinated universal time\n" \
1394        "        -l      The hardware clock is kept in local time\n" \
1395        "        -f FILE Use the specified clock (e.g. /dev/rtc2)"
1396
1397 #define id_trivial_usage \
1398        "[OPTIONS]... [USERNAME]"
1399 #define id_full_usage \
1400        "Print information for USERNAME or the current user" \
1401        "\n\nOptions:\n" \
1402         USE_SELINUX( \
1403        "        -Z      prints only the security context\n" \
1404         ) \
1405        "        -g      Prints only the group ID\n" \
1406        "        -u      Prints only the user ID\n" \
1407        "        -n      Print a name instead of a number\n" \
1408        "        -r      Prints the real user ID instead of the effective ID"
1409 #define id_example_usage \
1410        "$ id\n" \
1411        "uid=1000(andersen) gid=1000(andersen)\n"
1412
1413 #define ifconfig_trivial_usage \
1414         USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
1415 #define ifconfig_full_usage \
1416        "Configure a network interface" \
1417        "\n\nOptions:\n" \
1418         USE_FEATURE_IPV6( \
1419        "        [add ADDRESS[/PREFIXLEN]]\n") \
1420         USE_FEATURE_IPV6( \
1421        "        [del ADDRESS[/PREFIXLEN]]\n") \
1422        "        [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
1423        "        [netmask ADDRESS] [dstaddr ADDRESS]\n" \
1424         USE_FEATURE_IFCONFIG_SLIP( \
1425        "        [outfill NN] [keepalive NN]\n") \
1426        "        " USE_FEATURE_IFCONFIG_HW("[hw ether ADDRESS] ") "[metric NN] [mtu NN]\n" \
1427        "        [[-]trailers] [[-]arp] [[-]allmulti]\n" \
1428        "        [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
1429         USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
1430        "        [mem_start NN] [io_addr NN] [irq NN]\n") \
1431        "        [up|down] ..."
1432
1433 #define ifup_trivial_usage \
1434        "[-ahinv] ifaces..."
1435 #define ifup_full_usage \
1436        "Options:\n" \
1437        "        -a      De/configure all interfaces automatically\n" \
1438        "        -i FILE Use FILE for interface definitions\n" \
1439        "        -n      Print out what would happen, but don't do it\n" \
1440        "                (note that this option doesn't disable mappings)\n" \
1441        "        -v      Print out what would happen before doing it\n" \
1442        "        -m      Don't run any mappings\n" \
1443        "        -f      Force de/configuration"
1444
1445 #define ifdown_trivial_usage \
1446        "[-ahinv] ifaces..."
1447 #define ifdown_full_usage \
1448        "Options:\n" \
1449        "        -a      De/configure all interfaces automatically\n" \
1450        "        -i FILE Use FILE for interface definitions\n" \
1451        "        -n      Print out what would happen, but don't do it\n" \
1452        "                (note that this option doesn't disable mappings)\n" \
1453        "        -v      Print out what would happen before doing it\n" \
1454        "        -m      Don't run any mappings\n" \
1455        "        -f      Force de/configuration"
1456
1457 #define inetd_trivial_usage \
1458        "[-f] [-q len] [conf]"
1459 #define inetd_full_usage \
1460        "Listen for network connections and launch programs" \
1461        "\n\nOptions:\n" \
1462        "        -f      Run in foreground\n" \
1463        "        -q N    Set the size of the socket listen queue to N\n" \
1464        "                (default: 128)"
1465
1466 #define init_trivial_usage \
1467        ""
1468 #define init_full_usage \
1469        "Init is the parent of all processes"
1470 #define init_notes_usage \
1471 "This version of init is designed to be run only by the kernel.\n" \
1472 "\n" \
1473 "BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
1474 "the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
1475 "runlevels, use sysvinit.\n" \
1476 "\n" \
1477 "BusyBox init works just fine without an inittab. If no inittab is found,\n" \
1478 "it has the following default behavior:\n" \
1479 "\n" \
1480 "       ::sysinit:/etc/init.d/rcS\n" \
1481 "       ::askfirst:/bin/sh\n" \
1482 "       ::ctrlaltdel:/sbin/reboot\n" \
1483 "       ::shutdown:/sbin/swapoff -a\n" \
1484 "       ::shutdown:/bin/umount -a -r\n" \
1485 "       ::restart:/sbin/init\n" \
1486 "\n" \
1487 "if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
1488 "\n" \
1489 "       tty2::askfirst:/bin/sh\n" \
1490 "       tty3::askfirst:/bin/sh\n" \
1491 "       tty4::askfirst:/bin/sh\n" \
1492 "\n" \
1493 "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
1494 "\n" \
1495 "       <id>:<runlevels>:<action>:<process>\n" \
1496 "\n" \
1497 "       <id>:\n" \
1498 "\n" \
1499 "               WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
1500 "               The id field is used by BusyBox init to specify the controlling tty for\n" \
1501 "               the specified process to run on. The contents of this field are\n" \
1502 "               appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
1503 "               be unique, although if it isn't you may have strange results. If this\n" \
1504 "               field is left blank, the controlling tty is set to the console. Also\n" \
1505 "               note that if BusyBox detects that a serial console is in use, then only\n" \
1506 "               entries whose controlling tty is either the serial console or /dev/null\n" \
1507 "               will be run. BusyBox init does nothing with utmp. We don't need no\n" \
1508 "               stinkin' utmp.\n" \
1509 "\n" \
1510 "       <runlevels>:\n" \
1511 "\n" \
1512 "               The runlevels field is completely ignored.\n" \
1513 "\n" \
1514 "       <action>:\n" \
1515 "\n" \
1516 "               Valid actions include: sysinit, respawn, askfirst, wait,\n" \
1517 "               once, restart, ctrlaltdel, and shutdown.\n" \
1518 "\n" \
1519 "               The available actions can be classified into two groups: actions\n" \
1520 "               that are run only once, and actions that are re-run when the specified\n" \
1521 "               process exits.\n" \
1522 "\n" \
1523 "               Run only-once actions:\n" \
1524 "\n" \
1525 "                       'sysinit' is the first item run on boot. init waits until all\n" \
1526 "                       sysinit actions are completed before continuing. Following the\n" \
1527 "                       completion of all sysinit actions, all 'wait' actions are run.\n" \
1528 "                       'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
1529 "                       the specified task completes. 'once' actions are asynchronous,\n" \
1530 "                       therefore, init does not wait for them to complete. 'restart' is\n" \
1531 "                       the action taken to restart the init process. By default this should\n" \
1532 "                       simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
1533 "                       can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
1534 "                       actions are run when the system detects that someone on the system\n" \
1535 "                       console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
1536 "                       wants to run 'reboot' at this point to cause the system to reboot.\n" \
1537 "                       Finally the 'shutdown' action specifies the actions to taken when\n" \
1538 "                       init is told to reboot. Unmounting filesystems and disabling swap\n" \
1539 "                       is a very good here.\n" \
1540 "\n" \
1541 "               Run repeatedly actions:\n" \
1542 "\n" \
1543 "                       'respawn' actions are run after the 'once' actions. When a process\n" \
1544 "                       started with a 'respawn' action exits, init automatically restarts\n" \
1545 "                       it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
1546 "                       respawning out of control. The 'askfirst' actions acts just like\n" \
1547 "                       respawn, except that before running the specified process it\n" \
1548 "                       displays the line \"Please press Enter to activate this console.\"\n" \
1549 "                       and then waits for the user to press enter before starting the\n" \
1550 "                       specified process.\n" \
1551 "\n" \
1552 "               Unrecognized actions (like initdefault) will cause init to emit an\n" \
1553 "               error message, and then go along with its business. All actions are\n" \
1554 "               run in the order they appear in /etc/inittab.\n" \
1555 "\n" \
1556 "       <process>:\n" \
1557 "\n" \
1558 "               Specifies the process to be executed and its command line.\n" \
1559 "\n" \
1560 "Example /etc/inittab file:\n" \
1561 "\n" \
1562 "       # This is run first except when booting in single-user mode\n" \
1563 "       #\n" \
1564 "       ::sysinit:/etc/init.d/rcS\n" \
1565 "       \n" \
1566 "       # /bin/sh invocations on selected ttys\n" \
1567 "       #\n" \
1568 "       # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
1569 "       ::askfirst:-/bin/sh\n" \
1570 "       # Start an \"askfirst\" shell on /dev/tty2-4\n" \
1571 "       tty2::askfirst:-/bin/sh\n" \
1572 "       tty3::askfirst:-/bin/sh\n" \
1573 "       tty4::askfirst:-/bin/sh\n" \
1574 "       \n" \
1575 "       # /sbin/getty invocations for selected ttys\n" \
1576 "       #\n" \
1577 "       tty4::respawn:/sbin/getty 38400 tty4\n" \
1578 "       tty5::respawn:/sbin/getty 38400 tty5\n" \
1579 "       \n" \
1580 "       \n" \
1581 "       # Example of how to put a getty on a serial line (for a terminal)\n" \
1582 "       #\n" \
1583 "       #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
1584 "       #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
1585 "       #\n" \
1586 "       # Example how to put a getty on a modem line\n" \
1587 "       #::respawn:/sbin/getty 57600 ttyS2\n" \
1588 "       \n" \
1589 "       # Stuff to do when restarting the init process\n" \
1590 "       ::restart:/sbin/init\n" \
1591 "       \n" \
1592 "       # Stuff to do before rebooting\n" \
1593 "       ::ctrlaltdel:/sbin/reboot\n" \
1594 "       ::shutdown:/bin/umount -a -r\n" \
1595 "       ::shutdown:/sbin/swapoff -a\n"
1596
1597 #define insmod_trivial_usage \
1598         USE_FEATURE_2_4_MODULES("[OPTION]... ") "MODULE [symbol=value]..."
1599 #define insmod_full_usage \
1600        "Load the specified kernel modules into the kernel" \
1601         USE_FEATURE_2_4_MODULES( \
1602        "\n\nOptions:\n" \
1603        "        -f      Force module to load into the wrong kernel version\n" \
1604        "        -k      Make module autoclean-able\n" \
1605        "        -v      Verbose\n" \
1606        "        -q      Quiet\n" \
1607        "        -L      Lock to prevent simultaneous loads of a module\n" \
1608         USE_FEATURE_INSMOD_LOAD_MAP( \
1609        "        -m      Output load map to stdout\n" \
1610         ) \
1611        "        -o NAME Set internal module name to NAME\n" \
1612        "        -x      Do not export externs" \
1613         )
1614
1615 #define install_trivial_usage \
1616        "[-cgmops] [sources] dest|directory"
1617 #define install_full_usage \
1618        "Copy files and set attributes" \
1619        "\n\nOptions:\n" \
1620        "        -c      Copy the file, default\n" \
1621        "        -d      Create directories\n" \
1622        "        -g      Set group ownership\n" \
1623        "        -m      Set permissions\n" \
1624        "        -o      Set ownership\n" \
1625        "        -p      Preserve date\n" \
1626        "        -s      Strip symbol tables" \
1627         USE_SELINUX( \
1628        "\n      -Z      Set security context of copy" \
1629         )
1630 /* would need to make the " | " optional depending on more than one selected */
1631 #define ip_trivial_usage \
1632        "[OPTIONS] {" \
1633         USE_FEATURE_IP_ADDRESS("address | ") \
1634         USE_FEATURE_IP_ROUTE("route | ") \
1635         USE_FEATURE_IP_LINK("link | ") \
1636         USE_FEATURE_IP_TUNNEL("tunnel | ") \
1637         USE_FEATURE_IP_RULE("rule") \
1638        "} {COMMAND}"
1639 #define ip_full_usage \
1640        "ip [OPTIONS] OBJECT {COMMAND}\n" \
1641        "where OBJECT := {" \
1642         USE_FEATURE_IP_ADDRESS("address | ") \
1643         USE_FEATURE_IP_ROUTE("route | ") \
1644         USE_FEATURE_IP_LINK("link | ") \
1645         USE_FEATURE_IP_TUNNEL("tunnel | ") \
1646         USE_FEATURE_IP_RULE("rule") \
1647        "}\n" \
1648        "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }"
1649
1650 #define ipaddr_trivial_usage \
1651        "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
1652        "                [dev STRING] [to PREFIX] }"
1653 #define ipaddr_full_usage \
1654        "ipaddr {add|delete} IFADDR dev STRING\n" \
1655        "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n" \
1656        "        [to PREFIX] [label PATTERN]\n" \
1657        "        IFADDR := PREFIX | ADDR peer PREFIX\n" \
1658        "        [broadcast ADDR] [anycast ADDR]\n" \
1659        "        [label STRING] [scope SCOPE-ID]\n" \
1660        "        SCOPE-ID := [host | link | global | NUMBER]"
1661
1662 #define ipcalc_trivial_usage \
1663        "[OPTION]... ADDRESS[[/]NETMASK] [NETMASK]"
1664 #define ipcalc_full_usage \
1665        "Calculate IP network settings from a IP address" \
1666        "\n\nOptions:" \
1667        "\n      -b      --broadcast     Display calculated broadcast address" \
1668        "\n      -n      --network       Display calculated network address" \
1669        "\n      -m      --netmask       Display default netmask for IP" \
1670         USE_FEATURE_IPCALC_FANCY( \
1671        "\n      -p      --prefix        Display the prefix for IP/NETMASK" \
1672        "\n      -h      --hostname      Display first resolved host name" \
1673        "\n      -s      --silent        Don't ever display error messages")
1674
1675 #define ipcrm_trivial_usage \
1676        "[-[MQS] key] [-[mqs] id]"
1677 #define ipcrm_full_usage \
1678        "The upper-case options MQS are used to remove a shared memory segment by a\n" \
1679        "segment by a shmkey value. The lower-case options mqs are used\n" \
1680        "to remove a segment by shmid value.\n" \
1681        "\n\nOptions:\n" \
1682        "        -[mM]   Remove the memory segment after the last detach\n" \
1683        "        -[qQ]   Remove the message queue\n" \
1684        "        -[sS]   Remove the semaphore"
1685
1686 #define ipcs_trivial_usage \
1687        "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
1688 #define ipcs_full_usage \
1689        "        -i      Show a specific resource\n" \
1690        "Resource specification:\n" \
1691        "        -m      Shared memory segments\n" \
1692        "        -q      Message queues\n" \
1693        "        -s      Semaphore arrays\n" \
1694        "        -a      All (default)\n" \
1695        "Output format:\n" \
1696        "        -t      Time\n" \
1697        "        -c      Creator\n" \
1698        "        -p      Pid\n" \
1699        "        -l      Limits\n" \
1700        "        -u      Summary"
1701
1702 #define iplink_trivial_usage \
1703        "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
1704 #define iplink_full_usage \
1705        "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \
1706        "                        dynamic { on | off } |\n" \
1707        "                        mtu MTU }\n" \
1708        "iplink show [DEVICE]"
1709
1710 #define iproute_trivial_usage \
1711        "{ list | flush | { add | del | change | append |\n" \
1712        "                replace | monitor } ROUTE }"
1713 #define iproute_full_usage \
1714        "iproute { list | flush } SELECTOR\n" \
1715        "iproute get ADDRESS [from ADDRESS iif STRING]\n" \
1716        "                        [oif STRING]  [tos TOS]\n" \
1717        "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
1718        "                        SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
1719        "                        ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]"
1720
1721 #define iprule_trivial_usage \
1722        "{[list | add | del] RULE}"
1723 #define iprule_full_usage \
1724        "iprule [list | add | del] SELECTOR ACTION\n" \
1725        "        SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \
1726        "                        [dev STRING] [pref NUMBER]\n" \
1727        "        ACTION := [table TABLE_ID] [nat ADDRESS]\n" \
1728        "                        [prohibit | reject | unreachable]\n" \
1729        "                        [realms [SRCREALM/]DSTREALM]\n" \
1730        "        TABLE_ID := [local | main | default | NUMBER]"
1731
1732 #define iptunnel_trivial_usage \
1733        "{ add | change | del | show } [NAME]\n" \
1734        "        [mode { ipip | gre | sit }]\n" \
1735        "        [remote ADDR] [local ADDR] [ttl TTL]"
1736 #define iptunnel_full_usage \
1737        "iptunnel { add | change | del | show } [NAME]\n" \
1738        "        [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \
1739        "        [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
1740        "        [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]"
1741
1742 #define kill_trivial_usage \
1743        "[-l] [-signal] process-id [process-id ...]"
1744 #define kill_full_usage \
1745        "Send a signal (default is TERM) to the specified process(es)" \
1746        "\n\nOptions:\n" \
1747        "        -l      List all signal names and numbers"
1748 #define kill_example_usage \
1749        "$ ps | grep apache\n" \
1750        "252 root     root     S [apache]\n" \
1751        "263 www-data www-data S [apache]\n" \
1752        "264 www-data www-data S [apache]\n" \
1753        "265 www-data www-data S [apache]\n" \
1754        "266 www-data www-data S [apache]\n" \
1755        "267 www-data www-data S [apache]\n" \
1756        "$ kill 252\n"
1757
1758 #define killall_trivial_usage \
1759        "[-l] [-q] [-signal] process-name [process-name ...]"
1760 #define killall_full_usage \
1761        "Send a signal (default is TERM) to the specified process(es)" \
1762        "\n\nOptions:\n" \
1763        "        -l      List all signal names and numbers\n" \
1764        "        -q      Do not complain if no processes were killed"
1765 #define killall_example_usage \
1766        "$ killall apache\n"
1767
1768 #define killall5_trivial_usage \
1769        "[-l] [-signal]"
1770 #define killall5_full_usage \
1771        "Send a signal (default is TERM) to all processes outside current session" \
1772        "\n\nOptions:\n" \
1773        "        -l      List all signal names and numbers\n" \
1774
1775 #define klogd_trivial_usage \
1776        "[-c n] [-n]"
1777 #define klogd_full_usage \
1778        "Kernel logger" \
1779        "\n\nOptions:\n" \
1780        "        -c n    Sets the default log level of console messages to n\n" \
1781        "        -n      Run in foreground"
1782
1783 #define length_trivial_usage \
1784        "STRING"
1785 #define length_full_usage \
1786        "Print out the length of the specified STRING"
1787 #define length_example_usage \
1788        "$ length Hello\n" \
1789        "5\n"
1790
1791 #define less_trivial_usage \
1792        "[-EMNmh~?] FILE1 FILE2..."
1793 #define less_full_usage \
1794        "View a file or list of files. The position within files can be\n" \
1795        "changed, and files can be manipulated in various ways." \
1796        "\n\nOptions:\n" \
1797        "        -E      Quit once the end of a file is reached\n" \
1798        "        -M,-m   Display a status line containing the current line numbers\n" \
1799        "                and the percentage through the file\n" \
1800        "        -N      Prefix line numbers to each line\n" \
1801        "        -~      Suppress ~s displayed when input past the end of the file is\n" \
1802        "                reached"
1803
1804 #define setarch_trivial_usage \
1805        "personality program [args ...]"
1806 #define setarch_full_usage \
1807        "Personality may be:\n" \
1808        "        linux32         Set 32bit uname emulation\n" \
1809        "        linux64         Set 64bit uname emulation"
1810
1811 #define ln_trivial_usage \
1812        "[OPTION] TARGET... LINK_NAME|DIRECTORY"
1813 #define ln_full_usage \
1814        "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \
1815        "You may use '--' to indicate that all following arguments are non-options." \
1816        "\n\nOptions:\n" \
1817        "        -s      Make symlinks instead of hardlinks\n" \
1818        "        -f      Remove existing destination files\n" \
1819        "        -n      Don't dereference symlinks - treat like normal file\n" \
1820        "        -b      Make a backup of the target (if exists) before link operation\n" \
1821        "        -S suf  Use suffix instead of ~ when making backup files"
1822 #define ln_example_usage \
1823        "$ ln -s BusyBox /tmp/ls\n" \
1824        "$ ls -l /tmp/ls\n" \
1825        "lrwxrwxrwx    1 root     root            7 Apr 12 18:39 ls -> BusyBox*\n"
1826
1827 #define load_policy_trivial_usage
1828
1829 #define load_policy_full_usage
1830
1831 #define loadfont_trivial_usage \
1832        "< font"
1833 #define loadfont_full_usage \
1834        "Load a console font from standard input"
1835 #define loadfont_example_usage \
1836        "$ loadfont < /etc/i18n/fontname\n"
1837
1838 #define loadkmap_trivial_usage \
1839        "< keymap"
1840 #define loadkmap_full_usage \
1841        "Load a binary keyboard translation table from standard input"
1842 #define loadkmap_example_usage \
1843        "$ loadkmap < /etc/i18n/lang-keymap\n"
1844
1845 #define logger_trivial_usage \
1846        "[OPTION]... [MESSAGE]"
1847 #define logger_full_usage \
1848        "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin." \
1849        "\n\nOptions:\n" \
1850        "        -s      Log to stderr as well as the system log\n" \
1851        "        -t TAG  Log using the specified tag (defaults to user name)\n" \
1852        "        -p PRIO Enter the message with the specified priority.\n" \
1853        "                This may be numerical or a 'facility.level' pair."
1854 #define logger_example_usage \
1855        "$ logger \"hello\"\n"
1856
1857 #define login_trivial_usage \
1858        "[OPTION]... [username] [ENV=VAR ...]"
1859 #define login_full_usage \
1860        "Begin a new session on the system" \
1861        "\n\nOptions:\n" \
1862        "        -f      Do not authenticate (user already authenticated)\n" \
1863        "        -h      Name of the remote host for this login\n" \
1864        "        -p      Preserve environment"
1865
1866 #define logname_trivial_usage \
1867        ""
1868 #define logname_full_usage \
1869        "Print the name of the current user"
1870 #define logname_example_usage \
1871        "$ logname\n" \
1872        "root\n"
1873
1874 #define logread_trivial_usage \
1875        "[OPTION]..."
1876 #define logread_full_usage \
1877        "Show the messages from syslogd (using circular buffer)" \
1878        "\n\nOptions:\n" \
1879        "        -f      Output data as the log grows"
1880
1881 #define losetup_trivial_usage \
1882        "[-o OFS] LOOPDEV FILE - associate loop devices\n" \
1883        "        losetup -d LOOPDEV - disassociate\n" \
1884        "        losetup [-f] - show"
1885 #define losetup_full_usage \
1886        "Options:\n" \
1887        "        -o OFS  Start OFS bytes into FILE\n" \
1888        "        -f      Show first free loop device"
1889 #define losetup_notes_usage \
1890        "No arguments will display all current associations.\n" \
1891        "One argument (losetup /dev/loop1) will display the current association\n" \
1892        "(if any), or disassociate it (with -d). The display shows the offset\n" \
1893        "and filename of the file the loop device is currently bound to.\n\n" \
1894        "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
1895        "with an optional offset (-o 12345). Encryption is not yet supported.\n" \
1896        "losetup -f will show the first loop free loop device\n\n"
1897
1898 #define ls_trivial_usage \
1899        "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
1900         USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
1901         USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
1902         USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
1903         USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
1904         USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \
1905         USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \
1906         USE_SELINUX("K") "] [filenames...]"
1907 #define ls_full_usage \
1908        "List directory contents" \
1909        "\n\nOptions:" \
1910        "\n      -1      List files in a single column" \
1911        "\n      -A      Do not list implied . and .." \
1912        "\n      -a      Do not hide entries starting with ." \
1913        "\n      -C      List entries by columns" \
1914         USE_FEATURE_LS_TIMESTAMPS( \
1915        "\n      -c      With -l: show ctime") \
1916         USE_FEATURE_LS_COLOR( \
1917        "\n      --color[={always,never,auto}]   Control coloring") \
1918        "\n      -d      List directory entries instead of contents" \
1919         USE_FEATURE_LS_TIMESTAMPS( \
1920        "\n      -e      List both full date and full time") \
1921         USE_FEATURE_LS_FILETYPES( \
1922        "\n      -F      Append indicator (one of */=@|) to entries") \
1923        "\n      -i      List the i-node for each file" \
1924        "\n      -l      Use a long listing format" \
1925        "\n      -n      List numeric UIDs and GIDs instead of names" \
1926         USE_FEATURE_LS_FILETYPES( \
1927        "\n      -p      Append indicator (one of /=@|) to entries") \
1928         USE_FEATURE_LS_FOLLOWLINKS( \
1929        "\n      -L      List entries pointed to by symlinks") \
1930         USE_FEATURE_LS_RECURSIVE( \
1931        "\n      -R      List subdirectories recursively") \
1932         USE_FEATURE_LS_SORTFILES( \
1933        "\n      -r      Sort the listing in reverse order") \
1934         USE_FEATURE_LS_SORTFILES( \
1935        "\n      -S      Sort the listing by file size") \
1936        "\n      -s      List the size of each file, in blocks" \
1937         USE_FEATURE_AUTOWIDTH( \
1938        "\n      -T NUM  Assume Tabstop every NUM columns") \
1939         USE_FEATURE_LS_TIMESTAMPS( \
1940        "\n      -t      With -l: show modification time") \
1941         USE_FEATURE_LS_TIMESTAMPS( \
1942        "\n      -u      With -l: show access time") \
1943         USE_FEATURE_LS_SORTFILES( \
1944        "\n      -v      Sort the listing by version") \
1945         USE_FEATURE_AUTOWIDTH( \
1946        "\n      -w NUM  Assume the terminal is NUM columns wide") \
1947        "\n      -x      List entries by lines instead of by columns" \
1948         USE_FEATURE_LS_SORTFILES( \
1949        "\n      -X      Sort the listing by extension") \
1950         USE_FEATURE_HUMAN_READABLE( \
1951        "\n      -h      Print sizes in human readable format (e.g., 1K 243M 2G)") \
1952         USE_SELINUX( \
1953        "\n      -k      Print security context") \
1954         USE_SELINUX( \
1955        "\n      -K      Print security context in long format") \
1956         USE_SELINUX( \
1957        "\n      -Z      Print security context and permission")
1958
1959 #define lsattr_trivial_usage \
1960        "[-Radlv] [files...]"
1961 #define lsattr_full_usage \
1962        "List file attributes on an ext2 fs" \
1963        "\n\nOptions:\n" \
1964        "        -R      Recursively list subdirectories\n" \
1965        "        -a      Do not hide entries starting with .\n" \
1966        "        -d      List directory entries instead of contents\n" \
1967        "        -l      Print long flag names\n" \
1968        "        -v      List the file's version/generation number"
1969
1970 #define lsmod_trivial_usage \
1971        ""
1972 #define lsmod_full_usage \
1973        "List the currently loaded kernel modules"
1974
1975 #if ENABLE_FEATURE_MAKEDEVS_LEAF
1976 #define makedevs_trivial_usage \
1977        "NAME TYPE MAJOR MINOR FIRST LAST [s]"
1978 #define makedevs_full_usage \
1979        "Create a range of block or character special files\n\n" \
1980        "TYPEs include:\n" \
1981        "        b:      Make a block (buffered) device\n" \
1982        "        c or u: Make a character (un-buffered) device\n" \
1983        "        p:      Make a named pipe. MAJOR and MINOR are ignored for named pipes\n" \
1984        "\n" \
1985        "FIRST specifies the number appended to NAME to create the first device.\n" \
1986        "LAST specifies the number of the last item that should be created\n" \
1987        "If 's' is the last argument, the base device is created as well.\n\n" \
1988        "For example:\n" \
1989        "        makedevs /dev/ttyS c 4 66 2 63   ->  ttyS2-ttyS63\n" \
1990        "        makedevs /dev/hda b 3 0 0 8 s    ->  hda,hda1-hda8"
1991 #define makedevs_example_usage \
1992        "# makedevs /dev/ttyS c 4 66 2 63\n" \
1993        "[creates ttyS2-ttyS63]\n" \
1994        "# makedevs /dev/hda b 3 0 0 8 s\n" \
1995        "[creates hda,hda1-hda8]\n"
1996 #endif
1997
1998 #if ENABLE_FEATURE_MAKEDEVS_TABLE
1999 #define makedevs_trivial_usage \
2000        "[-d device_table] rootdir"
2001 #define makedevs_full_usage \
2002        "Create a range of special files as specified in a device table.\n" \
2003        "Device table entries take the form of:\n" \
2004        "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
2005        "Where name is the file name, type can be one of:\n" \
2006        "        f       A regular file\n" \
2007        "        d       Directory\n" \
2008        "        c       Character special device file\n" \
2009        "        b       Block special device file\n" \
2010        "        p       Fifo (named pipe)\n" \
2011        "uid is the user id for the target file, gid is the group id for the\n" \
2012        "target file. The rest of the entries (major, minor, etc) apply to\n" \
2013        "to device special files. A '-' may be used for blank entries."
2014 #define makedevs_example_usage \
2015        "For example:\n" \
2016        "<name>    <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
2017        "/dev         d   755    0    0    -      -      -      -    -\n" \
2018        "/dev/console c   666    0    0    5      1      -      -    -\n" \
2019        "/dev/null    c   666    0    0    1      3      0      0    -\n" \
2020        "/dev/zero    c   666    0    0    1      5      0      0    -\n" \
2021        "/dev/hda     b   640    0    0    3      0      0      0    -\n" \
2022        "/dev/hda     b   640    0    0    3      1      1      1    15\n\n" \
2023        "Will Produce:\n" \
2024        "/dev\n" \
2025        "/dev/console\n" \
2026        "/dev/null\n" \
2027        "/dev/zero\n" \
2028        "/dev/hda\n" \
2029        "/dev/hda[0-15]\n"
2030 #endif
2031
2032 #define matchpathcon_trivial_usage \
2033        "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
2034 #define matchpathcon_full_usage \
2035        "        -n      Do not display path" \
2036        "\n      -N      Do not use translations" \
2037        "\n      -f      Use alternate file_context file" \
2038        "\n      -p      Use prefix to speed translations" \
2039        "\n      -V      Verify file context on disk matches defaults"
2040
2041 #define md5sum_trivial_usage \
2042        "[OPTION] [FILEs...]" \
2043         USE_FEATURE_MD5_SHA1_SUM_CHECK("\n   or: md5sum [OPTION] -c [FILE]")
2044 #define md5sum_full_usage \
2045        "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
2046        "\n\nOptions:\n" \
2047        "With no FILE, or when FILE is -, read standard input." \
2048         USE_FEATURE_MD5_SHA1_SUM_CHECK("\n\n" \
2049        "        -c      Check MD5 sums against given list\n" \
2050        "\nThe following two options are useful only when verifying checksums:\n" \
2051        "        -s      Don't output anything, status code shows success\n" \
2052        "        -w      Warn about improperly formatted MD5 checksum lines")
2053 #define md5sum_example_usage \
2054        "$ md5sum < busybox\n" \
2055        "6fd11e98b98a58f64ff3398d7b324003\n" \
2056        "$ md5sum busybox\n" \
2057        "6fd11e98b98a58f64ff3398d7b324003  busybox\n" \
2058        "$ md5sum -c -\n" \
2059        "6fd11e98b98a58f64ff3398d7b324003  busybox\n" \
2060        "busybox: OK\n" \
2061        "^D\n"
2062
2063 #define mdev_trivial_usage \
2064        "[-s]"
2065 #define mdev_full_usage \
2066        "        -s      Scan /sys and populate /dev during system boot\n\n" \
2067        "Called with no options (via hotplug) it uses environment variables\n" \
2068        "to determine which device to add/remove."
2069 #define mdev_notes_usage "" \
2070         USE_FEATURE_MDEV_CONFIG( \
2071        "The mdev config file contains lines that look like:\n" \
2072        "  hd[a-z][0-9]* 0:3 660\n\n" \
2073        "That's device name (with regex match), uid:gid, and permissions.\n\n" \
2074         USE_FEATURE_MDEV_EXEC( \
2075        "Optionally, that can be followed (on the same line) by a special character\n" \
2076        "and a command line to run after creating/before deleting the corresponding\n" \
2077        "device(s). The environment variable $MDEV indicates the active device node\n" \
2078        "(which is useful if it's a regex match). For example:\n\n" \
2079        "  hdc root:cdrom 660  *ln -s $MDEV cdrom\n\n" \
2080        "The special characters are @ (run after creating), $ (run before deleting),\n" \
2081        "and * (run both after creating and before deleting). The commands run in\n" \
2082        "the /dev directory, and use system() which calls /bin/sh.\n\n" \
2083         ) \
2084        "Config file parsing stops on the first matching line. If no config\n"\
2085        "entry is matched, devices are created with default 0:0 660. (Make\n"\
2086        "the last line match .* to override this.)\n\n" \
2087         )
2088
2089 #define mesg_trivial_usage \
2090        "[y|n]"
2091 #define mesg_full_usage \
2092        "Control write access to your terminal\n" \
2093        "        y       Allow write access to your terminal\n" \
2094        "        n       Disallow write access to your terminal"
2095
2096 #define microcom_trivial_usage \
2097         "[-s speed] tty-name"
2098 #define microcom_full_usage \
2099         ""
2100
2101 #define mkdir_trivial_usage \
2102        "[OPTION] DIRECTORY..."
2103 #define mkdir_full_usage \
2104        "Create the DIRECTORY(ies) if they do not already exist" \
2105        "\n\nOptions:\n" \
2106        "        -m      Set permission mode (as in chmod), not rwxrwxrwx - umask\n" \
2107        "        -p      No error if existing, make parent directories as needed" \
2108         USE_SELINUX( \
2109        "\n      -Z      Set security context" \
2110         )
2111
2112 #define mkdir_example_usage \
2113        "$ mkdir /tmp/foo\n" \
2114        "$ mkdir /tmp/foo\n" \
2115        "/tmp/foo: File exists\n" \
2116        "$ mkdir /tmp/foo/bar/baz\n" \
2117        "/tmp/foo/bar/baz: No such file or directory\n" \
2118        "$ mkdir -p /tmp/foo/bar/baz\n"
2119
2120 #define mke2fs_trivial_usage \
2121        "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \
2122        "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \
2123        "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \
2124        "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \
2125        "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
2126        "device [blocks-count]"
2127 #define mke2fs_full_usage \
2128        "        -b size         Block size in bytes\n" \
2129        "        -c              Check for bad blocks before creating\n" \
2130        "        -E opts         Set extended options\n" \
2131        "        -f size         Fragment size in bytes\n" \
2132        "        -F              Force (ignore sanity checks)\n" \
2133        "        -g num          Number of blocks in a block group\n" \
2134        "        -i ratio        The bytes/inode ratio\n" \
2135        "        -j              Create a journal (ext3)\n" \
2136        "        -J opts         Set journal options (size/device)\n" \
2137        "        -l file         Read bad blocks list from file\n" \
2138        "        -L lbl          Set the volume label\n" \
2139        "        -m percent      Percent of fs blocks to reserve for admin\n" \
2140        "        -M dir          Set last mounted directory\n" \
2141        "        -n              Do not actually create anything\n" \
2142        "        -N num          Number of inodes to create\n" \
2143        "        -o os           Set the 'creator os' field\n" \
2144        "        -O features     Dir_index/filetype/has_journal/journal_dev/sparse_super\n" \
2145        "        -q              Quiet\n" \
2146        "        -r rev          Set filesystem revision\n" \
2147        "        -S              Write superblock and group descriptors only\n" \
2148        "        -T fs-type      Set usage type (news/largefile/largefile4)\n" \
2149        "        -v              Verbose"
2150
2151 #define mkfifo_trivial_usage \
2152        "[OPTIONS] name"
2153 #define mkfifo_full_usage \
2154        "Create a named pipe (identical to 'mknod name p')" \
2155        "\n\nOptions:\n" \
2156        "        -m      Create the pipe using the specified mode (default a=rw)" \
2157         USE_SELINUX( \
2158        "\n      -Z      Set security context" \
2159         )
2160
2161 #define mkfs_minix_trivial_usage \
2162        "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
2163 #define mkfs_minix_full_usage \
2164        "Make a MINIX filesystem" \
2165        "\n\nOptions:\n" \
2166        "        -c              Check device for bad blocks\n" \
2167        "        -n [14|30]      Maximum length of filenames\n" \
2168        "        -i INODES       Number of inodes for the filesystem\n" \
2169        "        -l FILENAME     Read bad blocks list from FILENAME\n" \
2170        "        -v              Make a Minix version 2 filesystem"
2171
2172 #define mknod_trivial_usage \
2173        "[OPTIONS] NAME TYPE MAJOR MINOR"
2174 #define mknod_full_usage \
2175        "Create a special file (block, character, or pipe)" \
2176        "\n\nOptions:\n" \
2177        "        -m      Create the special file using the specified mode (default a=rw)" \
2178        "\n\nTYPEs include:\n" \
2179        "        b:      Make a block (buffered) device\n" \
2180        "        c or u: Make a character (un-buffered) device\n" \
2181        "        p:      Make a named pipe. MAJOR and MINOR are ignored for named pipes" \
2182         USE_SELINUX( \
2183        "\n      -Z      Set security context" \
2184         )
2185
2186 #define mknod_example_usage \
2187        "$ mknod /dev/fd0 b 2 0\n" \
2188        "$ mknod -m 644 /tmp/pipe p\n"
2189
2190 #define mkswap_trivial_usage \
2191        "[-c] [-v0|-v1] device [block-count]"
2192 #define mkswap_full_usage \
2193        "Prepare a disk partition to be used as swap partition" \
2194        "\n\nOptions:\n" \
2195        "        -c              Check for read-ability\n" \
2196        "        -v0             Make version 0 swap [max 128 Megs]\n" \
2197        "        -v1             Make version 1 swap [big!] (default for kernels > 2.1.117)\n" \
2198        "        block-count     Number of block to use (default is entire partition)"
2199
2200 #define mktemp_trivial_usage \
2201        "[-dq] TEMPLATE"
2202 #define mktemp_full_usage \
2203        "Create a temporary file with its name based on TEMPLATE.\n" \
2204        "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX)." \
2205        "\n\nOptions:\n" \
2206        "        -d      Make a directory instead of a file\n" \
2207        "        -q      Fail silently if an error occurs"
2208 #define mktemp_example_usage \
2209        "$ mktemp /tmp/temp.XXXXXX\n" \
2210        "/tmp/temp.mWiLjM\n" \
2211        "$ ls -la /tmp/temp.mWiLjM\n" \
2212        "-rw-------    1 andersen andersen        0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
2213
2214 #define modprobe_trivial_usage \
2215        "[-knqrsv] MODULE [symbol=value ...]"
2216 #define modprobe_full_usage \
2217        "Options:\n" \
2218        "        -k      Make module autoclean-able\n" \
2219        "        -n      Dry run\n" \
2220        "        -q      Quiet\n" \
2221        "        -r      Remove module (stacks) or do autoclean\n" \
2222        "        -s      Report via syslog instead of stderr\n" \
2223        "        -v      Verbose"
2224 #define modprobe_notes_usage \
2225 "modprobe can (un)load a stack of modules, passing each module options (when\n" \
2226 "loading). modprobe uses a configuration file to determine what option(s) to\n" \
2227 "pass each module it loads.\n" \
2228 "\n" \
2229 "The configuration file is searched (in order) amongst:\n" \
2230 "\n" \
2231 "    /etc/modprobe.conf (2.6 only)\n" \
2232 "    /etc/modules.conf\n" \
2233 "    /etc/conf.modules (deprecated)\n" \
2234 "\n" \
2235 "They all have the same syntax (see below). If none is present, it is\n" \
2236 "_not_ an error; each loaded module is then expected to load without\n" \
2237 "options. Once a file is found, the others are tested for.\n" \
2238 "\n" \
2239 "/etc/modules.conf entry format:\n" \
2240 "\n" \
2241 "  alias <alias_name> <mod_name>\n" \
2242 "    Makes it possible to modprobe alias_name, when there is no such module.\n" \
2243 "    It makes sense if your mod_name is long, or you want a more representative\n" \
2244 "    name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
2245 "    This makes it also possible to use a different set of options (below) for\n" \
2246 "    the module and the alias.\n" \
2247 "    A module can be aliased more than once.\n" \
2248 "\n" \
2249 "  options <mod_name|alias_name> <symbol=value ...>\n" \
2250 "    When loading module mod_name (or the module aliased by alias_name), pass\n" \
2251 "    the \"symbol=value\" pairs as option to that module.\n" \
2252 "\n" \
2253 "Sample /etc/modules.conf file:\n" \
2254 "\n" \
2255 "  options tulip irq=3\n" \
2256 "  alias tulip tulip2\n" \
2257 "  options tulip2 irq=4 io=0x308\n" \
2258 "\n" \
2259 "Other functionality offered by 'classic' modprobe is not available in\n" \
2260 "this implementation.\n" \
2261 "\n" \
2262 "If module options are present both in the config file, and on the command line,\n" \
2263 "then the options from the command line will be passed to the module _after_\n" \
2264 "the options from the config file. That way, you can have defaults in the config\n" \
2265 "file, and override them for a specific usage from the command line.\n"
2266 #define modprobe_example_usage \
2267        "(with the above /etc/modules.conf):\n\n" \
2268        "$ modprobe tulip\n" \
2269        "   will load the module 'tulip' with default option 'irq=3'\n\n" \
2270        "$ modprobe tulip irq=5\n" \
2271        "   will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
2272        "$ modprobe tulip2\n" \
2273        "   will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
2274        "   which are the default for alias 'tulip2'\n\n" \
2275        "$ modprobe tulip2 irq=8\n" \
2276        "   will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
2277        "   which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
2278        "   from the command line\n\n" \
2279        "$ modprobe tulip2 irq=2 io=0x210\n" \
2280        "   will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
2281        "   which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
2282        "   from the command line\n"
2283
2284 #define more_trivial_usage \
2285        "[FILE ...]"
2286 #define more_full_usage \
2287        "View FILE or standard input one screenful at a time"
2288 #define more_example_usage \
2289        "$ dmesg | more\n"
2290
2291 #define mount_trivial_usage \
2292        "[flags] DEVICE NODE [-o options,more-options]"
2293 #define mount_full_usage \
2294        "Mount a filesystem. Filesystem autodetection requires /proc be mounted." \
2295        "\n\nOptions:\n" \
2296        "        -a              Mount all filesystems in fstab\n" \
2297         USE_FEATURE_MTAB_SUPPORT( \
2298        "        -f              Update /etc/mtab, but don't mount\n" \
2299        "        -n              Don't update /etc/mtab\n" \
2300         ) \
2301        "        -r              Read-only mount\n" \
2302        "        -t fs-type      Filesystem type\n" \
2303        "        -w              Read-write mount (default)\n" \
2304        "\n" \
2305        "-o option:\n" \
2306         USE_FEATURE_MOUNT_LOOP( \
2307        "        loop            Ignored (loop devices are autodetected)\n" \
2308         ) \
2309         USE_FEATURE_MOUNT_FLAGS( \
2310        "        [a]sync         Writes are asynchronous / synchronous\n" \
2311        "        [no]atime       Disable / enable updates to inode access times\n" \
2312        "        [no]diratime    Disable / enable atime updates to directories\n" \
2313        "        [no]dev         Allow use of special device files / disallow them\n" \
2314        "        [no]exec        Allow use of executable files / disallow them\n" \
2315        "        [no]suid        Allow set-user-id-root programs / disallow them\n" \
2316        "        [r]shared       Convert [recursively] to a shared subtree\n" \
2317        "        [r]slave        Convert [recursively] to a slave subtree\n" \
2318        "        [r]private      Convert [recursively] to a private subtree\n" \
2319        "        [un]bindable    Make mount point [un]able to be bind mounted\n" \
2320        "        bind            Bind a directory to an additional location\n" \
2321        "        move            Relocate an existing mount point\n" \
2322         ) \
2323        "        remount         Remount a mounted filesystem, changing its flags\n" \
2324        "        ro/rw           Mount for read-only / read-write\n" \
2325        "\n" \
2326        "There are EVEN MORE flags that are specific to each filesystem\n" \
2327        "You'll have to see the written documentation for those filesystems"
2328 #define mount_example_usage \
2329        "$ mount\n" \
2330        "/dev/hda3 on / type minix (rw)\n" \
2331        "proc on /proc type proc (rw)\n" \
2332        "devpts on /dev/pts type devpts (rw)\n" \
2333        "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
2334        "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
2335        "$ mount cd_image.iso mydir\n"
2336 #define mount_notes_usage \
2337        "Returns 0 for success, number of failed mounts for -a, or errno for one mount."
2338
2339 #define mountpoint_trivial_usage \
2340        "[-q] <[-d] DIR | -x DEVICE>"
2341 #define mountpoint_full_usage \
2342        "mountpoint checks if the directory is a mountpoint" \
2343        "\n\nOptions:\n" \
2344        "        -q      Quiet\n" \
2345        "        -d      Print major/minor device number of the filesystem\n" \
2346        "        -x      Print major/minor device number of the blockdevice"
2347 #define mountpoint_example_usage \
2348        "$ mountpoint /proc\n" \
2349        "/proc is not a mountpoint\n" \
2350        "$ mountpoint /sys\n" \
2351        "/sys is a mountpoint\n"
2352
2353 #define mt_trivial_usage \
2354        "[-f device] opcode value"
2355 #define mt_full_usage \
2356        "Control magnetic tape drive operation\n" \
2357        "\nAvailable Opcodes:\n\n" \
2358        "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
2359        "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
2360        "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
2361        "setpart tell unload unlock weof wset"
2362
2363 #define mv_trivial_usage \
2364        "[OPTION]... SOURCE DEST\n" \
2365        "or: mv [OPTION]... SOURCE... DIRECTORY"
2366 #define mv_full_usage \
2367        "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY" \
2368        "\n\nOptions:\n" \
2369        "        -f      Don't prompt before overwriting\n" \
2370        "        -i      Interactive, prompt before overwrite"
2371 #define mv_example_usage \
2372        "$ mv /tmp/foo /bin/bar\n"
2373
2374 #define nameif_trivial_usage \
2375        "[-s] [-c FILE] [{IFNAME MACADDR}]"
2376 #define nameif_full_usage \
2377        "Rename network interface while it in the down state" \
2378        "\n\nOptions:\n" \
2379        "        -c FILE         Use configuration file (default is /etc/mactab)\n" \
2380        "        -s              Use syslog (LOCAL0 facility)\n" \
2381        "        IFNAME MACADDR  new_interface_name interface_mac_address"
2382 #define nameif_example_usage \
2383        "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
2384        " or\n" \
2385        "$ nameif -c /etc/my_mactab_file\n" \
2386
2387 #if !ENABLE_DESKTOP
2388
2389 #if ENABLE_NC_SERVER || ENABLE_NC_EXTRA
2390 #define NC_OPTIONS_STR "\n\nOptions:"
2391 #else
2392 #define NC_OPTIONS_STR
2393 #endif
2394
2395 #define nc_trivial_usage \
2396         USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \
2397        "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]")
2398 #define nc_full_usage \
2399        "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \
2400         NC_OPTIONS_STR \
2401         USE_NC_EXTRA( \
2402        "\n      -e      Exec rest of command line after connect" \
2403        "\n      -i SECS Delay interval for lines sent" \
2404        "\n      -w SECS Timeout for connect" \
2405        "\n      -f FILE Use file (ala /dev/ttyS0) instead of network" \
2406         ) \
2407         USE_NC_SERVER( \
2408        "\n      -l      Listen mode, for inbound connects" \
2409         USE_NC_EXTRA( \
2410        "\n              (use -l twice with -e for persistent server)") \
2411        "\n      -p PORT Local port number" \
2412         )
2413
2414 #define nc_notes_usage "" \
2415         USE_NC_EXTRA( \
2416        "To use netcat as a terminal emulator on a serial port:\n\n" \
2417        "$ stty 115200 -F /dev/ttyS0\n" \
2418        "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
2419         )
2420
2421 #define nc_example_usage \
2422        "$ nc foobar.somedomain.com 25\n" \
2423        "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
2424        "help\n" \
2425        "214-Commands supported:\n" \
2426        "214-    HELO EHLO MAIL RCPT DATA AUTH\n" \
2427        "214     NOOP QUIT RSET HELP\n" \
2428        "quit\n" \
2429        "221 foobar closing connection\n"
2430
2431 #else /* DESKTOP nc - much more compatible with nc 1.10 */
2432
2433 #define nc_trivial_usage \
2434        "[-options] hostname port  - connect" \
2435         USE_NC_SERVER("\nnc [-options] -l -p port [hostname] [port]  - listen")
2436 #define nc_full_usage \
2437         USE_NC_SERVER( \
2438        "-l              Listen mode, for inbound connects\n" \
2439         ) \
2440        "-n              Don't do DNS resolution" \
2441      "\n-s addr         Local address" \
2442      "\n-p port         Local port" \
2443      "\n-u              UDP mode" \
2444      "\n-v              Verbose (cumulative: -vv)" \
2445      "\n-w secs         Timeout for connects and final net reads" \
2446         USE_NC_EXTRA( \
2447      "\n-i sec          Delay interval for lines sent" /* ", ports scanned" */ \
2448      "\n-o file         Hex dump of traffic" \
2449      "\n-z              Zero-I/O mode (scanning)" \
2450         ) \
2451      "\n-e prog [args]  Program to exec after connect (must be last)" \
2452 /*   "\n-r              Randomize local and remote ports" */
2453 /*   "\n-g gateway      Source-routing hop point[s], up to 8" */
2454 /*   "\n-G num          Source-routing pointer: 4, 8, 12, ..." */
2455 /*   "\nport numbers can be individual or ranges: lo-hi [inclusive]" */
2456
2457 #endif
2458
2459 #define netstat_trivial_usage \
2460        "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]"
2461 #define netstat_full_usage \
2462        "Display networking information" \
2463      "\n\nOptions:" \
2464      "\n        -l      Display listening server sockets" \
2465      "\n        -a      Display all sockets (default: connected)" \
2466      "\n        -e      Display other/more information" \
2467      "\n        -n      Don't resolve names" \
2468      "\n        -t      Tcp sockets" \
2469      "\n        -u      Udp sockets" \
2470      "\n        -w      Raw sockets" \
2471      "\n        -x      Unix sockets" \
2472      "\n        -r      Display routing table" \
2473         USE_FEATURE_NETSTAT_WIDE( \
2474      "\n        -W      Display with no column truncation" \
2475         )
2476
2477 #define nice_trivial_usage \
2478        "[-n ADJUST] [COMMAND [ARG] ...]"
2479 #define nice_full_usage \
2480        "Run a program with modified scheduling priority" \
2481        "\n\nOptions:\n" \
2482        "        -n ADJUST       Adjust the scheduling priority by ADJUST"
2483
2484 #define nmeter_trivial_usage \
2485        "format_string"
2486 #define nmeter_full_usage \
2487        "Monitor system in real time\n\n" \
2488        "Format specifiers:\n" \
2489        "%Nc or %[cN]    Monitor CPU. N - bar size, default 10\n" \
2490        "                (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \
2491        "%[niface]       Monitor network interface 'iface'\n" \
2492        "%m              Monitor allocated memory\n" \
2493        "%[mf]           Monitor free memory\n" \
2494        "%[mt]           Monitor total memory\n" \
2495        "%s              Monitor allocated swap\n" \
2496        "%f              Monitor number of used file descriptors\n" \
2497        "%Ni             Monitor total/specific IRQ rate\n" \
2498        "%x              Monitor context switch rate\n" \
2499        "%p              Monitor forks\n" \
2500        "%[pn]           Monitor # of processes\n" \
2501        "%b              Monitor block io\n" \
2502        "%Nt             Show time (with N decimal points)\n" \
2503        "%Nd             Milliseconds between updates (default=1000)\n" \
2504        "%r              Print <cr> instead of <lf> at EOL"
2505 #define nmeter_example_usage \
2506        "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'"
2507
2508 #define nohup_trivial_usage \
2509        "COMMAND [ARGS]"
2510 #define nohup_full_usage \
2511        "Run a command immune to hangups, with output to a non-tty"
2512 #define nohup_example_usage \
2513        "$ nohup make &"
2514
2515 #define nslookup_trivial_usage \
2516        "[HOST] [SERVER]"
2517 #define nslookup_full_usage \
2518        "Query the nameserver for the IP address of the given HOST\n" \
2519        "optionally using a specified DNS server"
2520 #define nslookup_example_usage \
2521        "$ nslookup localhost\n" \
2522        "Server:     default\n" \
2523        "Address:    default\n" \
2524        "\n" \
2525        "Name:       debian\n" \
2526        "Address:    127.0.0.1\n"
2527
2528 #define od_trivial_usage \
2529        "[-aBbcDdeFfHhIiLlOovXx] [FILE]"
2530 #define od_full_usage \
2531        "Write an unambiguous representation, octal bytes by default, of FILE\n" \
2532        "to standard output. With no FILE, or when FILE is -, read standard input."
2533
2534 #define openvt_trivial_usage \
2535        "VTNUM COMMAND [ARGS...]"
2536 #define openvt_full_usage \
2537        "Start a command on a new virtual terminal"
2538 #define openvt_example_usage \
2539        "openvt 2 /bin/ash\n"
2540
2541 #define passwd_trivial_usage \
2542        "[OPTION] [name]"
2543 #define passwd_full_usage \
2544        "Change a user password. If no name is specified,\n" \
2545        "changes the password for the current user." \
2546        "\n\nOptions:\n" \
2547        "        -a      Define which algorithm shall be used for the password\n" \
2548        "                (choices: des, md5)\n" /* ", sha1)" */ \
2549        "        -d      Delete the password for the specified user account\n" \
2550        "        -l      Locks (disables) the specified user account\n" \
2551        "        -u      Unlocks (re-enables) the specified user account"
2552
2553 #define chpasswd_trivial_usage \
2554        "[--md5|--encrypt]"
2555 #define chpasswd_full_usage \
2556        "Read user:password information from stdin\n" \
2557        "and update /etc/passwd accordingly." \
2558        "\n\nOptions:" \
2559        "\n      -e, --encrypt   Supplied passwords are in encrypted form" \
2560        "\n      -m, --md5       Use MD5 encryption instead of DES"
2561
2562 #define patch_trivial_usage \
2563        "[-p num] [-i diff]"
2564 #define patch_full_usage \
2565        "        -p NUM  Strip NUM leading components from file names\n" \
2566        "        -i DIFF Read DIFF instead of stdin"
2567 #define patch_example_usage \
2568        "$ patch -p1 < example.diff\n" \
2569        "$ patch -p0 -i example.diff"
2570
2571 #define pgrep_trivial_usage \
2572        "[-flnovx] pattern"
2573 #define pgrep_full_usage \
2574        "Display process(es) selected by regex pattern" \
2575        "\n\nOptions:\n" \
2576        "        -l      Show command name too\n" \
2577        "        -f      Match against entire command line\n" \
2578        "        -n      Signal the newest process only\n" \
2579        "        -o      Signal the oldest process only\n" \
2580        "        -v      Negate the matching\n" \
2581        "        -x      Match whole name (not substring)"
2582
2583 #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
2584 #define USAGE_PIDOF "Options:"
2585 #else
2586 #define USAGE_PIDOF "\nThis version of pidof accepts no options."
2587 #endif
2588
2589 #define pidof_trivial_usage \
2590        "process-name [OPTION] [process-name ...]"
2591
2592 #define pidof_full_usage \
2593        "List the PIDs of all processes with names that match the\n" \
2594        "names on the command line\n" \
2595         USAGE_PIDOF \
2596         USE_FEATURE_PIDOF_SINGLE( \
2597        "\n      -s      Display only a single PID") \
2598         USE_FEATURE_PIDOF_OMIT( \
2599        "\n      -o PID  Omit given pid") \
2600         USE_FEATURE_PIDOF_OMIT( \
2601        "\n              Use %PPID to omit the parent pid of pidof itself")
2602 #define pidof_example_usage \
2603        "$ pidof init\n" \
2604        "1\n" \
2605         USE_FEATURE_PIDOF_OMIT( \
2606        "$ pidof /bin/sh\n20351 5973 5950\n") \
2607         USE_FEATURE_PIDOF_OMIT( \
2608        "$ pidof /bin/sh -o %PPID\n20351 5950")
2609
2610 #if !ENABLE_FEATURE_FANCY_PING
2611 #define ping_trivial_usage \
2612        "host"
2613 #define ping_full_usage \
2614        "Send ICMP ECHO_REQUEST packets to network hosts"
2615 #define ping6_trivial_usage \
2616        "host"
2617 #define ping6_full_usage \
2618        "Send ICMP ECHO_REQUEST packets to network hosts"
2619 #else
2620 #define ping_trivial_usage \
2621        "[OPTION]... host"
2622 #define ping_full_usage \
2623        "Send ICMP ECHO_REQUEST packets to network hosts" \
2624        "\n\nOptions:\n" \
2625        "        -4, -6          Force IPv4 or IPv6 hostname resolution\n" \
2626        "        -c CNT          Send only CNT pings\n" \
2627        "        -s SIZE         Send SIZE data bytes in packets (default=56)\n" \
2628        "        -I iface/IP     Use interface or IP address as source\n" \
2629        "        -q              Quiet, only displays output at start\n" \
2630        "                        and when finished"
2631 #define ping6_trivial_usage \
2632        "[OPTION]... host"
2633 #define ping6_full_usage \
2634        "Send ICMP ECHO_REQUEST packets to network hosts" \
2635        "\n\nOptions:\n" \
2636        "        -c CNT          Send only CNT pings\n" \
2637        "        -s SIZE         Send SIZE data bytes in packets (default=56)\n" \
2638        "        -I iface/IP     Use interface or IP address as source\n" \
2639        "        -q              Quiet, only displays output at start\n" \
2640        "                        and when finished"
2641 #endif
2642 #define ping_example_usage \
2643        "$ ping localhost\n" \
2644        "PING slag (127.0.0.1): 56 data bytes\n" \
2645        "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
2646        "\n" \
2647        "--- debian ping statistics ---\n" \
2648        "1 packets transmitted, 1 packets received, 0% packet loss\n" \
2649        "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
2650 #define ping6_example_usage \
2651        "$ ping6 ip6-localhost\n" \
2652        "PING ip6-localhost (::1): 56 data bytes\n" \
2653        "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
2654        "\n" \
2655        "--- ip6-localhost ping statistics ---\n" \
2656        "1 packets transmitted, 1 packets received, 0% packet loss\n" \
2657        "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
2658
2659 #define pivot_root_trivial_usage \
2660        "NEW_ROOT PUT_OLD"
2661 #define pivot_root_full_usage \
2662        "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
2663        "the new root file system"
2664
2665 #define pkill_trivial_usage \
2666        "[-l] | [-fnovx] [-signal] pattern"
2667 #define pkill_full_usage \
2668        "Send a signal to process(es) selected by regex pattern" \
2669        "\n\nOptions:\n" \
2670        "        -l      List all signals\n" \
2671        "        -f      Match against entire command line\n" \
2672        "        -n      Signal the newest process only\n" \
2673        "        -o      Signal the oldest process only\n" \
2674        "        -v      Negate the matching\n" \
2675        "        -x      Match whole name (not substring)"
2676
2677 #define poweroff_trivial_usage \
2678        "[-d delay] [-n] [-f]"
2679 #define poweroff_full_usage \
2680        "Halt and shut off power" \
2681        "\n\nOptions:\n" \
2682        "        -d      Delay interval for halting\n" \
2683        "        -n      No call to sync()\n" \
2684        "        -f      Force power off (don't go through init)"
2685
2686 #define printenv_trivial_usage \
2687        "[VARIABLES...]"
2688 #define printenv_full_usage \
2689        "Print all or part of environment.\n" \
2690        "If no environment VARIABLE specified, print them all."
2691
2692 #define printf_trivial_usage \
2693        "FORMAT [ARGUMENT...]"
2694 #define printf_full_usage \
2695        "Format and print ARGUMENT(s) according to FORMAT,\n" \
2696        "where FORMAT controls the output exactly as in C printf"
2697 #define printf_example_usage \
2698        "$ printf \"Val=%d\\n\" 5\n" \
2699        "Val=5\n"
2700
2701
2702 #if ENABLE_DESKTOP
2703
2704 #define ps_trivial_usage \
2705        ""
2706 #define ps_full_usage \
2707        "Report process status" \
2708        "\n\nOptions:" \
2709        "\n      -o col1,col2=header     Select columns for display" \
2710
2711 #else /* !ENABLE_DESKTOP */
2712
2713 #if !defined CONFIG_SELINUX && !ENABLE_FEATURE_PS_WIDE
2714 #define USAGE_PS "\nThis version of ps accepts no options"
2715 #else
2716 #define USAGE_PS "\nOptions:"
2717 #endif
2718
2719 #define ps_trivial_usage \
2720        ""
2721 #define ps_full_usage \
2722        "Report process status\n" \
2723         USAGE_PS \
2724         USE_SELINUX( \
2725        "\n      -Z      Show SE Linux context") \
2726         USE_FEATURE_PS_WIDE( \
2727        "\n      w       Wide output")
2728
2729 #endif /* ENABLE_DESKTOP */
2730
2731 #define ps_example_usage \
2732        "$ ps\n" \
2733        "  PID  Uid      Gid State Command\n" \
2734        "    1 root     root     S init\n" \
2735        "    2 root     root     S [kflushd]\n" \
2736        "    3 root     root     S [kupdate]\n" \
2737        "    4 root     root     S [kpiod]\n" \
2738        "    5 root     root     S [kswapd]\n" \
2739        "  742 andersen andersen S [bash]\n" \
2740        "  743 andersen andersen S -bash\n" \
2741        "  745 root     root     S [getty]\n" \
2742        " 2990 andersen andersen R ps\n"
2743
2744 #define pscan_trivial_usage \
2745        "[-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
2746 #define pscan_full_usage \
2747        "Scan a host, print all open ports" \
2748        "\n\nOptions:" \
2749      "\n        -p      Scan from this port (default 1)" \
2750      "\n        -P      Scan up to this port (default 1024)" \
2751      "\n        -t      Timeout (default 5000 ms)" \
2752      "\n        -T      Minimum rtt (default 5 ms, increase for congested hosts)" \
2753
2754 #define pwd_trivial_usage \
2755        ""
2756 #define pwd_full_usage \
2757        "Print the full filename of the current working directory"
2758 #define pwd_example_usage \
2759        "$ pwd\n" \
2760        "/root\n"
2761
2762 #define raidautorun_trivial_usage \
2763        "DEVICE"
2764 #define raidautorun_full_usage \
2765        "Tell the kernel to automatically search and start RAID arrays"
2766 #define raidautorun_example_usage \
2767        "$ raidautorun /dev/md0"
2768
2769 #define rdate_trivial_usage \
2770        "[-sp] HOST"
2771 #define rdate_full_usage \
2772        "Get and possibly set the system date and time from a remote HOST" \
2773        "\n\nOptions:\n" \
2774        "        -s      Set the system date and time (default)\n" \
2775        "        -p      Print the date and time"
2776
2777 #define readahead_trivial_usage \
2778        "[FILE]..."
2779 #define readahead_full_usage \
2780        "Preload FILE(s) in RAM cache so that subsequent reads for those" \
2781        "files do not block on disk I/O"
2782
2783 #define readlink_trivial_usage \
2784         USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
2785 #define readlink_full_usage \
2786        "Display the value of a symlink" \
2787         USE_FEATURE_READLINK_FOLLOW( \
2788        "\n\nOptions:\n" \
2789        "        -f      Canonicalize by following all symlinks")
2790
2791 #define readprofile_trivial_usage \
2792        "[OPTIONS]..."
2793 #define readprofile_full_usage \
2794        "Options:\n" \
2795        "        -m mapfile      (Default: /boot/System.map)\n" \
2796        "        -p profile      (Default: /proc/profile)\n" \
2797        "        -M mult         Set the profiling multiplier to mult\n" \
2798        "        -i              Print only info about the sampling step\n" \
2799        "        -v              Verbose\n" \
2800        "        -a              Print all symbols, even if count is 0\n" \
2801        "        -b              Print individual histogram-bin counts\n" \
2802        "        -s              Print individual counters within functions\n" \
2803        "        -r              Reset all the counters (root only)\n" \
2804        "        -n              Disable byte order auto-detection"
2805
2806 #define realpath_trivial_usage \
2807        "pathname ..."
2808 #define realpath_full_usage \
2809        "Return the absolute pathnames of given argument"
2810
2811 #define reboot_trivial_usage \
2812        "[-d delay] [-n] [-f]"
2813 #define reboot_full_usage \
2814        "Reboot the system" \
2815        "\n\nOptions:\n" \
2816        "        -d      Delay interval for rebooting\n" \
2817        "        -n      No call to sync()\n" \
2818        "        -f      Force reboot (don't go through init)"
2819
2820 #define renice_trivial_usage \
2821        "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID ...]"
2822 #define renice_full_usage \
2823        "Change priority of running processes" \
2824        "\n\nOptions:\n" \
2825        "        -n      Adjust current nice value (smaller is faster)\n" \
2826        "        -p      Process id(s) (default)\n" \
2827        "        -g      Process group id(s)\n" \
2828        "        -u      Process user name(s) and/or id(s)"
2829
2830 #define reset_trivial_usage \
2831        ""
2832 #define reset_full_usage \
2833        "Reset the screen"
2834
2835 #define resize_trivial_usage \
2836        ""
2837 #define resize_full_usage \
2838        "Resize the screen"
2839
2840 #define restorecon_trivial_usage \
2841        "[-iFnrRv] [-e excludedir]... [-o filename] [-f filename | pathname]"
2842 #define restorecon_full_usage \
2843        "Reset security contexts of files in pathname\n" \
2844        "\n      -i              Ignore files that do not exist" \
2845        "\n      -f file         File with list of files to process. Use - for stdin" \
2846        "\n      -e directory    Directory to exclude" \
2847        "\n      -R,-r           Recurse directories" \
2848        "\n      -n              Don't change any file labels" \
2849        "\n      -o file         Save list of files with incorrect context" \
2850        "\n      -v              Verbose" \
2851        "\n      -vv             Show changed labels" \
2852        "\n      -F              Force reset of context to match file_context" \
2853        "\n                      for customizable files, or the user section," \
2854        "\n                      if it has changed"
2855
2856 #define rm_trivial_usage \
2857        "[OPTION]... FILE..."
2858 #define rm_full_usage \
2859        "Remove (unlink) the FILE(s). You may use '--' to\n" \
2860        "indicate that all following arguments are non-options." \
2861        "\n\nOptions:\n" \
2862        "        -i      Always prompt before removing each destination\n" \
2863        "        -f      Remove existing destinations, never prompt\n" \
2864        "        -r,-R   Remove the contents of directories recursively"
2865 #define rm_example_usage \
2866        "$ rm -rf /tmp/foo\n"
2867
2868 #define rmdir_trivial_usage \
2869        "[OPTION]... DIRECTORY..."
2870 #define rmdir_full_usage \
2871        "Remove the DIRECTORY, if it is empty"
2872 #define rmdir_example_usage \
2873        "# rmdir /tmp/foo\n"
2874
2875 #define rmmod_trivial_usage \
2876        "[OPTION]... [MODULE]..."
2877 #define rmmod_full_usage \
2878        "Unload the specified kernel modules from the kernel" \
2879        "\n\nOptions:\n" \
2880        "        -a      Remove all unused modules (recursively)"
2881 #define rmmod_example_usage \
2882        "$ rmmod tulip\n"
2883
2884 #define route_trivial_usage \
2885        "[{add|del|delete}]"
2886 #define route_full_usage \
2887        "Edit the kernel's routing tables" \
2888        "\n\nOptions:\n" \
2889        "        -n      Dont resolve names\n" \
2890        "        -e      Display other/more information\n" \
2891        "        -A inet" USE_FEATURE_IPV6("{6}") "      Select address family"
2892
2893 #define rpm_trivial_usage \
2894        "-i -q[ildc]p package.rpm"
2895 #define rpm_full_usage \
2896        "Manipulate RPM packages" \
2897        "\n\nOptions:" \
2898        "\n      -i      Install package" \
2899        "\n      -q      Query package" \
2900        "\n      -p      Query uninstalled package" \
2901        "\n      -i      Show information" \
2902        "\n      -l      List contents" \
2903        "\n      -d      List documents" \
2904        "\n      -c      List config files"
2905
2906 #define rpm2cpio_trivial_usage \
2907        "package.rpm"
2908 #define rpm2cpio_full_usage \
2909        "Output a cpio archive of the rpm file"
2910
2911 #define runcon_trivial_usage \
2912        "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \
2913        "        runcon CONTEXT COMMAND [args]"
2914 #define runcon_full_usage \
2915        "runcon [-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \
2916        "runcon CONTEXT COMMAND [args]\n" \
2917        "Run a program in a different security context\n\n" \
2918        "        CONTEXT         Complete security context\n" \
2919        "        -c, --compute   Compute process transition context before modifying\n" \
2920        "        -t, --type=TYPE Type (for same role as parent)\n" \
2921        "        -u, --user=USER User identity\n" \
2922        "        -r, --role=ROLE Role\n" \
2923        "        -l, --range=RNG Levelrange" \
2924
2925 #define run_parts_trivial_usage \
2926        "[-t] "USE_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
2927 #define run_parts_full_usage \
2928        "Run a bunch of scripts in a directory" \
2929        "\n\nOptions:\n" \
2930        "        -t      Prints what would be run, but does not actually run anything\n" \
2931        "        -a ARG  Pass ARG as an argument for every program invoked\n" \
2932        "        -u MASK Set the umask to MASK before executing every program" \
2933 USE_FEATURE_RUN_PARTS_FANCY("\n -l      Prints names of all matching files even when they are not executable")
2934
2935 #define run_parts_example_usage \
2936        "$ run-parts -a start /etc/init.d\n" \
2937        "$ run-parts -a stop=now /etc/init.d\n\n" \
2938        "Let's assume you have a script foo/dosomething:\n" \
2939        "#!/bin/sh\n" \
2940        "for i in $*; do eval $i; done; unset i\n" \
2941        "case \"$1\" in\n" \
2942        "start*) echo starting something;;\n" \
2943        "stop*) set -x; shutdown -h $stop;;\n" \
2944        "esac\n\n" \
2945        "Running this yields:\n" \
2946        "$run-parts -a stop=+4m foo/\n" \
2947        "+ shutdown -h +4m"
2948
2949 #define runlevel_trivial_usage \
2950        "[utmp]"
2951 #define runlevel_full_usage \
2952        "Find the current and previous system runlevel.\n\n" \
2953        "If no utmp file exists or if no runlevel record can be found,\n" \
2954        "print \"unknown\""
2955 #define runlevel_example_usage \
2956        "$ runlevel /var/run/utmp\n" \
2957        "N 2"
2958
2959 #define runsv_trivial_usage \
2960        "dir"
2961 #define runsv_full_usage \
2962        "Start and monitor a service and optionally an appendant log service"
2963
2964 #define runsvdir_trivial_usage \
2965        "[-P] dir"
2966 #define runsvdir_full_usage \
2967        "Start a runsv process for each subdirectory"
2968
2969 #define rx_trivial_usage \
2970        "FILE"
2971 #define rx_full_usage \
2972        "Receive a file using the xmodem protocol"
2973 #define rx_example_usage \
2974        "$ rx /tmp/foo\n"
2975
2976 #define sed_trivial_usage \
2977        "[-efinr] pattern [files...]"
2978 #define sed_full_usage \
2979        "Options:\n" \
2980        "        -e script       Add the script to the commands to be executed\n" \
2981        "        -f scriptfile   Add script-file contents to the\n" \
2982        "                        commands to be executed\n" \
2983        "        -i              Edit files in-place\n" \
2984        "        -n              Suppress automatic printing of pattern space\n" \
2985        "        -r              Use extended regular expression syntax\n" \
2986        "\n" \
2987        "If no -e or -f is given, the first non-option argument is taken as the sed\n" \
2988        "script to interpret. All remaining arguments are names of input files; if no\n" \
2989        "input files are specified, then the standard input is read. Source files\n" \
2990        "will not be modified unless -i option is given."
2991
2992 #define sed_example_usage \
2993        "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
2994        "bar\n"
2995
2996 #define selinuxenabled_trivial_usage
2997 #define selinuxenabled_full_usage
2998
2999 #define seq_trivial_usage \
3000        "[first [increment]] last"
3001 #define seq_full_usage \
3002        "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \
3003        "FIRST, INCREMENT default to 1" \
3004        "\n\nArguments:\n" \
3005        "        LAST\n" \
3006        "        FIRST LAST\n" \
3007        "        FIRST INCREMENT LAST"
3008
3009 #define setconsole_trivial_usage \
3010        "[-r|--reset] [DEVICE]"
3011 #define setconsole_full_usage \
3012        "Redirect system console output to DEVICE (default: /dev/tty)" \
3013        "\n\nOptions:\n" \
3014        "        -r      Reset output to /dev/console"
3015
3016 #define setenforce_trivial_usage \
3017        "[Enforcing | Permissive | 1 | 0]"
3018 #define setenforce_full_usage
3019
3020 #define setfiles_trivial_usage \
3021        "[-dnpqsvW] [-e dir]... [-o file] [-r alt_root_path]" \
3022         USE_FEATURE_SETFILES_CHECK_OPTION( \
3023        " [-c policyfile] spec_file" \
3024         ) \
3025        " pathname"
3026
3027 #define setfiles_full_usage \
3028        "Reset file contexts under pathname according to spec_file" \
3029         USE_FEATURE_SETFILES_CHECK_OPTION( \
3030        "\n      -c file Check the validity of the contexts against the specified binary policy" \
3031         ) \
3032        "\n      -d      Show which specification matched each file" \
3033        "\n      -l      Log changes in file labels to syslog" \
3034        "\n      -n      Don't change any file labels" \
3035        "\n      -q      Suppress warnings" \
3036        "\n      -r dir  Use an altenate root path" \
3037        "\n      -e dir  Exclude directory" \
3038        "\n      -F      Force reset of context to match file_context for customizable files" \
3039        "\n      -o file Save list of files with incorrect context" \
3040        "\n      -s      Take a list of files from standard input (instead of command line)" \
3041        "\n      -v      Show changes in file labels, if type or role are changing" \
3042        "\n      -vv     Show changes in file labels, if type, role, or user are changing" \
3043        "\n      -W      Display warnings about entries that had no matching files"
3044
3045 #define setkeycodes_trivial_usage \
3046        "SCANCODE KEYCODE ..."
3047 #define setkeycodes_full_usage \
3048        "Set entries into the kernel's scancode-to-keycode map,\n" \
3049        "allowing unusual keyboards to generate usable keycodes.\n\n" \
3050        "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
3051        "and KEYCODE is given in decimal"
3052 #define setkeycodes_example_usage \
3053        "$ setkeycodes e030 127\n"
3054
3055 #define setlogcons_trivial_usage \
3056        "N"
3057 #define setlogcons_full_usage \
3058        "Redirect the kernel output to console N (0 for current)"
3059
3060 #define setsebool_trivial_usage \
3061        "boolean value"
3062
3063 #define setsebool_full_usage \
3064        "Change boolean setting"
3065
3066 #define setsid_trivial_usage \
3067        "program [arg ...]"
3068 #define setsid_full_usage \
3069        "Run any program in a new session by calling setsid() before\n" \
3070        "exec'ing the rest of its arguments. See setsid(2) for details."
3071
3072 #define lash_trivial_usage \
3073        "[FILE]...\n" \
3074        "or: sh -c command [args]..."
3075 #define lash_full_usage \
3076        "The BusyBox LAme SHell (command interpreter)"
3077 #define lash_notes_usage \
3078        "This command does not yet have proper documentation.\n\n" \
3079        "Use lash just as you would use any other shell. It properly handles pipes,\n" \
3080        "redirects, job control, can be used as the shell for scripts, and has a\n" \
3081        "sufficient set of builtins to do what is needed. It does not (yet) support\n" \
3082        "Bourne Shell syntax. If you need things like \"if-then-else\", \"while\", and such\n" \
3083        "use ash or bash. If you just need a very simple and extremely small shell,\n" \
3084        "this will do the job."
3085
3086 #define last_trivial_usage \
3087        ""
3088 #define last_full_usage \
3089        "Show listing of the last users that logged into the system"
3090
3091 #define sha1sum_trivial_usage \
3092        "[OPTION] [FILEs...]" \
3093         USE_FEATURE_MD5_SHA1_SUM_CHECK("\n   or: sha1sum [OPTION] -c [FILE]")
3094 #define sha1sum_full_usage \
3095        "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums.\n" \
3096        "With no FILE, or when FILE is -, read standard input." \
3097        "\n\nOptions:\n" \
3098         USE_FEATURE_MD5_SHA1_SUM_CHECK( \
3099        "        -c      Check SHA1 sums against given list\n" \
3100        "\nThe following two options are useful only when verifying checksums:\n" \
3101        "        -s      Don't output anything, status code shows success\n" \
3102        "        -w      Warn about improperly formatted SHA1 checksum lines")
3103
3104 #define slattach_trivial_usage \
3105        "[-cehmLF] [-s speed] [-p protocol] DEVICEs"
3106 #define slattach_full_usage \
3107        "Attach network interface(s) to serial line(s)\n" \
3108      "\nOptions:" \
3109      "\n        -p      Set protocol (slip, cslip, slip6, clisp6 or adaptive)" \
3110      "\n        -s      Set line speed" \
3111      "\n        -e      Exit after initializing device" \
3112      "\n        -h      Exit when the carrier is lost" \
3113      "\n        -c      Execute a command when the line is hung up" \
3114      "\n        -m      Do NOT initialize the line in raw 8 bits mode" \
3115      "\n        -L      Enable 3-wire operation" \
3116      "\n        -F      Disable RTS/CTS flow control" \
3117
3118 #define sleep_trivial_usage \
3119         USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...")
3120 #define sleep_full_usage \
3121         SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds") \
3122         USE_FEATURE_FANCY_SLEEP( \
3123        "Pause for a time equal to the total of the args given, where each arg can\n" \
3124        "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
3125 #define sleep_example_usage \
3126        "$ sleep 2\n" \
3127        "[2 second delay results]\n" \
3128         USE_FEATURE_FANCY_SLEEP( \
3129        "$ sleep 1d 3h 22m 8s\n" \
3130        "[98528 second delay results]\n")
3131
3132 #define sort_trivial_usage \
3133        "[-nru" \
3134         USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o outfile] [-k start[.offset][opts][,end[.offset][opts]] [-t char") \
3135        "] [FILE]..."
3136 #define sort_full_usage \
3137        "Sort lines of text in the specified files" \
3138        "\n\nOptions:\n" \
3139         USE_FEATURE_SORT_BIG( \
3140        "        -b      Ignore leading blanks\n" \
3141        "        -c      Check whether input is sorted\n" \
3142        "        -d      Dictionary order (blank or alphanumeric only)\n" \
3143        "        -f      Ignore case\n" \
3144        "        -g      General numerical sort\n" \
3145        "        -i      Ignore unprintable characters\n" \
3146        "        -k      Sort key\n" \
3147        "        -M      Sort month\n") \
3148        "        -n      Sort numbers\n" \
3149         USE_FEATURE_SORT_BIG( \
3150        "        -o      Output to file\n" \
3151        "        -k      Sort by key\n" \
3152        "        -t      Use key separator other than whitespace\n") \
3153        "        -r      Reverse sort order\n" \
3154         USE_FEATURE_SORT_BIG( \
3155        "        -s      Stable (don't sort ties alphabetically)\n") \
3156        "        -u      Suppress duplicate lines" \
3157         USE_FEATURE_SORT_BIG( \
3158        "\n      -z      Input terminated by nulls, not newlines\n") \
3159         USE_FEATURE_SORT_BIG( \
3160        "        -mST    Ignored for GNU compatibility") \
3161        ""
3162 #define sort_example_usage \
3163        "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
3164        "a\n" \
3165        "b\n" \
3166        "c\n" \
3167        "d\n" \
3168        "e\n" \
3169        "f\n" \
3170         USE_FEATURE_SORT_BIG( \
3171                 "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
3172                 "d 2\n" \
3173                 "b 2\n" \
3174                 "c 3\n" \
3175         ) \
3176        ""
3177
3178 #define split_trivial_usage \
3179        "[OPTION] [INPUT [PREFIX]]"
3180 #define split_full_usage \
3181        "Options:" \
3182        "\n      -b n[k|m]       Split by bytes" \
3183        "\n      -l n            Split by lines" \
3184        "\n      -a n            Use n letters as suffix"
3185 #define split_example_usage \
3186        "$ split TODO foo\n" \
3187        "$ cat TODO | split -a 2 -l 2 TODO_\n"
3188
3189 #define start_stop_daemon_trivial_usage \
3190        "[OPTIONS] [--start|--stop] ... [-- arguments...]"
3191 #define start_stop_daemon_full_usage \
3192        "Start and stop services" \
3193        "\n\nOptions:" \
3194        "\n      -S|--start                      Start" \
3195        "\n      -K|--stop                       Stop" \
3196        "\n      -a|--startas pathname           Starts process specified by pathname" \
3197        "\n      -b|--background                 Put process into background" \
3198        "\n      -u|--user username|uid          Stop this user's processes" \
3199        "\n      -x|--exec executable            Program to either start or check" \
3200        "\n      -m|--make-pidfile               Create the -p file and enter pid in it" \
3201        "\n      -n|--name process-name          Stop processes with this name" \
3202        "\n      -p|--pidfile pid-file           Save or load pid using a pid-file" \
3203        "\n      -q|--quiet                      Quiet" \
3204         USE_FEATURE_START_STOP_DAEMON_FANCY( \
3205        "\n      -o|--oknodo                     Exit status 0 if nothing done" \
3206        "\n      -v|--verbose                    Verbose" \
3207        "\n      -N|--nicelevel N                Add N to process's nice level" \
3208         ) \
3209        "\n      -s|--signal signal              Signal to send (default TERM)" \
3210        "\n      -c|--chuid user[:[group]]       Change to specified user/group"
3211
3212 #define stat_trivial_usage \
3213        "[OPTION] FILE..."
3214 #define stat_full_usage \
3215        "Display file (default) or filesystem status" \
3216        "\n\nOptions:\n" \
3217         USE_FEATURE_STAT_FORMAT( \
3218        "        -c fmt  Use the specified format\n") \
3219        "        -f      Display filesystem status\n" \
3220        "        -L,-l   Dereference links\n" \
3221        "        -t      Display info in terse form" \
3222         USE_SELINUX( \
3223        "\n      -Z      Print security context" \
3224         ) \
3225         USE_FEATURE_STAT_FORMAT( \
3226        "\n\nValid format sequences for files:\n" \
3227        " %a     Access rights in octal\n" \
3228        " %A     Access rights in human readable form\n" \
3229        " %b     Number of blocks allocated (see %B)\n" \
3230        " %B     The size in bytes of each block reported by %b\n" \
3231        " %d     Device number in decimal\n" \
3232        " %D     Device number in hex\n" \
3233        " %f     Raw mode in hex\n" \
3234        " %F     File type\n" \
3235        " %g     Group ID of owner\n" \
3236        " %G     Group name of owner\n" \
3237        " %h     Number of hard links\n" \
3238        " %i     Inode number\n" \
3239        " %n     File name\n" \
3240        " %N     Quoted file name with dereference if symlink\n" \
3241        " %o     I/O block size\n" \
3242        " %s     Total size, in bytes\n" \
3243        " %t     Major device type in hex\n" \
3244        " %T     Minor device type in hex\n" \
3245        " %u     User ID of owner\n" \
3246        " %U     User name of owner\n" \
3247        " %x     Time of last access\n" \
3248        " %X     Time of last access as seconds since Epoch\n" \
3249        " %y     Time of last modification\n" \
3250        " %Y     Time of last modification as seconds since Epoch\n" \
3251        " %z     Time of last change\n" \
3252        " %Z     Time of last change as seconds since Epoch\n" \
3253        "\nValid format sequences for file systems:\n" \
3254        " %a     Free blocks available to non-superuser\n" \
3255        " %b     Total data blocks in file system\n" \
3256        " %c     Total file nodes in file system\n" \
3257        " %d     Free file nodes in file system\n" \
3258        " %f     Free blocks in file system\n" \
3259         USE_SELINUX( \
3260        " %C     Security context in SELinux\n" \
3261         ) \
3262        " %i     File System ID in hex\n" \
3263        " %l     Maximum length of filenames\n" \
3264        " %n     File name\n" \
3265        " %s     Block size (for faster transfer)\n" \
3266        " %S     Fundamental block size (for block counts)\n" \
3267        " %t     Type in hex\n" \
3268        " %T     Type in human readable form" \
3269         )
3270
3271 #define strings_trivial_usage \
3272        "[-afo] [-n length] [file ...]"
3273 #define strings_full_usage \
3274        "Display printable strings in a binary file" \
3275        "\n\nOptions:" \
3276        "\n      -a      Scan whole file (default)" \
3277        "\n      -f      Precede strings with filenames" \
3278        "\n      -n N    At least N characters form a string (default 4)" \
3279        "\n      -o      Precede strings with decimal offsets"
3280
3281 #define stty_trivial_usage \
3282        "[-a|g] [-F DEVICE] [SETTING]..."
3283 #define stty_full_usage \
3284        "Without arguments, prints baud rate, line discipline,\n" \
3285        "and deviations from stty sane" \
3286        "\n\nOptions:" \
3287        "\n      -F DEVICE       Open device instead of stdin" \
3288        "\n      -a              Print all current settings in human-readable form" \
3289        "\n      -g              Print in stty-readable form" \
3290        "\n      [SETTING]       See manpage"
3291
3292 #define su_trivial_usage \
3293        "[OPTION]... [-] [username]"
3294 #define su_full_usage \
3295        "Change user id or become root" \
3296        "\n\nOptions:" \
3297        "\n      -p, -m  Preserve environment" \
3298        "\n      -c      Command to pass to 'sh -c'" \
3299        "\n      -s      Shell to use instead of default shell"
3300
3301 #define sulogin_trivial_usage \
3302        "[OPTION]... [tty-device]"
3303 #define sulogin_full_usage \
3304        "Single user login" \
3305        "\n\nOptions:" \
3306        "\n      -t      Timeout"
3307
3308 #define sum_trivial_usage \
3309        "[rs] [files...]"
3310 #define sum_full_usage \
3311        "Checksum and count the blocks in a file" \
3312        "\n\nOptions:\n" \
3313        "        -r      Use BSD sum algorithm (1K blocks)\n" \
3314        "        -s      Use System V sum algorithm (512byte blocks)"
3315
3316 #define sv_trivial_usage \
3317        "[-v] [-w sec] command service..."
3318 #define sv_full_usage \
3319        "Control services monitored by runsv supervisor.\n" \
3320        "Commands (only first character is enough):\n" \
3321        "\n" \
3322        "status: query service status\n" \
3323        "up: if service isn't running, start it. If service stops, restart it\n" \
3324        "once: like 'up', but if service stops, don't restart it\n" \
3325        "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
3326        "    if it exists. After it stops, do not restart service\n" \
3327        "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
3328        "    runsv exits too\n" \
3329        "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
3330        "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service"
3331
3332 #define svlogd_trivial_usage \
3333        "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..."
3334 #define svlogd_full_usage \
3335        "Continuously read log data from standard input, optionally " \
3336        "filter log messages, and write the data to one or more automatically " \
3337        "rotated logs"
3338
3339 #define swapoff_trivial_usage \
3340        "[-a] [DEVICE]"
3341 #define swapoff_full_usage \
3342        "Stop swapping virtual memory pages on DEVICE" \
3343        "\n\nOptions:\n" \
3344        "        -a      Stop swapping on all swap devices"
3345
3346 #define swapon_trivial_usage \
3347        "[-a] [DEVICE]"
3348 #define swapon_full_usage \
3349        "Start swapping virtual memory pages on DEVICE" \
3350        "\n\nOptions:\n" \
3351        "        -a      Start swapping on all swap devices"
3352
3353 #define switch_root_trivial_usage \
3354        "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
3355 #define switch_root_full_usage \
3356        "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
3357        "and exec NEW_INIT" \
3358        "\n\nOptions:\n" \
3359        "        -c      Redirect console to device on new root"
3360
3361 #define sync_trivial_usage \
3362        ""
3363 #define sync_full_usage \
3364        "Write all buffered filesystem blocks to disk"
3365
3366 #define sysctl_trivial_usage \
3367        "[OPTIONS]... [VALUE]..."
3368 #define sysctl_full_usage \
3369        "Configure kernel parameters at runtime" \
3370        "\n\nOptions:\n" \
3371        "        -n      Disable printing of key names\n" \
3372        "        -w      Change sysctl setting\n" \
3373        "        -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)\n" \
3374        "        -a      Display all values\n" \
3375        "        -A      Display all values in table form"
3376 #define sysctl_example_usage \
3377        "sysctl [-n] variable ...\n" \
3378        "sysctl [-n] -w variable=value ...\n" \
3379        "sysctl [-n] -a\n" \
3380        "sysctl [-n] -p file     (default /etc/sysctl.conf)\n" \
3381        "sysctl [-n] -A\n"
3382
3383 #define syslogd_trivial_usage \
3384        "[OPTION]..."
3385 #define syslogd_full_usage \
3386        "System logging utility.\n" \
3387        "Note that this version of syslogd ignores /etc/syslog.conf." \
3388        "\n\nOptions:" \
3389        "\n      -n              Run in foreground" \
3390        "\n      -O FILE         Log to given file (default=/var/log/messages)" \
3391        "\n      -l n            Set local log level" \
3392        "\n      -S              Smaller logging output" \
3393         USE_FEATURE_ROTATE_LOGFILE( \
3394        "\n      -s SIZE         Max size (KB) before rotate (default=200KB, 0=off)" \
3395        "\n      -b NUM          Number of rotated logs to keep (default=1, max=99, 0=purge)") \
3396         USE_FEATURE_REMOTE_LOG( \
3397        "\n      -R HOST[:PORT]  Log to IP or hostname on PORT (default PORT=514/UDP)" \
3398        "\n      -L              Log locally and via network (default is network only if -R)") \
3399         USE_FEATURE_IPC_SYSLOG( \
3400        "\n      -C[size(KiB)]   Log to shared mem buffer (read it using logread)")
3401         /* NB: -Csize shouldn't have space (because size is optional) */
3402 /*     "\n      -m MIN          Minutes between MARK lines (default=20, 0=off)" */
3403 #define syslogd_example_usage \
3404        "$ syslogd -R masterlog:514\n" \
3405        "$ syslogd -R 192.168.1.1:601\n"
3406
3407 #define tail_trivial_usage \
3408        "[OPTION]... [FILE]..."
3409 #define tail_full_usage \
3410        "Print last 10 lines of each FILE to standard output.\n" \
3411        "With more than one FILE, precede each with a header giving the\n" \
3412        "file name. With no FILE, or when FILE is -, read standard input." \
3413        "\n\nOptions:" \
3414         USE_FEATURE_FANCY_TAIL( \
3415        "\n      -c N[kbm]       Output the last N bytes") \
3416        "\n      -n N[kbm]       Print last N lines instead of last 10" \
3417        "\n      -f              Output data as the file grows" \
3418         USE_FEATURE_FANCY_TAIL( \
3419        "\n      -q              Never output headers giving file names" \
3420        "\n      -s SEC          Wait SEC seconds between reads with -f" \
3421        "\n      -v              Always output headers giving file names" \
3422        "\n\n" \
3423        "If the first character of N (bytes or lines) is a '+', output begins with\n" \
3424        "the Nth item from the start of each file, otherwise, print the last N items\n" \
3425        "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." )
3426 #define tail_example_usage \
3427        "$ tail -n 1 /etc/resolv.conf\n" \
3428        "nameserver 10.0.0.1\n"
3429
3430 #define tar_trivial_usage \
3431        "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_TAR_GZIP("z") \
3432         USE_FEATURE_TAR_BZIP2("j") USE_FEATURE_TAR_LZMA("a") \
3433         USE_FEATURE_TAR_COMPRESS("Z") "xtvO] " \
3434         USE_FEATURE_TAR_FROM("[-X FILE] ") \
3435        "[-f TARFILE] [-C DIR] [FILE(s)] ..."
3436 #define tar_full_usage \
3437        "Create, extract, or list files from a tar file" \
3438        "\n\nOptions:\n" \
3439         USE_FEATURE_TAR_CREATE( \
3440        "        c       Create\n") \
3441        "        x       Extract\n" \
3442        "        t       List\n" \
3443        "\nArchive format selection:\n" \
3444         USE_FEATURE_TAR_GZIP( \
3445        "        z       Filter the archive through gzip\n") \
3446         USE_FEATURE_TAR_BZIP2( \
3447        "        j       Filter the archive through bzip2\n") \
3448         USE_FEATURE_TAR_LZMA( \
3449        "        a       Filter the archive through lzma\n") \
3450         USE_FEATURE_TAR_COMPRESS( \
3451        "        Z       Filter the archive through compress\n") \
3452        "\nFile selection:\n" \
3453        "        f       Name of TARFILE or \"-\" for stdin\n" \
3454        "        O       Extract to stdout\n" \
3455         USE_FEATURE_TAR_FROM( \
3456        "        exclude File to exclude\n" \
3457        "        X       File with names to exclude\n") \
3458        "        C       Change to directory DIR before operation\n" \
3459        "        v       Verbose"
3460 #define tar_example_usage \
3461        "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
3462        "$ tar -cf /tmp/tarball.tar /usr/local\n"
3463
3464 #define taskset_trivial_usage \
3465        "[OPTIONS] [mask] [pid | command [arg]...]"
3466 #define taskset_full_usage \
3467        "Set or get CPU affinity" \
3468        "\n\nOptions:\n" \
3469        "        -p      Operate on an existing PID"
3470 #define taskset_example_usage \
3471        "$ taskset 0x7 ./dgemm_test&\n" \
3472        "$ taskset -p 0x1 $!\n" \
3473        "pid 4790's current affinity mask: 7\n" \
3474        "pid 4790's new affinity mask: 1\n" \
3475        "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
3476        "pid 6671's current affinity mask: 1\n" \
3477        "pid 6671's new affinity mask: 1\n" \
3478        "$ taskset -p 1\n" \
3479        "pid 1's current affinity mask: 3\n"
3480
3481 #define tee_trivial_usage \
3482        "[OPTION]... [FILE]..."
3483 #define tee_full_usage \
3484        "Copy standard input to each FILE, and also to standard output" \
3485        "\n\nOptions:\n" \
3486        "        -a      Append to the given FILEs, do not overwrite\n" \
3487        "        -i      Ignore interrupt signals (SIGINT)"
3488 #define tee_example_usage \
3489        "$ echo \"Hello\" | tee /tmp/foo\n" \
3490        "$ cat /tmp/foo\n" \
3491        "Hello\n"
3492
3493 #if ENABLE_FEATURE_TELNET_AUTOLOGIN
3494 #define telnet_trivial_usage \
3495        "[-a] [-l USER] HOST [PORT]"
3496 #define telnet_full_usage \
3497        "Connect to remote telnet server" \
3498        "\n\nOptions:\n" \
3499        "        -a      Attempt an automatic login with the USER variable\n" \
3500        "        -l USER Attempt an automatic login with the USER argument\n" \
3501        "        HOST    The official name, alias or the IP address of the\n" \
3502        "                remote host\n" \
3503        "        PORT    The remote port number to connect to. If it is not\n" \
3504        "                specified, the default telnet (23) port is used."
3505 #else
3506 #define telnet_trivial_usage \
3507        "HOST [PORT]"
3508 #define telnet_full_usage \
3509        "Connect to remote telnet server"
3510 #endif
3511
3512 #define telnetd_trivial_usage \
3513        "[OPTION]"
3514 #define telnetd_full_usage \
3515        "Handle incoming telnet connections" \
3516         SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") \
3517        "\n\nOptions:" \
3518        "\n      -l LOGIN        Exec LOGIN on connect" \
3519        "\n      -f issue_file   Display issue_file instead of /etc/issue" \
3520        "\n      -K              Close connection as soon as login exits" \
3521        "\n                      (normally wait until all programs close slave pty)" \
3522         USE_FEATURE_TELNETD_STANDALONE( \
3523        "\n      -p PORT         Port to listen to" \
3524        "\n      -b ADDR         Address to bind to" \
3525        "\n      -F              Run in foreground" \
3526        "\n      -i              Run as inetd subservice" \
3527         )
3528
3529 #define test_trivial_usage \
3530        "EXPRESSION\n  or   [ EXPRESSION ]"
3531 #define test_full_usage \
3532        "Check file types and compares values returning an exit code\n" \
3533        "determined by the value of EXPRESSION"
3534 #define test_example_usage \
3535        "$ test 1 -eq 2\n" \
3536        "$ echo $?\n" \
3537        "1\n" \
3538        "$ test 1 -eq 1\n" \
3539        "$ echo $?\n" \
3540        "0\n" \
3541        "$ [ -d /etc ]\n" \
3542        "$ echo $?\n" \
3543        "0\n" \
3544        "$ [ -d /junk ]\n" \
3545        "$ echo $?\n" \
3546        "1\n"
3547
3548 #define tcpsvd_trivial_usage \
3549        "[-hEv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] ip port prog..."
3550 /* with not-implemented options: */
3551 /*     "[-hpEvv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] [-i dir|-x cdb] [-t sec] ip port prog..." */
3552 #define tcpsvd_full_usage \
3553        "Creates TCP socket, binds it to ip:port and listens on it\n" \
3554        "for incoming connections. For each connection it runs prog." \
3555      "\n" \
3556      "\nip              IP to listen on. '0' = all" \
3557      "\nport            Port to listen on" \
3558      "\nprog [arg]      Program to run" \
3559      "\n-l name         Local hostname (else looks up local hostname in DNS)" \
3560      "\n-u user[:group] Change to user/group after bind" \
3561      "\n-c n            Handle up to n connections simultaneously" \
3562      "\n-b n            Allow a backlog of approximately n TCP SYNs" \
3563      "\n-C n[:msg]      Allow only up to n connections from the same IP" \
3564      "\n                New connections from this IP address are closed" \
3565      "\n                immediately. 'msg' is written to the peer before close" \
3566      "\n-h              Look up peer's hostname" \
3567      "\n-E              Do not set up environment variables" \
3568      "\n-v              Verbose"
3569
3570 #define udpsvd_trivial_usage \
3571        "[-hEv] [-c n] [-u user] [-l name] ip port prog"
3572 #define udpsvd_full_usage \
3573        "Creates UDP socket, binds it to ip:port and listens on it\n" \
3574        "for incoming packets. For each packet it runs prog\n" \
3575        "(redirecting all further packets with same peer ip:port to it)." \
3576      "\n" \
3577      "\nip              IP to listen on. '0' = all" \
3578      "\nport            Port to listen on" \
3579      "\nprog [arg]      Program to run" \
3580      "\n-l name         Local hostname (else looks up local hostname in DNS)" \
3581      "\n-u user[:group] Change to user/group after bind" \
3582      "\n-c n            Handle up to n connections simultaneously" \
3583      "\n-h              Look up peer's hostname" \
3584      "\n-E              Do not set up environment variables" \
3585      "\n-v              Verbose"
3586
3587 #define tftp_trivial_usage \
3588        "[OPTION]... HOST [PORT]"
3589 #define tftp_full_usage \
3590        "Transfer a file from/to tftp server using \"octet\" mode" \
3591        "\n\nOptions:" \
3592        "\n      -l FILE Local FILE" \
3593        "\n      -r FILE Remote FILE" \
3594         USE_FEATURE_TFTP_GET( \
3595        "\n      -g      Get file" \
3596         ) \
3597         USE_FEATURE_TFTP_PUT( \
3598        "\n      -p      Put file" \
3599         ) \
3600         USE_FEATURE_TFTP_BLOCKSIZE( \
3601        "\n      -b SIZE Transfer blocks of SIZE octets" \
3602         )
3603 #define time_trivial_usage \
3604        "[OPTION]... COMMAND [ARGS...]"
3605 #define time_full_usage \
3606        "Run the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \
3607        "COMMAND's resource usage information is displayed." \
3608        "\n\nOptions:\n" \
3609        "        -v      Verbose"
3610
3611 #define top_trivial_usage \
3612        "[-b] [-n count] [-d seconds]"
3613 #define top_full_usage \
3614        "Provide a view of process activity in real time.\n" \
3615        "Read the status of all processes from /proc each <seconds>\n" \
3616        "and show the status for however many processes will fit on the screen."
3617
3618 #define touch_trivial_usage \
3619        "[-c] FILE [FILE ...]"
3620 #define touch_full_usage \
3621        "Update the last-modified date on the given FILE[s]" \
3622        "\n\nOptions:\n" \
3623        "        -c      Do not create any files"
3624 #define touch_example_usage \
3625        "$ ls -l /tmp/foo\n" \
3626        "/bin/ls: /tmp/foo: No such file or directory\n" \
3627        "$ touch /tmp/foo\n" \
3628        "$ ls -l /tmp/foo\n" \
3629        "-rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo\n"
3630
3631 #define tr_trivial_usage \
3632        "[-cds] STRING1 [STRING2]"
3633 #define tr_full_usage \
3634        "Translate, squeeze, and/or delete characters from\n" \
3635        "standard input, writing to standard output" \
3636        "\n\nOptions:\n" \
3637        "        -c      Take complement of STRING1\n" \
3638        "        -d      Delete input characters coded STRING1\n" \
3639        "        -s      Squeeze multiple output characters of STRING2 into one character"
3640 #define tr_example_usage \
3641        "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
3642        "hello world\n"
3643
3644 #define traceroute_trivial_usage \
3645        "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
3646        "        [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
3647        "        [-z pausemsecs] host [data size]"
3648 #define traceroute_full_usage \
3649        "Trace the route to \"host\"" \
3650        "\n\nOptions:\n" \
3651        "        -F      Set the don't fragment bit\n" \
3652        "        -I      Use ICMP ECHO instead of UDP datagrams\n" \
3653        "        -l      Display the ttl value of the returned packet\n" \
3654        "        -d      Set SO_DEBUG options to socket\n" \
3655        "        -n      Print hop addresses numerically rather than symbolically\n" \
3656        "        -r      Bypass the normal routing tables and send directly to a host\n" \
3657        "        -v      Verbose\n" \
3658        "        -m max_ttl      Max time-to-live (max number of hops)\n" \
3659        "        -p port#        Base UDP port number used in probes\n" \
3660        "                        (default is 33434)\n" \
3661        "        -q nqueries     Number of probes per 'ttl' (default 3)\n" \
3662        "        -s src_addr     IP address to use as the source address\n" \
3663        "        -t tos          Type-of-service in probe packets (default 0)\n" \
3664        "        -w wait         Time in seconds to wait for a response\n" \
3665        "                        (default 3 sec)\n" \
3666        "        -g              Loose source route gateway (8 max)"
3667
3668 #define true_trivial_usage \
3669        ""
3670 #define true_full_usage \
3671        "Return an exit code of TRUE (0)"
3672 #define true_example_usage \
3673        "$ true\n" \
3674        "$ echo $?\n" \
3675        "0\n"
3676
3677 #define tty_trivial_usage \
3678        ""
3679 #define tty_full_usage \
3680        "Print file name of standard input's terminal" \
3681         USE_INCLUDE_SUSv2( \
3682        "\n\nOptions:\n" \
3683        "        -s      Print nothing, only return exit status")
3684 #define tty_example_usage \
3685        "$ tty\n" \
3686        "/dev/tty2\n"
3687
3688 #define ttysize_trivial_usage \
3689        "[w] [h]"
3690 #define ttysize_full_usage \
3691        "Print dimension(s) of standard input's terminal, on error return 80x25"
3692
3693 #define tune2fs_trivial_usage \
3694        "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
3695        "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
3696        "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
3697        "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
3698        "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
3699        "[-T last-check-time] [-U UUID] device"
3700 #define tune2fs_full_usage \
3701        "Adjust filesystem options on ext[23] filesystems"
3702
3703 #define udhcpc_trivial_usage \
3704        "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \
3705        "        [-p pidfile] [-r IP] [-s script]"
3706 #define udhcpc_full_usage \
3707        "        -V,--vendorclass=CLASSID        Set vendor class identifier" \
3708        "\n      -i,--interface=INTERFACE        Interface to use (default: eth0)" \
3709        "\n      -H,-h,--hostname=HOSTNAME       Client hostname" \
3710        "\n      -c,--clientid=CLIENTID  Set client identifier" \
3711        "\n      -C,--clientid-none      Suppress default client identifier" \
3712        "\n      -p,--pidfile=file       Store process ID of daemon in file" \
3713        "\n      -r,--request=IP         IP address to request" \
3714        "\n      -s,--script=file        Run file at dhcp events (default: /usr/share/udhcpc/default.script)" \
3715        "\n      -t,--retries=N          Send up to N request packets"\
3716        "\n      -f,--foreground Run in foreground" \
3717        "\n      -b,--background Background if lease cannot be immediately negotiated" \
3718        "\n      -S,--syslog     Log to syslog too" \
3719        "\n      -n,--now        Exit with failure if lease cannot be immediately negotiated" \
3720        "\n      -q,--quit       Quit after obtaining lease" \
3721        "\n      -R,--release    Release IP on quit" \
3722        "\n      -v,--version    Display version" \
3723
3724 #define udhcpd_trivial_usage \
3725        "[-fS] [configfile]" \
3726
3727 #define udhcpd_full_usage \
3728        "DHCP server" \
3729        "\n      -f      Run in foreground" \
3730        "\n      -S      Log to syslog too"
3731
3732 #define umount_trivial_usage \
3733        "[flags] FILESYSTEM|DIRECTORY"
3734 #define umount_full_usage \
3735        "Unmount file systems" \
3736        "\n\nOptions:\n" \
3737         USE_FEATURE_UMOUNT_ALL( \
3738        "\n      -a      Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab")) \
3739         USE_FEATURE_MTAB_SUPPORT( \
3740        "\n      -n      Don't erase /etc/mtab entries") \
3741        "\n      -r      Try to remount devices as read-only if mount is busy" \
3742        "\n      -l      Lazy umount (detach filesystem)" \
3743        "\n      -f      Force umount (i.e., unreachable NFS server)" \
3744         USE_FEATURE_MOUNT_LOOP( \
3745        "\n      -D      Do not free loop device (if a loop device has been used)")
3746 #define umount_example_usage \
3747        "$ umount /dev/hdc1\n"
3748
3749 #define uname_trivial_usage \
3750        "[OPTION]..."
3751 #define uname_full_usage \
3752        "Print certain system information. With no OPTION, same as -s." \
3753        "\n\nOptions:\n" \
3754        "        -a      Print all information\n" \
3755        "        -m      The machine (hardware) type\n" \
3756        "        -n      Print machine's hostname\n" \
3757        "        -r      Print OS release\n" \
3758        "        -s      Print OS name\n" \
3759        "        -p      Print host processor type\n" \
3760        "        -v      Print OS version"
3761 #define uname_example_usage \
3762        "$ uname -a\n" \
3763        "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
3764
3765 #define uncompress_trivial_usage \
3766        "[-c] [-f] [name...]"
3767 #define uncompress_full_usage \
3768        "Uncompress .Z file[s]" \
3769        "\n\nOptions:\n" \
3770        "        -c      Extract to stdout\n" \
3771        "        -f      Force overwrite an existing file"
3772
3773 #define unexpand_trivial_usage \
3774        "[-f][-a][-t NUM] [FILE|-]"
3775 #define unexpand_full_usage \
3776        "Convert spaces to tabs, writing to standard output." \
3777        "\n\nOptions:" \
3778        "\n      -a" USE_FEATURE_UNEXPAND_LONG_OPTIONS(",--all") \
3779        "        Convert all blanks" \
3780        "\n      -f" USE_FEATURE_UNEXPAND_LONG_OPTIONS(",--first-only") \
3781        "        Convert only leading sequences of blanks" \
3782        "\n      -t" USE_FEATURE_UNEXPAND_LONG_OPTIONS(",--tabs=N") \
3783        "        Tabstops every N chars"
3784
3785 #define uniq_trivial_usage \
3786        "[-fscdu]... [INPUT [OUTPUT]]"
3787 #define uniq_full_usage \
3788        "Discard all but one of successive identical lines from INPUT\n" \
3789        "(or standard input), writing to OUTPUT (or standard output)" \
3790        "\n\nOptions:\n" \
3791        "        -c      Prefix lines by the number of occurrences\n" \
3792        "        -d      Only print duplicate lines\n" \
3793        "        -u      Only print unique lines\n" \
3794        "        -f N    Skip the first N fields\n" \
3795        "        -s N    Skip the first N chars (after any skipped fields)"
3796 #define uniq_example_usage \
3797        "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
3798        "a\n" \
3799        "b\n" \
3800        "c\n"
3801
3802 #define unix2dos_trivial_usage \
3803        "[option] [FILE]"
3804 #define unix2dos_full_usage \
3805        "Convert FILE from unix format to dos format. When no option\n" \
3806        "is given, the input is converted to the opposite output format.\n" \
3807        "When no file is given, use stdin/stdout." \
3808        "\n\nOptions:\n" \
3809        "        -u      Output will be in UNIX format\n" \
3810        "        -d      Output will be in DOS format"
3811
3812 #define unzip_trivial_usage \
3813        "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
3814 #define unzip_full_usage \
3815        "Extract files from ZIP archives" \
3816        "\n\nOptions:\n" \
3817        "        -l      List archive contents (with -q for short form)\n" \
3818        "        -n      Never overwrite existing files (default)\n" \
3819        "        -o      Overwrite files without prompting\n" \
3820        "        -p      Send output to stdout\n" \
3821        "        -q      Quiet\n" \
3822        "        -x      Exclude these files\n" \
3823        "        -d      Extract files into this directory"
3824
3825 #define uptime_trivial_usage \
3826        ""
3827 #define uptime_full_usage \
3828        "Display the time since the last boot"
3829 #define uptime_example_usage \
3830        "$ uptime\n" \
3831        "  1:55pm  up  2:30, load average: 0.09, 0.04, 0.00\n"
3832
3833 #define usleep_trivial_usage \
3834        "N"
3835 #define usleep_full_usage \
3836        "Pause for N microseconds"
3837 #define usleep_example_usage \
3838        "$ usleep 1000000\n" \
3839        "[pauses for 1 second]\n"
3840
3841 #define uudecode_trivial_usage \
3842        "[-o outfile] [infile]"
3843 #define uudecode_full_usage \
3844        "Uudecode a file\n" \
3845        "NB: finds outfile name in uuencoded source unless -o is given"
3846 #define uudecode_example_usage \
3847        "$ uudecode -o busybox busybox.uu\n" \
3848        "$ ls -l busybox\n" \
3849        "-rwxr-xr-x   1 ams      ams        245264 Jun  7 21:35 busybox\n"
3850
3851 #define uuencode_trivial_usage \
3852        "[-m] [infile] stored_filename"
3853 #define uuencode_full_usage \
3854        "Uuencode a file to stdout" \
3855        "\n\nOptions:\n" \
3856        "        -m      Use base64 encoding per RFC1521"
3857 #define uuencode_example_usage \
3858        "$ uuencode busybox busybox\n" \
3859        "begin 755 busybox\n" \
3860        "<encoded file snipped>\n" \
3861        "$ uudecode busybox busybox > busybox.uu\n" \
3862        "$\n"
3863
3864 #define vconfig_trivial_usage \
3865        "COMMAND [OPTIONS] ..."
3866 #define vconfig_full_usage \
3867        "Create and remove virtual ethernet devices" \
3868        "\n\nOptions:\n" \
3869        "        add             [interface-name] [vlan_id]\n" \
3870        "        rem             [vlan-name]\n" \
3871        "        set_flag        [interface-name] [flag-num] [0 | 1]\n" \
3872        "        set_egress_map  [vlan-name] [skb_priority] [vlan_qos]\n" \
3873        "        set_ingress_map [vlan-name] [skb_priority] [vlan_qos]\n" \
3874        "        set_name_type   [name-type]"
3875
3876 #define vi_trivial_usage \
3877        "[OPTION] [FILE]..."
3878 #define vi_full_usage \
3879        "Edit FILE" \
3880        "\n\nOptions:\n" \
3881        "        -R      Read-only - do not write to the file"
3882
3883 #define vlock_trivial_usage \
3884        "[OPTIONS]"
3885 #define vlock_full_usage \
3886        "Lock a virtual terminal. A password is required to unlock." \
3887        "\n\nOptions:\n" \
3888        "        -a      Lock all VTs"
3889
3890 #define watch_trivial_usage \
3891        "[-n seconds] [-t] COMMAND..."
3892 #define watch_full_usage \
3893        "Execute a program periodically" \
3894        "\n\nOptions:\n" \
3895        "        -n      Loop period in seconds (default 2)\n" \
3896        "        -t      Don't print header"
3897 #define watch_example_usage \
3898        "$ watch date\n" \
3899        "Mon Dec 17 10:31:40 GMT 2000\n" \
3900        "Mon Dec 17 10:31:42 GMT 2000\n" \
3901        "Mon Dec 17 10:31:44 GMT 2000"
3902
3903 #define watchdog_trivial_usage \
3904        "[-t N[ms]] [-F] DEV"
3905 #define watchdog_full_usage \
3906        "Periodically write to watchdog device DEV" \
3907        "\n\nOptions:" \
3908      "\n        -t N    Timer period (default 30)" \
3909      "\n        -F      Run in foreground" \
3910      "\n" \
3911      "\nUse -t 500ms to specify period in milliseconds"
3912
3913 #define wc_trivial_usage \
3914        "[OPTION]... [FILE]..."
3915 #define wc_full_usage \
3916        "Print line, word, and byte counts for each FILE, and a total line if\n" \
3917        "more than one FILE is specified. With no FILE, read standard input." \
3918        "\n\nOptions:\n" \
3919        "        -c      Print the byte counts\n" \
3920        "        -l      Print the newline counts\n" \
3921        "        -L      Print the length of the longest line\n" \
3922        "        -w      Print the word counts"
3923 #define wc_example_usage \
3924        "$ wc /etc/passwd\n" \
3925        "     31      46    1365 /etc/passwd\n"
3926
3927 #define wget_trivial_usage \
3928        "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \
3929        "                [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
3930        "                [-U|--user-agent agent] url"
3931 #define wget_full_usage \
3932        "Retrieve files via HTTP or FTP" \
3933        "\n\nOptions:\n" \
3934        "        -s      Spider mode - only check file existence\n" \
3935        "        -c      Continue retrieval of aborted transfer\n" \
3936        "        -q      Quiet\n" \
3937        "        -P      Set directory prefix to DIR\n" \
3938        "        -O      Save to filename ('-' for stdout)\n" \
3939        "        -U      Adjust 'User-Agent' field\n" \
3940        "        -Y      Use proxy ('on' or 'off')"
3941
3942 #define which_trivial_usage \
3943        "[COMMAND ...]"
3944 #define which_full_usage \
3945        "Locate a COMMAND"
3946 #define which_example_usage \
3947        "$ which login\n" \
3948        "/bin/login\n"
3949
3950 #define who_trivial_usage \
3951        " "
3952 #define who_full_usage \
3953        "Print the current user names and related information"
3954
3955 #define whoami_trivial_usage \
3956        ""
3957 #define whoami_full_usage \
3958        "Print the user name associated with the current effective user id"
3959
3960 #define xargs_trivial_usage \
3961        "[OPTIONS] [COMMAND] [ARGS...]"
3962 #define xargs_full_usage \
3963        "Execute COMMAND on every item given by standard input" \
3964        "\n\nOptions:\n" \
3965         USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
3966        "        -p      Prompt the user about whether to run each command\n") \
3967        "        -r      Do not run command for empty read lines\n" \
3968         USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
3969        "        -x      Exit if the size is exceeded\n") \
3970         USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
3971        "        -0      Input filenames are terminated by a null character\n") \
3972        "        -t      Print the command line on stderr before executing it"
3973 #define xargs_example_usage \
3974        "$ ls | xargs gzip\n" \
3975        "$ find . -name '*.c' -print | xargs rm\n"
3976
3977 #define yes_trivial_usage \
3978        "[OPTION]... [STRING]..."
3979 #define yes_full_usage \
3980        "Repeatedly output a line with all specified STRING(s), or 'y'"
3981
3982 #define zcat_trivial_usage \
3983        "FILE"
3984 #define zcat_full_usage \
3985        "Uncompress to stdout"
3986
3987 #define zcip_trivial_usage \
3988        "[OPTIONS] ifname script"
3989 #define zcip_full_usage \
3990        "Manage a ZeroConf IPv4 link-local address" \
3991        "\n\nOptions:\n" \
3992        "        -f              Run in foreground\n" \
3993        "        -q              Quit after address (no daemon)\n" \
3994        "        -r 169.254.x.x  Request this address first\n" \
3995        "        -v              Verbose"
3996
3997 #endif /* __BB_USAGE_H__ */