diff options
Diffstat (limited to 'usage.h')
-rw-r--r-- | usage.h | 533 |
1 files changed, 521 insertions, 12 deletions
@@ -15,11 +15,21 @@ | |||
15 | #define basename_full_usage \ | 15 | #define basename_full_usage \ |
16 | "Strips directory path and suffixes from FILE.\n" \ | 16 | "Strips directory path and suffixes from FILE.\n" \ |
17 | "If specified, also removes any trailing SUFFIX." | 17 | "If specified, also removes any trailing SUFFIX." |
18 | #define basename_example_usage \ | ||
19 | "$ basename /usr/local/bin/foo\n" \ | ||
20 | "foo\n" \ | ||
21 | "$ basename /usr/local/bin/\n" \ | ||
22 | "bin\n" \ | ||
23 | "$ basename /foo/bar.txt .txt\n" \ | ||
24 | "bar" | ||
18 | 25 | ||
19 | #define cat_trivial_usage \ | 26 | #define cat_trivial_usage \ |
20 | "[FILE]..." | 27 | "[FILE]..." |
21 | #define cat_full_usage \ | 28 | #define cat_full_usage \ |
22 | "Concatenates FILE(s) and prints them to stdout." | 29 | "Concatenates FILE(s) and prints them to stdout." |
30 | #define cat_example_usage \ | ||
31 | "$ cat /proc/uptime\n" \ | ||
32 | "110716.72 17.67" | ||
23 | 33 | ||
24 | #define chgrp_trivial_usage \ | 34 | #define chgrp_trivial_usage \ |
25 | "[OPTION]... GROUP FILE..." | 35 | "[OPTION]... GROUP FILE..." |
@@ -27,6 +37,12 @@ | |||
27 | "Change the group membership of each FILE to GROUP.\n" \ | 37 | "Change the group membership of each FILE to GROUP.\n" \ |
28 | "\nOptions:\n" \ | 38 | "\nOptions:\n" \ |
29 | "\t-R\tChanges files and directories recursively." | 39 | "\t-R\tChanges files and directories recursively." |
40 | #define chgrp_example_usage \ | ||
41 | "$ ls -l /tmp/foo\n" \ | ||
42 | "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ | ||
43 | "$ chgrp root /tmp/foo\n" \ | ||
44 | "$ ls -l /tmp/foo\n" \ | ||
45 | "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" | ||
30 | 46 | ||
31 | #define chmod_trivial_usage \ | 47 | #define chmod_trivial_usage \ |
32 | "[-R] MODE[,MODE]... FILE..." | 48 | "[-R] MODE[,MODE]... FILE..." |
@@ -35,6 +51,15 @@ | |||
35 | "symbols +-= and one or more of the letters rwxst.\n\n" \ | 51 | "symbols +-= and one or more of the letters rwxst.\n\n" \ |
36 | "Options:\n" \ | 52 | "Options:\n" \ |
37 | "\t-R\tChanges files and directories recursively." | 53 | "\t-R\tChanges files and directories recursively." |
54 | #define chmod_example_usage \ | ||
55 | "$ ls -l /tmp/foo\n" \ | ||
56 | "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \ | ||
57 | "$ chmod u+x /tmp/foo\n" \ | ||
58 | "$ ls -l /tmp/foo\n" \ | ||
59 | "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \ | ||
60 | "$ chmod 444 /tmp/foo\n" \ | ||
61 | "$ ls -l /tmp/foo\n" \ | ||
62 | "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
38 | 63 | ||
39 | #define chown_trivial_usage \ | 64 | #define chown_trivial_usage \ |
40 | "[OPTION]... OWNER[<.|:>[GROUP] FILE..." | 65 | "[OPTION]... OWNER[<.|:>[GROUP] FILE..." |
@@ -42,11 +67,27 @@ | |||
42 | "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \ | 67 | "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \ |
43 | "\nOptions:\n" \ | 68 | "\nOptions:\n" \ |
44 | "\t-R\tChanges files and directories recursively." | 69 | "\t-R\tChanges files and directories recursively." |
70 | #define chown_example_usage \ | ||
71 | "$ ls -l /tmp/foo\n" \ | ||
72 | "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ | ||
73 | "$ chown root /tmp/foo\n" \ | ||
74 | "$ ls -l /tmp/foo\n" \ | ||
75 | "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \ | ||
76 | "$ chown root.root /tmp/foo\n" \ | ||
77 | "ls -l /tmp/foo\n" \ | ||
78 | "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
45 | 79 | ||
46 | #define chroot_trivial_usage \ | 80 | #define chroot_trivial_usage \ |
47 | "NEWROOT [COMMAND...]" | 81 | "NEWROOT [COMMAND...]" |
48 | #define chroot_full_usage \ | 82 | #define chroot_full_usage \ |
49 | "Run COMMAND with root directory set to NEWROOT." | 83 | "Run COMMAND with root directory set to NEWROOT." |
84 | #define chroot_example_usage \ | ||
85 | "$ ls -l /bin/ls\n" \ | ||
86 | "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \ | ||
87 | "$ mount /dev/hdc1 /mnt -t minix\n" \ | ||
88 | "$ chroot /mnt\n" \ | ||
89 | "$ ls -l /bin/ls\n" \ | ||
90 | "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n" | ||
50 | 91 | ||
51 | #define chvt_trivial_usage \ | 92 | #define chvt_trivial_usage \ |
52 | "N" | 93 | "N" |
@@ -85,6 +126,11 @@ | |||
85 | "\t-s\t\tOutput only the lines containing delimiter\n" \ | 126 | "\t-s\t\tOutput only the lines containing delimiter\n" \ |
86 | "\t-f N\t\tPrint only these fields\n" \ | 127 | "\t-f N\t\tPrint only these fields\n" \ |
87 | "\t-n\t\tIgnored" | 128 | "\t-n\t\tIgnored" |
129 | #define cut_example_usage \ | ||
130 | "$ echo "Hello world" | cut -f 1 -d ' '\n" \ | ||
131 | "Hello\n" \ | ||
132 | "$ echo "Hello world" | cut -f 2 -d ' '\n" \ | ||
133 | "world\n" | ||
88 | 134 | ||
89 | #define date_trivial_usage \ | 135 | #define date_trivial_usage \ |
90 | "[OPTION]... [+FORMAT]" | 136 | "[OPTION]... [+FORMAT]" |
@@ -95,6 +141,9 @@ | |||
95 | "\t-d STRING\tdisplay time described by STRING, not `now'\n" \ | 141 | "\t-d STRING\tdisplay time described by STRING, not `now'\n" \ |
96 | "\t-s\t\tSets time described by STRING\n" \ | 142 | "\t-s\t\tSets time described by STRING\n" \ |
97 | "\t-u\t\tPrints or sets Coordinated Universal Time" | 143 | "\t-u\t\tPrints or sets Coordinated Universal Time" |
144 | #define date_example_usage \ | ||
145 | "$ date\n" \ | ||
146 | "Wed Apr 12 18:52:41 MDT 2000\n" | ||
98 | 147 | ||
99 | #define dc_trivial_usage \ | 148 | #define dc_trivial_usage \ |
100 | "expression ..." | 149 | "expression ..." |
@@ -102,6 +151,17 @@ | |||
102 | "This is a Tiny RPN calculator that understands the\n" \ | 151 | "This is a Tiny RPN calculator that understands the\n" \ |
103 | "following operations: +, -, /, *, and, or, not, eor.\n" \ | 152 | "following operations: +, -, /, *, and, or, not, eor.\n" \ |
104 | "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16" | 153 | "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16" |
154 | #define dc_example_usage \ | ||
155 | "$ dc 2 2 +\n" \ | ||
156 | "4\n" \ | ||
157 | "$ dc 8 8 \* 2 2 + /\n" \ | ||
158 | "16\n" \ | ||
159 | "$ dc 0 1 and\n" \ | ||
160 | "0\n" \ | ||
161 | "$ dc 0 1 or\n" \ | ||
162 | "1\n" \ | ||
163 | "$ echo 72 9 div 8 mul | dc\n" \ | ||
164 | "64\n" | ||
105 | 165 | ||
106 | #define dd_trivial_usage \ | 166 | #define dd_trivial_usage \ |
107 | "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]\n" \ | 167 | "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]\n" \ |
@@ -119,6 +179,10 @@ | |||
119 | "\n" \ | 179 | "\n" \ |
120 | "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \ | 180 | "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \ |
121 | "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)." | 181 | "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)." |
182 | #define dd_example_usage \ | ||
183 | "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \ | ||
184 | "4+0 records in\n" \ | ||
185 | "4+0 records out\n" | ||
122 | 186 | ||
123 | #define deallocvt_trivial_usage \ | 187 | #define deallocvt_trivial_usage \ |
124 | "N" | 188 | "N" |
@@ -143,11 +207,24 @@ | |||
143 | "\t-m\tprint sizes in megabytes\n" \ | 207 | "\t-m\tprint sizes in megabytes\n" \ |
144 | "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \ | 208 | "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \ |
145 | "\n\t-k\tprint sizes in kilobytes(compatability)") | 209 | "\n\t-k\tprint sizes in kilobytes(compatability)") |
210 | #define df_example_usage \ | ||
211 | "$ df\n" \ | ||
212 | "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ | ||
213 | "/dev/sda3 8690864 8553540 137324 98% /\n" \ | ||
214 | "/dev/sda1 64216 36364 27852 57% /boot\n" \ | ||
215 | "$ df /dev/sda3\n" \ | ||
216 | "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ | ||
217 | "/dev/sda3 8690864 8553540 137324 98% /\n" | ||
146 | 218 | ||
147 | #define dirname_trivial_usage \ | 219 | #define dirname_trivial_usage \ |
148 | "[FILENAME ...]" | 220 | "[FILENAME ...]" |
149 | #define dirname_full_usage \ | 221 | #define dirname_full_usage \ |
150 | "Strips non-directory suffix from FILENAME" | 222 | "Strips non-directory suffix from FILENAME" |
223 | #define dirname_example_usage \ | ||
224 | "$ dirname /tmp/foo\n" \ | ||
225 | "/tmp\n" \ | ||
226 | "$ dirname /tmp/foo/\n" \ | ||
227 | "/tmp\n" | ||
151 | 228 | ||
152 | #define dmesg_trivial_usage \ | 229 | #define dmesg_trivial_usage \ |
153 | "[-c] [-n LEVEL] [-s SIZE]" | 230 | "[-c] [-n LEVEL] [-s SIZE]" |
@@ -184,6 +261,8 @@ | |||
184 | "\t-e\tExtract control files to directory\n" \ | 261 | "\t-e\tExtract control files to directory\n" \ |
185 | "\t-x\tExctract packages filesystem tree to directory\n" \ | 262 | "\t-x\tExctract packages filesystem tree to directory\n" \ |
186 | "\t-X\tVerbose extract" | 263 | "\t-X\tVerbose extract" |
264 | #define dpkg_deb_example_usage \ | ||
265 | "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" | ||
187 | 266 | ||
188 | #define du_trivial_usage \ | 267 | #define du_trivial_usage \ |
189 | "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..." | 268 | "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..." |
@@ -198,17 +277,40 @@ | |||
198 | "\t-m\tprint sizes in megabytes\n" \ | 277 | "\t-m\tprint sizes in megabytes\n" \ |
199 | "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \ | 278 | "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \ |
200 | "\n\t-k\tprint sizes in kilobytes(compatability)") | 279 | "\n\t-k\tprint sizes in kilobytes(compatability)") |
280 | #define du_example_usage \ | ||
281 | "$ du\n" \ | ||
282 | "16 ./CVS\n" \ | ||
283 | "12 ./kernel-patches/CVS\n" \ | ||
284 | "80 ./kernel-patches\n" \ | ||
285 | "12 ./tests/CVS\n" \ | ||
286 | "36 ./tests\n" \ | ||
287 | "12 ./scripts/CVS\n" \ | ||
288 | "16 ./scripts\n" \ | ||
289 | "12 ./docs/CVS\n" \ | ||
290 | "104 ./docs\n" \ | ||
291 | "2417 .\n" | ||
201 | 292 | ||
202 | #define dumpkmap_trivial_usage \ | 293 | #define dumpkmap_trivial_usage \ |
203 | "> keymap" | 294 | "> keymap" |
204 | #define dumpkmap_full_usage \ | 295 | #define dumpkmap_full_usage \ |
205 | "Prints out a binary keyboard translation table to standard output." | 296 | "Prints out a binary keyboard translation table to standard output." |
297 | #define dumpkmap_example_usage \ | ||
298 | "$ dumpkmap > keymap\n" | ||
206 | 299 | ||
207 | #define dutmp_trivial_usage \ | 300 | #define dutmp_trivial_usage \ |
208 | "[FILE]" | 301 | "[FILE]" |
209 | #define dutmp_full_usage \ | 302 | #define dutmp_full_usage \ |
210 | "Dump utmp file format (pipe delimited) from FILE\n" \ | 303 | "Dump utmp file format (pipe delimited) from FILE\n" \ |
211 | "or stdin to stdout. (i.e. 'dutmp /var/run/utmp')" | 304 | "or stdin to stdout. (i.e. 'dutmp /var/run/utmp')" |
305 | #define dutmp_example_usage \ | ||
306 | "$ dutmp /var/run/utmp\n" \ | ||
307 | "8|7||si|||0|0|0|955637625|760097|0\n" \ | ||
308 | "2|0|~|~~|reboot||0|0|0|955637625|782235|0\n" \ | ||
309 | "1|20020|~|~~|runlevel||0|0|0|955637625|800089|0\n" \ | ||
310 | "8|125||l4|||0|0|0|955637629|998367|0\n" \ | ||
311 | "6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0\n" \ | ||
312 | "6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0\n" \ | ||
313 | "7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0\n" | ||
212 | 314 | ||
213 | #define echo_trivial_usage \ | 315 | #define echo_trivial_usage \ |
214 | "[-neE] [ARG ...]" | 316 | "[-neE] [ARG ...]" |
@@ -218,6 +320,15 @@ | |||
218 | "\t-n\tsuppress trailing newline\n" \ | 320 | "\t-n\tsuppress trailing newline\n" \ |
219 | "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n" \ | 321 | "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n" \ |
220 | "\t-E\tdisable interpretation of backslash-escaped characters" | 322 | "\t-E\tdisable interpretation of backslash-escaped characters" |
323 | #define echo_example_usage \ | ||
324 | "$ echo "Erik is cool"\n" \ | ||
325 | "Erik is cool\n" \ | ||
326 | "$ echo -e "Erik\nis\ncool"\n" \ | ||
327 | "Erik\n" \ | ||
328 | "is\n" \ | ||
329 | "cool\n" \ | ||
330 | "$ echo "Erik\nis\ncool"\n" \ | ||
331 | "Erik\nis\ncool\n" | ||
221 | 332 | ||
222 | #define expr_trivial_usage \ | 333 | #define expr_trivial_usage \ |
223 | "EXPRESSION" | 334 | "EXPRESSION" |
@@ -257,6 +368,24 @@ | |||
257 | "" | 368 | "" |
258 | #define false_full_usage \ | 369 | #define false_full_usage \ |
259 | "Return an exit code of FALSE (1)." | 370 | "Return an exit code of FALSE (1)." |
371 | #define false_example_usage \ | ||
372 | "$ false\n" \ | ||
373 | "$ echo $?\n" \ | ||
374 | "1\n" | ||
375 | |||
376 | #define fbset_trivial_usage \ | ||
377 | "[options] [mode]" | ||
378 | #define fbset_full_usage \ | ||
379 | "Show and modify frame buffer settings" | ||
380 | #define fbset_example_usage \ | ||
381 | "$ fbset\n" \ | ||
382 | "mode "1024x768-76"\n" \ | ||
383 | "\t# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \ | ||
384 | "\tgeometry 1024 768 1024 768 16\n" \ | ||
385 | "\ttimings 12714 128 32 16 4 128 4\n" \ | ||
386 | "\taccel false\n" \ | ||
387 | "\trgba 5/11,6/5,5/0,0/0\n" \ | ||
388 | "endmode\n" | ||
260 | 389 | ||
261 | #define fdflush_trivial_usage \ | 390 | #define fdflush_trivial_usage \ |
262 | "DEVICE" | 391 | "DEVICE" |
@@ -293,16 +422,27 @@ | |||
293 | "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \ | 422 | "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \ |
294 | ) USAGE_FIND_MTIME( \ | 423 | ) USAGE_FIND_MTIME( \ |
295 | "\n\t-mtime TIME\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days") | 424 | "\n\t-mtime TIME\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days") |
425 | #define find_example_usage \ | ||
426 | "$ find / -name /etc/passwd\n" \ | ||
427 | "/etc/passwd\n" | ||
296 | 428 | ||
297 | #define free_trivial_usage \ | 429 | #define free_trivial_usage \ |
298 | "" | 430 | "" |
299 | #define free_full_usage \ | 431 | #define free_full_usage \ |
300 | "Displays the amount of free and used system memory" | 432 | "Displays the amount of free and used system memory" |
433 | #define free_example_usage \ | ||
434 | "$ free\n" \ | ||
435 | " total used free shared buffers\n" \ | ||
436 | " Mem: 257628 248724 8904 59644 93124\n" \ | ||
437 | " Swap: 128516 8404 120112\n" \ | ||
438 | "Total: 386144 257128 129016\n" \ | ||
301 | 439 | ||
302 | #define freeramdisk_trivial_usage \ | 440 | #define freeramdisk_trivial_usage \ |
303 | "DEVICE" | 441 | "DEVICE" |
304 | #define freeramdisk_full_usage \ | 442 | #define freeramdisk_full_usage \ |
305 | "Frees all memory used by the specified ramdisk." | 443 | "Frees all memory used by the specified ramdisk." |
444 | #define freeramdisk_example_usage \ | ||
445 | "$ freeramdisk /dev/ram2\n" | ||
306 | 446 | ||
307 | #define fsck_minix_trivial_usage \ | 447 | #define fsck_minix_trivial_usage \ |
308 | "[-larvsmf] /dev/name" | 448 | "[-larvsmf] /dev/name" |
@@ -330,6 +470,26 @@ | |||
330 | "\t-s, --shell=shell Set shell quoting conventions\n" \ | 470 | "\t-s, --shell=shell Set shell quoting conventions\n" \ |
331 | "\t-T, --test Test for getopt(1) version\n" \ | 471 | "\t-T, --test Test for getopt(1) version\n" \ |
332 | "\t-u, --unqote Do not quote the output" | 472 | "\t-u, --unqote Do not quote the output" |
473 | #define getopt_example_usage \ | ||
474 | "$ cat getopt.test\n" \ | ||
475 | "#!/bin/sh\n" \ | ||
476 | "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \ | ||
477 | " -n 'example.busybox' -- "$@"`\n" \ | ||
478 | "if [ $? != 0 ] ; then exit 1 ; fi\n" \ | ||
479 | "eval set -- "$GETOPT"\n" \ | ||
480 | "while true ; do\n" \ | ||
481 | " case $1 in\n" \ | ||
482 | " -a|--a-long) echo \"Option a\" ; shift ;;\n" \ | ||
483 | " -b|--b-long) echo \"Option b, argument \`$2'\" ; shift 2 ;;\n" \ | ||
484 | " -c|--c-long)\n" \ | ||
485 | " case "$2" in\n" \ | ||
486 | " \"\") echo \"Option c, no argument\"; shift 2 ;;\n" \ | ||
487 | " *) echo \"Option c, argument \`$2'\" ; shift 2 ;;\n" \ | ||
488 | " esac ;;\n" \ | ||
489 | " --) shift ; break ;;\n" \ | ||
490 | " *) echo \"Internal error!\" ; exit 1 ;;\n" \ | ||
491 | " esac\n" \ | ||
492 | "done\n" | ||
333 | 493 | ||
334 | #define grep_trivial_usage \ | 494 | #define grep_trivial_usage \ |
335 | "[-ihHnqvs] pattern [files...]" | 495 | "[-ihHnqvs] pattern [files...]" |
@@ -343,9 +503,11 @@ | |||
343 | "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n" \ | 503 | "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n" \ |
344 | "\t-v\tselect non-matching lines\n" \ | 504 | "\t-v\tselect non-matching lines\n" \ |
345 | "\t-s\tsuppress file open/read error messages" | 505 | "\t-s\tsuppress file open/read error messages" |
346 | 506 | #define grep_example_usage \ | |
347 | #define egrep_trivial_usage grep_trivial_usage | 507 | "$ grep root /etc/passwd\n" \ |
348 | #define egrep_full_usage grep_full_usage | 508 | "root:x:0:0:root:/root:/bin/bash\n" \ |
509 | "$ grep ^[rR]oo. /etc/passwd\n" \ | ||
510 | "root:x:0:0:root:/root:/bin/bash\n" | ||
349 | 511 | ||
350 | #define gunzip_trivial_usage \ | 512 | #define gunzip_trivial_usage \ |
351 | "[OPTION]... FILE" | 513 | "[OPTION]... FILE" |
@@ -354,6 +516,12 @@ | |||
354 | "Options:\n" \ | 516 | "Options:\n" \ |
355 | "\t-c\tWrite output to standard output\n" \ | 517 | "\t-c\tWrite output to standard output\n" \ |
356 | "\t-t\tTest compressed file integrity" | 518 | "\t-t\tTest compressed file integrity" |
519 | #define gunzip_example_usage \ | ||
520 | "$ ls -la /tmp/BusyBox*\n" \ | ||
521 | "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \ | ||
522 | "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \ | ||
523 | "$ ls -la /tmp/BusyBox*\n" \ | ||
524 | "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" | ||
357 | 525 | ||
358 | #define gzip_trivial_usage \ | 526 | #define gzip_trivial_usage \ |
359 | "[OPTION]... FILE" | 527 | "[OPTION]... FILE" |
@@ -363,6 +531,12 @@ | |||
363 | "Options:\n" \ | 531 | "Options:\n" \ |
364 | "\t-c\tWrite output to standard output instead of FILE.gz\n" \ | 532 | "\t-c\tWrite output to standard output instead of FILE.gz\n" \ |
365 | "\t-d\tdecompress" | 533 | "\t-d\tdecompress" |
534 | #define gzip_example_usage \ | ||
535 | "$ ls -la /tmp/BusyBox*\n" \ | ||
536 | "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" \ | ||
537 | "$ gzip /tmp/BusyBox-0.43.tar\n" \ | ||
538 | "$ ls -la /tmp/BusyBox*\n" \ | ||
539 | "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz\n" | ||
366 | 540 | ||
367 | #define halt_trivial_usage \ | 541 | #define halt_trivial_usage \ |
368 | "" | 542 | "" |
@@ -377,6 +551,10 @@ | |||
377 | "file name. With no FILE, or when FILE is -, read standard input.\n\n" \ | 551 | "file name. With no FILE, or when FILE is -, read standard input.\n\n" \ |
378 | "Options:\n" \ | 552 | "Options:\n" \ |
379 | "\t-n NUM\t\tPrint first NUM lines instead of first 10" | 553 | "\t-n NUM\t\tPrint first NUM lines instead of first 10" |
554 | #define head_example_usage \ | ||
555 | "$ head -n 2 /etc/passwd\n" \ | ||
556 | "root:x:0:0:root:/root:/bin/bash\n" \ | ||
557 | "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" | ||
380 | 558 | ||
381 | #define hostid_trivial_usage \ | 559 | #define hostid_trivial_usage \ |
382 | "" | 560 | "" |
@@ -393,6 +571,9 @@ | |||
393 | "\t-i\t\tAddresses for the hostname\n" \ | 571 | "\t-i\t\tAddresses for the hostname\n" \ |
394 | "\t-d\t\tDNS domain name\n" \ | 572 | "\t-d\t\tDNS domain name\n" \ |
395 | "\t-F, --file FILE\tUse the contents of FILE to specify the hostname" | 573 | "\t-F, --file FILE\tUse the contents of FILE to specify the hostname" |
574 | #define hostname_example_usage \ | ||
575 | "$ hostname\n" \ | ||
576 | "slag \n" | ||
396 | 577 | ||
397 | #define id_trivial_usage \ | 578 | #define id_trivial_usage \ |
398 | "[OPTIONS]... [USERNAME]" | 579 | "[OPTIONS]... [USERNAME]" |
@@ -403,6 +584,9 @@ | |||
403 | "\t-u\tprints only the user ID\n" \ | 584 | "\t-u\tprints only the user ID\n" \ |
404 | "\t-n\tprint a name instead of a number (with for -ug)\n" \ | 585 | "\t-n\tprint a name instead of a number (with for -ug)\n" \ |
405 | "\t-r\tprints the real user ID instead of the effective ID (with -ug)" | 586 | "\t-r\tprints the real user ID instead of the effective ID (with -ug)" |
587 | #define id_example_usage \ | ||
588 | "$ id\n" \ | ||
589 | "uid=1000(andersen) gid=1000(andersen)\n" | ||
406 | 590 | ||
407 | #ifdef BB_FEATURE_IFCONFIG_SLIP | 591 | #ifdef BB_FEATURE_IFCONFIG_SLIP |
408 | #define USAGE_SIOCSKEEPALIVE(a) a | 592 | #define USAGE_SIOCSKEEPALIVE(a) a |
@@ -443,8 +627,116 @@ | |||
443 | #define init_trivial_usage \ | 627 | #define init_trivial_usage \ |
444 | "" | 628 | "" |
445 | #define init_full_usage \ | 629 | #define init_full_usage \ |
446 | "Init is the parent of all processes.\n\n" \ | 630 | "Init is the parent of all processes." |
447 | "This version of init is designed to be run only by the kernel." | 631 | #define init_notes_usage \ |
632 | "This version of init is designed to be run only by the kernel.\n" \ | ||
633 | "\n" \ | ||
634 | "BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \ | ||
635 | "the /etc/inittab file is completely ignored by BusyBox init. If you want \n" \ | ||
636 | "runlevels, use sysvinit.\n" \ | ||
637 | "\n" \ | ||
638 | "BusyBox init works just fine without an inittab. If no inittab is found, \n" \ | ||
639 | "it has the following default behavior:\n" \ | ||
640 | "\n" \ | ||
641 | " ::sysinit:/etc/init.d/rcS\n" \ | ||
642 | " ::askfirst:/bin/sh\n" \ | ||
643 | "\n" \ | ||
644 | "if it detects that /dev/console is _not_ a serial console, it will also run:\n" \ | ||
645 | "\n" \ | ||
646 | " tty2::askfirst:/bin/sh\n" \ | ||
647 | "\n" \ | ||
648 | "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \ | ||
649 | "\n" \ | ||
650 | " <id>:<runlevels>:<action>:<process>\n" \ | ||
651 | "\n" \ | ||
652 | " <id>: \n" \ | ||
653 | "\n" \ | ||
654 | " WARNING: This field has a non-traditional meaning for BusyBox init!\n" \ | ||
655 | " The id field is used by BusyBox init to specify the controlling tty for\n" \ | ||
656 | " the specified process to run on. The contents of this field are\n" \ | ||
657 | " appended to "/dev/" and used as-is. There is no need for this field to\n" \ | ||
658 | " be unique, although if it isn't you may have strange results. If this\n" \ | ||
659 | " field is left blank, the controlling tty is set to the console. Also\n" \ | ||
660 | " note that if BusyBox detects that a serial console is in use, then only\n" \ | ||
661 | " entries whose controlling tty is either the serial console or /dev/null\n" \ | ||
662 | " will be run. BusyBox init does nothing with utmp. We don't need no\n" \ | ||
663 | " stinkin' utmp.\n" \ | ||
664 | "\n" \ | ||
665 | " <runlevels>: \n" \ | ||
666 | "\n" \ | ||
667 | " The runlevels field is completely ignored.\n" \ | ||
668 | "\n" \ | ||
669 | " <action>: \n" \ | ||
670 | "\n" \ | ||
671 | " Valid actions include: sysinit, respawn, askfirst, wait, \n" \ | ||
672 | " once, and ctrlaltdel.\n" \ | ||
673 | "\n" \ | ||
674 | " The available actions can be classified into two groups: actions\n" \ | ||
675 | " that are run only once, and actions that are re-run when the specified\n" \ | ||
676 | " process exits.\n" \ | ||
677 | "\n" \ | ||
678 | " Run only-once actions:\n" \ | ||
679 | "\n" \ | ||
680 | " 'sysinit' is the first item run on boot. init waits until all\n" \ | ||
681 | " sysinit actions are completed before continuing. Following the\n" \ | ||
682 | " completion of all sysinit actions, all 'wait' actions are run.\n" \ | ||
683 | " 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \ | ||
684 | " the specified task completes. 'once' actions are asyncronous,\n" \ | ||
685 | " therefore, init does not wait for them to complete. 'ctrlaltdel'\n" \ | ||
686 | " actions are run immediately before init causes the system to reboot\n" \ | ||
687 | " (unmounting filesystems with a 'ctrlaltdel' action is a very good\n" \ | ||
688 | " idea).\n" \ | ||
689 | "\n" \ | ||
690 | " Run repeatedly actions:\n" \ | ||
691 | "\n" \ | ||
692 | " 'respawn' actions are run after the 'once' actions. When a process\n" \ | ||
693 | " started with a 'respawn' action exits, init automatically restarts\n" \ | ||
694 | " it. Unlike sysvinit, BusyBox init does not stop processes from\n" \ | ||
695 | " respawning out of control. The 'askfirst' actions acts just like\n" \ | ||
696 | " respawn, except that before running the specified process it\n" \ | ||
697 | " displays the line "Please press Enter to activate this console."\n" \ | ||
698 | " and then waits for the user to press enter before starting the\n" \ | ||
699 | " specified process. \n" \ | ||
700 | "\n" \ | ||
701 | " Unrecognized actions (like initdefault) will cause init to emit an\n" \ | ||
702 | " error message, and then go along with its business. All actions are\n" \ | ||
703 | " run in the reverse order from how they appear in /etc/inittab.\n" \ | ||
704 | "\n" \ | ||
705 | " <process>: \n" \ | ||
706 | "\n" \ | ||
707 | " Specifies the process to be executed and it's command line.\n" \ | ||
708 | "\n" \ | ||
709 | "Example /etc/inittab file:\n" \ | ||
710 | " # This is run first except when booting in single-user mode.\n" \ | ||
711 | " #\n" \ | ||
712 | " ::sysinit:/etc/init.d/rcS\n" \ | ||
713 | " \n" \ | ||
714 | " # /bin/sh invocations on selected ttys\n" \ | ||
715 | " #\n" \ | ||
716 | " # Start an "askfirst" shell on the console (whatever that may be)\n" \ | ||
717 | " ::askfirst:-/bin/sh\n" \ | ||
718 | " # Start an "askfirst" shell on /dev/tty2-4\n" \ | ||
719 | " tty2::askfirst:-/bin/sh\n" \ | ||
720 | " tty3::askfirst:-/bin/sh\n" \ | ||
721 | " tty4::askfirst:-/bin/sh\n" \ | ||
722 | " \n" \ | ||
723 | " # /sbin/getty invocations for selected ttys\n" \ | ||
724 | " #\n" \ | ||
725 | " tty4::respawn:/sbin/getty 38400 tty5\n" \ | ||
726 | " tty5::respawn:/sbin/getty 38400 tty6\n" \ | ||
727 | " \n" \ | ||
728 | " \n" \ | ||
729 | " # Example of how to put a getty on a serial line (for a terminal)\n" \ | ||
730 | " #\n" \ | ||
731 | " #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \ | ||
732 | " #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \ | ||
733 | " #\n" \ | ||
734 | " # Example how to put a getty on a modem line.\n" \ | ||
735 | " #::respawn:/sbin/getty 57600 ttyS2\n" \ | ||
736 | " \n" \ | ||
737 | " # Stuff to do before rebooting\n" \ | ||
738 | " ::ctrlaltdel:/bin/umount -a -r\n" \ | ||
739 | " ::ctrlaltdel:/sbin/swapoff -a\n" | ||
448 | 740 | ||
449 | #define insmod_trivial_usage \ | 741 | #define insmod_trivial_usage \ |
450 | "[OPTION]... MODULE [symbol=value]..." | 742 | "[OPTION]... MODULE [symbol=value]..." |
@@ -463,6 +755,15 @@ | |||
463 | "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\ | 755 | "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\ |
464 | "Options:\n" \ | 756 | "Options:\n" \ |
465 | "\t-l\tList all signal names and numbers." | 757 | "\t-l\tList all signal names and numbers." |
758 | #define kill_example_usage \ | ||
759 | "$ ps | grep apache\n" \ | ||
760 | "252 root root S [apache]\n" \ | ||
761 | "263 www-data www-data S [apache]\n" \ | ||
762 | "264 www-data www-data S [apache]\n" \ | ||
763 | "265 www-data www-data S [apache]\n" \ | ||
764 | "266 www-data www-data S [apache]\n" \ | ||
765 | "267 www-data www-data S [apache]\n" \ | ||
766 | "$ kill 252\n" | ||
466 | 767 | ||
467 | #define killall_trivial_usage \ | 768 | #define killall_trivial_usage \ |
468 | "[-signal] process-name [process-name ...]" | 769 | "[-signal] process-name [process-name ...]" |
@@ -470,6 +771,8 @@ | |||
470 | "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\ | 771 | "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\ |
471 | "Options:\n" \ | 772 | "Options:\n" \ |
472 | "\t-l\tList all signal names and numbers." | 773 | "\t-l\tList all signal names and numbers." |
774 | #define killall_example_usage \ | ||
775 | "$ killall apache\n" | ||
473 | 776 | ||
474 | #define klogd_trivial_usage \ | 777 | #define klogd_trivial_usage \ |
475 | "-n" | 778 | "-n" |
@@ -482,6 +785,9 @@ | |||
482 | "STRING" | 785 | "STRING" |
483 | #define length_full_usage \ | 786 | #define length_full_usage \ |
484 | "Prints out the length of the specified STRING." | 787 | "Prints out the length of the specified STRING." |
788 | #define length_example_usage \ | ||
789 | "$ length "Hello"\n" \ | ||
790 | "5\n" | ||
485 | 791 | ||
486 | #define ln_trivial_usage \ | 792 | #define ln_trivial_usage \ |
487 | "[OPTION] TARGET... LINK_NAME|DIRECTORY" | 793 | "[OPTION] TARGET... LINK_NAME|DIRECTORY" |
@@ -492,21 +798,31 @@ | |||
492 | "\t-s\tmake symbolic links instead of hard links\n" \ | 798 | "\t-s\tmake symbolic links instead of hard links\n" \ |
493 | "\t-f\tremove existing destination files\n" \ | 799 | "\t-f\tremove existing destination files\n" \ |
494 | "\t-n\tno dereference symlinks - treat like normal file" | 800 | "\t-n\tno dereference symlinks - treat like normal file" |
801 | #define ln_example_usage \ | ||
802 | "$ ln -s BusyBox /tmp/ls\n" \ | ||
803 | "$ ls -l /tmp/ls\n" \ | ||
804 | "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n" | ||
495 | 805 | ||
496 | #define loadacm_trivial_usage \ | 806 | #define loadacm_trivial_usage \ |
497 | "< mapfile" | 807 | "< mapfile" |
498 | #define loadacm_full_usage \ | 808 | #define loadacm_full_usage \ |
499 | "Loads an acm from standard input." | 809 | "Loads an acm from standard input." |
810 | #define loadacm_example_usage \ | ||
811 | "$ loadacm < /etc/i18n/acmname\n" | ||
500 | 812 | ||
501 | #define loadfont_trivial_usage \ | 813 | #define loadfont_trivial_usage \ |
502 | "< font" | 814 | "< font" |
503 | #define loadfont_full_usage \ | 815 | #define loadfont_full_usage \ |
504 | "Loads a console font from standard input." | 816 | "Loads a console font from standard input." |
817 | #define loadfont_example_usage \ | ||
818 | "$ loadfont < /etc/i18n/fontname\n" | ||
505 | 819 | ||
506 | #define loadkmap_trivial_usage \ | 820 | #define loadkmap_trivial_usage \ |
507 | "< keymap" | 821 | "< keymap" |
508 | #define loadkmap_full_usage \ | 822 | #define loadkmap_full_usage \ |
509 | "Loads a binary keyboard translation table from standard input." | 823 | "Loads a binary keyboard translation table from standard input." |
824 | #define loadkmap_example_usage \ | ||
825 | "$ loadkmap < /etc/i18n/lang-keymap\n" | ||
510 | 826 | ||
511 | #define logger_trivial_usage \ | 827 | #define logger_trivial_usage \ |
512 | "[OPTION]... [MESSAGE]" | 828 | "[OPTION]... [MESSAGE]" |
@@ -517,11 +833,16 @@ | |||
517 | "\t-t\tLog using the specified tag (defaults to user name).\n" \ | 833 | "\t-t\tLog using the specified tag (defaults to user name).\n" \ |
518 | "\t-p\tEnter the message with the specified priority.\n" \ | 834 | "\t-p\tEnter the message with the specified priority.\n" \ |
519 | "\t\tThis may be numerical or a ``facility.level'' pair." | 835 | "\t\tThis may be numerical or a ``facility.level'' pair." |
836 | #define logger_example_usage \ | ||
837 | "$ logger "hello"\n" | ||
520 | 838 | ||
521 | #define logname_trivial_usage \ | 839 | #define logname_trivial_usage \ |
522 | "" | 840 | "" |
523 | #define logname_full_usage \ | 841 | #define logname_full_usage \ |
524 | "Print the name of the current user." | 842 | "Print the name of the current user." |
843 | #define logname_example_usage \ | ||
844 | "$ logname\n" \ | ||
845 | "root\n" | ||
525 | 846 | ||
526 | #define logread_trivial_usage \ | 847 | #define logread_trivial_usage \ |
527 | "" | 848 | "" |
@@ -612,6 +933,11 @@ | |||
612 | "For example:\n" \ | 933 | "For example:\n" \ |
613 | "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \ | 934 | "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \ |
614 | "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8" | 935 | "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8" |
936 | #define makedevs_example_usage \ | ||
937 | "$ makedevs /dev/ttyS c 4 66 2 63\n" \ | ||
938 | "[creates ttyS2-ttyS63]\n" \ | ||
939 | "$ makedevs /dev/hda b 3 0 0 8 s\n" \ | ||
940 | "[creates hda,hda1-hda8]\n" | ||
615 | 941 | ||
616 | #define md5sum_trivial_usage \ | 942 | #define md5sum_trivial_usage \ |
617 | "[OPTION] [FILE]...\n" \ | 943 | "[OPTION] [FILE]...\n" \ |
@@ -627,6 +953,15 @@ | |||
627 | "\nThe following two options are useful only when verifying checksums:\n" \ | 953 | "\nThe following two options are useful only when verifying checksums:\n" \ |
628 | "\t-s\tdon't output anything, status code shows success\n" \ | 954 | "\t-s\tdon't output anything, status code shows success\n" \ |
629 | "\t-w\twarn about improperly formated MD5 checksum lines" | 955 | "\t-w\twarn about improperly formated MD5 checksum lines" |
956 | #define md5sum_example_usage \ | ||
957 | "$ md5sum < busybox\n" \ | ||
958 | "6fd11e98b98a58f64ff3398d7b324003\n" \ | ||
959 | "$ md5sum busybox\n" \ | ||
960 | "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ | ||
961 | "$ md5sum -c -\n" \ | ||
962 | "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ | ||
963 | "busybox: OK\n" \ | ||
964 | "^D\n" | ||
630 | 965 | ||
631 | #define mkdir_trivial_usage \ | 966 | #define mkdir_trivial_usage \ |
632 | "[OPTION] DIRECTORY..." | 967 | "[OPTION] DIRECTORY..." |
@@ -635,6 +970,13 @@ | |||
635 | "Options:\n" \ | 970 | "Options:\n" \ |
636 | "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" \ | 971 | "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" \ |
637 | "\t-p\tno error if existing, make parent directories as needed" | 972 | "\t-p\tno error if existing, make parent directories as needed" |
973 | #define mkdir_example_usage \ | ||
974 | "$ mkdir /tmp/foo\n" \ | ||
975 | "$ mkdir /tmp/foo\n" \ | ||
976 | "/tmp/foo: File exists\n" \ | ||
977 | "$ mkdir /tmp/foo/bar/baz\n" \ | ||
978 | "/tmp/foo/bar/baz: No such file or directory\n" \ | ||
979 | "$ mkdir -p /tmp/foo/bar/baz\n" | ||
638 | 980 | ||
639 | #define mkfifo_trivial_usage \ | 981 | #define mkfifo_trivial_usage \ |
640 | "[OPTIONS] name" | 982 | "[OPTIONS] name" |
@@ -664,6 +1006,9 @@ | |||
664 | "\tb:\tMake a block (buffered) device.\n" \ | 1006 | "\tb:\tMake a block (buffered) device.\n" \ |
665 | "\tc or u:\tMake a character (un-buffered) device.\n" \ | 1007 | "\tc or u:\tMake a character (un-buffered) device.\n" \ |
666 | "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes." | 1008 | "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes." |
1009 | #define mknod_example_usage \ | ||
1010 | "$ mknod /dev/fd0 b 2 0 \n" \ | ||
1011 | "$ mknod -m 644 /tmp/pipe p\n" | ||
667 | 1012 | ||
668 | #define mkswap_trivial_usage \ | 1013 | #define mkswap_trivial_usage \ |
669 | "[-c] [-v0|-v1] device [block-count]" | 1014 | "[-c] [-v0|-v1] device [block-count]" |
@@ -680,11 +1025,18 @@ | |||
680 | #define mktemp_full_usage \ | 1025 | #define mktemp_full_usage \ |
681 | "Creates a temporary file with its name based on TEMPLATE.\n" \ | 1026 | "Creates a temporary file with its name based on TEMPLATE.\n" \ |
682 | "TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX)." | 1027 | "TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX)." |
1028 | #define mktemp_example_usage \ | ||
1029 | "$ mktemp /tmp/temp.XXXXXX\n" \ | ||
1030 | "/tmp/temp.mWiLjM\n" \ | ||
1031 | "$ ls -la /tmp/temp.mWiLjM\n" \ | ||
1032 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" | ||
683 | 1033 | ||
684 | #define more_trivial_usage \ | 1034 | #define more_trivial_usage \ |
685 | "[FILE ...]" | 1035 | "[FILE ...]" |
686 | #define more_full_usage \ | 1036 | #define more_full_usage \ |
687 | "More is a filter for viewing FILE one screenful at a time." | 1037 | "More is a filter for viewing FILE one screenful at a time." |
1038 | #define more_example_usage \ | ||
1039 | "$ dmesg | more\n" | ||
688 | 1040 | ||
689 | #ifdef BB_FEATURE_MOUNT_LOOP | 1041 | #ifdef BB_FEATURE_MOUNT_LOOP |
690 | #define USAGE_MOUNT_LOOP(a) a | 1042 | #define USAGE_MOUNT_LOOP(a) a |
@@ -724,6 +1076,13 @@ | |||
724 | "\tro/rw:\t\tMount for read-only / read-write.\n" \ | 1076 | "\tro/rw:\t\tMount for read-only / read-write.\n" \ |
725 | "\nThere are EVEN MORE flags that are specific to each filesystem.\n" \ | 1077 | "\nThere are EVEN MORE flags that are specific to each filesystem.\n" \ |
726 | "You'll have to see the written documentation for those." | 1078 | "You'll have to see the written documentation for those." |
1079 | #define mount_example_usage \ | ||
1080 | "$ mount\n" \ | ||
1081 | "/dev/hda3 on / type minix (rw)\n" \ | ||
1082 | "proc on /proc type proc (rw)\n" \ | ||
1083 | "devpts on /dev/pts type devpts (rw)\n" \ | ||
1084 | "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \ | ||
1085 | "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" | ||
727 | 1086 | ||
728 | #define mt_trivial_usage \ | 1087 | #define mt_trivial_usage \ |
729 | "[-f device] opcode value" | 1088 | "[-f device] opcode value" |
@@ -740,16 +1099,34 @@ | |||
740 | "or: mv SOURCE... DIRECTORY" | 1099 | "or: mv SOURCE... DIRECTORY" |
741 | #define mv_full_usage \ | 1100 | #define mv_full_usage \ |
742 | "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY." | 1101 | "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY." |
1102 | #define mv_example_usage \ | ||
1103 | "$ mv /tmp/foo /bin/bar\n" | ||
743 | 1104 | ||
744 | #define nc_trivial_usage \ | 1105 | #define nc_trivial_usage \ |
745 | "[IP] [port]" | 1106 | "[IP] [port]" |
746 | #define nc_full_usage \ | 1107 | #define nc_full_usage \ |
747 | "Netcat opens a pipe to IP:port" | 1108 | "Netcat opens a pipe to IP:port" |
1109 | #define nc_example_usage \ | ||
1110 | "$ nc foobar.somedomain.com 25\n" \ | ||
1111 | "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \ | ||
1112 | "help\n" \ | ||
1113 | "214-Commands supported:\n" \ | ||
1114 | "214- HELO EHLO MAIL RCPT DATA AUTH\n" \ | ||
1115 | "214 NOOP QUIT RSET HELP\n" \ | ||
1116 | "quit\n" \ | ||
1117 | "221 foobar closing connection\n" | ||
748 | 1118 | ||
749 | #define nslookup_trivial_usage \ | 1119 | #define nslookup_trivial_usage \ |
750 | "[HOST]" | 1120 | "[HOST]" |
751 | #define nslookup_full_usage \ | 1121 | #define nslookup_full_usage \ |
752 | "Queries the nameserver for the IP address of the given HOST" | 1122 | "Queries the nameserver for the IP address of the given HOST" |
1123 | #define nslookup_example_usage \ | ||
1124 | "$ nslookup localhost\n" \ | ||
1125 | "Server: default\n" \ | ||
1126 | "Address: default\n" \ | ||
1127 | "\n" \ | ||
1128 | "Name: debian\n" \ | ||
1129 | "Address: 127.0.0.1\n" | ||
753 | 1130 | ||
754 | #ifdef BB_FEATURE_SIMPLE_PING | 1131 | #ifdef BB_FEATURE_SIMPLE_PING |
755 | #define ping_trivial_usage "host" | 1132 | #define ping_trivial_usage "host" |
@@ -765,6 +1142,14 @@ | |||
765 | "\t-q\t\tQuiet mode, only displays output at start\n" \ | 1142 | "\t-q\t\tQuiet mode, only displays output at start\n" \ |
766 | "\t\t\tand when finished." | 1143 | "\t\t\tand when finished." |
767 | #endif | 1144 | #endif |
1145 | #define ping_example_usage \ | ||
1146 | "$ ping localhost\n" \ | ||
1147 | "PING slag (127.0.0.1): 56 data bytes\n" \ | ||
1148 | "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ | ||
1149 | "\n" \ | ||
1150 | "--- debian ping statistics ---\n" \ | ||
1151 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ | ||
1152 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" | ||
768 | 1153 | ||
769 | #define pivot_root_trivial_usage \ | 1154 | #define pivot_root_trivial_usage \ |
770 | "new_root put_old" | 1155 | "new_root put_old" |
@@ -782,17 +1167,35 @@ | |||
782 | #define printf_full_usage \ | 1167 | #define printf_full_usage \ |
783 | "Formats and prints ARGUMENT(s) according to FORMAT,\n" \ | 1168 | "Formats and prints ARGUMENT(s) according to FORMAT,\n" \ |
784 | "Where FORMAT controls the output exactly as in C printf." | 1169 | "Where FORMAT controls the output exactly as in C printf." |
1170 | #define printf_example_usage \ | ||
1171 | "$ printf "Val=%d\n" 5\n" \ | ||
1172 | "Val=5\n" | ||
785 | 1173 | ||
786 | #define ps_trivial_usage \ | 1174 | #define ps_trivial_usage \ |
787 | "" | 1175 | "" |
788 | #define ps_full_usage \ | 1176 | #define ps_full_usage \ |
789 | "Report process status\n" \ | 1177 | "Report process status\n" \ |
790 | "\nThis version of ps accepts no options." | 1178 | "\nThis version of ps accepts no options." |
1179 | #define ps_example_usage \ | ||
1180 | "$ ps\n" \ | ||
1181 | " PID Uid Gid State Command\n" \ | ||
1182 | " 1 root root S init\n" \ | ||
1183 | " 2 root root S [kflushd]\n" \ | ||
1184 | " 3 root root S [kupdate]\n" \ | ||
1185 | " 4 root root S [kpiod]\n" \ | ||
1186 | " 5 root root S [kswapd]\n" \ | ||
1187 | " 742 andersen andersen S [bash]\n" \ | ||
1188 | " 743 andersen andersen S -bash\n" \ | ||
1189 | " 745 root root S [getty]\n" \ | ||
1190 | " 2990 andersen andersen R ps\n" | ||
791 | 1191 | ||
792 | #define pwd_trivial_usage \ | 1192 | #define pwd_trivial_usage \ |
793 | "" | 1193 | "" |
794 | #define pwd_full_usage \ | 1194 | #define pwd_full_usage \ |
795 | "Print the full filename of the current working directory." | 1195 | "Print the full filename of the current working directory." |
1196 | #define pwd_example_usage \ | ||
1197 | "$ pwd\n" \ | ||
1198 | "/root\n" | ||
796 | 1199 | ||
797 | #define rdate_trivial_usage \ | 1200 | #define rdate_trivial_usage \ |
798 | "[OPTION] HOST" | 1201 | "[OPTION] HOST" |
@@ -838,11 +1241,15 @@ | |||
838 | USAGE_RM_INTERACTIVE("\t-i\t\talways prompt before removing each destinations\n") \ | 1241 | USAGE_RM_INTERACTIVE("\t-i\t\talways prompt before removing each destinations\n") \ |
839 | "\t-f\t\tremove existing destinations, never prompt\n" \ | 1242 | "\t-f\t\tremove existing destinations, never prompt\n" \ |
840 | "\t-r or -R\tremove the contents of directories recursively" | 1243 | "\t-r or -R\tremove the contents of directories recursively" |
1244 | #define rm_example_usage \ | ||
1245 | "$ rm -rf /tmp/foo\n" | ||
841 | 1246 | ||
842 | #define rmdir_trivial_usage \ | 1247 | #define rmdir_trivial_usage \ |
843 | "[OPTION]... DIRECTORY..." | 1248 | "[OPTION]... DIRECTORY..." |
844 | #define rmdir_full_usage \ | 1249 | #define rmdir_full_usage \ |
845 | "Remove the DIRECTORY(ies), if they are empty." | 1250 | "Remove the DIRECTORY(ies), if they are empty." |
1251 | #define rmdir_example_usage \ | ||
1252 | "# rmdir /tmp/foo\n" | ||
846 | 1253 | ||
847 | #define rmmod_trivial_usage \ | 1254 | #define rmmod_trivial_usage \ |
848 | "[OPTION]... [MODULE]..." | 1255 | "[OPTION]... [MODULE]..." |
@@ -850,6 +1257,8 @@ | |||
850 | "Unloads the specified kernel modules from the kernel.\n\n" \ | 1257 | "Unloads the specified kernel modules from the kernel.\n\n" \ |
851 | "Options:\n" \ | 1258 | "Options:\n" \ |
852 | "\t-a\tTry to remove all unused kernel modules." | 1259 | "\t-a\tTry to remove all unused kernel modules." |
1260 | #define rmmod_example_usage \ | ||
1261 | "$ rmmod tulip\n" | ||
853 | 1262 | ||
854 | #define route_trivial_usage \ | 1263 | #define route_trivial_usage \ |
855 | "[{add|del|flush}]" | 1264 | "[{add|del|flush}]" |
@@ -873,6 +1282,9 @@ | |||
873 | "If no -e or -f is given, the first non-option argument is taken as the\n" \ | 1282 | "If no -e or -f is given, the first non-option argument is taken as the\n" \ |
874 | "sed script to interpret. All remaining arguments are names of input\n" \ | 1283 | "sed script to interpret. All remaining arguments are names of input\n" \ |
875 | "files; if no input files are specified, then the standard input is read." | 1284 | "files; if no input files are specified, then the standard input is read." |
1285 | #define sed_example_usage \ | ||
1286 | "$ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \ | ||
1287 | "bar\n" | ||
876 | 1288 | ||
877 | #define setkeycodes_trivial_usage \ | 1289 | #define setkeycodes_trivial_usage \ |
878 | "SCANCODE KEYCODE ..." | 1290 | "SCANCODE KEYCODE ..." |
@@ -881,17 +1293,31 @@ | |||
881 | "allowing unusual keyboards to generate usable keycodes.\n\n" \ | 1293 | "allowing unusual keyboards to generate usable keycodes.\n\n" \ |
882 | "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ | 1294 | "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ |
883 | "and KEYCODE is given in decimal" | 1295 | "and KEYCODE is given in decimal" |
1296 | #define setkeycodes_example_usage \ | ||
1297 | "$ setkeycodes e030 127\n" | ||
884 | 1298 | ||
885 | #define sh_trivial_usage \ | 1299 | #define sh_trivial_usage \ |
886 | "[FILE]...\n" \ | 1300 | "[FILE]...\n" \ |
887 | "or: sh -c command [args]..." | 1301 | "or: sh -c command [args]..." |
888 | #define sh_full_usage \ | 1302 | #define sh_full_usage \ |
889 | "lash: The BusyBox command interpreter (shell)." | 1303 | "lash: The BusyBox LAme SHell (command interpreter)" |
1304 | #define sh_notes_usage \ | ||
1305 | "This command does not yet have proper documentation.\n" \ | ||
1306 | "\n" \ | ||
1307 | "Use lash just as you would use any other shell. It properly handles pipes,\n" \ | ||
1308 | "redirects, job control, can be used as the shell for scripts, and has a\n" \ | ||
1309 | "sufficient set of builtins to do what is needed. It does not (yet) support\n" \ | ||
1310 | "Bourne Shell syntax. If you need things like "if-then-else", "while", and such\n" \ | ||
1311 | "use ash or bash. If you just need a very simple and extremely small shell,\n" \ | ||
1312 | "this will do the job." | ||
890 | 1313 | ||
891 | #define sleep_trivial_usage \ | 1314 | #define sleep_trivial_usage \ |
892 | "N" | 1315 | "N" |
893 | #define sleep_full_usage \ | 1316 | #define sleep_full_usage \ |
894 | "Pause for N seconds." | 1317 | "Pause for N seconds." |
1318 | #define sleep_example_usage \ | ||
1319 | "$ sleep 2\n" \ | ||
1320 | "[2 second delay results]\n" | ||
895 | 1321 | ||
896 | 1322 | ||
897 | #ifdef BB_FEATURE_SORT_REVERSE | 1323 | #ifdef BB_FEATURE_SORT_REVERSE |
@@ -903,6 +1329,14 @@ | |||
903 | "[-n]" USAGE_SORT_REVERSE(" [-r]") " [FILE]..." | 1329 | "[-n]" USAGE_SORT_REVERSE(" [-r]") " [FILE]..." |
904 | #define sort_full_usage \ | 1330 | #define sort_full_usage \ |
905 | "Sorts lines of text in the specified files" | 1331 | "Sorts lines of text in the specified files" |
1332 | #define sort_example_usage \ | ||
1333 | "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \ | ||
1334 | "a\n" \ | ||
1335 | "b\n" \ | ||
1336 | "c\n" \ | ||
1337 | "d\n" \ | ||
1338 | "e\n" \ | ||
1339 | "f\n" | ||
906 | 1340 | ||
907 | #define stty_trivial_usage \ | 1341 | #define stty_trivial_usage \ |
908 | "[-a|g] [-F device] [SETTING]..." | 1342 | "[-a|g] [-F device] [SETTING]..." |
@@ -952,6 +1386,9 @@ | |||
952 | USAGE_REMOTE_LOG( \ | 1386 | USAGE_REMOTE_LOG( \ |
953 | "\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \ | 1387 | "\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \ |
954 | "\t-L\t\tLog locally and via network logging (default is network only)") | 1388 | "\t-L\t\tLog locally and via network logging (default is network only)") |
1389 | #define syslogd_example_usage \ | ||
1390 | "$ syslogd -R masterlog:514\n" \ | ||
1391 | "$ syslogd -R 192.168.1.1:601\n" | ||
955 | 1392 | ||
956 | 1393 | ||
957 | #ifdef BB_FEATURE_SIMPLE_TAIL | 1394 | #ifdef BB_FEATURE_SIMPLE_TAIL |
@@ -969,14 +1406,15 @@ | |||
969 | USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \ | 1406 | USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \ |
970 | "\t-n N[kbm]\tprint last N lines instead of last 10\n" \ | 1407 | "\t-n N[kbm]\tprint last N lines instead of last 10\n" \ |
971 | "\t-f\t\toutput data as the file grows" \ | 1408 | "\t-f\t\toutput data as the file grows" \ |
972 | USAGE_UNSIMPLE_TAIL( \ | 1409 | USAGE_UNSIMPLE_TAIL( "\n\t-q\t\tnever output headers giving file names\n" \ |
973 | "\n\t-q\t\tnever output headers giving file names\n" \ | ||
974 | "\t-s SEC\t\twait SEC seconds between reads with -f\n" \ | 1410 | "\t-s SEC\t\twait SEC seconds between reads with -f\n" \ |
975 | "\t-v\t\talways output headers giving file names\n\n" \ | 1411 | "\t-v\t\talways output headers giving file names\n\n" \ |
976 | "If the first character of N (bytes or lines) is a `+', output begins with \n" \ | 1412 | "If the first character of N (bytes or lines) is a '+', output begins with \n" \ |
977 | "the Nth item from the start of each file, otherwise, print the last N items\n" \ | 1413 | "the Nth item from the start of each file, otherwise, print the last N items\n" \ |
978 | "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." \ | 1414 | "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) |
979 | ) | 1415 | #define tail_example_usage \ |
1416 | "$ tail -n 1 /etc/resolv.conf\n" \ | ||
1417 | "nameserver 10.0.0.1\n" | ||
980 | 1418 | ||
981 | #ifdef BB_FEATURE_TAR_CREATE | 1419 | #ifdef BB_FEATURE_TAR_CREATE |
982 | #define USAGE_TAR_CREATE(a) a | 1420 | #define USAGE_TAR_CREATE(a) a |
@@ -1007,6 +1445,9 @@ | |||
1007 | ) \ | 1445 | ) \ |
1008 | "\nInformative output:\n" \ | 1446 | "\nInformative output:\n" \ |
1009 | "\tv\t\tverbosely list files processed" | 1447 | "\tv\t\tverbosely list files processed" |
1448 | #define tar_example_usage \ | ||
1449 | "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \ | ||
1450 | "$ tar -cf /tmp/tarball.tar /usr/local\n" | ||
1010 | 1451 | ||
1011 | #define tee_trivial_usage \ | 1452 | #define tee_trivial_usage \ |
1012 | "[OPTION]... [FILE]..." | 1453 | "[OPTION]... [FILE]..." |
@@ -1014,6 +1455,10 @@ | |||
1014 | "Copy standard input to each FILE, and also to standard output.\n\n" \ | 1455 | "Copy standard input to each FILE, and also to standard output.\n\n" \ |
1015 | "Options:\n" \ | 1456 | "Options:\n" \ |
1016 | "\t-a\tappend to the given FILEs, do not overwrite" | 1457 | "\t-a\tappend to the given FILEs, do not overwrite" |
1458 | #define tee_example_usage \ | ||
1459 | "$ echo "Hello" | tee /tmp/foo\n" \ | ||
1460 | "$ cat /tmp/foo\n" \ | ||
1461 | "Hello\n" | ||
1017 | 1462 | ||
1018 | #define telnet_trivial_usage \ | 1463 | #define telnet_trivial_usage \ |
1019 | "host [port]" | 1464 | "host [port]" |
@@ -1026,6 +1471,19 @@ | |||
1026 | #define test_full_usage \ | 1471 | #define test_full_usage \ |
1027 | "Checks file types and compares values returning an exit\n" \ | 1472 | "Checks file types and compares values returning an exit\n" \ |
1028 | "code determined by the value of EXPRESSION." | 1473 | "code determined by the value of EXPRESSION." |
1474 | #define test_example_usage \ | ||
1475 | "$ test 1 -eq 2\n" \ | ||
1476 | "$ echo $?\n" \ | ||
1477 | "1\n" \ | ||
1478 | "$ test 1 -eq 1\n" \ | ||
1479 | "$ echo $? \n" \ | ||
1480 | "0\n" \ | ||
1481 | "$ [ -d /etc ]\n" \ | ||
1482 | "$ echo $?\n" \ | ||
1483 | "0\n" \ | ||
1484 | "$ [ -d /junk ]\n" \ | ||
1485 | "$ echo $?\n" \ | ||
1486 | "1\n" | ||
1029 | 1487 | ||
1030 | #ifdef BB_FEATURE_TFTP_GET | 1488 | #ifdef BB_FEATURE_TFTP_GET |
1031 | #define USAGE_TFTP_GET(a) a | 1489 | #define USAGE_TFTP_GET(a) a |
@@ -1057,6 +1515,12 @@ | |||
1057 | "Update the last-modified date on the given file[s].\n\n" \ | 1515 | "Update the last-modified date on the given file[s].\n\n" \ |
1058 | "Options:\n" \ | 1516 | "Options:\n" \ |
1059 | "\t-c\tDo not create any files" | 1517 | "\t-c\tDo not create any files" |
1518 | #define touch_example_usage \ | ||
1519 | "$ ls -l /tmp/foo\n" \ | ||
1520 | "/bin/ls: /tmp/foo: No such file or directory\n" \ | ||
1521 | "$ touch /tmp/foo\n" \ | ||
1522 | "$ ls -l /tmp/foo\n" \ | ||
1523 | "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" | ||
1060 | 1524 | ||
1061 | #define tr_trivial_usage \ | 1525 | #define tr_trivial_usage \ |
1062 | "[-cds] STRING1 [STRING2]" | 1526 | "[-cds] STRING1 [STRING2]" |
@@ -1067,11 +1531,18 @@ | |||
1067 | "\t-c\ttake complement of STRING1\n" \ | 1531 | "\t-c\ttake complement of STRING1\n" \ |
1068 | "\t-d\tdelete input characters coded STRING1\n" \ | 1532 | "\t-d\tdelete input characters coded STRING1\n" \ |
1069 | "\t-s\tsqueeze multiple output characters of STRING2 into one character" | 1533 | "\t-s\tsqueeze multiple output characters of STRING2 into one character" |
1534 | #define tr_example_usage \ | ||
1535 | "$ echo "gdkkn vnqkc" | tr [a-y] [b-z]\n" \ | ||
1536 | "hello world\n" | ||
1070 | 1537 | ||
1071 | #define true_trivial_usage \ | 1538 | #define true_trivial_usage \ |
1072 | "" | 1539 | "" |
1073 | #define true_full_usage \ | 1540 | #define true_full_usage \ |
1074 | "Return an exit code of TRUE (0)." | 1541 | "Return an exit code of TRUE (0)." |
1542 | #define true_example_usage \ | ||
1543 | "$ true\n" \ | ||
1544 | "$ echo $?\n" \ | ||
1545 | "0\n" | ||
1075 | 1546 | ||
1076 | #define tty_trivial_usage \ | 1547 | #define tty_trivial_usage \ |
1077 | "" | 1548 | "" |
@@ -1079,6 +1550,9 @@ | |||
1079 | "Print the file name of the terminal connected to standard input.\n\n"\ | 1550 | "Print the file name of the terminal connected to standard input.\n\n"\ |
1080 | "Options:\n" \ | 1551 | "Options:\n" \ |
1081 | "\t-s\tprint nothing, only return an exit status" | 1552 | "\t-s\tprint nothing, only return an exit status" |
1553 | #define tty_example_usage \ | ||
1554 | "$ tty\n" \ | ||
1555 | "/dev/tty2\n" | ||
1082 | 1556 | ||
1083 | #ifdef BB_FEATURE_MOUNT_FORCE | 1557 | #ifdef BB_FEATURE_MOUNT_FORCE |
1084 | #define USAGE_MOUNT_FORCE(a) a | 1558 | #define USAGE_MOUNT_FORCE(a) a |
@@ -1094,6 +1568,8 @@ | |||
1094 | "\n\t-r:\tTry to remount devices as read-only if mount is busy" \ | 1568 | "\n\t-r:\tTry to remount devices as read-only if mount is busy" \ |
1095 | USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \ | 1569 | USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \ |
1096 | USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)") | 1570 | USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)") |
1571 | #define umount_example_usage \ | ||
1572 | "$ umount /dev/hdc1 \n" | ||
1097 | 1573 | ||
1098 | #define uname_trivial_usage \ | 1574 | #define uname_trivial_usage \ |
1099 | "[OPTION]..." | 1575 | "[OPTION]..." |
@@ -1107,6 +1583,9 @@ | |||
1107 | "\t-s\tprint the operating system name\n" \ | 1583 | "\t-s\tprint the operating system name\n" \ |
1108 | "\t-p\tprint the host processor type\n" \ | 1584 | "\t-p\tprint the host processor type\n" \ |
1109 | "\t-v\tprint the operating system version" | 1585 | "\t-v\tprint the operating system version" |
1586 | #define uname_example_usage \ | ||
1587 | "$ uname -a\n" \ | ||
1588 | "Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown\n" | ||
1110 | 1589 | ||
1111 | #define uniq_trivial_usage \ | 1590 | #define uniq_trivial_usage \ |
1112 | "[OPTION]... [INPUT [OUTPUT]]" | 1591 | "[OPTION]... [INPUT [OUTPUT]]" |
@@ -1117,6 +1596,11 @@ | |||
1117 | "\t-c\tprefix lines by the number of occurrences\n" \ | 1596 | "\t-c\tprefix lines by the number of occurrences\n" \ |
1118 | "\t-d\tonly print duplicate lines\n" \ | 1597 | "\t-d\tonly print duplicate lines\n" \ |
1119 | "\t-u\tonly print unique lines" | 1598 | "\t-u\tonly print unique lines" |
1599 | #define uniq_example_usage \ | ||
1600 | "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \ | ||
1601 | "a\n" \ | ||
1602 | "b\n" \ | ||
1603 | "c\n" | ||
1120 | 1604 | ||
1121 | #define unix2dos_trivial_usage \ | 1605 | #define unix2dos_trivial_usage \ |
1122 | "[option] [file]" | 1606 | "[option] [file]" |
@@ -1136,11 +1620,17 @@ | |||
1136 | "" | 1620 | "" |
1137 | #define uptime_full_usage \ | 1621 | #define uptime_full_usage \ |
1138 | "Display the time since the last boot." | 1622 | "Display the time since the last boot." |
1623 | #define uptime_example_usage \ | ||
1624 | "$ uptime\n" \ | ||
1625 | " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" | ||
1139 | 1626 | ||
1140 | #define usleep_trivial_usage \ | 1627 | #define usleep_trivial_usage \ |
1141 | "N" | 1628 | "N" |
1142 | #define usleep_full_usage \ | 1629 | #define usleep_full_usage \ |
1143 | "Pause for N microseconds." | 1630 | "Pause for N microseconds." |
1631 | #define usleep_example_usage \ | ||
1632 | "$ usleep 1000000\n" \ | ||
1633 | "[pauses for 1 second]\n" | ||
1144 | 1634 | ||
1145 | #define uudecode_trivial_usage \ | 1635 | #define uudecode_trivial_usage \ |
1146 | "[FILE]..." | 1636 | "[FILE]..." |
@@ -1148,6 +1638,10 @@ | |||
1148 | "Uudecode a file that is uuencoded.\n\n" \ | 1638 | "Uudecode a file that is uuencoded.\n\n" \ |
1149 | "Options:\n" \ | 1639 | "Options:\n" \ |
1150 | "\t-o FILE\tdirect output to FILE" \ | 1640 | "\t-o FILE\tdirect output to FILE" \ |
1641 | #define uudecode_example_usage \ | ||
1642 | "$ uudecode -o busybox busybox.uu\n" \ | ||
1643 | "$ ls -l busybox\n" \ | ||
1644 | "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n" | ||
1151 | 1645 | ||
1152 | #define uuencode_trivial_usage \ | 1646 | #define uuencode_trivial_usage \ |
1153 | "[OPTION] [INFILE] REMOTEFILE" | 1647 | "[OPTION] [INFILE] REMOTEFILE" |
@@ -1155,6 +1649,12 @@ | |||
1155 | "Uuencode a file.\n\n" \ | 1649 | "Uuencode a file.\n\n" \ |
1156 | "Options:\n" \ | 1650 | "Options:\n" \ |
1157 | "\t-m\tuse base64 encoding as of RFC1521" | 1651 | "\t-m\tuse base64 encoding as of RFC1521" |
1652 | #define uuencode_example_usage \ | ||
1653 | "$ uuencode busybox busybox\n" \ | ||
1654 | "begin 755 busybox\n" \ | ||
1655 | "<encoded file snipped>\n" \ | ||
1656 | "$ uudecode busybox busybox > busybox.uu\n" \ | ||
1657 | "$\n" | ||
1158 | 1658 | ||
1159 | #define watchdog_trivial_usage \ | 1659 | #define watchdog_trivial_usage \ |
1160 | "DEV" | 1660 | "DEV" |
@@ -1171,6 +1671,9 @@ | |||
1171 | "\t-l\tprint the newline counts\n" \ | 1671 | "\t-l\tprint the newline counts\n" \ |
1172 | "\t-L\tprint the length of the longest line\n" \ | 1672 | "\t-L\tprint the length of the longest line\n" \ |
1173 | "\t-w\tprint the word counts" | 1673 | "\t-w\tprint the word counts" |
1674 | #define wc_example_usage \ | ||
1675 | "$ wc /etc/passwd\n" \ | ||
1676 | " 31 46 1365 /etc/passwd\n" | ||
1174 | 1677 | ||
1175 | #define wget_trivial_usage \ | 1678 | #define wget_trivial_usage \ |
1176 | "[-c] [-O file] url" | 1679 | "[-c] [-O file] url" |
@@ -1184,6 +1687,9 @@ | |||
1184 | "[COMMAND ...]" | 1687 | "[COMMAND ...]" |
1185 | #define which_full_usage \ | 1688 | #define which_full_usage \ |
1186 | "Locates a COMMAND." | 1689 | "Locates a COMMAND." |
1690 | #define which_example_usage \ | ||
1691 | "$ which login\n" \ | ||
1692 | "/bin/login\n" | ||
1187 | 1693 | ||
1188 | #define whoami_trivial_usage \ | 1694 | #define whoami_trivial_usage \ |
1189 | "" | 1695 | "" |
@@ -1194,11 +1700,14 @@ | |||
1194 | "[COMMAND] [ARGS...]" | 1700 | "[COMMAND] [ARGS...]" |
1195 | #define xargs_full_usage \ | 1701 | #define xargs_full_usage \ |
1196 | "Executes COMMAND on every item given by standard input." | 1702 | "Executes COMMAND on every item given by standard input." |
1703 | #define xargs_example_usage \ | ||
1704 | "$ ls | xargs gzip\n" \ | ||
1705 | "$ find . -name '*.c' -print | xargs rm\n" | ||
1197 | 1706 | ||
1198 | #define yes_trivial_usage \ | 1707 | #define yes_trivial_usage \ |
1199 | "[OPTION]... [STRING]..." | 1708 | "[OPTION]... [STRING]..." |
1200 | #define yes_full_usage \ | 1709 | #define yes_full_usage \ |
1201 | "Repeatedly outputs a line with all specified STRING(s), or `y'." | 1710 | "Repeatedly outputs a line with all specified STRING(s), or 'y'." |
1202 | 1711 | ||
1203 | #define zcat_trivial_usage \ | 1712 | #define zcat_trivial_usage \ |
1204 | "FILE" | 1713 | "FILE" |