blob: 785b6c976de218d3c6363878a55fcd7051545955
1 | /* DO NOT EDIT. This file is generated from usage.src.h */ |
2 | /* vi: set sw=8 ts=8: */ |
3 | /* |
4 | * This file suffers from chronically incorrect tabification |
5 | * of messages. Before editing this file: |
6 | * 1. Switch you editor to 8-space tab mode. |
7 | * 2. Do not use \t in messages, use real tab character. |
8 | * 3. Start each source line with message as follows: |
9 | * |<7 spaces>"text with tabs".... |
10 | * or |
11 | * |<5 spaces>"\ntext with tabs".... |
12 | */ |
13 | #ifndef BB_USAGE_H |
14 | #define BB_USAGE_H 1 |
15 | |
16 | #define NOUSAGE_STR "\b" |
17 | |
18 | |
19 | #define ar_trivial_usage \ |
20 | "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" \ |
21 | |
22 | #define ar_full_usage "\n\n" \ |
23 | "Extract or list FILES from an ar archive\n" \ |
24 | "\n -o Preserve original dates" \ |
25 | "\n -p Extract to stdout" \ |
26 | "\n -t List" \ |
27 | "\n -x Extract" \ |
28 | "\n -v Verbose" \ |
29 | |
30 | #define uncompress_trivial_usage \ |
31 | "[-cf] [FILE]..." \ |
32 | |
33 | #define uncompress_full_usage "\n\n" \ |
34 | "Decompress .Z file[s]\n" \ |
35 | "\n -c Write to stdout" \ |
36 | "\n -f Overwrite" \ |
37 | |
38 | #define gunzip_trivial_usage \ |
39 | "[-cft] [FILE]..." \ |
40 | |
41 | #define gunzip_full_usage "\n\n" \ |
42 | "Decompress FILEs (or stdin)\n" \ |
43 | "\n -c Write to stdout" \ |
44 | "\n -f Force" \ |
45 | "\n -t Test file integrity" \ |
46 | |
47 | #define gunzip_example_usage \ |
48 | "$ ls -la /tmp/BusyBox*\n" \ |
49 | "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \ |
50 | "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \ |
51 | "$ ls -la /tmp/BusyBox*\n" \ |
52 | "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" \ |
53 | |
54 | #define zcat_trivial_usage \ |
55 | "[FILE]..." \ |
56 | |
57 | #define zcat_full_usage "\n\n" \ |
58 | "Decompress to stdout" \ |
59 | |
60 | #define bunzip2_trivial_usage \ |
61 | "[-cf] [FILE]..." \ |
62 | |
63 | #define bunzip2_full_usage "\n\n" \ |
64 | "Decompress FILEs (or stdin)\n" \ |
65 | "\n -c Write to stdout" \ |
66 | "\n -f Force" \ |
67 | |
68 | #define bzcat_trivial_usage \ |
69 | "[FILE]..." \ |
70 | |
71 | #define bzcat_full_usage "\n\n" \ |
72 | "Decompress to stdout" \ |
73 | |
74 | #define unlzma_trivial_usage \ |
75 | "[-cf] [FILE]..." \ |
76 | |
77 | #define unlzma_full_usage "\n\n" \ |
78 | "Decompress FILE (or stdin)\n" \ |
79 | "\n -c Write to stdout" \ |
80 | "\n -f Force" \ |
81 | |
82 | #define lzma_trivial_usage \ |
83 | "-d [-cf] [FILE]..." \ |
84 | |
85 | #define lzma_full_usage "\n\n" \ |
86 | "Decompress FILE (or stdin)\n" \ |
87 | "\n -d Decompress" \ |
88 | "\n -c Write to stdout" \ |
89 | "\n -f Force" \ |
90 | |
91 | #define lzcat_trivial_usage \ |
92 | "[FILE]..." \ |
93 | |
94 | #define lzcat_full_usage "\n\n" \ |
95 | "Decompress to stdout" \ |
96 | |
97 | #define unxz_trivial_usage \ |
98 | "[-cf] [FILE]..." \ |
99 | |
100 | #define unxz_full_usage "\n\n" \ |
101 | "Decompress FILE (or stdin)\n" \ |
102 | "\n -c Write to stdout" \ |
103 | "\n -f Force" \ |
104 | |
105 | #define xz_trivial_usage \ |
106 | "-d [-cf] [FILE]..." \ |
107 | |
108 | #define xz_full_usage "\n\n" \ |
109 | "Decompress FILE (or stdin)\n" \ |
110 | "\n -d Decompress" \ |
111 | "\n -c Write to stdout" \ |
112 | "\n -f Force" \ |
113 | |
114 | #define xzcat_trivial_usage \ |
115 | "[FILE]..." \ |
116 | |
117 | #define xzcat_full_usage "\n\n" \ |
118 | "Decompress to stdout" \ |
119 | |
120 | #define bzip2_trivial_usage \ |
121 | "[OPTIONS] [FILE]..." \ |
122 | |
123 | #define bzip2_full_usage "\n\n" \ |
124 | "Compress FILEs (or stdin) with bzip2 algorithm\n" \ |
125 | "\n -1..9 Compression level" \ |
126 | "\n -d Decompress" \ |
127 | "\n -c Write to stdout" \ |
128 | "\n -f Force" \ |
129 | |
130 | #define cpio_trivial_usage \ |
131 | "[-dmvu] [-F FILE] [-R USER[:GRP]]" IF_FEATURE_CPIO_O(" [-H newc]") \ |
132 | " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]") \ |
133 | " [EXTR_FILE]..." \ |
134 | |
135 | #define cpio_full_usage "\n\n" \ |
136 | "Extract (-i) or list (-t) files from a cpio archive" \ |
137 | IF_FEATURE_CPIO_O(", or" \ |
138 | "\ntake file list from stdin and create an archive (-o)" \ |
139 | IF_FEATURE_CPIO_P(" or copy files (-p)") \ |
140 | ) \ |
141 | "\n" \ |
142 | "\nMain operation mode:" \ |
143 | "\n -t List" \ |
144 | "\n -i Extract EXTR_FILEs (or all)" \ |
145 | IF_FEATURE_CPIO_O( \ |
146 | "\n -o Create (requires -H newc)" \ |
147 | ) \ |
148 | IF_FEATURE_CPIO_P( \ |
149 | "\n -p DIR Copy files to DIR" \ |
150 | ) \ |
151 | "\nOptions:" \ |
152 | "\n -d Make leading directories" \ |
153 | "\n -m Preserve mtime" \ |
154 | "\n -v Verbose" \ |
155 | "\n -u Overwrite" \ |
156 | "\n -F FILE Input (-t,-i,-p) or output (-o) file" \ |
157 | "\n -R USER[:GRP] Set owner of created files" \ |
158 | IF_FEATURE_CPIO_O( \ |
159 | "\n -H newc Archive format" \ |
160 | ) \ |
161 | |
162 | #define dpkg_trivial_usage \ |
163 | "[-ilCPru] [-F OPT] PACKAGE" \ |
164 | |
165 | #define dpkg_full_usage "\n\n" \ |
166 | "Install, remove and manage Debian packages\n" \ |
167 | IF_LONG_OPTS( \ |
168 | "\n -i,--install Install the package" \ |
169 | "\n -l,--list List of installed packages" \ |
170 | "\n --configure Configure an unpackaged package" \ |
171 | "\n -P,--purge Purge all files of a package" \ |
172 | "\n -r,--remove Remove all but the configuration files for a package" \ |
173 | "\n --unpack Unpack a package, but don't configure it" \ |
174 | "\n --force-depends Ignore dependency problems" \ |
175 | "\n --force-confnew Overwrite existing config files when installing" \ |
176 | "\n --force-confold Keep old config files when installing" \ |
177 | ) \ |
178 | IF_NOT_LONG_OPTS( \ |
179 | "\n -i Install the package" \ |
180 | "\n -l List of installed packages" \ |
181 | "\n -C Configure an unpackaged package" \ |
182 | "\n -P Purge all files of a package" \ |
183 | "\n -r Remove all but the configuration files for a package" \ |
184 | "\n -u Unpack a package, but don't configure it" \ |
185 | "\n -F depends Ignore dependency problems" \ |
186 | "\n -F confnew Overwrite existing config files when installing" \ |
187 | "\n -F confold Keep old config files when installing" \ |
188 | ) \ |
189 | |
190 | #define dpkg_deb_trivial_usage \ |
191 | "[-cefxX] FILE [DIR]" \ |
192 | |
193 | #define dpkg_deb_full_usage "\n\n" \ |
194 | "Perform actions on Debian packages (.deb)\n" \ |
195 | "\n -c List files" \ |
196 | "\n -f Print control fields" \ |
197 | "\n -e Extract control files to DIR (default: ./DEBIAN)" \ |
198 | "\n -x Extract files to DIR (no default)" \ |
199 | "\n -X Verbose -x" \ |
200 | |
201 | #define dpkg_deb_example_usage \ |
202 | "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" \ |
203 | |
204 | #define gzip_trivial_usage \ |
205 | "[-cf" IF_GUNZIP("d") IF_FEATURE_GZIP_LEVELS("123456789") "] [FILE]..." \ |
206 | |
207 | #define gzip_full_usage "\n\n" \ |
208 | "Compress FILEs (or stdin)\n" \ |
209 | IF_FEATURE_GZIP_LEVELS( \ |
210 | "\n -1..9 Compression level" \ |
211 | ) \ |
212 | IF_GUNZIP( \ |
213 | "\n -d Decompress" \ |
214 | ) \ |
215 | "\n -c Write to stdout" \ |
216 | "\n -f Force" \ |
217 | |
218 | #define gzip_example_usage \ |
219 | "$ ls -la /tmp/busybox*\n" \ |
220 | "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \ |
221 | "$ gzip /tmp/busybox.tar\n" \ |
222 | "$ ls -la /tmp/busybox*\n" \ |
223 | "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" \ |
224 | |
225 | #define lzop_trivial_usage \ |
226 | "[-cfvd123456789CF] [FILE]..." \ |
227 | |
228 | #define lzop_full_usage "\n\n" \ |
229 | " -1..9 Compression level" \ |
230 | "\n -d Decompress" \ |
231 | "\n -c Write to stdout" \ |
232 | "\n -f Force" \ |
233 | "\n -v Verbose" \ |
234 | "\n -F Don't store or verify checksum" \ |
235 | "\n -C Also write checksum of compressed block" \ |
236 | |
237 | #define lzopcat_trivial_usage \ |
238 | "[-vF] [FILE]..." \ |
239 | |
240 | #define lzopcat_full_usage "\n\n" \ |
241 | " -v Verbose" \ |
242 | "\n -F Don't verify checksum" \ |
243 | |
244 | #define unlzop_trivial_usage \ |
245 | "[-cfvF] [FILE]..." \ |
246 | |
247 | #define unlzop_full_usage "\n\n" \ |
248 | " -c Write to stdout" \ |
249 | "\n -f Force" \ |
250 | "\n -v Verbose" \ |
251 | "\n -F Don't verify checksum" \ |
252 | |
253 | #define rpm_trivial_usage \ |
254 | "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm" \ |
255 | |
256 | #define rpm_full_usage "\n\n" \ |
257 | "Manipulate RPM packages\n" \ |
258 | "\nCommands:" \ |
259 | "\n -i Install package" \ |
260 | "\n -qp Query package" \ |
261 | "\n -qpi Show information" \ |
262 | "\n -qpl List contents" \ |
263 | "\n -qpd List documents" \ |
264 | "\n -qpc List config files" \ |
265 | |
266 | #define rpm2cpio_trivial_usage \ |
267 | "package.rpm" \ |
268 | |
269 | #define rpm2cpio_full_usage "\n\n" \ |
270 | "Output a cpio archive of the rpm file" \ |
271 | |
272 | #define tar_trivial_usage \ |
273 | "-[" IF_FEATURE_TAR_CREATE("c") "xt" \ |
274 | IF_FEATURE_SEAMLESS_Z("Z") \ |
275 | IF_FEATURE_SEAMLESS_GZ("z") \ |
276 | IF_FEATURE_SEAMLESS_XZ("J") \ |
277 | IF_FEATURE_SEAMLESS_BZ2("j") \ |
278 | IF_FEATURE_SEAMLESS_LZMA("a") \ |
279 | IF_FEATURE_TAR_CREATE("h") \ |
280 | IF_FEATURE_TAR_NOPRESERVE_TIME("m") \ |
281 | "vO] " \ |
282 | IF_FEATURE_TAR_FROM("[-X FILE] [-T FILE] ") \ |
283 | "[-f TARFILE] [-C DIR] [FILE]..." \ |
284 | |
285 | #define tar_full_usage "\n\n" \ |
286 | IF_FEATURE_TAR_CREATE("Create, extract, ") \ |
287 | IF_NOT_FEATURE_TAR_CREATE("Extract ") \ |
288 | "or list files from a tar file\n" \ |
289 | "\nOperation:" \ |
290 | IF_FEATURE_TAR_CREATE( \ |
291 | "\n c Create" \ |
292 | ) \ |
293 | "\n x Extract" \ |
294 | "\n t List" \ |
295 | "\n f Name of TARFILE ('-' for stdin/out)" \ |
296 | "\n C Change to DIR before operation" \ |
297 | "\n v Verbose" \ |
298 | IF_FEATURE_SEAMLESS_Z( \ |
299 | "\n Z (De)compress using compress" \ |
300 | ) \ |
301 | IF_FEATURE_SEAMLESS_GZ( \ |
302 | "\n z (De)compress using gzip" \ |
303 | ) \ |
304 | IF_FEATURE_SEAMLESS_XZ( \ |
305 | "\n J (De)compress using xz" \ |
306 | ) \ |
307 | IF_FEATURE_SEAMLESS_BZ2( \ |
308 | "\n j (De)compress using bzip2" \ |
309 | ) \ |
310 | IF_FEATURE_SEAMLESS_LZMA( \ |
311 | "\n a (De)compress using lzma" \ |
312 | ) \ |
313 | "\n O Extract to stdout" \ |
314 | IF_FEATURE_TAR_CREATE( \ |
315 | "\n h Follow symlinks" \ |
316 | ) \ |
317 | IF_FEATURE_TAR_NOPRESERVE_TIME( \ |
318 | "\n m Don't restore mtime" \ |
319 | ) \ |
320 | IF_FEATURE_TAR_FROM( \ |
321 | IF_FEATURE_TAR_LONG_OPTIONS( \ |
322 | "\n exclude File to exclude" \ |
323 | ) \ |
324 | "\n X File with names to exclude" \ |
325 | "\n T File with names to include" \ |
326 | ) \ |
327 | |
328 | #define tar_example_usage \ |
329 | "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \ |
330 | "$ tar -cf /tmp/tarball.tar /usr/local\n" \ |
331 | |
332 | #define unzip_trivial_usage \ |
333 | "[-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]" \ |
334 | |
335 | #define unzip_full_usage "\n\n" \ |
336 | "Extract FILEs from ZIP archive\n" \ |
337 | "\n -l List contents (with -q for short form)" \ |
338 | "\n -n Never overwrite files (default: ask)" \ |
339 | "\n -o Overwrite" \ |
340 | "\n -p Print to stdout" \ |
341 | "\n -q Quiet" \ |
342 | "\n -x FILE Exclude FILEs" \ |
343 | "\n -d DIR Extract into DIR" \ |
344 | |
345 | #define chvt_trivial_usage \ |
346 | "N" \ |
347 | |
348 | #define chvt_full_usage "\n\n" \ |
349 | "Change the foreground virtual terminal to /dev/ttyN" \ |
350 | |
351 | #define clear_trivial_usage \ |
352 | "" \ |
353 | |
354 | #define clear_full_usage "\n\n" \ |
355 | "Clear screen" \ |
356 | |
357 | #define deallocvt_trivial_usage \ |
358 | "[N]" \ |
359 | |
360 | #define deallocvt_full_usage "\n\n" \ |
361 | "Deallocate unused virtual terminal /dev/ttyN" \ |
362 | |
363 | #define dumpkmap_trivial_usage \ |
364 | "> keymap" \ |
365 | |
366 | #define dumpkmap_full_usage "\n\n" \ |
367 | "Print a binary keyboard translation table to stdout" \ |
368 | |
369 | #define dumpkmap_example_usage \ |
370 | "$ dumpkmap > keymap\n" \ |
371 | |
372 | #define fgconsole_trivial_usage \ |
373 | "" \ |
374 | |
375 | #define fgconsole_full_usage "\n\n" \ |
376 | "Get active console" \ |
377 | |
378 | #define kbd_mode_trivial_usage \ |
379 | "[-a|k|s|u] [-C TTY]" \ |
380 | |
381 | #define kbd_mode_full_usage "\n\n" \ |
382 | "Report or set the keyboard mode\n" \ |
383 | "\n -a Default (ASCII)" \ |
384 | "\n -k Medium-raw (keyboard)" \ |
385 | "\n -s Raw (scancode)" \ |
386 | "\n -u Unicode (utf-8)" \ |
387 | "\n -C TTY Affect TTY instead of /dev/tty" \ |
388 | |
389 | #define loadfont_trivial_usage \ |
390 | "< font" \ |
391 | |
392 | #define loadfont_full_usage "\n\n" \ |
393 | "Load a console font from stdin" \ |
394 | |
395 | #define loadfont_example_usage \ |
396 | "$ loadfont < /etc/i18n/fontname\n" \ |
397 | |
398 | #define setfont_trivial_usage \ |
399 | "FONT [-m MAPFILE] [-C TTY]" \ |
400 | |
401 | #define setfont_full_usage "\n\n" \ |
402 | "Load a console font\n" \ |
403 | "\n -m MAPFILE Load console screen map" \ |
404 | "\n -C TTY Affect TTY instead of /dev/tty" \ |
405 | |
406 | #define setfont_example_usage \ |
407 | "$ setfont -m koi8-r /etc/i18n/fontname\n" \ |
408 | |
409 | #define loadkmap_trivial_usage \ |
410 | "< keymap" \ |
411 | |
412 | #define loadkmap_full_usage "\n\n" \ |
413 | "Load a binary keyboard translation table from stdin" \ |
414 | |
415 | #define loadkmap_example_usage \ |
416 | "$ loadkmap < /etc/i18n/lang-keymap\n" \ |
417 | |
418 | #define openvt_trivial_usage \ |
419 | "[-c N] [-sw] [PROG ARGS]" \ |
420 | |
421 | #define openvt_full_usage "\n\n" \ |
422 | "Start PROG on a new virtual terminal\n" \ |
423 | "\n -c N Use specified VT" \ |
424 | "\n -s Switch to the VT" \ |
425 | "\n -w Wait for PROG to exit" \ |
426 | |
427 | #define openvt_example_usage \ |
428 | "openvt 2 /bin/ash\n" \ |
429 | |
430 | #define reset_trivial_usage \ |
431 | "" \ |
432 | |
433 | #define reset_full_usage "\n\n" \ |
434 | "Reset the screen" \ |
435 | |
436 | #define resize_trivial_usage \ |
437 | "" \ |
438 | |
439 | #define resize_full_usage "\n\n" \ |
440 | "Resize the screen" \ |
441 | |
442 | #define setconsole_trivial_usage \ |
443 | "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]" \ |
444 | |
445 | #define setconsole_full_usage "\n\n" \ |
446 | "Redirect system console output to DEVICE (default: /dev/tty)\n" \ |
447 | "\n -r Reset output to /dev/console" \ |
448 | |
449 | #define setkeycodes_trivial_usage \ |
450 | "SCANCODE KEYCODE..." \ |
451 | |
452 | #define setkeycodes_full_usage "\n\n" \ |
453 | "Set entries into the kernel's scancode-to-keycode map,\n" \ |
454 | "allowing unusual keyboards to generate usable keycodes.\n\n" \ |
455 | "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ |
456 | "and KEYCODE is given in decimal." \ |
457 | |
458 | #define setkeycodes_example_usage \ |
459 | "$ setkeycodes e030 127\n" \ |
460 | |
461 | #define setlogcons_trivial_usage \ |
462 | "[N]" \ |
463 | |
464 | #define setlogcons_full_usage "\n\n" \ |
465 | "Redirect the kernel output to console N. Default:0 (current console)" \ |
466 | |
467 | #define showkey_trivial_usage \ |
468 | "[-a | -k | -s]" \ |
469 | |
470 | #define showkey_full_usage "\n\n" \ |
471 | "Show keys pressed\n" \ |
472 | "\n -a Display decimal/octal/hex values of the keys" \ |
473 | "\n -k Display interpreted keycodes (default)" \ |
474 | "\n -s Display raw scan-codes" \ |
475 | |
476 | #define basename_trivial_usage \ |
477 | "FILE [SUFFIX]" \ |
478 | |
479 | #define basename_full_usage "\n\n" \ |
480 | "Strip directory path and .SUFFIX from FILE" \ |
481 | |
482 | #define basename_example_usage \ |
483 | "$ basename /usr/local/bin/foo\n" \ |
484 | "foo\n" \ |
485 | "$ basename /usr/local/bin/\n" \ |
486 | "bin\n" \ |
487 | "$ basename /foo/bar.txt .txt\n" \ |
488 | "bar" \ |
489 | |
490 | #define cal_trivial_usage \ |
491 | "[-jy] [[MONTH] YEAR]" \ |
492 | |
493 | #define cal_full_usage "\n\n" \ |
494 | "Display a calendar\n" \ |
495 | "\n -j Use julian dates" \ |
496 | "\n -y Display the entire year" \ |
497 | |
498 | #define cat_trivial_usage \ |
499 | "[FILE]..." \ |
500 | |
501 | #define cat_full_usage "\n\n" \ |
502 | "Concatenate FILEs and print them to stdout" \ |
503 | |
504 | #define cat_example_usage \ |
505 | "$ cat /proc/uptime\n" \ |
506 | "110716.72 17.67" \ |
507 | |
508 | #define catv_trivial_usage \ |
509 | "[-etv] [FILE]..." \ |
510 | |
511 | #define catv_full_usage "\n\n" \ |
512 | "Display nonprinting characters as ^x or M-x\n" \ |
513 | "\n -e End each line with $" \ |
514 | "\n -t Show tabs as ^I" \ |
515 | "\n -v Don't use ^x or M-x escapes" \ |
516 | |
517 | #define chgrp_trivial_usage \ |
518 | "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..." \ |
519 | |
520 | #define chgrp_full_usage "\n\n" \ |
521 | "Change the group membership of each FILE to GROUP\n" \ |
522 | "\n -R Recurse" \ |
523 | "\n -h Affect symlinks instead of symlink targets" \ |
524 | "\n -L Traverse all symlinks to directories" \ |
525 | "\n -H Traverse symlinks on command line only" \ |
526 | "\n -P Don't traverse symlinks (default)" \ |
527 | IF_DESKTOP( \ |
528 | "\n -c List changed files" \ |
529 | "\n -v Verbose" \ |
530 | "\n -f Hide errors" \ |
531 | ) \ |
532 | |
533 | #define chgrp_example_usage \ |
534 | "$ ls -l /tmp/foo\n" \ |
535 | "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ |
536 | "$ chgrp root /tmp/foo\n" \ |
537 | "$ ls -l /tmp/foo\n" \ |
538 | "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" \ |
539 | |
540 | #define chmod_trivial_usage \ |
541 | "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..." \ |
542 | |
543 | #define chmod_full_usage "\n\n" \ |
544 | "Each MODE is one or more of the letters ugoa, one of the\n" \ |
545 | "symbols +-= and one or more of the letters rwxst\n" \ |
546 | "\n -R Recurse" \ |
547 | IF_DESKTOP( \ |
548 | "\n -c List changed files" \ |
549 | "\n -v List all files" \ |
550 | "\n -f Hide errors" \ |
551 | ) \ |
552 | |
553 | #define chmod_example_usage \ |
554 | "$ ls -l /tmp/foo\n" \ |
555 | "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \ |
556 | "$ chmod u+x /tmp/foo\n" \ |
557 | "$ ls -l /tmp/foo\n" \ |
558 | "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \ |
559 | "$ chmod 444 /tmp/foo\n" \ |
560 | "$ ls -l /tmp/foo\n" \ |
561 | "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \ |
562 | |
563 | #define chown_trivial_usage \ |
564 | "[-Rh"IF_DESKTOP("LHPcvf")"]... USER[:[GRP]] FILE..." \ |
565 | |
566 | #define chown_full_usage "\n\n" \ |
567 | "Change the owner and/or group of each FILE to USER and/or GRP\n" \ |
568 | "\n -R Recurse" \ |
569 | "\n -h Affect symlinks instead of symlink targets" \ |
570 | IF_DESKTOP( \ |
571 | "\n -L Traverse all symlinks to directories" \ |
572 | "\n -H Traverse symlinks on command line only" \ |
573 | "\n -P Don't traverse symlinks (default)" \ |
574 | "\n -c List changed files" \ |
575 | "\n -v List all files" \ |
576 | "\n -f Hide errors" \ |
577 | ) \ |
578 | |
579 | #define chown_example_usage \ |
580 | "$ ls -l /tmp/foo\n" \ |
581 | "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ |
582 | "$ chown root /tmp/foo\n" \ |
583 | "$ ls -l /tmp/foo\n" \ |
584 | "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \ |
585 | "$ chown root.root /tmp/foo\n" \ |
586 | "ls -l /tmp/foo\n" \ |
587 | "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \ |
588 | |
589 | #define chroot_trivial_usage \ |
590 | "NEWROOT [PROG ARGS]" \ |
591 | |
592 | #define chroot_full_usage "\n\n" \ |
593 | "Run PROG with root directory set to NEWROOT" \ |
594 | |
595 | #define chroot_example_usage \ |
596 | "$ ls -l /bin/ls\n" \ |
597 | "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \ |
598 | "# mount /dev/hdc1 /mnt -t minix\n" \ |
599 | "# chroot /mnt\n" \ |
600 | "# ls -l /bin/ls\n" \ |
601 | "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n" \ |
602 | |
603 | #define cksum_trivial_usage \ |
604 | "FILES..." \ |
605 | |
606 | #define cksum_full_usage "\n\n" \ |
607 | "Calculate the CRC32 checksums of FILES" \ |
608 | |
609 | #define comm_trivial_usage \ |
610 | "[-123] FILE1 FILE2" \ |
611 | |
612 | #define comm_full_usage "\n\n" \ |
613 | "Compare FILE1 with FILE2\n" \ |
614 | "\n -1 Suppress lines unique to FILE1" \ |
615 | "\n -2 Suppress lines unique to FILE2" \ |
616 | "\n -3 Suppress lines common to both files" \ |
617 | |
618 | #define cp_trivial_usage \ |
619 | "[OPTIONS] SOURCE... DEST" \ |
620 | |
621 | #define cp_full_usage "\n\n" \ |
622 | "Copy SOURCE(s) to DEST\n" \ |
623 | "\n -a Same as -dpR" \ |
624 | IF_SELINUX( \ |
625 | "\n -c Preserve security context" \ |
626 | ) \ |
627 | "\n -R,-r Recurse" \ |
628 | "\n -d,-P Preserve symlinks (default if -R)" \ |
629 | "\n -L Follow all symlinks" \ |
630 | "\n -H Follow symlinks on command line" \ |
631 | "\n -p Preserve file attributes if possible" \ |
632 | "\n -f Overwrite" \ |
633 | "\n -i Prompt before overwrite" \ |
634 | "\n -l,-s Create (sym)links" \ |
635 | "\n -u Copy only newer files" \ |
636 | |
637 | #define cut_trivial_usage \ |
638 | "[OPTIONS] [FILE]..." \ |
639 | |
640 | #define cut_full_usage "\n\n" \ |
641 | "Print selected fields from each input FILE to stdout\n" \ |
642 | "\n -b LIST Output only bytes from LIST" \ |
643 | "\n -c LIST Output only characters from LIST" \ |
644 | "\n -d CHAR Use CHAR instead of tab as the field delimiter" \ |
645 | "\n -s Output only the lines containing delimiter" \ |
646 | "\n -f N Print only these fields" \ |
647 | "\n -n Ignored" \ |
648 | |
649 | #define cut_example_usage \ |
650 | "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \ |
651 | "Hello\n" \ |
652 | "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \ |
653 | "world\n" \ |
654 | |
655 | #define date_trivial_usage \ |
656 | "[OPTIONS] [+FMT] [TIME]" \ |
657 | |
658 | #define date_full_usage "\n\n" \ |
659 | "Display time (using +FMT), or set time\n" \ |
660 | IF_NOT_LONG_OPTS( \ |
661 | "\n [-s] TIME Set time to TIME" \ |
662 | "\n -u Work in UTC (don't convert to local time)" \ |
663 | "\n -R Output RFC-2822 compliant date string" \ |
664 | ) IF_LONG_OPTS( \ |
665 | "\n [-s,--set] TIME Set time to TIME" \ |
666 | "\n -u,--utc Work in UTC (don't convert to local time)" \ |
667 | "\n -R,--rfc-2822 Output RFC-2822 compliant date string" \ |
668 | ) \ |
669 | IF_FEATURE_DATE_ISOFMT( \ |
670 | "\n -I[SPEC] Output ISO-8601 compliant date string" \ |
671 | "\n SPEC='date' (default) for date only," \ |
672 | "\n 'hours', 'minutes', or 'seconds' for date and" \ |
673 | "\n time to the indicated precision" \ |
674 | ) \ |
675 | IF_NOT_LONG_OPTS( \ |
676 | "\n -r FILE Display last modification time of FILE" \ |
677 | "\n -d TIME Display TIME, not 'now'" \ |
678 | ) IF_LONG_OPTS( \ |
679 | "\n -r,--reference FILE Display last modification time of FILE" \ |
680 | "\n -d,--date TIME Display TIME, not 'now'" \ |
681 | ) \ |
682 | IF_FEATURE_DATE_ISOFMT( \ |
683 | "\n -D FMT Use FMT for -d TIME conversion" \ |
684 | ) \ |
685 | "\n" \ |
686 | "\nRecognized TIME formats:" \ |
687 | "\n hh:mm[:ss]" \ |
688 | "\n [YYYY.]MM.DD-hh:mm[:ss]" \ |
689 | "\n YYYY-MM-DD hh:mm[:ss]" \ |
690 | "\n [[[[[YY]YY]MM]DD]hh]mm[.ss]" \ |
691 | IF_FEATURE_DATE_COMPAT( \ |
692 | "\n 'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead" \ |
693 | ) \ |
694 | |
695 | #define date_example_usage \ |
696 | "$ date\n" \ |
697 | "Wed Apr 12 18:52:41 MDT 2000\n" \ |
698 | |
699 | #define dd_trivial_usage \ |
700 | "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ |
701 | " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync] [iflag=skip_bytes]") \ |
702 | |
703 | #define dd_full_usage "\n\n" \ |
704 | "Copy a file with converting and formatting\n" \ |
705 | "\n if=FILE Read from FILE instead of stdin" \ |
706 | "\n of=FILE Write to FILE instead of stdout" \ |
707 | "\n bs=N Read and write N bytes at a time" \ |
708 | IF_FEATURE_DD_IBS_OBS( \ |
709 | "\n ibs=N Read N bytes at a time" \ |
710 | ) \ |
711 | IF_FEATURE_DD_IBS_OBS( \ |
712 | "\n obs=N Write N bytes at a time" \ |
713 | ) \ |
714 | "\n count=N Copy only N input blocks" \ |
715 | "\n skip=N Skip N input blocks" \ |
716 | "\n seek=N Skip N output blocks" \ |
717 | IF_FEATURE_DD_IBS_OBS( \ |
718 | "\n conv=notrunc Don't truncate output file" \ |
719 | "\n conv=noerror Continue after read errors" \ |
720 | "\n conv=sync Pad blocks with zeros" \ |
721 | "\n conv=fsync Physically write data out before finishing" \ |
722 | "\n conv=swab Swap every pair of bytes" \ |
723 | "\n iflag=skip_bytes skip=N is in bytes" \ |
724 | ) \ |
725 | IF_FEATURE_DD_STATUS( \ |
726 | "\n status=noxfer Suppress rate output" \ |
727 | "\n status=none Suppress all output" \ |
728 | ) \ |
729 | "\n" \ |
730 | "\nN may be suffixed by c (1), w (2), b (512), kB (1000), k (1024), MB, M, GB, G" \ |
731 | |
732 | #define dd_example_usage \ |
733 | "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \ |
734 | "4+0 records in\n" \ |
735 | "4+0 records out\n" \ |
736 | |
737 | #define df_trivial_usage \ |
738 | "[-Pk" \ |
739 | IF_FEATURE_HUMAN_READABLE("mh") \ |
740 | "T" \ |
741 | IF_FEATURE_DF_FANCY("ai] [-B SIZE") \ |
742 | "] [FILESYSTEM]..." \ |
743 | |
744 | #define df_full_usage "\n\n" \ |
745 | "Print filesystem usage statistics\n" \ |
746 | "\n -P POSIX output format" \ |
747 | "\n -k 1024-byte blocks (default)" \ |
748 | IF_FEATURE_HUMAN_READABLE( \ |
749 | "\n -m 1M-byte blocks" \ |
750 | "\n -h Human readable (e.g. 1K 243M 2G)" \ |
751 | ) \ |
752 | "\n -T Print filesystem type" \ |
753 | IF_FEATURE_DF_FANCY( \ |
754 | "\n -a Show all filesystems" \ |
755 | "\n -i Inodes" \ |
756 | "\n -B SIZE Blocksize" \ |
757 | ) \ |
758 | |
759 | #define df_example_usage \ |
760 | "$ df\n" \ |
761 | "Filesystem 1K-blocks Used Available Use% Mounted on\n" \ |
762 | "/dev/sda3 8690864 8553540 137324 98% /\n" \ |
763 | "/dev/sda1 64216 36364 27852 57% /boot\n" \ |
764 | "$ df /dev/sda3\n" \ |
765 | "Filesystem 1K-blocks Used Available Use% Mounted on\n" \ |
766 | "/dev/sda3 8690864 8553540 137324 98% /\n" \ |
767 | "$ POSIXLY_CORRECT=sure df /dev/sda3\n" \ |
768 | "Filesystem 512B-blocks Used Available Use% Mounted on\n" \ |
769 | "/dev/sda3 17381728 17107080 274648 98% /\n" \ |
770 | "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" \ |
771 | "Filesystem 512-blocks Used Available Capacity Mounted on\n" \ |
772 | "/dev/sda3 17381728 17107080 274648 98% /\n" \ |
773 | |
774 | #define dirname_trivial_usage \ |
775 | "FILENAME" \ |
776 | |
777 | #define dirname_full_usage "\n\n" \ |
778 | "Strip non-directory suffix from FILENAME" \ |
779 | |
780 | #define dirname_example_usage \ |
781 | "$ dirname /tmp/foo\n" \ |
782 | "/tmp\n" \ |
783 | "$ dirname /tmp/foo/\n" \ |
784 | "/tmp\n" \ |
785 | |
786 | #define dos2unix_trivial_usage \ |
787 | "[-ud] [FILE]" \ |
788 | |
789 | #define dos2unix_full_usage "\n\n" \ |
790 | "Convert FILE in-place from DOS to Unix format.\n" \ |
791 | "When no file is given, use stdin/stdout.\n" \ |
792 | "\n -u dos2unix" \ |
793 | "\n -d unix2dos" \ |
794 | |
795 | #define unix2dos_trivial_usage \ |
796 | "[-ud] [FILE]" \ |
797 | |
798 | #define unix2dos_full_usage "\n\n" \ |
799 | "Convert FILE in-place from Unix to DOS format.\n" \ |
800 | "When no file is given, use stdin/stdout.\n" \ |
801 | "\n -u dos2unix" \ |
802 | "\n -d unix2dos" \ |
803 | |
804 | #define du_trivial_usage \ |
805 | "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..." \ |
806 | |
807 | #define du_full_usage "\n\n" \ |
808 | "Summarize disk space used for each FILE and/or directory\n" \ |
809 | "\n -a Show file sizes too" \ |
810 | "\n -L Follow all symlinks" \ |
811 | "\n -H Follow symlinks on command line" \ |
812 | "\n -d N Limit output to directories (and files with -a) of depth < N" \ |
813 | "\n -c Show grand total" \ |
814 | "\n -l Count sizes many times if hard linked" \ |
815 | "\n -s Display only a total for each argument" \ |
816 | "\n -x Skip directories on different filesystems" \ |
817 | IF_FEATURE_HUMAN_READABLE( \ |
818 | "\n -h Sizes in human readable format (e.g., 1K 243M 2G)" \ |
819 | "\n -m Sizes in megabytes" \ |
820 | ) \ |
821 | "\n -k Sizes in kilobytes" IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \ |
822 | IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K( \ |
823 | "\n Default unit is 512 bytes" \ |
824 | ) \ |
825 | |
826 | #define du_example_usage \ |
827 | "$ du\n" \ |
828 | "16 ./CVS\n" \ |
829 | "12 ./kernel-patches/CVS\n" \ |
830 | "80 ./kernel-patches\n" \ |
831 | "12 ./tests/CVS\n" \ |
832 | "36 ./tests\n" \ |
833 | "12 ./scripts/CVS\n" \ |
834 | "16 ./scripts\n" \ |
835 | "12 ./docs/CVS\n" \ |
836 | "104 ./docs\n" \ |
837 | "2417 .\n" \ |
838 | |
839 | #define echo_trivial_usage \ |
840 | IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..." \ |
841 | |
842 | #define echo_full_usage "\n\n" \ |
843 | "Print the specified ARGs to stdout" \ |
844 | IF_FEATURE_FANCY_ECHO( "\n" \ |
845 | "\n -n Suppress trailing newline" \ |
846 | "\n -e Interpret backslash escapes (i.e., \\t=tab)" \ |
847 | "\n -E Don't interpret backslash escapes (default)" \ |
848 | ) \ |
849 | |
850 | #define echo_example_usage \ |
851 | "$ echo \"Erik is cool\"\n" \ |
852 | "Erik is cool\n" \ |
853 | IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \ |
854 | "Erik\n" \ |
855 | "is\n" \ |
856 | "cool\n" \ |
857 | "$ echo \"Erik\\nis\\ncool\"\n" \ |
858 | "Erik\\nis\\ncool\n") \ |
859 | |
860 | #define env_trivial_usage \ |
861 | "[-iu] [-] [name=value]... [PROG ARGS]" \ |
862 | |
863 | #define env_full_usage "\n\n" \ |
864 | "Print the current environment or run PROG after setting up\n" \ |
865 | "the specified environment\n" \ |
866 | "\n -, -i Start with an empty environment" \ |
867 | "\n -u Remove variable from the environment" \ |
868 | |
869 | #define expand_trivial_usage \ |
870 | "[-i] [-t N] [FILE]..." \ |
871 | |
872 | #define expand_full_usage "\n\n" \ |
873 | "Convert tabs to spaces, writing to stdout\n" \ |
874 | IF_FEATURE_EXPAND_LONG_OPTIONS( \ |
875 | "\n -i,--initial Don't convert tabs after non blanks" \ |
876 | "\n -t,--tabs=N Tabstops every N chars" \ |
877 | ) \ |
878 | IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( \ |
879 | "\n -i Don't convert tabs after non blanks" \ |
880 | "\n -t Tabstops every N chars" \ |
881 | ) \ |
882 | |
883 | #define unexpand_trivial_usage \ |
884 | "[-fa][-t N] [FILE]..." \ |
885 | |
886 | #define unexpand_full_usage "\n\n" \ |
887 | "Convert spaces to tabs, writing to stdout\n" \ |
888 | IF_FEATURE_UNEXPAND_LONG_OPTIONS( \ |
889 | "\n -a,--all Convert all blanks" \ |
890 | "\n -f,--first-only Convert only leading blanks" \ |
891 | "\n -t,--tabs=N Tabstops every N chars" \ |
892 | ) \ |
893 | IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( \ |
894 | "\n -a Convert all blanks" \ |
895 | "\n -f Convert only leading blanks" \ |
896 | "\n -t N Tabstops every N chars" \ |
897 | ) \ |
898 | |
899 | #define expr_trivial_usage \ |
900 | "EXPRESSION" \ |
901 | |
902 | #define expr_full_usage "\n\n" \ |
903 | "Print the value of EXPRESSION to stdout\n" \ |
904 | "\n" \ |
905 | "EXPRESSION may be:\n" \ |
906 | " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \ |
907 | " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \ |
908 | " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \ |
909 | " ARG1 <= ARG2\n" \ |
910 | " ARG1 = ARG2\n" \ |
911 | " ARG1 != ARG2\n" \ |
912 | " ARG1 >= ARG2\n" \ |
913 | " ARG1 > ARG2\n" \ |
914 | " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \ |
915 | " ARG1 - ARG2\n" \ |
916 | " ARG1 * ARG2\n" \ |
917 | " ARG1 / ARG2\n" \ |
918 | " ARG1 % ARG2\n" \ |
919 | " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \ |
920 | " match STRING REGEXP Same as STRING : REGEXP\n" \ |
921 | " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \ |
922 | " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \ |
923 | " length STRING Length of STRING\n" \ |
924 | " quote TOKEN Interpret TOKEN as a string, even if\n" \ |
925 | " it is a keyword like 'match' or an\n" \ |
926 | " operator like '/'\n" \ |
927 | " (EXPRESSION) Value of EXPRESSION\n" \ |
928 | "\n" \ |
929 | "Beware that many operators need to be escaped or quoted for shells.\n" \ |
930 | "Comparisons are arithmetic if both ARGs are numbers, else\n" \ |
931 | "lexicographical. Pattern matches return the string matched between\n" \ |
932 | "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \ |
933 | "of characters matched or 0." \ |
934 | |
935 | #define false_trivial_usage NOUSAGE_STR \ |
936 | |
937 | #define false_full_usage "" \ |
938 | |
939 | #define false_example_usage \ |
940 | "$ false\n" \ |
941 | "$ echo $?\n" \ |
942 | "1\n" \ |
943 | |
944 | #define fold_trivial_usage \ |
945 | "[-bs] [-w WIDTH] [FILE]..." \ |
946 | |
947 | #define fold_full_usage "\n\n" \ |
948 | "Wrap input lines in each FILE (or stdin), writing to stdout\n" \ |
949 | "\n -b Count bytes rather than columns" \ |
950 | "\n -s Break at spaces" \ |
951 | "\n -w Use WIDTH columns instead of 80" \ |
952 | |
953 | #define fsync_trivial_usage \ |
954 | "[-d] FILE..." \ |
955 | |
956 | #define fsync_full_usage "\n\n" \ |
957 | "Write files' buffered blocks to disk\n" \ |
958 | "\n -d Avoid syncing metadata" \ |
959 | |
960 | #define head_trivial_usage \ |
961 | "[OPTIONS] [FILE]..." \ |
962 | |
963 | #define head_full_usage "\n\n" \ |
964 | "Print first 10 lines of each FILE (or stdin) to stdout.\n" \ |
965 | "With more than one FILE, precede each with a filename header.\n" \ |
966 | "\n -n N[kbm] Print first N lines" \ |
967 | IF_FEATURE_FANCY_HEAD( \ |
968 | "\n -n -N[kbm] Print all except N last lines" \ |
969 | "\n -c [-]N[kbm] Print first N bytes" \ |
970 | "\n -q Never print headers" \ |
971 | "\n -v Always print headers" \ |
972 | ) \ |
973 | "\n" \ |
974 | "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \ |
975 | |
976 | #define head_example_usage \ |
977 | "$ head -n 2 /etc/passwd\n" \ |
978 | "root:x:0:0:root:/root:/bin/bash\n" \ |
979 | "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" \ |
980 | |
981 | #define hostid_trivial_usage \ |
982 | "" \ |
983 | |
984 | #define hostid_full_usage "\n\n" \ |
985 | "Print out a unique 32-bit identifier for the machine" \ |
986 | |
987 | #define id_trivial_usage \ |
988 | "[OPTIONS] [USER]" \ |
989 | |
990 | #define id_full_usage "\n\n" \ |
991 | "Print information about USER or the current user\n" \ |
992 | IF_SELINUX( \ |
993 | "\n -Z Security context" \ |
994 | ) \ |
995 | "\n -u User ID" \ |
996 | "\n -g Group ID" \ |
997 | "\n -G Supplementary group IDs" \ |
998 | "\n -n Print names instead of numbers" \ |
999 | "\n -r Print real ID instead of effective ID" \ |
1000 | |
1001 | #define id_example_usage \ |
1002 | "$ id\n" \ |
1003 | "uid=1000(andersen) gid=1000(andersen)\n" \ |
1004 | |
1005 | #define groups_trivial_usage \ |
1006 | "[USER]" \ |
1007 | |
1008 | #define groups_full_usage "\n\n" \ |
1009 | "Print the group memberships of USER or for the current process" \ |
1010 | |
1011 | #define groups_example_usage \ |
1012 | "$ groups\n" \ |
1013 | "andersen lp dialout cdrom floppy\n" \ |
1014 | |
1015 | #define install_trivial_usage \ |
1016 | "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST" \ |
1017 | |
1018 | #define install_full_usage "\n\n" \ |
1019 | "Copy files and set attributes\n" \ |
1020 | "\n -c Just copy (default)" \ |
1021 | "\n -d Create directories" \ |
1022 | "\n -D Create leading target directories" \ |
1023 | "\n -s Strip symbol table" \ |
1024 | "\n -p Preserve date" \ |
1025 | "\n -o USER Set ownership" \ |
1026 | "\n -g GRP Set group ownership" \ |
1027 | "\n -m MODE Set permissions" \ |
1028 | "\n -t DIR Install to DIR" \ |
1029 | IF_SELINUX( \ |
1030 | "\n -Z Set security context" \ |
1031 | ) \ |
1032 | |
1033 | #define ln_trivial_usage \ |
1034 | "[OPTIONS] TARGET... LINK|DIR" \ |
1035 | |
1036 | #define ln_full_usage "\n\n" \ |
1037 | "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" \ |
1038 | "\n -s Make symlinks instead of hardlinks" \ |
1039 | "\n -f Remove existing destinations" \ |
1040 | "\n -n Don't dereference symlinks - treat like normal file" \ |
1041 | "\n -b Make a backup of the target (if exists) before link operation" \ |
1042 | "\n -S suf Use suffix instead of ~ when making backup files" \ |
1043 | "\n -T 2nd arg must be a DIR" \ |
1044 | "\n -v Verbose" \ |
1045 | |
1046 | #define ln_example_usage \ |
1047 | "$ ln -s BusyBox /tmp/ls\n" \ |
1048 | "$ ls -l /tmp/ls\n" \ |
1049 | "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n" \ |
1050 | |
1051 | #define logname_trivial_usage \ |
1052 | "" \ |
1053 | |
1054 | #define logname_full_usage "\n\n" \ |
1055 | "Print the name of the current user" \ |
1056 | |
1057 | #define logname_example_usage \ |
1058 | "$ logname\n" \ |
1059 | "root\n" \ |
1060 | |
1061 | #define ls_trivial_usage \ |
1062 | "[-1AaCxd" \ |
1063 | IF_FEATURE_LS_FOLLOWLINKS("LH") \ |
1064 | IF_FEATURE_LS_RECURSIVE("R") \ |
1065 | IF_FEATURE_LS_FILETYPES("Fp") "lins" \ |
1066 | IF_FEATURE_LS_TIMESTAMPS("e") \ |
1067 | IF_FEATURE_HUMAN_READABLE("h") \ |
1068 | IF_FEATURE_LS_SORTFILES("rSXv") \ |
1069 | IF_FEATURE_LS_TIMESTAMPS("ctu") \ |
1070 | IF_SELINUX("kKZ") "]" \ |
1071 | IF_FEATURE_AUTOWIDTH(" [-w WIDTH]") " [FILE]..." \ |
1072 | |
1073 | #define ls_full_usage "\n\n" \ |
1074 | "List directory contents\n" \ |
1075 | "\n -1 One column output" \ |
1076 | "\n -a Include entries which start with ." \ |
1077 | "\n -A Like -a, but exclude . and .." \ |
1078 | "\n -C List by columns" \ |
1079 | "\n -x List by lines" \ |
1080 | "\n -d List directory entries instead of contents" \ |
1081 | IF_FEATURE_LS_FOLLOWLINKS( \ |
1082 | "\n -L Follow symlinks" \ |
1083 | "\n -H Follow symlinks on command line" \ |
1084 | ) \ |
1085 | IF_FEATURE_LS_RECURSIVE( \ |
1086 | "\n -R Recurse" \ |
1087 | ) \ |
1088 | IF_FEATURE_LS_FILETYPES( \ |
1089 | "\n -p Append / to dir entries" \ |
1090 | "\n -F Append indicator (one of */=@|) to entries" \ |
1091 | ) \ |
1092 | "\n -l Long listing format" \ |
1093 | "\n -i List inode numbers" \ |
1094 | "\n -n List numeric UIDs and GIDs instead of names" \ |
1095 | "\n -s List allocated blocks" \ |
1096 | IF_FEATURE_LS_TIMESTAMPS( \ |
1097 | "\n -e List full date and time" \ |
1098 | ) \ |
1099 | IF_FEATURE_HUMAN_READABLE( \ |
1100 | "\n -h List sizes in human readable format (1K 243M 2G)" \ |
1101 | ) \ |
1102 | IF_FEATURE_LS_SORTFILES( \ |
1103 | "\n -r Sort in reverse order" \ |
1104 | "\n -S Sort by size" \ |
1105 | "\n -X Sort by extension" \ |
1106 | "\n -v Sort by version" \ |
1107 | ) \ |
1108 | IF_FEATURE_LS_TIMESTAMPS( \ |
1109 | "\n -c With -l: sort by ctime" \ |
1110 | "\n -t With -l: sort by mtime" \ |
1111 | "\n -u With -l: sort by atime" \ |
1112 | ) \ |
1113 | IF_SELINUX( \ |
1114 | "\n -k List security context" \ |
1115 | "\n -K List security context in long format" \ |
1116 | "\n -Z List security context and permission" \ |
1117 | ) \ |
1118 | IF_FEATURE_AUTOWIDTH( \ |
1119 | "\n -w N Assume the terminal is N columns wide" \ |
1120 | ) \ |
1121 | IF_FEATURE_LS_COLOR( \ |
1122 | "\n --color[={always,never,auto}] Control coloring" \ |
1123 | ) \ |
1124 | |
1125 | #define md5sum_trivial_usage \ |
1126 | IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \ |
1127 | |
1128 | #define md5sum_full_usage "\n\n" \ |
1129 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \ |
1130 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ |
1131 | "\n -c Check sums against list in FILEs" \ |
1132 | "\n -s Don't output anything, status code shows success" \ |
1133 | "\n -w Warn about improperly formatted checksum lines" \ |
1134 | ) \ |
1135 | |
1136 | #define md5sum_example_usage \ |
1137 | "$ md5sum < busybox\n" \ |
1138 | "6fd11e98b98a58f64ff3398d7b324003\n" \ |
1139 | "$ md5sum busybox\n" \ |
1140 | "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ |
1141 | "$ md5sum -c -\n" \ |
1142 | "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ |
1143 | "busybox: OK\n" \ |
1144 | "^D\n" \ |
1145 | |
1146 | #define sha1sum_trivial_usage \ |
1147 | IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \ |
1148 | |
1149 | #define sha1sum_full_usage "\n\n" \ |
1150 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \ |
1151 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ |
1152 | "\n -c Check sums against list in FILEs" \ |
1153 | "\n -s Don't output anything, status code shows success" \ |
1154 | "\n -w Warn about improperly formatted checksum lines" \ |
1155 | ) \ |
1156 | |
1157 | #define sha256sum_trivial_usage \ |
1158 | IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \ |
1159 | |
1160 | #define sha256sum_full_usage "\n\n" \ |
1161 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \ |
1162 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ |
1163 | "\n -c Check sums against list in FILEs" \ |
1164 | "\n -s Don't output anything, status code shows success" \ |
1165 | "\n -w Warn about improperly formatted checksum lines" \ |
1166 | ) \ |
1167 | |
1168 | #define sha512sum_trivial_usage \ |
1169 | IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..." \ |
1170 | |
1171 | #define sha512sum_full_usage "\n\n" \ |
1172 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \ |
1173 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ |
1174 | "\n -c Check sums against list in FILEs" \ |
1175 | "\n -s Don't output anything, status code shows success" \ |
1176 | "\n -w Warn about improperly formatted checksum lines" \ |
1177 | ) \ |
1178 | |
1179 | #define sha3sum_trivial_usage \ |
1180 | IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[-a BITS] [FILE]..." \ |
1181 | |
1182 | #define sha3sum_full_usage "\n\n" \ |
1183 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA3 checksums" \ |
1184 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ |
1185 | "\n -c Check sums against list in FILEs" \ |
1186 | "\n -s Don't output anything, status code shows success" \ |
1187 | "\n -w Warn about improperly formatted checksum lines" \ |
1188 | "\n -a BITS 224 (default), 256, 384, 512" \ |
1189 | ) \ |
1190 | |
1191 | #define mkdir_trivial_usage \ |
1192 | "[OPTIONS] DIRECTORY..." \ |
1193 | |
1194 | #define mkdir_full_usage "\n\n" \ |
1195 | "Create DIRECTORY\n" \ |
1196 | "\n -m MODE Mode" \ |
1197 | "\n -p No error if exists; make parent directories as needed" \ |
1198 | IF_SELINUX( \ |
1199 | "\n -Z Set security context" \ |
1200 | ) \ |
1201 | |
1202 | #define mkdir_example_usage \ |
1203 | "$ mkdir /tmp/foo\n" \ |
1204 | "$ mkdir /tmp/foo\n" \ |
1205 | "/tmp/foo: File exists\n" \ |
1206 | "$ mkdir /tmp/foo/bar/baz\n" \ |
1207 | "/tmp/foo/bar/baz: No such file or directory\n" \ |
1208 | "$ mkdir -p /tmp/foo/bar/baz\n" \ |
1209 | |
1210 | #define mkfifo_trivial_usage \ |
1211 | "[-m MODE] " IF_SELINUX("[-Z] ") "NAME" \ |
1212 | |
1213 | #define mkfifo_full_usage "\n\n" \ |
1214 | "Create named pipe\n" \ |
1215 | "\n -m MODE Mode (default a=rw)" \ |
1216 | IF_SELINUX( \ |
1217 | "\n -Z Set security context" \ |
1218 | ) \ |
1219 | |
1220 | #define mknod_trivial_usage \ |
1221 | "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR" \ |
1222 | |
1223 | #define mknod_full_usage "\n\n" \ |
1224 | "Create a special file (block, character, or pipe)\n" \ |
1225 | "\n -m MODE Creation mode (default a=rw)" \ |
1226 | IF_SELINUX( \ |
1227 | "\n -Z Set security context" \ |
1228 | ) \ |
1229 | "\nTYPE:" \ |
1230 | "\n b Block device" \ |
1231 | "\n c or u Character device" \ |
1232 | "\n p Named pipe (MAJOR and MINOR are ignored)" \ |
1233 | |
1234 | #define mknod_example_usage \ |
1235 | "$ mknod /dev/fd0 b 2 0\n" \ |
1236 | "$ mknod -m 644 /tmp/pipe p\n" \ |
1237 | |
1238 | #define mv_trivial_usage \ |
1239 | "[-fin] SOURCE DEST\n" \ |
1240 | "or: mv [-fin] SOURCE... DIRECTORY" \ |
1241 | |
1242 | #define mv_full_usage "\n\n" \ |
1243 | "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \ |
1244 | "\n -f Don't prompt before overwriting" \ |
1245 | "\n -i Interactive, prompt before overwrite" \ |
1246 | "\n -n Don't overwrite an existing file" \ |
1247 | |
1248 | #define mv_example_usage \ |
1249 | "$ mv /tmp/foo /bin/bar\n" \ |
1250 | |
1251 | #define nice_trivial_usage \ |
1252 | "[-n ADJUST] [PROG ARGS]" \ |
1253 | |
1254 | #define nice_full_usage "\n\n" \ |
1255 | "Change scheduling priority, run PROG\n" \ |
1256 | "\n -n ADJUST Adjust priority by ADJUST" \ |
1257 | |
1258 | #define nohup_trivial_usage \ |
1259 | "PROG ARGS" \ |
1260 | |
1261 | #define nohup_full_usage "\n\n" \ |
1262 | "Run PROG immune to hangups, with output to a non-tty" \ |
1263 | |
1264 | #define nohup_example_usage \ |
1265 | "$ nohup make &" \ |
1266 | |
1267 | #if !ENABLE_DESKTOP \ |
1268 | |
1269 | #define od_trivial_usage \ |
1270 | "[-aBbcDdeFfHhIiLlOovXx] [FILE]" \ |
1271 | |
1272 | #define od_full_usage "\n\n" \ |
1273 | "Print FILE (or stdin) unambiguously, as octal bytes by default" \ |
1274 | |
1275 | #endif \ |
1276 | |
1277 | #if ENABLE_DESKTOP \ |
1278 | |
1279 | #define od_trivial_usage \ |
1280 | "[-abcdfhilovxs] [-t TYPE] [-A RADIX] [-N SIZE] [-j SKIP] [-S MINSTR] [-w WIDTH] [FILE]..." \ |
1281 | |
1282 | #define od_full_usage "\n\n" \ |
1283 | "Print FILEs (or stdin) unambiguously, as octal bytes by default" \ |
1284 | |
1285 | #endif \ |
1286 | |
1287 | #define printenv_trivial_usage \ |
1288 | "[VARIABLE]..." \ |
1289 | |
1290 | #define printenv_full_usage "\n\n" \ |
1291 | "Print environment VARIABLEs.\n" \ |
1292 | "If no VARIABLE specified, print all." \ |
1293 | |
1294 | #define printf_trivial_usage \ |
1295 | "FORMAT [ARG]..." \ |
1296 | |
1297 | #define printf_full_usage "\n\n" \ |
1298 | "Format and print ARG(s) according to FORMAT (a-la C printf)" \ |
1299 | |
1300 | #define printf_example_usage \ |
1301 | "$ printf \"Val=%d\\n\" 5\n" \ |
1302 | "Val=5\n" \ |
1303 | |
1304 | #define pwd_trivial_usage \ |
1305 | "" \ |
1306 | |
1307 | #define pwd_full_usage "\n\n" \ |
1308 | "Print the full filename of the current working directory" \ |
1309 | |
1310 | #define pwd_example_usage \ |
1311 | "$ pwd\n" \ |
1312 | "/root\n" \ |
1313 | |
1314 | #define readlink_trivial_usage \ |
1315 | IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE" \ |
1316 | |
1317 | #define readlink_full_usage "\n\n" \ |
1318 | "Display the value of a symlink" \ |
1319 | IF_FEATURE_READLINK_FOLLOW( "\n" \ |
1320 | "\n -f Canonicalize by following all symlinks" \ |
1321 | "\n -n Don't add newline" \ |
1322 | "\n -v Verbose" \ |
1323 | ) \ |
1324 | |
1325 | #define realpath_trivial_usage \ |
1326 | "FILE..." \ |
1327 | |
1328 | #define realpath_full_usage "\n\n" \ |
1329 | "Return the absolute pathnames of given FILE" \ |
1330 | |
1331 | #define rm_trivial_usage \ |
1332 | "[-irf] FILE..." \ |
1333 | |
1334 | #define rm_full_usage "\n\n" \ |
1335 | "Remove (unlink) FILEs\n" \ |
1336 | "\n -i Always prompt before removing" \ |
1337 | "\n -f Never prompt" \ |
1338 | "\n -R,-r Recurse" \ |
1339 | |
1340 | #define rm_example_usage \ |
1341 | "$ rm -rf /tmp/foo\n" \ |
1342 | |
1343 | #define rmdir_trivial_usage \ |
1344 | "[OPTIONS] DIRECTORY..." \ |
1345 | |
1346 | #define rmdir_full_usage "\n\n" \ |
1347 | "Remove DIRECTORY if it is empty\n" \ |
1348 | IF_FEATURE_RMDIR_LONG_OPTIONS( \ |
1349 | "\n -p|--parents Include parents" \ |
1350 | "\n --ignore-fail-on-non-empty" \ |
1351 | ) \ |
1352 | IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \ |
1353 | "\n -p Include parents" \ |
1354 | ) \ |
1355 | |
1356 | #define rmdir_example_usage \ |
1357 | "# rmdir /tmp/foo\n" \ |
1358 | |
1359 | #define seq_trivial_usage \ |
1360 | "[-w] [-s SEP] [FIRST [INC]] LAST" \ |
1361 | |
1362 | #define seq_full_usage "\n\n" \ |
1363 | "Print numbers from FIRST to LAST, in steps of INC.\n" \ |
1364 | "FIRST, INC default to 1.\n" \ |
1365 | "\n -w Pad to last with leading zeros" \ |
1366 | "\n -s SEP String separator" \ |
1367 | |
1368 | #define shuf_trivial_usage \ |
1369 | "[-e|-i L-H] [-n NUM] [-o FILE] [-z] [FILE|ARG...]" \ |
1370 | |
1371 | #define shuf_full_usage "\n\n" \ |
1372 | "Randomly permute lines\n" \ |
1373 | "\n -e Treat ARGs as lines" \ |
1374 | "\n -i L-H Treat numbers L-H as lines" \ |
1375 | "\n -n NUM Output at most NUM lines" \ |
1376 | "\n -o FILE Write to FILE, not standard output" \ |
1377 | "\n -z End lines with zero byte, not newline" \ |
1378 | |
1379 | #define sleep_trivial_usage \ |
1380 | IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...") \ |
1381 | |
1382 | #define sleep_full_usage "\n\n" \ |
1383 | IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \ |
1384 | IF_FEATURE_FANCY_SLEEP( \ |
1385 | "Pause for a time equal to the total of the args given, where each arg can\n" \ |
1386 | "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays") \ |
1387 | |
1388 | #define sleep_example_usage \ |
1389 | "$ sleep 2\n" \ |
1390 | "[2 second delay results]\n" \ |
1391 | IF_FEATURE_FANCY_SLEEP( \ |
1392 | "$ sleep 1d 3h 22m 8s\n" \ |
1393 | "[98528 second delay results]\n") \ |
1394 | |
1395 | #define sort_trivial_usage \ |
1396 | "[-nru" \ |
1397 | IF_FEATURE_SORT_BIG("gMcszbdfiokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \ |
1398 | "] [FILE]..." \ |
1399 | |
1400 | #define sort_full_usage "\n\n" \ |
1401 | "Sort lines of text\n" \ |
1402 | IF_FEATURE_SORT_BIG( \ |
1403 | "\n -o FILE Output to FILE" \ |
1404 | "\n -c Check whether input is sorted" \ |
1405 | "\n -b Ignore leading blanks" \ |
1406 | "\n -f Ignore case" \ |
1407 | "\n -i Ignore unprintable characters" \ |
1408 | "\n -d Dictionary order (blank or alphanumeric only)" \ |
1409 | "\n -g General numerical sort" \ |
1410 | "\n -M Sort month" \ |
1411 | ) \ |
1412 | "\n -n Sort numbers" \ |
1413 | IF_FEATURE_SORT_BIG( \ |
1414 | "\n -t CHAR Field separator" \ |
1415 | "\n -k N[,M] Sort by Nth field" \ |
1416 | ) \ |
1417 | "\n -r Reverse sort order" \ |
1418 | IF_FEATURE_SORT_BIG( \ |
1419 | "\n -s Stable (don't sort ties alphabetically)" \ |
1420 | ) \ |
1421 | "\n -u Suppress duplicate lines" \ |
1422 | IF_FEATURE_SORT_BIG( \ |
1423 | "\n -z Lines are terminated by NUL, not newline" \ |
1424 | ) \ |
1425 | |
1426 | #define sort_example_usage \ |
1427 | "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ |
1428 | "a\n" \ |
1429 | "b\n" \ |
1430 | "c\n" \ |
1431 | "d\n" \ |
1432 | "e\n" \ |
1433 | "f\n" \ |
1434 | IF_FEATURE_SORT_BIG( \ |
1435 | "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \ |
1436 | "d 2\n" \ |
1437 | "b 2\n" \ |
1438 | "c 3\n" \ |
1439 | ) \ |
1440 | "" \ |
1441 | |
1442 | #define split_trivial_usage \ |
1443 | "[OPTIONS] [INPUT [PREFIX]]" \ |
1444 | |
1445 | #define split_full_usage "\n\n" \ |
1446 | " -b N[k|m] Split by N (kilo|mega)bytes" \ |
1447 | "\n -l N Split by N lines" \ |
1448 | "\n -a N Use N letters as suffix" \ |
1449 | |
1450 | #define split_example_usage \ |
1451 | "$ split TODO foo\n" \ |
1452 | "$ cat TODO | split -a 2 -l 2 TODO_\n" \ |
1453 | |
1454 | #define stat_trivial_usage \ |
1455 | "[OPTIONS] FILE..." \ |
1456 | |
1457 | #define stat_full_usage "\n\n" \ |
1458 | "Display file" \ |
1459 | IF_FEATURE_STAT_FILESYSTEM(" (default) or filesystem") \ |
1460 | " status\n" \ |
1461 | IF_FEATURE_STAT_FORMAT( \ |
1462 | "\n -c FMT Use the specified format" \ |
1463 | ) \ |
1464 | IF_FEATURE_STAT_FILESYSTEM( \ |
1465 | "\n -f Display filesystem status" \ |
1466 | ) \ |
1467 | "\n -L Follow links" \ |
1468 | "\n -t Terse display" \ |
1469 | IF_SELINUX( \ |
1470 | "\n -Z Print security context" \ |
1471 | ) \ |
1472 | IF_FEATURE_STAT_FORMAT( \ |
1473 | "\n\nFMT sequences"IF_FEATURE_STAT_FILESYSTEM(" for files")":\n" \ |
1474 | " %a Access rights in octal\n" \ |
1475 | " %A Access rights in human readable form\n" \ |
1476 | " %b Number of blocks allocated (see %B)\n" \ |
1477 | " %B Size in bytes of each block reported by %b\n" \ |
1478 | " %d Device number in decimal\n" \ |
1479 | " %D Device number in hex\n" \ |
1480 | " %f Raw mode in hex\n" \ |
1481 | " %F File type\n" \ |
1482 | " %g Group ID\n" \ |
1483 | " %G Group name\n" \ |
1484 | " %h Number of hard links\n" \ |
1485 | " %i Inode number\n" \ |
1486 | " %n File name\n" \ |
1487 | " %N File name, with -> TARGET if symlink\n" \ |
1488 | " %o I/O block size\n" \ |
1489 | " %s Total size in bytes\n" \ |
1490 | " %t Major device type in hex\n" \ |
1491 | " %T Minor device type in hex\n" \ |
1492 | " %u User ID\n" \ |
1493 | " %U User name\n" \ |
1494 | " %x Time of last access\n" \ |
1495 | " %X Time of last access as seconds since Epoch\n" \ |
1496 | " %y Time of last modification\n" \ |
1497 | " %Y Time of last modification as seconds since Epoch\n" \ |
1498 | " %z Time of last change\n" \ |
1499 | " %Z Time of last change as seconds since Epoch\n" \ |
1500 | IF_FEATURE_STAT_FILESYSTEM( \ |
1501 | "\nFMT sequences for file systems:\n" \ |
1502 | " %a Free blocks available to non-superuser\n" \ |
1503 | " %b Total data blocks\n" \ |
1504 | " %c Total file nodes\n" \ |
1505 | " %d Free file nodes\n" \ |
1506 | " %f Free blocks\n" \ |
1507 | IF_SELINUX( \ |
1508 | " %C Security context in selinux\n" \ |
1509 | ) \ |
1510 | " %i File System ID in hex\n" \ |
1511 | " %l Maximum length of filenames\n" \ |
1512 | " %n File name\n" \ |
1513 | " %s Block size (for faster transfer)\n" \ |
1514 | " %S Fundamental block size (for block counts)\n" \ |
1515 | " %t Type in hex\n" \ |
1516 | " %T Type in human readable form" \ |
1517 | ) \ |
1518 | ) \ |
1519 | |
1520 | #define stty_trivial_usage \ |
1521 | "[-a|g] [-F DEVICE] [SETTING]..." \ |
1522 | |
1523 | #define stty_full_usage "\n\n" \ |
1524 | "Without arguments, prints baud rate, line discipline,\n" \ |
1525 | "and deviations from stty sane\n" \ |
1526 | "\n -F DEVICE Open device instead of stdin" \ |
1527 | "\n -a Print all current settings in human-readable form" \ |
1528 | "\n -g Print in stty-readable form" \ |
1529 | "\n [SETTING] See manpage" \ |
1530 | |
1531 | #define sum_trivial_usage \ |
1532 | "[-rs] [FILE]..." \ |
1533 | |
1534 | #define sum_full_usage "\n\n" \ |
1535 | "Checksum and count the blocks in a file\n" \ |
1536 | "\n -r Use BSD sum algorithm (1K blocks)" \ |
1537 | "\n -s Use System V sum algorithm (512byte blocks)" \ |
1538 | |
1539 | #define sync_trivial_usage \ |
1540 | ""IF_FEATURE_SYNC_FANCY("[-df] [FILE]...") \ |
1541 | |
1542 | #define sync_full_usage "\n\n" \ |
1543 | IF_NOT_FEATURE_SYNC_FANCY( \ |
1544 | "Write all buffered blocks to disk" \ |
1545 | ) \ |
1546 | IF_FEATURE_SYNC_FANCY( \ |
1547 | "Write all buffered blocks (in FILEs) to disk" \ |
1548 | "\n -d Avoid syncing metadata" \ |
1549 | "\n -f Sync filesystems underlying FILEs" \ |
1550 | ) \ |
1551 | |
1552 | #define tac_trivial_usage \ |
1553 | "[FILE]..." \ |
1554 | |
1555 | #define tac_full_usage "\n\n" \ |
1556 | "Concatenate FILEs and print them in reverse" \ |
1557 | |
1558 | #define tail_trivial_usage \ |
1559 | "[OPTIONS] [FILE]..." \ |
1560 | |
1561 | #define tail_full_usage "\n\n" \ |
1562 | "Print last 10 lines of each FILE (or stdin) to stdout.\n" \ |
1563 | "With more than one FILE, precede each with a filename header.\n" \ |
1564 | "\n -f Print data as file grows" \ |
1565 | "\n -c [+]N[kbm] Print last N bytes" \ |
1566 | "\n -n N[kbm] Print last N lines" \ |
1567 | "\n -n +N[kbm] Start on Nth line and print the rest" \ |
1568 | IF_FEATURE_FANCY_TAIL( \ |
1569 | "\n -q Never print headers" \ |
1570 | "\n -s SECONDS Wait SECONDS between reads with -f" \ |
1571 | "\n -v Always print headers" \ |
1572 | "\n -F Same as -f, but keep retrying" \ |
1573 | "\n" \ |
1574 | "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \ |
1575 | ) \ |
1576 | |
1577 | #define tail_example_usage \ |
1578 | "$ tail -n 1 /etc/resolv.conf\n" \ |
1579 | "nameserver 10.0.0.1\n" \ |
1580 | |
1581 | #define tee_trivial_usage \ |
1582 | "[-ai] [FILE]..." \ |
1583 | |
1584 | #define tee_full_usage "\n\n" \ |
1585 | "Copy stdin to each FILE, and also to stdout\n" \ |
1586 | "\n -a Append to the given FILEs, don't overwrite" \ |
1587 | "\n -i Ignore interrupt signals (SIGINT)" \ |
1588 | |
1589 | #define tee_example_usage \ |
1590 | "$ echo \"Hello\" | tee /tmp/foo\n" \ |
1591 | "$ cat /tmp/foo\n" \ |
1592 | "Hello\n" \ |
1593 | |
1594 | #define test_trivial_usage NOUSAGE_STR \ |
1595 | |
1596 | #define test_full_usage "" \ |
1597 | |
1598 | #define test_example_usage \ |
1599 | "$ test 1 -eq 2\n" \ |
1600 | "$ echo $?\n" \ |
1601 | "1\n" \ |
1602 | "$ test 1 -eq 1\n" \ |
1603 | "$ echo $?\n" \ |
1604 | "0\n" \ |
1605 | "$ [ -d /etc ]\n" \ |
1606 | "$ echo $?\n" \ |
1607 | "0\n" \ |
1608 | "$ [ -d /junk ]\n" \ |
1609 | "$ echo $?\n" \ |
1610 | "1\n" \ |
1611 | |
1612 | #define touch_trivial_usage \ |
1613 | "[-c]" IF_FEATURE_TOUCH_SUSV3(" [-d DATE] [-t DATE] [-r FILE]") " FILE..." \ |
1614 | |
1615 | #define touch_full_usage "\n\n" \ |
1616 | "Update the last-modified date on the given FILE[s]\n" \ |
1617 | "\n -c Don't create files" \ |
1618 | IF_FEATURE_TOUCH_NODEREF( \ |
1619 | "\n -h Don't follow links" \ |
1620 | ) \ |
1621 | IF_FEATURE_TOUCH_SUSV3( \ |
1622 | "\n -d DT Date/time to use" \ |
1623 | "\n -t DT Date/time to use" \ |
1624 | "\n -r FILE Use FILE's date/time" \ |
1625 | ) \ |
1626 | |
1627 | #define touch_example_usage \ |
1628 | "$ ls -l /tmp/foo\n" \ |
1629 | "/bin/ls: /tmp/foo: No such file or directory\n" \ |
1630 | "$ touch /tmp/foo\n" \ |
1631 | "$ ls -l /tmp/foo\n" \ |
1632 | "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" \ |
1633 | |
1634 | #define tr_trivial_usage \ |
1635 | "[-cds] STRING1 [STRING2]" \ |
1636 | |
1637 | #define tr_full_usage "\n\n" \ |
1638 | "Translate, squeeze, or delete characters from stdin, writing to stdout\n" \ |
1639 | "\n -c Take complement of STRING1" \ |
1640 | "\n -d Delete input characters coded STRING1" \ |
1641 | "\n -s Squeeze multiple output characters of STRING2 into one character" \ |
1642 | |
1643 | #define tr_example_usage \ |
1644 | "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \ |
1645 | "hello world\n" \ |
1646 | |
1647 | #define true_trivial_usage NOUSAGE_STR \ |
1648 | |
1649 | #define true_full_usage "" \ |
1650 | |
1651 | #define true_example_usage \ |
1652 | "$ true\n" \ |
1653 | "$ echo $?\n" \ |
1654 | "0\n" \ |
1655 | |
1656 | #define truncate_trivial_usage \ |
1657 | "[-c] -s SIZE FILE..." \ |
1658 | |
1659 | #define truncate_full_usage "\n\n" \ |
1660 | "Truncate FILEs to the given size\n" \ |
1661 | "\n -c Do not create files" \ |
1662 | "\n -s SIZE Truncate to SIZE" \ |
1663 | |
1664 | #define truncate_example_usage \ |
1665 | "$ truncate -s 1G foo" \ |
1666 | |
1667 | #define tty_trivial_usage \ |
1668 | "" \ |
1669 | |
1670 | #define tty_full_usage "\n\n" \ |
1671 | "Print file name of stdin's terminal" \ |
1672 | IF_INCLUDE_SUSv2( "\n" \ |
1673 | "\n -s Print nothing, only return exit status" \ |
1674 | ) \ |
1675 | |
1676 | #define tty_example_usage \ |
1677 | "$ tty\n" \ |
1678 | "/dev/tty2\n" \ |
1679 | |
1680 | #define uname_trivial_usage \ |
1681 | "[-amnrspvio]" \ |
1682 | |
1683 | #define uname_full_usage "\n\n" \ |
1684 | "Print system information\n" \ |
1685 | "\n -a Print all" \ |
1686 | "\n -m The machine (hardware) type" \ |
1687 | "\n -n Hostname" \ |
1688 | "\n -r Kernel release" \ |
1689 | "\n -s Kernel name (default)" \ |
1690 | "\n -p Processor type" \ |
1691 | "\n -v Kernel version" \ |
1692 | "\n -i The hardware platform" \ |
1693 | "\n -o OS name" \ |
1694 | |
1695 | #define uname_example_usage \ |
1696 | "$ uname -a\n" \ |
1697 | "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" \ |
1698 | |
1699 | #define uniq_trivial_usage \ |
1700 | "[-cdu][-f,s,w N] [INPUT [OUTPUT]]" \ |
1701 | |
1702 | #define uniq_full_usage "\n\n" \ |
1703 | "Discard duplicate lines\n" \ |
1704 | "\n -c Prefix lines by the number of occurrences" \ |
1705 | "\n -d Only print duplicate lines" \ |
1706 | "\n -u Only print unique lines" \ |
1707 | "\n -f N Skip first N fields" \ |
1708 | "\n -s N Skip first N chars (after any skipped fields)" \ |
1709 | "\n -w N Compare N characters in line" \ |
1710 | |
1711 | #define uniq_example_usage \ |
1712 | "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ |
1713 | "a\n" \ |
1714 | "b\n" \ |
1715 | "c\n" \ |
1716 | |
1717 | #define unlink_trivial_usage \ |
1718 | "FILE" \ |
1719 | |
1720 | #define unlink_full_usage "\n\n" \ |
1721 | "Delete FILE by calling unlink()" \ |
1722 | |
1723 | #define usleep_trivial_usage \ |
1724 | "N" \ |
1725 | |
1726 | #define usleep_full_usage "\n\n" \ |
1727 | "Pause for N microseconds" \ |
1728 | |
1729 | #define usleep_example_usage \ |
1730 | "$ usleep 1000000\n" \ |
1731 | "[pauses for 1 second]\n" \ |
1732 | |
1733 | #define uudecode_trivial_usage \ |
1734 | "[-o OUTFILE] [INFILE]" \ |
1735 | |
1736 | #define uudecode_full_usage "\n\n" \ |
1737 | "Uudecode a file\n" \ |
1738 | "Finds OUTFILE in uuencoded source unless -o is given" \ |
1739 | |
1740 | #define uudecode_example_usage \ |
1741 | "$ uudecode -o busybox busybox.uu\n" \ |
1742 | "$ ls -l busybox\n" \ |
1743 | "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n" \ |
1744 | |
1745 | #define base64_trivial_usage \ |
1746 | "[-d] [FILE]" \ |
1747 | |
1748 | #define base64_full_usage "\n\n" \ |
1749 | "Base64 encode or decode FILE to standard output" \ |
1750 | "\n -d Decode data" \ |
1751 | |
1752 | #define uuencode_trivial_usage \ |
1753 | "[-m] [FILE] STORED_FILENAME" \ |
1754 | |
1755 | #define uuencode_full_usage "\n\n" \ |
1756 | "Uuencode FILE (or stdin) to stdout\n" \ |
1757 | "\n -m Use base64 encoding per RFC1521" \ |
1758 | |
1759 | #define uuencode_example_usage \ |
1760 | "$ uuencode busybox busybox\n" \ |
1761 | "begin 755 busybox\n" \ |
1762 | "<encoded file snipped>\n" \ |
1763 | "$ uudecode busybox busybox > busybox.uu\n" \ |
1764 | "$\n" \ |
1765 | |
1766 | #define wc_trivial_usage \ |
1767 | "[-c"IF_UNICODE_SUPPORT("m")"lwL] [FILE]..." \ |
1768 | |
1769 | #define wc_full_usage "\n\n" \ |
1770 | "Count lines, words, and bytes for each FILE (or stdin)\n" \ |
1771 | "\n -c Count bytes" \ |
1772 | IF_UNICODE_SUPPORT( \ |
1773 | "\n -m Count characters" \ |
1774 | ) \ |
1775 | "\n -l Count newlines" \ |
1776 | "\n -w Count words" \ |
1777 | "\n -L Print longest line length" \ |
1778 | |
1779 | #define wc_example_usage \ |
1780 | "$ wc /etc/passwd\n" \ |
1781 | " 31 46 1365 /etc/passwd\n" \ |
1782 | |
1783 | #define users_trivial_usage \ |
1784 | "" \ |
1785 | |
1786 | #define users_full_usage "\n\n" \ |
1787 | "Print the users currently logged on" \ |
1788 | |
1789 | #define who_trivial_usage \ |
1790 | "[-a]" \ |
1791 | |
1792 | #define who_full_usage "\n\n" \ |
1793 | "Show who is logged on\n" \ |
1794 | "\n -a Show all" \ |
1795 | "\n -H Print column headers" \ |
1796 | |
1797 | #define whoami_trivial_usage \ |
1798 | "" \ |
1799 | |
1800 | #define whoami_full_usage "\n\n" \ |
1801 | "Print the user name associated with the current effective user id" \ |
1802 | |
1803 | #define yes_trivial_usage \ |
1804 | "[STRING]" \ |
1805 | |
1806 | #define yes_full_usage "\n\n" \ |
1807 | "Repeatedly output a line with STRING, or 'y'" \ |
1808 | |
1809 | #define mktemp_trivial_usage \ |
1810 | "[-dt] [-p DIR] [TEMPLATE]" \ |
1811 | |
1812 | #define mktemp_full_usage "\n\n" \ |
1813 | "Create a temporary file with name based on TEMPLATE and print its name.\n" \ |
1814 | "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" \ |
1815 | "Without TEMPLATE, -t tmp.XXXXXX is assumed.\n" \ |
1816 | "\n -d Make directory, not file" \ |
1817 | "\n -q Fail silently on errors" \ |
1818 | "\n -t Prepend base directory name to TEMPLATE" \ |
1819 | "\n -p DIR Use DIR as a base directory (implies -t)" \ |
1820 | "\n -u Do not create anything; print a name" \ |
1821 | "\n" \ |
1822 | "\nBase directory is: -p DIR, else $TMPDIR, else /data/local/tmp" \ |
1823 | |
1824 | #define mktemp_example_usage \ |
1825 | "$ mktemp /tmp/temp.XXXXXX\n" \ |
1826 | "/tmp/temp.mWiLjM\n" \ |
1827 | "$ ls -la /tmp/temp.mWiLjM\n" \ |
1828 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" \ |
1829 | |
1830 | #define pipe_progress_trivial_usage NOUSAGE_STR \ |
1831 | |
1832 | #define pipe_progress_full_usage "" \ |
1833 | |
1834 | #define run_parts_trivial_usage \ |
1835 | "[-a ARG]... [-u UMASK] " \ |
1836 | IF_FEATURE_RUN_PARTS_LONG_OPTIONS("[--reverse] [--test] [--exit-on-error] "IF_FEATURE_RUN_PARTS_FANCY("[--list] ")) \ |
1837 | "DIRECTORY" \ |
1838 | |
1839 | #define run_parts_full_usage "\n\n" \ |
1840 | "Run a bunch of scripts in DIRECTORY\n" \ |
1841 | "\n -a ARG Pass ARG as argument to scripts" \ |
1842 | "\n -u UMASK Set UMASK before running scripts" \ |
1843 | IF_FEATURE_RUN_PARTS_LONG_OPTIONS( \ |
1844 | "\n --reverse Reverse execution order" \ |
1845 | "\n --test Dry run" \ |
1846 | "\n --exit-on-error Exit if a script exits with non-zero" \ |
1847 | IF_FEATURE_RUN_PARTS_FANCY( \ |
1848 | "\n --list Print names of matching files even if they are not executable" \ |
1849 | ) \ |
1850 | ) \ |
1851 | |
1852 | #define run_parts_example_usage \ |
1853 | "$ run-parts -a start /etc/init.d\n" \ |
1854 | "$ run-parts -a stop=now /etc/init.d\n\n" \ |
1855 | "Let's assume you have a script foo/dosomething:\n" \ |
1856 | "#!/bin/sh\n" \ |
1857 | "for i in $*; do eval $i; done; unset i\n" \ |
1858 | "case \"$1\" in\n" \ |
1859 | "start*) echo starting something;;\n" \ |
1860 | "stop*) set -x; shutdown -h $stop;;\n" \ |
1861 | "esac\n\n" \ |
1862 | "Running this yields:\n" \ |
1863 | "$run-parts -a stop=+4m foo/\n" \ |
1864 | "+ shutdown -h +4m" \ |
1865 | |
1866 | #define start_stop_daemon_trivial_usage \ |
1867 | "[OPTIONS] [-S|-K] ... [-- ARGS...]" \ |
1868 | |
1869 | #define start_stop_daemon_full_usage "\n\n" \ |
1870 | "Search for matching processes, and then\n" \ |
1871 | "-K: stop all matching processes.\n" \ |
1872 | "-S: start a process unless a matching process is found.\n" \ |
1873 | IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \ |
1874 | "\nProcess matching:" \ |
1875 | "\n -u,--user USERNAME|UID Match only this user's processes" \ |
1876 | "\n -n,--name NAME Match processes with NAME" \ |
1877 | "\n in comm field in /proc/PID/stat" \ |
1878 | "\n -x,--exec EXECUTABLE Match processes with this command" \ |
1879 | "\n in /proc/PID/{exe,cmdline}" \ |
1880 | "\n -p,--pidfile FILE Match a process with PID from the file" \ |
1881 | "\n All specified conditions must match" \ |
1882 | "\n-S only:" \ |
1883 | "\n -x,--exec EXECUTABLE Program to run" \ |
1884 | "\n -a,--startas NAME Zeroth argument" \ |
1885 | "\n -b,--background Background" \ |
1886 | IF_FEATURE_START_STOP_DAEMON_FANCY( \ |
1887 | "\n -N,--nicelevel N Change nice level" \ |
1888 | ) \ |
1889 | "\n -c,--chuid USER[:[GRP]] Change to user/group" \ |
1890 | "\n -m,--make-pidfile Write PID to the pidfile specified by -p" \ |
1891 | "\n-K only:" \ |
1892 | "\n -s,--signal SIG Signal to send" \ |
1893 | "\n -t,--test Match only, exit with 0 if a process is found" \ |
1894 | "\nOther:" \ |
1895 | IF_FEATURE_START_STOP_DAEMON_FANCY( \ |
1896 | "\n -o,--oknodo Exit with status 0 if nothing is done" \ |
1897 | "\n -v,--verbose Verbose" \ |
1898 | ) \ |
1899 | "\n -q,--quiet Quiet" \ |
1900 | ) \ |
1901 | IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \ |
1902 | "\nProcess matching:" \ |
1903 | "\n -u USERNAME|UID Match only this user's processes" \ |
1904 | "\n -n NAME Match processes with NAME" \ |
1905 | "\n in comm field in /proc/PID/stat" \ |
1906 | "\n -x EXECUTABLE Match processes with this command" \ |
1907 | "\n command in /proc/PID/cmdline" \ |
1908 | "\n -p FILE Match a process with PID from the file" \ |
1909 | "\n All specified conditions must match" \ |
1910 | "\n-S only:" \ |
1911 | "\n -x EXECUTABLE Program to run" \ |
1912 | "\n -a NAME Zeroth argument" \ |
1913 | "\n -b Background" \ |
1914 | IF_FEATURE_START_STOP_DAEMON_FANCY( \ |
1915 | "\n -N N Change nice level" \ |
1916 | ) \ |
1917 | "\n -c USER[:[GRP]] Change to user/group" \ |
1918 | "\n -m Write PID to the pidfile specified by -p" \ |
1919 | "\n-K only:" \ |
1920 | "\n -s SIG Signal to send" \ |
1921 | "\n -t Match only, exit with 0 if a process is found" \ |
1922 | "\nOther:" \ |
1923 | IF_FEATURE_START_STOP_DAEMON_FANCY( \ |
1924 | "\n -o Exit with status 0 if nothing is done" \ |
1925 | "\n -v Verbose" \ |
1926 | ) \ |
1927 | "\n -q Quiet" \ |
1928 | ) \ |
1929 | |
1930 | #define which_trivial_usage \ |
1931 | "[COMMAND]..." \ |
1932 | |
1933 | #define which_full_usage "\n\n" \ |
1934 | "Locate a COMMAND" \ |
1935 | |
1936 | #define which_example_usage \ |
1937 | "$ which login\n" \ |
1938 | "/bin/login\n" \ |
1939 | |
1940 | #define chattr_trivial_usage \ |
1941 | "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..." \ |
1942 | |
1943 | #define chattr_full_usage "\n\n" \ |
1944 | "Change ext2 file attributes\n" \ |
1945 | "\nModifiers:" \ |
1946 | "\n -,+,= Remove/add/set attributes" \ |
1947 | "\nAttributes:" \ |
1948 | "\n A Don't track atime" \ |
1949 | "\n a Append mode only" \ |
1950 | "\n c Enable compress" \ |
1951 | "\n D Write dir contents synchronously" \ |
1952 | "\n d Don't backup with dump" \ |
1953 | "\n i Cannot be modified (immutable)" \ |
1954 | "\n j Write all data to journal first" \ |
1955 | "\n s Zero disk storage when deleted" \ |
1956 | "\n S Write synchronously" \ |
1957 | "\n t Disable tail-merging of partial blocks with other files" \ |
1958 | "\n u Allow file to be undeleted" \ |
1959 | "\n -R Recurse" \ |
1960 | "\n -v VER Set version/generation number" \ |
1961 | |
1962 | #define fsck_trivial_usage \ |
1963 | "[-ANPRTV] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..." \ |
1964 | |
1965 | #define fsck_full_usage "\n\n" \ |
1966 | "Check and repair filesystems\n" \ |
1967 | "\n -A Walk /etc/fstab and check all filesystems" \ |
1968 | "\n -N Don't execute, just show what would be done" \ |
1969 | "\n -P With -A, check filesystems in parallel" \ |
1970 | "\n -R With -A, skip the root filesystem" \ |
1971 | "\n -T Don't show title on startup" \ |
1972 | "\n -V Verbose" \ |
1973 | "\n -t TYPE List of filesystem types to check" \ |
1974 | |
1975 | #define lsattr_trivial_usage \ |
1976 | "[-Radlv] [FILE]..." \ |
1977 | |
1978 | #define lsattr_full_usage "\n\n" \ |
1979 | "List ext2 file attributes\n" \ |
1980 | "\n -R Recurse" \ |
1981 | "\n -a Don't hide entries starting with ." \ |
1982 | "\n -d List directory entries instead of contents" \ |
1983 | "\n -l List long flag names" \ |
1984 | "\n -v List version/generation number" \ |
1985 | |
1986 | #define tune2fs_trivial_usage \ |
1987 | "[-c MAX_MOUNT_COUNT] " \ |
1988 | "[-i DAYS] " \ |
1989 | "[-C MOUNT_COUNT] " \ |
1990 | "[-L LABEL] " \ |
1991 | "BLOCKDEV" \ |
1992 | |
1993 | #define tune2fs_full_usage "\n\n" \ |
1994 | "Adjust filesystem options on ext[23] filesystems" \ |
1995 | |
1996 | #define awk_trivial_usage \ |
1997 | "[OPTIONS] [AWK_PROGRAM] [FILE]..." \ |
1998 | |
1999 | #define awk_full_usage "\n\n" \ |
2000 | " -v VAR=VAL Set variable" \ |
2001 | "\n -F SEP Use SEP as field separator" \ |
2002 | "\n -f FILE Read program from FILE" \ |
2003 | IF_FEATURE_AWK_GNU_EXTENSIONS( \ |
2004 | "\n -e AWK_PROGRAM" \ |
2005 | ) \ |
2006 | |
2007 | #define cmp_trivial_usage \ |
2008 | "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]" \ |
2009 | |
2010 | #define cmp_full_usage "\n\n" \ |
2011 | "Compare FILE1 with FILE2 (or stdin)\n" \ |
2012 | "\n -l Write the byte numbers (decimal) and values (octal)" \ |
2013 | "\n for all differing bytes" \ |
2014 | "\n -s Quiet" \ |
2015 | |
2016 | #define diff_trivial_usage \ |
2017 | "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2" \ |
2018 | |
2019 | #define diff_full_usage "\n\n" \ |
2020 | "Compare files line by line and output the differences between them.\n" \ |
2021 | "This implementation supports unified diffs only.\n" \ |
2022 | "\n -a Treat all files as text" \ |
2023 | "\n -b Ignore changes in the amount of whitespace" \ |
2024 | "\n -B Ignore changes whose lines are all blank" \ |
2025 | "\n -d Try hard to find a smaller set of changes" \ |
2026 | "\n -i Ignore case differences" \ |
2027 | "\n -L Use LABEL instead of the filename in the unified header" \ |
2028 | "\n -N Treat absent files as empty" \ |
2029 | "\n -q Output only whether files differ" \ |
2030 | "\n -r Recurse" \ |
2031 | "\n -S Start with FILE when comparing directories" \ |
2032 | "\n -T Make tabs line up by prefixing a tab when necessary" \ |
2033 | "\n -s Report when two files are the same" \ |
2034 | "\n -t Expand tabs to spaces in output" \ |
2035 | "\n -U Output LINES lines of context" \ |
2036 | "\n -w Ignore all whitespace" \ |
2037 | |
2038 | #define ed_trivial_usage "" \ |
2039 | |
2040 | #define ed_full_usage "" \ |
2041 | |
2042 | #define patch_trivial_usage \ |
2043 | "[OPTIONS] [ORIGFILE [PATCHFILE]]" \ |
2044 | |
2045 | #define patch_full_usage "\n\n" \ |
2046 | IF_LONG_OPTS( \ |
2047 | " -p,--strip N Strip N leading components from file names" \ |
2048 | "\n -i,--input DIFF Read DIFF instead of stdin" \ |
2049 | "\n -R,--reverse Reverse patch" \ |
2050 | "\n -N,--forward Ignore already applied patches" \ |
2051 | "\n -E,--remove-empty-files Remove output files if they become empty" \ |
2052 | ) \ |
2053 | IF_NOT_LONG_OPTS( \ |
2054 | " -p N Strip N leading components from file names" \ |
2055 | "\n -i DIFF Read DIFF instead of stdin" \ |
2056 | "\n -R Reverse patch" \ |
2057 | "\n -N Ignore already applied patches" \ |
2058 | "\n -E Remove output files if they become empty" \ |
2059 | ) \ |
2060 | |
2061 | #define patch_example_usage \ |
2062 | "$ patch -p1 < example.diff\n" \ |
2063 | "$ patch -p0 -i example.diff" \ |
2064 | |
2065 | #define sed_trivial_usage \ |
2066 | "[-inrE] [-f FILE]... [-e CMD]... [FILE]...\n" \ |
2067 | "or: sed [-inrE] CMD [FILE]..." \ |
2068 | |
2069 | #define sed_full_usage "\n\n" \ |
2070 | " -e CMD Add CMD to sed commands to be executed" \ |
2071 | "\n -f FILE Add FILE contents to sed commands to be executed" \ |
2072 | "\n -i[SFX] Edit files in-place (otherwise sends to stdout)" \ |
2073 | "\n Optionally back files up, appending SFX" \ |
2074 | "\n -n Suppress automatic printing of pattern space" \ |
2075 | "\n -r,-E Use extended regex syntax" \ |
2076 | "\n" \ |
2077 | "\nIf no -e or -f, the first non-option argument is the sed command string." \ |
2078 | "\nRemaining arguments are input files (stdin if none)." \ |
2079 | |
2080 | #define sed_example_usage \ |
2081 | "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \ |
2082 | "bar\n" \ |
2083 | |
2084 | #define vi_trivial_usage \ |
2085 | "[OPTIONS] [FILE]..." \ |
2086 | |
2087 | #define vi_full_usage "\n\n" \ |
2088 | "Edit FILE\n" \ |
2089 | IF_FEATURE_VI_COLON( \ |
2090 | "\n -c CMD Initial command to run ($EXINIT also available)" \ |
2091 | ) \ |
2092 | IF_FEATURE_VI_READONLY( \ |
2093 | "\n -R Read-only" \ |
2094 | ) \ |
2095 | "\n -H List available features" \ |
2096 | |
2097 | #define find_trivial_usage \ |
2098 | "[-HL] [PATH]... [OPTIONS] [ACTIONS]" \ |
2099 | |
2100 | #define find_full_usage "\n\n" \ |
2101 | "Search for files and perform actions on them.\n" \ |
2102 | "First failed action stops processing of current file.\n" \ |
2103 | "Defaults: PATH is current directory, action is '-print'\n" \ |
2104 | "\n -L,-follow Follow symlinks" \ |
2105 | "\n -H ...on command line only" \ |
2106 | IF_FEATURE_FIND_XDEV( \ |
2107 | "\n -xdev Don't descend directories on other filesystems" \ |
2108 | ) \ |
2109 | IF_FEATURE_FIND_MAXDEPTH( \ |
2110 | "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \ |
2111 | "\n actions to command line arguments only" \ |
2112 | "\n -mindepth N Don't act on first N levels" \ |
2113 | ) \ |
2114 | IF_FEATURE_FIND_DEPTH( \ |
2115 | "\n -depth Act on directory *after* traversing it" \ |
2116 | ) \ |
2117 | "\n" \ |
2118 | "\nActions:" \ |
2119 | IF_FEATURE_FIND_PAREN( \ |
2120 | "\n ( ACTIONS ) Group actions for -o / -a" \ |
2121 | ) \ |
2122 | IF_FEATURE_FIND_NOT( \ |
2123 | "\n ! ACT Invert ACT's success/failure" \ |
2124 | ) \ |
2125 | "\n ACT1 [-a] ACT2 If ACT1 fails, stop, else do ACT2" \ |
2126 | "\n ACT1 -o ACT2 If ACT1 succeeds, stop, else do ACT2" \ |
2127 | "\n Note: -a has higher priority than -o" \ |
2128 | "\n -name PATTERN Match file name (w/o directory name) to PATTERN" \ |
2129 | "\n -iname PATTERN Case insensitive -name" \ |
2130 | IF_FEATURE_FIND_PATH( \ |
2131 | "\n -path PATTERN Match path to PATTERN" \ |
2132 | "\n -ipath PATTERN Case insensitive -path" \ |
2133 | ) \ |
2134 | IF_FEATURE_FIND_REGEX( \ |
2135 | "\n -regex PATTERN Match path to regex PATTERN" \ |
2136 | ) \ |
2137 | IF_FEATURE_FIND_TYPE( \ |
2138 | "\n -type X File type is X (one of: f,d,l,b,c,...)" \ |
2139 | ) \ |
2140 | IF_FEATURE_FIND_PERM( \ |
2141 | "\n -perm MASK At least one mask bit (+MASK), all bits (-MASK)," \ |
2142 | "\n or exactly MASK bits are set in file's mode" \ |
2143 | ) \ |
2144 | IF_FEATURE_FIND_MTIME( \ |
2145 | "\n -mtime DAYS mtime is greater than (+N), less than (-N)," \ |
2146 | "\n or exactly N days in the past" \ |
2147 | ) \ |
2148 | IF_FEATURE_FIND_MMIN( \ |
2149 | "\n -mmin MINS mtime is greater than (+N), less than (-N)," \ |
2150 | "\n or exactly N minutes in the past" \ |
2151 | ) \ |
2152 | IF_FEATURE_FIND_NEWER( \ |
2153 | "\n -newer FILE mtime is more recent than FILE's" \ |
2154 | ) \ |
2155 | IF_FEATURE_FIND_INUM( \ |
2156 | "\n -inum N File has inode number N" \ |
2157 | ) \ |
2158 | IF_FEATURE_FIND_USER( \ |
2159 | "\n -user NAME/ID File is owned by given user" \ |
2160 | ) \ |
2161 | IF_FEATURE_FIND_GROUP( \ |
2162 | "\n -group NAME/ID File is owned by given group" \ |
2163 | ) \ |
2164 | IF_FEATURE_FIND_SIZE( \ |
2165 | "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))" \ |
2166 | "\n +/-N: file size is bigger/smaller than N" \ |
2167 | ) \ |
2168 | IF_FEATURE_FIND_LINKS( \ |
2169 | "\n -links N Number of links is greater than (+N), less than (-N)," \ |
2170 | "\n or exactly N" \ |
2171 | ) \ |
2172 | IF_FEATURE_FIND_CONTEXT( \ |
2173 | "\n -context CTX File has specified security context" \ |
2174 | ) \ |
2175 | IF_FEATURE_FIND_PRUNE( \ |
2176 | "\n -prune If current file is directory, don't descend into it" \ |
2177 | ) \ |
2178 | "\nIf none of the following actions is specified, -print is assumed" \ |
2179 | "\n -print Print file name" \ |
2180 | IF_FEATURE_FIND_PRINT0( \ |
2181 | "\n -print0 Print file name, NUL terminated" \ |
2182 | ) \ |
2183 | IF_FEATURE_FIND_EXEC( \ |
2184 | "\n -exec CMD ARG ; Run CMD with all instances of {} replaced by" \ |
2185 | "\n file name. Fails if CMD exits with nonzero" \ |
2186 | ) \ |
2187 | IF_FEATURE_FIND_EXEC_PLUS( \ |
2188 | "\n -exec CMD ARG + Run CMD with {} replaced by list of file names" \ |
2189 | ) \ |
2190 | IF_FEATURE_FIND_DELETE( \ |
2191 | "\n -delete Delete current file/directory. Turns on -depth option" \ |
2192 | ) \ |
2193 | |
2194 | #define find_example_usage \ |
2195 | "$ find / -name passwd\n" \ |
2196 | "/etc/passwd\n" \ |
2197 | |
2198 | #define grep_trivial_usage \ |
2199 | "[-HhnlLoqvsriwFE" \ |
2200 | IF_EXTRA_COMPAT("z") \ |
2201 | "] [-m N] " \ |
2202 | IF_FEATURE_GREP_CONTEXT("[-A/B/C N] ") \ |
2203 | "PATTERN/-e PATTERN.../-f FILE [FILE]..." \ |
2204 | |
2205 | #define grep_full_usage "\n\n" \ |
2206 | "Search for PATTERN in FILEs (or stdin)\n" \ |
2207 | "\n -H Add 'filename:' prefix" \ |
2208 | "\n -h Do not add 'filename:' prefix" \ |
2209 | "\n -n Add 'line_no:' prefix" \ |
2210 | "\n -l Show only names of files that match" \ |
2211 | "\n -L Show only names of files that don't match" \ |
2212 | "\n -c Show only count of matching lines" \ |
2213 | "\n -o Show only the matching part of line" \ |
2214 | "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \ |
2215 | "\n -v Select non-matching lines" \ |
2216 | "\n -s Suppress open and read errors" \ |
2217 | "\n -r Recurse" \ |
2218 | "\n -i Ignore case" \ |
2219 | "\n -w Match whole words only" \ |
2220 | "\n -x Match whole lines only" \ |
2221 | "\n -F PATTERN is a literal (not regexp)" \ |
2222 | "\n -E PATTERN is an extended regexp" \ |
2223 | IF_EXTRA_COMPAT( \ |
2224 | "\n -z Input is NUL terminated" \ |
2225 | ) \ |
2226 | "\n -m N Match up to N times per file" \ |
2227 | IF_FEATURE_GREP_CONTEXT( \ |
2228 | "\n -A N Print N lines of trailing context" \ |
2229 | "\n -B N Print N lines of leading context" \ |
2230 | "\n -C N Same as '-A N -B N'" \ |
2231 | ) \ |
2232 | "\n -e PTRN Pattern to match" \ |
2233 | "\n -f FILE Read pattern from file" \ |
2234 | |
2235 | #define grep_example_usage \ |
2236 | "$ grep root /etc/passwd\n" \ |
2237 | "root:x:0:0:root:/root:/bin/bash\n" \ |
2238 | "$ grep ^[rR]oo. /etc/passwd\n" \ |
2239 | "root:x:0:0:root:/root:/bin/bash\n" \ |
2240 | |
2241 | #define egrep_trivial_usage NOUSAGE_STR \ |
2242 | |
2243 | #define egrep_full_usage "" \ |
2244 | |
2245 | #define fgrep_trivial_usage NOUSAGE_STR \ |
2246 | |
2247 | #define fgrep_full_usage "" \ |
2248 | |
2249 | #define xargs_trivial_usage \ |
2250 | "[OPTIONS] [PROG ARGS]" \ |
2251 | |
2252 | #define xargs_full_usage "\n\n" \ |
2253 | "Run PROG on every item given by stdin\n" \ |
2254 | IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \ |
2255 | "\n -p Ask user whether to run each command" \ |
2256 | ) \ |
2257 | "\n -r Don't run command if input is empty" \ |
2258 | IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( \ |
2259 | "\n -0 Input is separated by NUL characters" \ |
2260 | ) \ |
2261 | "\n -t Print the command on stderr before execution" \ |
2262 | "\n -e[STR] STR stops input processing" \ |
2263 | "\n -n N Pass no more than N args to PROG" \ |
2264 | "\n -s N Pass command line of no more than N bytes" \ |
2265 | IF_FEATURE_XARGS_SUPPORT_REPL_STR( \ |
2266 | "\n -I STR Replace STR within PROG ARGS with input line" \ |
2267 | ) \ |
2268 | IF_FEATURE_XARGS_SUPPORT_TERMOPT( \ |
2269 | "\n -x Exit if size is exceeded" \ |
2270 | ) \ |
2271 | |
2272 | #define xargs_example_usage \ |
2273 | "$ ls | xargs gzip\n" \ |
2274 | "$ find . -name '*.c' -print | xargs rm\n" \ |
2275 | |
2276 | #define bootchartd_trivial_usage \ |
2277 | "start [PROG ARGS]|stop|init" \ |
2278 | |
2279 | #define bootchartd_full_usage "\n\n" \ |
2280 | "Create /var/log/bootchart.tgz with boot chart data\n" \ |
2281 | "\nstart: start background logging; with PROG, run PROG, then kill logging with USR1" \ |
2282 | "\nstop: send USR1 to all bootchartd processes" \ |
2283 | "\ninit: start background logging; stop when getty/xdm is seen (for init scripts)" \ |
2284 | "\nUnder PID 1: as init, then exec $bootchart_init, /init, /sbin/init" \ |
2285 | |
2286 | #define halt_trivial_usage \ |
2287 | "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]") \ |
2288 | |
2289 | #define halt_full_usage "\n\n" \ |
2290 | "Halt the system\n" \ |
2291 | "\n -d SEC Delay interval" \ |
2292 | "\n -n Do not sync" \ |
2293 | "\n -f Force (don't go through init)" \ |
2294 | IF_FEATURE_WTMP( \ |
2295 | "\n -w Only write a wtmp record" \ |
2296 | ) \ |
2297 | |
2298 | #define poweroff_trivial_usage \ |
2299 | "[-d DELAY] [-n] [-f]" \ |
2300 | |
2301 | #define poweroff_full_usage "\n\n" \ |
2302 | "Halt and shut off power\n" \ |
2303 | "\n -d SEC Delay interval" \ |
2304 | "\n -n Do not sync" \ |
2305 | "\n -f Force (don't go through init)" \ |
2306 | |
2307 | #define reboot_trivial_usage \ |
2308 | "[-d DELAY] [-n] [-f]" \ |
2309 | |
2310 | #define reboot_full_usage "\n\n" \ |
2311 | "Reboot the system\n" \ |
2312 | "\n -d SEC Delay interval" \ |
2313 | "\n -n Do not sync" \ |
2314 | "\n -f Force (don't go through init)" \ |
2315 | |
2316 | #define linuxrc_trivial_usage NOUSAGE_STR \ |
2317 | |
2318 | #define linuxrc_full_usage "" \ |
2319 | |
2320 | #define init_trivial_usage \ |
2321 | "" \ |
2322 | |
2323 | #define init_full_usage "\n\n" \ |
2324 | "Init is the first process started during boot. It never exits." \ |
2325 | IF_FEATURE_USE_INITTAB( \ |
2326 | "\n""It (re)spawns children according to /etc/inittab." \ |
2327 | ) \ |
2328 | IF_NOT_FEATURE_USE_INITTAB( \ |
2329 | "\n""This version of init doesn't use /etc/inittab," \ |
2330 | "\n""has fixed set of processed to run." \ |
2331 | ) \ |
2332 | |
2333 | #define init_notes_usage \ |
2334 | "This version of init is designed to be run only by the kernel.\n" \ |
2335 | "\n" \ |
2336 | "BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \ |
2337 | "the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \ |
2338 | "runlevels, use sysvinit.\n" \ |
2339 | "\n" \ |
2340 | "BusyBox init works just fine without an inittab. If no inittab is found,\n" \ |
2341 | "it has the following default behavior:\n" \ |
2342 | "\n" \ |
2343 | " ::sysinit:/etc/init.d/rcS\n" \ |
2344 | " ::askfirst:/bin/sh\n" \ |
2345 | " ::ctrlaltdel:/sbin/reboot\n" \ |
2346 | " ::shutdown:/sbin/swapoff -a\n" \ |
2347 | " ::shutdown:/bin/umount -a -r\n" \ |
2348 | " ::restart:/sbin/init\n" \ |
2349 | " tty2::askfirst:/bin/sh\n" \ |
2350 | " tty3::askfirst:/bin/sh\n" \ |
2351 | " tty4::askfirst:/bin/sh\n" \ |
2352 | "\n" \ |
2353 | "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \ |
2354 | "\n" \ |
2355 | " <id>:<runlevels>:<action>:<process>\n" \ |
2356 | "\n" \ |
2357 | " <id>:\n" \ |
2358 | "\n" \ |
2359 | " WARNING: This field has a non-traditional meaning for BusyBox init!\n" \ |
2360 | " The id field is used by BusyBox init to specify the controlling tty for\n" \ |
2361 | " the specified process to run on. The contents of this field are\n" \ |
2362 | " appended to \"/dev/\" and used as-is. There is no need for this field to\n" \ |
2363 | " be unique, although if it isn't you may have strange results. If this\n" \ |
2364 | " field is left blank, then the init's stdin/out will be used.\n" \ |
2365 | "\n" \ |
2366 | " <runlevels>:\n" \ |
2367 | "\n" \ |
2368 | " The runlevels field is completely ignored.\n" \ |
2369 | "\n" \ |
2370 | " <action>:\n" \ |
2371 | "\n" \ |
2372 | " Valid actions include: sysinit, respawn, askfirst, wait,\n" \ |
2373 | " once, restart, ctrlaltdel, and shutdown.\n" \ |
2374 | "\n" \ |
2375 | " The available actions can be classified into two groups: actions\n" \ |
2376 | " that are run only once, and actions that are re-run when the specified\n" \ |
2377 | " process exits.\n" \ |
2378 | "\n" \ |
2379 | " Run only-once actions:\n" \ |
2380 | "\n" \ |
2381 | " 'sysinit' is the first item run on boot. init waits until all\n" \ |
2382 | " sysinit actions are completed before continuing. Following the\n" \ |
2383 | " completion of all sysinit actions, all 'wait' actions are run.\n" \ |
2384 | " 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \ |
2385 | " the specified task completes. 'once' actions are asynchronous,\n" \ |
2386 | " therefore, init does not wait for them to complete. 'restart' is\n" \ |
2387 | " the action taken to restart the init process. By default this should\n" \ |
2388 | " simply run /sbin/init, but can be a script which runs pivot_root or it\n" \ |
2389 | " can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \ |
2390 | " actions are run when the system detects that someone on the system\n" \ |
2391 | " console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \ |
2392 | " wants to run 'reboot' at this point to cause the system to reboot.\n" \ |
2393 | " Finally the 'shutdown' action specifies the actions to taken when\n" \ |
2394 | " init is told to reboot. Unmounting filesystems and disabling swap\n" \ |
2395 | " is a very good here.\n" \ |
2396 | "\n" \ |
2397 | " Run repeatedly actions:\n" \ |
2398 | "\n" \ |
2399 | " 'respawn' actions are run after the 'once' actions. When a process\n" \ |
2400 | " started with a 'respawn' action exits, init automatically restarts\n" \ |
2401 | " it. Unlike sysvinit, BusyBox init does not stop processes from\n" \ |
2402 | " respawning out of control. The 'askfirst' actions acts just like\n" \ |
2403 | " respawn, except that before running the specified process it\n" \ |
2404 | " displays the line \"Please press Enter to activate this console.\"\n" \ |
2405 | " and then waits for the user to press enter before starting the\n" \ |
2406 | " specified process.\n" \ |
2407 | "\n" \ |
2408 | " Unrecognized actions (like initdefault) will cause init to emit an\n" \ |
2409 | " error message, and then go along with its business. All actions are\n" \ |
2410 | " run in the order they appear in /etc/inittab.\n" \ |
2411 | "\n" \ |
2412 | " <process>:\n" \ |
2413 | "\n" \ |
2414 | " Specifies the process to be executed and its command line.\n" \ |
2415 | "\n" \ |
2416 | "Example /etc/inittab file:\n" \ |
2417 | "\n" \ |
2418 | " # This is run first except when booting in single-user mode\n" \ |
2419 | " #\n" \ |
2420 | " ::sysinit:/etc/init.d/rcS\n" \ |
2421 | " \n" \ |
2422 | " # /bin/sh invocations on selected ttys\n" \ |
2423 | " #\n" \ |
2424 | " # Start an \"askfirst\" shell on the console (whatever that may be)\n" \ |
2425 | " ::askfirst:-/bin/sh\n" \ |
2426 | " # Start an \"askfirst\" shell on /dev/tty2-4\n" \ |
2427 | " tty2::askfirst:-/bin/sh\n" \ |
2428 | " tty3::askfirst:-/bin/sh\n" \ |
2429 | " tty4::askfirst:-/bin/sh\n" \ |
2430 | " \n" \ |
2431 | " # /sbin/getty invocations for selected ttys\n" \ |
2432 | " #\n" \ |
2433 | " tty4::respawn:/sbin/getty 38400 tty4\n" \ |
2434 | " tty5::respawn:/sbin/getty 38400 tty5\n" \ |
2435 | " \n" \ |
2436 | " \n" \ |
2437 | " # Example of how to put a getty on a serial line (for a terminal)\n" \ |
2438 | " #\n" \ |
2439 | " #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \ |
2440 | " #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \ |
2441 | " #\n" \ |
2442 | " # Example how to put a getty on a modem line\n" \ |
2443 | " #::respawn:/sbin/getty 57600 ttyS2\n" \ |
2444 | " \n" \ |
2445 | " # Stuff to do when restarting the init process\n" \ |
2446 | " ::restart:/sbin/init\n" \ |
2447 | " \n" \ |
2448 | " # Stuff to do before rebooting\n" \ |
2449 | " ::ctrlaltdel:/sbin/reboot\n" \ |
2450 | " ::shutdown:/bin/umount -a -r\n" \ |
2451 | " ::shutdown:/sbin/swapoff -a\n" \ |
2452 | |
2453 | #define mesg_trivial_usage \ |
2454 | "[y|n]" \ |
2455 | |
2456 | #define mesg_full_usage "\n\n" \ |
2457 | "Control write access to your terminal\n" \ |
2458 | " y Allow write access to your terminal\n" \ |
2459 | " n Disallow write access to your terminal" \ |
2460 | |
2461 | #define unit_trivial_usage \ |
2462 | "" \ |
2463 | |
2464 | #define unit_full_usage "\n\n" \ |
2465 | "Run the unit-test suite" \ |
2466 | |
2467 | #define parse_trivial_usage \ |
2468 | "[-x] [-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..." \ |
2469 | |
2470 | #define parse_full_usage "\n\n" \ |
2471 | " -x Suppress output (for benchmarking)" \ |
2472 | |
2473 | #define add_shell_trivial_usage \ |
2474 | "SHELL..." \ |
2475 | |
2476 | #define add_shell_full_usage "\n\n" \ |
2477 | "Add SHELLs to /etc/shells" \ |
2478 | |
2479 | #define remove_shell_trivial_usage \ |
2480 | "SHELL..." \ |
2481 | |
2482 | #define remove_shell_full_usage "\n\n" \ |
2483 | "Remove SHELLs from /etc/shells" \ |
2484 | |
2485 | #define addgroup_trivial_usage \ |
2486 | "[-g GID] [-S] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP" \ |
2487 | |
2488 | #define addgroup_full_usage "\n\n" \ |
2489 | "Add a group" IF_FEATURE_ADDUSER_TO_GROUP(" or add a user to a group") "\n" \ |
2490 | "\n -g GID Group id" \ |
2491 | "\n -S Create a system group" \ |
2492 | |
2493 | #define adduser_trivial_usage \ |
2494 | "[OPTIONS] USER [GROUP]" \ |
2495 | |
2496 | #define adduser_full_usage "\n\n" \ |
2497 | "Create new user, or add USER to GROUP\n" \ |
2498 | "\n -h DIR Home directory" \ |
2499 | "\n -g GECOS GECOS field" \ |
2500 | "\n -s SHELL Login shell" \ |
2501 | "\n -G GRP Add user to existing group" \ |
2502 | "\n -S Create a system user" \ |
2503 | "\n -D Don't assign a password" \ |
2504 | "\n -H Don't create home directory" \ |
2505 | "\n -u UID User id" \ |
2506 | "\n -k SKEL Skeleton directory (/etc/skel)" \ |
2507 | |
2508 | #define chpasswd_trivial_usage \ |
2509 | IF_LONG_OPTS("[--md5|--encrypted|--crypt-method]") IF_NOT_LONG_OPTS("[-m|-e|-c]") \ |
2510 | |
2511 | #define chpasswd_full_usage "\n\n" \ |
2512 | "Read user:password from stdin and update /etc/passwd\n" \ |
2513 | IF_LONG_OPTS( \ |
2514 | "\n -e,--encrypted Supplied passwords are in encrypted form" \ |
2515 | "\n -m,--md5 Use MD5 encryption instead of DES" \ |
2516 | "\n -c,--crypt-method Use the specified method to encrypt the passwords" \ |
2517 | ) \ |
2518 | IF_NOT_LONG_OPTS( \ |
2519 | "\n -e Supplied passwords are in encrypted form" \ |
2520 | "\n -m Use MD5 encryption instead of DES" \ |
2521 | "\n -c Use the specified method to encrypt the passwords" \ |
2522 | ) \ |
2523 | |
2524 | #define cryptpw_trivial_usage \ |
2525 | "[OPTIONS] [PASSWORD] [SALT]" \ |
2526 | |
2527 | #define cryptpw_full_usage "\n\n" \ |
2528 | "Crypt PASSWORD using crypt(3)\n" \ |
2529 | IF_LONG_OPTS( \ |
2530 | "\n -P,--password-fd=N Read password from fd N" \ |
2531 | "\n -m,--method=TYPE Encryption method" \ |
2532 | "\n -S,--salt=SALT" \ |
2533 | ) \ |
2534 | IF_NOT_LONG_OPTS( \ |
2535 | "\n -P N Read password from fd N" \ |
2536 | "\n -m TYPE Encryption method TYPE" \ |
2537 | "\n -S SALT" \ |
2538 | ) \ |
2539 | |
2540 | #define deluser_trivial_usage \ |
2541 | IF_LONG_OPTS("[--remove-home] ") "USER" \ |
2542 | |
2543 | #define deluser_full_usage "\n\n" \ |
2544 | "Delete USER from the system" \ |
2545 | |
2546 | #define delgroup_trivial_usage \ |
2547 | IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP" \ |
2548 | |
2549 | #define delgroup_full_usage "\n\n" \ |
2550 | "Delete group GROUP from the system" \ |
2551 | IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP") \ |
2552 | |
2553 | #define getty_trivial_usage \ |
2554 | "[OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]" \ |
2555 | |
2556 | #define getty_full_usage "\n\n" \ |
2557 | "Open TTY, prompt for login name, then invoke /system/xbin/login\n" \ |
2558 | "\n -h Enable hardware RTS/CTS flow control" \ |
2559 | "\n -L Set CLOCAL (ignore Carrier Detect state)" \ |
2560 | "\n -m Get baud rate from modem's CONNECT status message" \ |
2561 | "\n -n Don't prompt for login name" \ |
2562 | "\n -w Wait for CR or LF before sending /etc/issue" \ |
2563 | "\n -i Don't display /etc/issue" \ |
2564 | "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" \ |
2565 | "\n -l LOGIN Invoke LOGIN instead of /system/xbin/login" \ |
2566 | "\n -t SEC Terminate after SEC if no login name is read" \ |
2567 | "\n -I INITSTR Send INITSTR before anything else" \ |
2568 | "\n -H HOST Log HOST into the utmp file as the hostname" \ |
2569 | "\n" \ |
2570 | "\nBAUD_RATE of 0 leaves it unchanged" \ |
2571 | |
2572 | #define login_trivial_usage \ |
2573 | "[-p] [-h HOST] [[-f] USER]" \ |
2574 | |
2575 | #define login_full_usage "\n\n" \ |
2576 | "Begin a new session on the system\n" \ |
2577 | "\n -f Don't authenticate (user already authenticated)" \ |
2578 | "\n -h HOST Host user came from (for network logins)" \ |
2579 | "\n -p Preserve environment" \ |
2580 | |
2581 | #define passwd_trivial_usage \ |
2582 | "[OPTIONS] [USER]" \ |
2583 | |
2584 | #define passwd_full_usage "\n\n" \ |
2585 | "Change USER's password (default: current user)" \ |
2586 | "\n" \ |
2587 | "\n -a ALG Encryption method" \ |
2588 | "\n -d Set password to ''" \ |
2589 | "\n -l Lock (disable) account" \ |
2590 | "\n -u Unlock (enable) account" \ |
2591 | |
2592 | #define su_trivial_usage \ |
2593 | "[-lmp] [-] [-s SH] [USER [SCRIPT ARGS / -c 'CMD' ARG0 ARGS]]" \ |
2594 | |
2595 | #define su_full_usage "\n\n" \ |
2596 | "Run shell under USER (by default, root)\n" \ |
2597 | "\n -,-l Clear environment, go to home dir, run shell as login shell" \ |
2598 | "\n -p,-m Do not set new $HOME, $SHELL, $USER, $LOGNAME" \ |
2599 | "\n -c CMD Command to pass to 'sh -c'" \ |
2600 | "\n -s SH Shell to use instead of user's default" \ |
2601 | |
2602 | #define sulogin_trivial_usage \ |
2603 | "[-t N] [TTY]" \ |
2604 | |
2605 | #define sulogin_full_usage "\n\n" \ |
2606 | "Single user login\n" \ |
2607 | "\n -t N Timeout" \ |
2608 | |
2609 | #define vlock_trivial_usage \ |
2610 | "[-a]" \ |
2611 | |
2612 | #define vlock_full_usage "\n\n" \ |
2613 | "Lock a virtual terminal. A password is required to unlock.\n" \ |
2614 | "\n -a Lock all VTs" \ |
2615 | |
2616 | #define makemime_trivial_usage \ |
2617 | "[OPTIONS] [FILE]..." \ |
2618 | |
2619 | #define makemime_full_usage "\n\n" \ |
2620 | "Create multipart MIME-encoded message from FILEs\n" \ |
2621 | "\n -o FILE Output. Default: stdout" \ |
2622 | "\n -a HDR Add header(s). Examples:" \ |
2623 | "\n \"From: user@host.org\", \"Date: `date -R`\"" \ |
2624 | "\n -c CT Content type. Default: application/octet-stream" \ |
2625 | "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET \ |
2626 | "\n" \ |
2627 | "\nOther options are silently ignored" \ |
2628 | |
2629 | #define popmaildir_trivial_usage \ |
2630 | "[OPTIONS] MAILDIR [CONN_HELPER ARGS]" \ |
2631 | |
2632 | #define popmaildir_full_usage "\n\n" \ |
2633 | "Fetch content of remote mailbox to local maildir\n" \ |
2634 | "\n -s Skip authorization" \ |
2635 | "\n -T Get messages with TOP instead of RETR" \ |
2636 | "\n -k Keep retrieved messages on the server" \ |
2637 | "\n -t SEC Network timeout" \ |
2638 | IF_FEATURE_POPMAILDIR_DELIVERY( \ |
2639 | "\n -F \"PROG ARGS\" Filter program (may be repeated)" \ |
2640 | "\n -M \"PROG ARGS\" Delivery program" \ |
2641 | ) \ |
2642 | "\n" \ |
2643 | "\nFetch from plain POP3 server:" \ |
2644 | "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt" \ |
2645 | "\nFetch from SSLed POP3 server and delete fetched emails:" \ |
2646 | "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt" \ |
2647 | |
2648 | #define popmaildir_example_usage \ |
2649 | "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \ |
2650 | "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n" \ |
2651 | |
2652 | #define reformime_trivial_usage \ |
2653 | "[OPTIONS]" \ |
2654 | |
2655 | #define reformime_full_usage "\n\n" \ |
2656 | "Parse MIME-encoded message on stdin\n" \ |
2657 | "\n -x PREFIX Extract content of MIME sections to files" \ |
2658 | "\n -X PROG ARGS Filter content of MIME sections through PROG" \ |
2659 | "\n Must be the last option" \ |
2660 | "\n" \ |
2661 | "\nOther options are silently ignored" \ |
2662 | |
2663 | #define sendmail_trivial_usage \ |
2664 | "[-tv] [-f SENDER] [-amLOGIN 4<user_pass.txt | -auUSER -apPASS]" \ |
2665 | "\n [-w SECS] [-H 'PROG ARGS' | -S HOST] [RECIPIENT_EMAIL]..." \ |
2666 | |
2667 | #define sendmail_full_usage "\n\n" \ |
2668 | "Read email from stdin and send it\n" \ |
2669 | "\nStandard options:" \ |
2670 | "\n -t Read additional recipients from message body" \ |
2671 | "\n -f SENDER For use in MAIL FROM:<sender>. Can be empty string" \ |
2672 | "\n Default: -auUSER, or username of current UID" \ |
2673 | "\n -o OPTIONS Various options. -oi implied, others are ignored" \ |
2674 | "\n -i -oi synonym, implied and ignored" \ |
2675 | "\n" \ |
2676 | "\nBusybox specific options:" \ |
2677 | "\n -v Verbose" \ |
2678 | "\n -w SECS Network timeout" \ |
2679 | "\n -H 'PROG ARGS' Run connection helper. Examples:" \ |
2680 | "\n openssl s_client -quiet -tls1 -starttls smtp -connect smtp.gmail.com:25" \ |
2681 | "\n openssl s_client -quiet -tls1 -connect smtp.gmail.com:465" \ |
2682 | "\n $SMTP_ANTISPAM_DELAY: seconds to wait after helper connect" \ |
2683 | "\n -S HOST[:PORT] Server (default $SMTPHOST or 127.0.0.1)" \ |
2684 | "\n -amLOGIN Log in using AUTH LOGIN (-amCRAM-MD5 not supported)" \ |
2685 | "\n -auUSER Username for AUTH" \ |
2686 | "\n -apPASS Password for AUTH" \ |
2687 | "\n" \ |
2688 | "\nIf no -a options are given, authentication is not done." \ |
2689 | "\nIf -amLOGIN is given but no -au/-ap, user/password is read from fd #4." \ |
2690 | "\nOther options are silently ignored; -oi is implied." \ |
2691 | IF_MAKEMIME( \ |
2692 | "\nUse makemime to create emails with attachments." \ |
2693 | ) \ |
2694 | |
2695 | #define adjtimex_trivial_usage \ |
2696 | "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" \ |
2697 | |
2698 | #define adjtimex_full_usage "\n\n" \ |
2699 | "Read or set kernel time variables. See adjtimex(2)\n" \ |
2700 | "\n -q Quiet" \ |
2701 | "\n -o OFF Time offset, microseconds" \ |
2702 | "\n -f FREQ Frequency adjust, integer kernel units (65536 is 1ppm)" \ |
2703 | "\n -t TICK Microseconds per tick, usually 10000" \ |
2704 | "\n (positive -t or -f values make clock run faster)" \ |
2705 | "\n -p TCONST" \ |
2706 | |
2707 | #define bbconfig_trivial_usage \ |
2708 | "" \ |
2709 | |
2710 | #define bbconfig_full_usage "\n\n" \ |
2711 | "Print the config file used by busybox build" \ |
2712 | |
2713 | #define beep_trivial_usage \ |
2714 | "-f FREQ -l LEN -d DELAY -r COUNT -n" \ |
2715 | |
2716 | #define beep_full_usage "\n\n" \ |
2717 | " -f Frequency in Hz" \ |
2718 | "\n -l Length in ms" \ |
2719 | "\n -d Delay in ms" \ |
2720 | "\n -r Repetitions" \ |
2721 | "\n -n Start new tone" \ |
2722 | |
2723 | #define chat_trivial_usage \ |
2724 | "EXPECT [SEND [EXPECT [SEND...]]]" \ |
2725 | |
2726 | #define chat_full_usage "\n\n" \ |
2727 | "Useful for interacting with a modem connected to stdin/stdout.\n" \ |
2728 | "A script consists of one or more \"expect-send\" pairs of strings,\n" \ |
2729 | "each pair is a pair of arguments. Example:\n" \ |
2730 | "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \ |
2731 | |
2732 | #define chrt_trivial_usage \ |
2733 | "[-prfom] [PRIO] [PID | PROG ARGS]" \ |
2734 | |
2735 | #define chrt_full_usage "\n\n" \ |
2736 | "Change scheduling priority and class for a process\n" \ |
2737 | "\n -p Operate on PID" \ |
2738 | "\n -r Set SCHED_RR class" \ |
2739 | "\n -f Set SCHED_FIFO class" \ |
2740 | "\n -o Set SCHED_OTHER class" \ |
2741 | "\n -m Show min/max priorities" \ |
2742 | |
2743 | #define chrt_example_usage \ |
2744 | "$ chrt -r 4 sleep 900; x=$!\n" \ |
2745 | "$ chrt -f -p 3 $x\n" \ |
2746 | "You need CAP_SYS_NICE privileges to set scheduling attributes of a process" \ |
2747 | |
2748 | #define conspy_trivial_usage \ |
2749 | "[-vcsndfFQ] [-x COL] [-y LINE] [CONSOLE_NO]" \ |
2750 | |
2751 | #define conspy_full_usage "\n\n" \ |
2752 | "A text-mode VNC like program for Linux virtual consoles." \ |
2753 | "\nTo exit, quickly press ESC 3 times." \ |
2754 | "\n" \ |
2755 | "\n -v Don't send keystrokes to the console" \ |
2756 | "\n -c Create missing /dev/{tty,vcsa}N" \ |
2757 | "\n -s Open a SHELL session" \ |
2758 | "\n -n Black & white" \ |
2759 | "\n -d Dump console to stdout" \ |
2760 | "\n -f Follow cursor" \ |
2761 | "\n -F Assume console is on a framebuffer device" \ |
2762 | "\n -Q Disable exit on ESC-ESC-ESC" \ |
2763 | "\n -x COL Starting column" \ |
2764 | "\n -y LINE Starting line" \ |
2765 | |
2766 | #define crond_trivial_usage \ |
2767 | "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" \ |
2768 | |
2769 | #define crond_full_usage "\n\n" \ |
2770 | " -f Foreground" \ |
2771 | "\n -b Background (default)" \ |
2772 | "\n -S Log to syslog (default)" \ |
2773 | "\n -l N Set log level. Most verbose:0, default:8" \ |
2774 | IF_FEATURE_CROND_D( \ |
2775 | "\n -d N Set log level, log to stderr" \ |
2776 | ) \ |
2777 | "\n -L FILE Log to FILE" \ |
2778 | "\n -c DIR Cron dir. Default:"CONFIG_FEATURE_CROND_DIR"/crontabs" \ |
2779 | |
2780 | #define crontab_trivial_usage \ |
2781 | "[-c DIR] [-u USER] [-ler]|[FILE]" \ |
2782 | |
2783 | #define crontab_full_usage "\n\n" \ |
2784 | " -c Crontab directory" \ |
2785 | "\n -u User" \ |
2786 | "\n -l List crontab" \ |
2787 | "\n -e Edit crontab" \ |
2788 | "\n -r Delete crontab" \ |
2789 | "\n FILE Replace crontab by FILE ('-': stdin)" \ |
2790 | |
2791 | #define dc_trivial_usage \ |
2792 | "EXPRESSION..." \ |
2793 | |
2794 | #define dc_full_usage "\n\n" \ |
2795 | "Tiny RPN calculator. Operations:\n" \ |
2796 | "+, add, -, sub, *, mul, /, div, %, mod, "IF_FEATURE_DC_LIBM("**, exp, ")"and, or, not, xor,\n" \ |
2797 | "p - print top of the stack (without popping),\n" \ |
2798 | "f - print entire stack,\n" \ |
2799 | "o - pop the value and set output radix (must be 10, 16, 8 or 2).\n" \ |
2800 | "Examples: 'dc 2 2 add p' -> 4, 'dc 8 8 mul 2 2 + / p' -> 16" \ |
2801 | |
2802 | #define dc_example_usage \ |
2803 | "$ dc 2 2 + p\n" \ |
2804 | "4\n" \ |
2805 | "$ dc 8 8 \\* 2 2 + / p\n" \ |
2806 | "16\n" \ |
2807 | "$ dc 0 1 and p\n" \ |
2808 | "0\n" \ |
2809 | "$ dc 0 1 or p\n" \ |
2810 | "1\n" \ |
2811 | "$ echo 72 9 div 8 mul p | dc\n" \ |
2812 | "64\n" \ |
2813 | |
2814 | #define devfsd_trivial_usage \ |
2815 | "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") \ |
2816 | |
2817 | #define devfsd_full_usage "\n\n" \ |
2818 | "Manage devfs permissions and old device name symlinks\n" \ |
2819 | "\n mntpnt The mount point where devfs is mounted" \ |
2820 | "\n -v Print the protocol version numbers for devfsd" \ |
2821 | "\n and the kernel-side protocol version and exit" \ |
2822 | IF_DEVFSD_FG_NP( \ |
2823 | "\n -fg Run in foreground" \ |
2824 | "\n -np Exit after parsing the configuration file" \ |
2825 | "\n and processing synthetic REGISTER events," \ |
2826 | "\n don't poll for events" \ |
2827 | ) \ |
2828 | |
2829 | #define devmem_trivial_usage \ |
2830 | "ADDRESS [WIDTH [VALUE]]" \ |
2831 | |
2832 | #define devmem_full_usage "\n\n" \ |
2833 | "Read/write from physical address\n" \ |
2834 | "\n ADDRESS Address to act upon" \ |
2835 | "\n WIDTH Width (8/16/...)" \ |
2836 | "\n VALUE Data to be written" \ |
2837 | |
2838 | #define eject_trivial_usage \ |
2839 | "[-t] [-T] [DEVICE]" \ |
2840 | |
2841 | #define eject_full_usage "\n\n" \ |
2842 | "Eject DEVICE or default /dev/cdrom\n" \ |
2843 | IF_FEATURE_EJECT_SCSI( \ |
2844 | "\n -s SCSI device" \ |
2845 | ) \ |
2846 | "\n -t Close tray" \ |
2847 | "\n -T Open/close tray (toggle)" \ |
2848 | |
2849 | #define fbsplash_trivial_usage \ |
2850 | "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" \ |
2851 | |
2852 | #define fbsplash_full_usage "\n\n" \ |
2853 | " -s Image" \ |
2854 | "\n -c Hide cursor" \ |
2855 | "\n -d Framebuffer device (default /dev/fb0)" \ |
2856 | "\n -i Config file (var=value):" \ |
2857 | "\n BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT" \ |
2858 | "\n BAR_R,BAR_G,BAR_B" \ |
2859 | "\n -f Control pipe (else exit after drawing image)" \ |
2860 | "\n commands: 'NN' (% for progress bar) or 'exit'" \ |
2861 | |
2862 | #define flash_eraseall_trivial_usage \ |
2863 | "[-jNq] MTD_DEVICE" \ |
2864 | |
2865 | #define flash_eraseall_full_usage "\n\n" \ |
2866 | "Erase an MTD device\n" \ |
2867 | "\n -j Format the device for jffs2" \ |
2868 | "\n -N Don't skip bad blocks" \ |
2869 | "\n -q Don't display progress messages" \ |
2870 | |
2871 | #define flash_lock_trivial_usage \ |
2872 | "MTD_DEVICE OFFSET SECTORS" \ |
2873 | |
2874 | #define flash_lock_full_usage "\n\n" \ |
2875 | "Lock part or all of an MTD device. If SECTORS is -1, then all sectors\n" \ |
2876 | "will be locked, regardless of the value of OFFSET" \ |
2877 | |
2878 | #define flash_unlock_trivial_usage \ |
2879 | "MTD_DEVICE" \ |
2880 | |
2881 | #define flash_unlock_full_usage "\n\n" \ |
2882 | "Unlock an MTD device" \ |
2883 | |
2884 | #define flashcp_trivial_usage \ |
2885 | "-v FILE MTD_DEVICE" \ |
2886 | |
2887 | #define flashcp_full_usage "\n\n" \ |
2888 | "Copy an image to MTD device\n" \ |
2889 | "\n -v Verbose" \ |
2890 | |
2891 | #define hdparm_trivial_usage \ |
2892 | "[OPTIONS] [DEVICE]" \ |
2893 | |
2894 | #define hdparm_full_usage "\n\n" \ |
2895 | " -a Get/set fs readahead" \ |
2896 | "\n -A Set drive read-lookahead flag (0/1)" \ |
2897 | "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)" \ |
2898 | "\n -B Set Advanced Power Management setting (1-255)" \ |
2899 | "\n -c Get/set IDE 32-bit IO setting" \ |
2900 | "\n -C Check IDE power mode status" \ |
2901 | IF_FEATURE_HDPARM_HDIO_GETSET_DMA( \ |
2902 | "\n -d Get/set using_dma flag") \ |
2903 | "\n -D Enable/disable drive defect-mgmt" \ |
2904 | "\n -f Flush buffer cache for device on exit" \ |
2905 | "\n -g Display drive geometry" \ |
2906 | "\n -h Display terse usage information" \ |
2907 | IF_FEATURE_HDPARM_GET_IDENTITY( \ |
2908 | "\n -i Display drive identification") \ |
2909 | IF_FEATURE_HDPARM_GET_IDENTITY( \ |
2910 | "\n -I Detailed/current information directly from drive") \ |
2911 | "\n -k Get/set keep_settings_over_reset flag (0/1)" \ |
2912 | "\n -K Set drive keep_features_over_reset flag (0/1)" \ |
2913 | "\n -L Set drive doorlock (0/1) (removable harddisks only)" \ |
2914 | "\n -m Get/set multiple sector count" \ |
2915 | "\n -n Get/set ignore-write-errors flag (0/1)" \ |
2916 | "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \ |
2917 | "\n -P Set drive prefetch count" \ |
2918 | "\n -Q Get/set DMA tagged-queuing depth (if supported)" \ |
2919 | "\n -r Get/set readonly flag (DANGEROUS to set)" \ |
2920 | IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( \ |
2921 | "\n -R Register an IDE interface (DANGEROUS)") \ |
2922 | "\n -S Set standby (spindown) timeout" \ |
2923 | "\n -t Perform device read timings" \ |
2924 | "\n -T Perform cache read timings" \ |
2925 | "\n -u Get/set unmaskirq flag (0/1)" \ |
2926 | IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \ |
2927 | "\n -U Unregister an IDE interface (DANGEROUS)") \ |
2928 | "\n -v Defaults; same as -mcudkrag for IDE drives" \ |
2929 | "\n -V Display program version and exit immediately" \ |
2930 | IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( \ |
2931 | "\n -w Perform device reset (DANGEROUS)") \ |
2932 | "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \ |
2933 | IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \ |
2934 | "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \ |
2935 | "\n -X Set IDE xfer mode (DANGEROUS)" \ |
2936 | "\n -y Put IDE drive in standby mode" \ |
2937 | "\n -Y Put IDE drive to sleep" \ |
2938 | "\n -Z Disable Seagate auto-powersaving mode" \ |
2939 | "\n -z Reread partition table" \ |
2940 | |
2941 | #define i2cget_trivial_usage \ |
2942 | "[-f] [-y] BUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]" \ |
2943 | |
2944 | #define i2cget_full_usage "\n\n" \ |
2945 | "Read from I2C/SMBus chip registers\n" \ |
2946 | "\n I2CBUS i2c bus number" \ |
2947 | "\n ADDRESS 0x03 - 0x77" \ |
2948 | "\nMODE is:" \ |
2949 | "\n b read byte data (default)" \ |
2950 | "\n w read word data" \ |
2951 | "\n c write byte/read byte" \ |
2952 | "\n Append p for SMBus PEC" \ |
2953 | "\n" \ |
2954 | "\n -f force access" \ |
2955 | "\n -y disable interactive mode" \ |
2956 | |
2957 | #define i2cset_trivial_usage \ |
2958 | "[-f] [-y] [-m MASK] BUS CHIP-ADDR DATA-ADDR [VALUE] ... [MODE]" \ |
2959 | |
2960 | #define i2cset_full_usage "\n\n" \ |
2961 | "Set I2C registers\n" \ |
2962 | "\n I2CBUS i2c bus number" \ |
2963 | "\n ADDRESS 0x03 - 0x77" \ |
2964 | "\nMODE is:" \ |
2965 | "\n c byte, no value" \ |
2966 | "\n b byte data (default)" \ |
2967 | "\n w word data" \ |
2968 | "\n i I2C block data" \ |
2969 | "\n s SMBus block data" \ |
2970 | "\n Append p for SMBus PEC" \ |
2971 | "\n" \ |
2972 | "\n -f force access" \ |
2973 | "\n -y disable interactive mode" \ |
2974 | "\n -r read back and compare the result" \ |
2975 | "\n -m MASK mask specifying which bits to write" \ |
2976 | |
2977 | #define i2cdump_trivial_usage \ |
2978 | "[-f] [-r FIRST-LAST] [-y] BUS ADDR [MODE]" \ |
2979 | |
2980 | #define i2cdump_full_usage "\n\n" \ |
2981 | "Examine I2C registers\n" \ |
2982 | "\n I2CBUS i2c bus number" \ |
2983 | "\n ADDRESS 0x03 - 0x77" \ |
2984 | "\nMODE is:" \ |
2985 | "\n b byte (default)" \ |
2986 | "\n w word" \ |
2987 | "\n W word on even register addresses" \ |
2988 | "\n i I2C block" \ |
2989 | "\n s SMBus block" \ |
2990 | "\n c consecutive byte" \ |
2991 | "\n Append p for SMBus PEC" \ |
2992 | "\n" \ |
2993 | "\n -f force access" \ |
2994 | "\n -y disable interactive mode" \ |
2995 | "\n -r limit the number of registers being accessed" \ |
2996 | |
2997 | #define i2cdetect_trivial_usage \ |
2998 | "[-F I2CBUS] [-l] [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]" \ |
2999 | |
3000 | #define i2cdetect_full_usage "\n\n" \ |
3001 | "Detect I2C chips.\n" \ |
3002 | "\n I2CBUS i2c bus number" \ |
3003 | "\n FIRST and LAST limit the probing range" \ |
3004 | "\n" \ |
3005 | "\n -l output list of installed busses" \ |
3006 | "\n -y disable interactive mode" \ |
3007 | "\n -a force scanning of non-regular addresses" \ |
3008 | "\n -q use smbus quick write commands for probing (default)" \ |
3009 | "\n -r use smbus read byte commands for probing" \ |
3010 | "\n -F display list of functionalities" \ |
3011 | |
3012 | #define inotifyd_trivial_usage \ |
3013 | "PROG FILE1[:MASK]..." \ |
3014 | |
3015 | #define inotifyd_full_usage "\n\n" \ |
3016 | "Run PROG on filesystem changes." \ |
3017 | "\nWhen a filesystem event matching MASK occurs on FILEn," \ |
3018 | "\nPROG ACTUAL_EVENTS FILEn [SUBFILE] is run." \ |
3019 | "\nIf PROG is -, events are sent to stdout." \ |
3020 | "\nEvents:" \ |
3021 | "\n a File is accessed" \ |
3022 | "\n c File is modified" \ |
3023 | "\n e Metadata changed" \ |
3024 | "\n w Writable file is closed" \ |
3025 | "\n 0 Unwritable file is closed" \ |
3026 | "\n r File is opened" \ |
3027 | "\n D File is deleted" \ |
3028 | "\n M File is moved" \ |
3029 | "\n u Backing fs is unmounted" \ |
3030 | "\n o Event queue overflowed" \ |
3031 | "\n x File can't be watched anymore" \ |
3032 | "\nIf watching a directory:" \ |
3033 | "\n y Subfile is moved into dir" \ |
3034 | "\n m Subfile is moved out of dir" \ |
3035 | "\n n Subfile is created" \ |
3036 | "\n d Subfile is deleted" \ |
3037 | "\n" \ |
3038 | "\ninotifyd waits for PROG to exit." \ |
3039 | "\nWhen x event happens for all FILEs, inotifyd exits." \ |
3040 | |
3041 | #define ionice_trivial_usage \ |
3042 | "[-c 1-3] [-n 0-7] [-p PID] [PROG]" \ |
3043 | |
3044 | #define ionice_full_usage "\n\n" \ |
3045 | "Change I/O priority and class\n" \ |
3046 | "\n -c Class. 1:realtime 2:best-effort 3:idle" \ |
3047 | "\n -n Priority" \ |
3048 | |
3049 | #define last_trivial_usage \ |
3050 | ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") \ |
3051 | |
3052 | #define last_full_usage "\n\n" \ |
3053 | "Show listing of the last users that logged into the system" \ |
3054 | IF_FEATURE_LAST_FANCY( "\n" \ |
3055 | "\n -W Display with no host column truncation" \ |
3056 | "\n -f FILE Read from FILE instead of /var/log/wtmp" \ |
3057 | ) \ |
3058 | |
3059 | #define less_trivial_usage \ |
3060 | "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") \ |
3061 | "N" IF_FEATURE_LESS_TRUNCATE("S") "h~] [FILE]..." \ |
3062 | |
3063 | #define less_full_usage "\n\n" \ |
3064 | "View FILE (or stdin) one screenful at a time\n" \ |
3065 | "\n -E Quit once the end of a file is reached" \ |
3066 | IF_FEATURE_LESS_REGEXP( \ |
3067 | "\n -I Ignore case in all searches" \ |
3068 | ) \ |
3069 | IF_FEATURE_LESS_FLAGS( \ |
3070 | "\n -M,-m Display status line with line numbers" \ |
3071 | "\n and percentage through the file" \ |
3072 | ) \ |
3073 | "\n -N Prefix line number to each line" \ |
3074 | IF_FEATURE_LESS_TRUNCATE( \ |
3075 | "\n -S Truncate long lines" \ |
3076 | ) \ |
3077 | "\n -~ Suppress ~s displayed past EOF" \ |
3078 | |
3079 | #if ENABLE_FEATURE_MAKEDEVS_LEAF \ |
3080 | |
3081 | #define makedevs_trivial_usage \ |
3082 | "NAME TYPE MAJOR MINOR FIRST LAST [s]" \ |
3083 | |
3084 | #define makedevs_full_usage "\n\n" \ |
3085 | "Create a range of block or character special files" \ |
3086 | "\n" \ |
3087 | "\nTYPE is:" \ |
3088 | "\n b Block device" \ |
3089 | "\n c Character device" \ |
3090 | "\n f FIFO, MAJOR and MINOR are ignored" \ |
3091 | "\n" \ |
3092 | "\nFIRST..LAST specify numbers appended to NAME." \ |
3093 | "\nIf 's' is the last argument, the base device is created as well." \ |
3094 | "\n" \ |
3095 | "\nExamples:" \ |
3096 | "\n makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63" \ |
3097 | "\n makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8" \ |
3098 | |
3099 | #define makedevs_example_usage \ |
3100 | "# makedevs /dev/ttyS c 4 66 2 63\n" \ |
3101 | "[creates ttyS2-ttyS63]\n" \ |
3102 | "# makedevs /dev/hda b 3 0 0 8 s\n" \ |
3103 | "[creates hda,hda1-hda8]\n" \ |
3104 | |
3105 | #endif \ |
3106 | |
3107 | #if ENABLE_FEATURE_MAKEDEVS_TABLE \ |
3108 | |
3109 | #define makedevs_trivial_usage \ |
3110 | "[-d device_table] rootdir" \ |
3111 | |
3112 | #define makedevs_full_usage "\n\n" \ |
3113 | "Create a range of special files as specified in a device table.\n" \ |
3114 | "Device table entries take the form of:\n" \ |
3115 | "<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \ |
3116 | "Where name is the file name, type can be one of:\n" \ |
3117 | " f Regular file\n" \ |
3118 | " d Directory\n" \ |
3119 | " c Character device\n" \ |
3120 | " b Block device\n" \ |
3121 | " p Fifo (named pipe)\n" \ |
3122 | "uid is the user id for the target file, gid is the group id for the\n" \ |
3123 | "target file. The rest of the entries (major, minor, etc) apply to\n" \ |
3124 | "to device special files. A '-' may be used for blank entries." \ |
3125 | |
3126 | #define makedevs_example_usage \ |
3127 | "For example:\n" \ |
3128 | "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \ |
3129 | "/dev d 755 0 0 - - - - -\n" \ |
3130 | "/dev/console c 666 0 0 5 1 - - -\n" \ |
3131 | "/dev/null c 666 0 0 1 3 0 0 -\n" \ |
3132 | "/dev/zero c 666 0 0 1 5 0 0 -\n" \ |
3133 | "/dev/hda b 640 0 0 3 0 0 0 -\n" \ |
3134 | "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \ |
3135 | "Will Produce:\n" \ |
3136 | "/dev\n" \ |
3137 | "/dev/console\n" \ |
3138 | "/dev/null\n" \ |
3139 | "/dev/zero\n" \ |
3140 | "/dev/hda\n" \ |
3141 | "/dev/hda[0-15]\n" \ |
3142 | |
3143 | #endif \ |
3144 | |
3145 | #define man_trivial_usage \ |
3146 | "[-aw] [MANPAGE]..." \ |
3147 | |
3148 | #define man_full_usage "\n\n" \ |
3149 | "Format and display manual page\n" \ |
3150 | "\n -a Display all pages" \ |
3151 | "\n -w Show page locations" \ |
3152 | "\n" \ |
3153 | "\n$COLUMNS overrides output width" \ |
3154 | |
3155 | #define microcom_trivial_usage \ |
3156 | "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" \ |
3157 | |
3158 | #define microcom_full_usage "\n\n" \ |
3159 | "Copy bytes for stdin to TTY and from TTY to stdout\n" \ |
3160 | "\n -d Wait up to DELAY ms for TTY output before sending every" \ |
3161 | "\n next byte to it" \ |
3162 | "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \ |
3163 | "\n -s Set serial line to SPEED" \ |
3164 | "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \ |
3165 | |
3166 | #define mountpoint_trivial_usage \ |
3167 | "[-q] <[-dn] DIR | -x DEVICE>" \ |
3168 | |
3169 | #define mountpoint_full_usage "\n\n" \ |
3170 | "Check if the directory is a mountpoint\n" \ |
3171 | "\n -q Quiet" \ |
3172 | "\n -d Print major/minor device number of the filesystem" \ |
3173 | "\n -n Print device name of the filesystem" \ |
3174 | "\n -x Print major/minor device number of the blockdevice" \ |
3175 | |
3176 | #define mountpoint_example_usage \ |
3177 | "$ mountpoint /proc\n" \ |
3178 | "/proc is not a mountpoint\n" \ |
3179 | "$ mountpoint /sys\n" \ |
3180 | "/sys is a mountpoint\n" \ |
3181 | |
3182 | #define mt_trivial_usage \ |
3183 | "[-f device] opcode value" \ |
3184 | |
3185 | #define mt_full_usage "\n\n" \ |
3186 | "Control magnetic tape drive operation\n" \ |
3187 | "\n" \ |
3188 | "Available Opcodes:\n" \ |
3189 | "\n" \ |
3190 | "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \ |
3191 | "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \ |
3192 | "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ |
3193 | "setpart tell unload unlock weof wset" \ |
3194 | |
3195 | #define nandwrite_trivial_usage \ |
3196 | "[-np] [-s ADDR] MTD_DEVICE [FILE]" \ |
3197 | |
3198 | #define nandwrite_full_usage "\n\n" \ |
3199 | "Write to MTD_DEVICE\n" \ |
3200 | "\n -n Write without ecc" \ |
3201 | "\n -p Pad to page size" \ |
3202 | "\n -s ADDR Start address" \ |
3203 | |
3204 | #define nanddump_trivial_usage \ |
3205 | "[-no]" IF_LONG_OPTS(" [--bb=padbad|skipbad]") " [-s ADDR] [-l LEN] [-f FILE] MTD_DEVICE" \ |
3206 | |
3207 | #define nanddump_full_usage "\n\n" \ |
3208 | "Dump MTD_DEVICE\n" \ |
3209 | "\n -n Read without ecc" \ |
3210 | "\n -o Dump oob data" \ |
3211 | "\n -s ADDR Start address" \ |
3212 | "\n -l LEN Length" \ |
3213 | "\n -f FILE Dump to file ('-' for stdout)" \ |
3214 | IF_LONG_OPTS( \ |
3215 | "\n --bb=METHOD:" \ |
3216 | "\n skipbad: skip bad blocks" \ |
3217 | "\n padbad: substitute bad blocks by 0xff (default)" \ |
3218 | ) \ |
3219 | |
3220 | #define raidautorun_trivial_usage \ |
3221 | "DEVICE" \ |
3222 | |
3223 | #define raidautorun_full_usage "\n\n" \ |
3224 | "Tell the kernel to automatically search and start RAID arrays" \ |
3225 | |
3226 | #define raidautorun_example_usage \ |
3227 | "$ raidautorun /dev/md0" \ |
3228 | |
3229 | #define readahead_trivial_usage \ |
3230 | "[FILE]..." \ |
3231 | |
3232 | #define readahead_full_usage "\n\n" \ |
3233 | "Preload FILEs to RAM" \ |
3234 | |
3235 | #define rfkill_trivial_usage \ |
3236 | "COMMAND [INDEX|TYPE]" \ |
3237 | |
3238 | #define rfkill_full_usage "\n\n" \ |
3239 | "Enable/disable wireless devices\n" \ |
3240 | "\nCommands:" \ |
3241 | "\n list [INDEX|TYPE] List current state" \ |
3242 | "\n block INDEX|TYPE Disable device" \ |
3243 | "\n unblock INDEX|TYPE Enable device" \ |
3244 | "\n" \ |
3245 | "\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \ |
3246 | "\n wimax, wwan, gps, fm" \ |
3247 | |
3248 | #define runlevel_trivial_usage \ |
3249 | "[FILE]" \ |
3250 | |
3251 | #define runlevel_full_usage "\n\n" \ |
3252 | "Find the current and previous system runlevel\n" \ |
3253 | "\n" \ |
3254 | "If no utmp FILE exists or if no runlevel record can be found,\n" \ |
3255 | "print \"unknown\"" \ |
3256 | |
3257 | #define runlevel_example_usage \ |
3258 | "$ runlevel /var/run/utmp\n" \ |
3259 | "N 2" \ |
3260 | |
3261 | #define rx_trivial_usage \ |
3262 | "FILE" \ |
3263 | |
3264 | #define rx_full_usage "\n\n" \ |
3265 | "Receive a file using the xmodem protocol" \ |
3266 | |
3267 | #define rx_example_usage \ |
3268 | "$ rx /tmp/foo\n" \ |
3269 | |
3270 | #define setserial_trivial_usage \ |
3271 | "[-gabGvzV] DEVICE [PARAMETER [ARG]]..." \ |
3272 | |
3273 | #define setserial_full_usage "\n\n" \ |
3274 | "Request or set Linux serial port information\n" \ |
3275 | "\n" \ |
3276 | " -g Interpret parameters as list of devices for reporting\n" \ |
3277 | " -a Print all available information\n" \ |
3278 | " -b Print summary information\n" \ |
3279 | " -G Print in form which can be fed back\n" \ |
3280 | " to setserial as command line parameters\n" \ |
3281 | " -z Zero out serial flags before setting\n" \ |
3282 | " -v Verbose\n" \ |
3283 | "\n" \ |
3284 | "Parameters: (* = takes an argument, ^ = can be turned off by preceding ^)\n" \ |
3285 | " *port, *irq, *divisor, *uart, *baud_base, *close_delay, *closing_wait,\n" \ |
3286 | " ^fourport, ^auto_irq, ^skip_test, ^sak, ^session_lockout, ^pgrp_lockout,\n" \ |
3287 | " ^callout_nohup, ^split_termios, ^hup_notify, ^low_latency, autoconfig,\n" \ |
3288 | " spd_normal, spd_hi, spd_vhi, spd_shi, spd_warp, spd_cust\n" \ |
3289 | "\n" \ |
3290 | "UART types:\n" \ |
3291 | " unknown, 8250, 16450, 16550, 16550A, Cirrus, 16650, 16650V2, 16750,\n" \ |
3292 | " 16950, 16954, 16654, 16850, RSA, NS16550A, XSCALE, RM9000, OCTEON, AR7,\n" \ |
3293 | " U6_16550A" \ |
3294 | |
3295 | #define setsid_trivial_usage \ |
3296 | "[-c] PROG ARGS" \ |
3297 | |
3298 | #define setsid_full_usage "\n\n" \ |
3299 | "Run PROG in a new session. PROG will have no controlling terminal\n" \ |
3300 | "and will not be affected by keyboard signals (^C etc).\n" \ |
3301 | "\n -c Set controlling terminal to stdin" \ |
3302 | |
3303 | #define strings_trivial_usage \ |
3304 | "[-fo] [-t o/d/x] [-n LEN] [FILE]..." \ |
3305 | |
3306 | #define strings_full_usage "\n\n" \ |
3307 | "Display printable strings in a binary file\n" \ |
3308 | "\n -f Precede strings with filenames" \ |
3309 | "\n -o Precede strings with octal offsets" \ |
3310 | "\n -t o/d/x Precede strings with offsets in base 8/10/16" \ |
3311 | "\n -n LEN At least LEN characters form a string (default 4)" \ |
3312 | |
3313 | #define taskset_trivial_usage \ |
3314 | "[-p] [MASK] [PID | PROG ARGS]" \ |
3315 | |
3316 | #define taskset_full_usage "\n\n" \ |
3317 | "Set or get CPU affinity\n" \ |
3318 | "\n -p Operate on an existing PID" \ |
3319 | |
3320 | #define taskset_example_usage \ |
3321 | "$ taskset 0x7 ./dgemm_test&\n" \ |
3322 | "$ taskset -p 0x1 $!\n" \ |
3323 | "pid 4790's current affinity mask: 7\n" \ |
3324 | "pid 4790's new affinity mask: 1\n" \ |
3325 | "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \ |
3326 | "pid 6671's current affinity mask: 1\n" \ |
3327 | "pid 6671's new affinity mask: 1\n" \ |
3328 | "$ taskset -p 1\n" \ |
3329 | "pid 1's current affinity mask: 3\n" \ |
3330 | |
3331 | #define time_trivial_usage \ |
3332 | "[-v] PROG ARGS" \ |
3333 | |
3334 | #define time_full_usage "\n\n" \ |
3335 | "Run PROG, display resource usage when it exits\n" \ |
3336 | "\n -v Verbose" \ |
3337 | |
3338 | #define timeout_trivial_usage \ |
3339 | "[-t SECS] [-s SIG] PROG ARGS" \ |
3340 | |
3341 | #define timeout_full_usage "\n\n" \ |
3342 | "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \ |
3343 | "Defaults: SECS: 10, SIG: TERM." \ |
3344 | |
3345 | #define ttysize_trivial_usage \ |
3346 | "[w] [h]" \ |
3347 | |
3348 | #define ttysize_full_usage "\n\n" \ |
3349 | "Print dimension(s) of stdin's terminal, on error return 80x25" \ |
3350 | |
3351 | #define ubiattach_trivial_usage \ |
3352 | "-m MTD_NUM [-d UBI_NUM] [-O VID_HDR_OFF] UBI_CTRL_DEV" \ |
3353 | |
3354 | #define ubiattach_full_usage "\n\n" \ |
3355 | "Attach MTD device to UBI\n" \ |
3356 | "\n -m MTD_NUM MTD device number to attach" \ |
3357 | "\n -d UBI_NUM UBI device number to assign" \ |
3358 | "\n -O VID_HDR_OFF VID header offset" \ |
3359 | |
3360 | #define ubidetach_trivial_usage \ |
3361 | "-d UBI_NUM UBI_CTRL_DEV" \ |
3362 | |
3363 | #define ubidetach_full_usage "\n\n" \ |
3364 | "Detach MTD device from UBI\n" \ |
3365 | "\n -d UBI_NUM UBI device number" \ |
3366 | |
3367 | #define ubimkvol_trivial_usage \ |
3368 | "-N NAME [-s SIZE | -m] UBI_DEVICE" \ |
3369 | |
3370 | #define ubimkvol_full_usage "\n\n" \ |
3371 | "Create UBI volume\n" \ |
3372 | "\n -a ALIGNMENT Volume alignment (default 1)" \ |
3373 | "\n -m Set volume size to maximum available" \ |
3374 | "\n -n VOLID Volume ID. If not specified," \ |
3375 | "\n assigned automatically" \ |
3376 | "\n -N NAME Volume name" \ |
3377 | "\n -s SIZE Size in bytes" \ |
3378 | "\n -t TYPE Volume type (static|dynamic)" \ |
3379 | |
3380 | #define ubirmvol_trivial_usage \ |
3381 | "-n VOLID / -N VOLNAME UBI_DEVICE" \ |
3382 | |
3383 | #define ubirmvol_full_usage "\n\n" \ |
3384 | "Remove UBI volume\n" \ |
3385 | "\n -n VOLID Volume ID" \ |
3386 | "\n -N VOLNAME Volume name" \ |
3387 | |
3388 | #define ubirsvol_trivial_usage \ |
3389 | "-n VOLID -s SIZE UBI_DEVICE" \ |
3390 | |
3391 | #define ubirsvol_full_usage "\n\n" \ |
3392 | "Resize UBI volume\n" \ |
3393 | "\n -n VOLID Volume ID" \ |
3394 | "\n -s SIZE Size in bytes" \ |
3395 | |
3396 | #define ubiupdatevol_trivial_usage \ |
3397 | "[-t | [-s SIZE] IMG_FILE] UBI_DEVICE" \ |
3398 | |
3399 | #define ubiupdatevol_full_usage "\n\n" \ |
3400 | "Update UBI volume\n" \ |
3401 | "\n -t Truncate to zero size" \ |
3402 | "\n -s SIZE Size in bytes to resize to" \ |
3403 | |
3404 | #define ubirename_trivial_usage \ |
3405 | "UBI_DEVICE OLD_VOLNAME NEW_VOLNAME [OLD2 NEW2]..." \ |
3406 | |
3407 | #define ubirename_full_usage "\n\n" \ |
3408 | "Rename UBI volumes on UBI_DEVICE" \ |
3409 | |
3410 | #define volname_trivial_usage \ |
3411 | "[DEVICE]" \ |
3412 | |
3413 | #define volname_full_usage "\n\n" \ |
3414 | "Show CD volume name of the DEVICE (default /dev/cdrom)" \ |
3415 | |
3416 | #define wall_trivial_usage \ |
3417 | "[FILE]" \ |
3418 | |
3419 | #define wall_full_usage "\n\n" \ |
3420 | "Write content of FILE or stdin to all logged-in users" \ |
3421 | |
3422 | #define wall_sample_usage \ |
3423 | "echo foo | wall\n" \ |
3424 | "wall ./mymessage" \ |
3425 | |
3426 | #define watchdog_trivial_usage \ |
3427 | "[-t N[ms]] [-T N[ms]] [-F] DEV" \ |
3428 | |
3429 | #define watchdog_full_usage "\n\n" \ |
3430 | "Periodically write to watchdog device DEV\n" \ |
3431 | "\n -T N Reboot after N seconds if not reset (default 60)" \ |
3432 | "\n -t N Reset every N seconds (default 30)" \ |
3433 | "\n -F Run in foreground" \ |
3434 | "\n" \ |
3435 | "\nUse 500ms to specify period in milliseconds" \ |
3436 | |
3437 | #if !ENABLE_MODPROBE_SMALL \ |
3438 | |
3439 | #define depmod_trivial_usage "[-n] [-b BASE] [VERSION] [MODFILES]..." \ |
3440 | |
3441 | #define depmod_full_usage "\n\n" \ |
3442 | "Generate modules.dep, alias, and symbols files" \ |
3443 | "\n" \ |
3444 | "\n -b BASE Use BASE/lib/modules/VERSION" \ |
3445 | "\n -n Dry run: print files to stdout" \ |
3446 | |
3447 | #endif \ |
3448 | |
3449 | #if !ENABLE_MODPROBE_SMALL \ |
3450 | |
3451 | #define insmod_trivial_usage \ |
3452 | IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ") \ |
3453 | IF_NOT_FEATURE_2_4_MODULES("FILE ") \ |
3454 | "[SYMBOL=VALUE]..." \ |
3455 | |
3456 | #define insmod_full_usage "\n\n" \ |
3457 | "Load kernel module" \ |
3458 | IF_FEATURE_2_4_MODULES( "\n" \ |
3459 | "\n -f Force module to load into the wrong kernel version" \ |
3460 | "\n -k Make module autoclean-able" \ |
3461 | "\n -v Verbose" \ |
3462 | "\n -q Quiet" \ |
3463 | "\n -L Lock: prevent simultaneous loads" \ |
3464 | IF_FEATURE_INSMOD_LOAD_MAP( \ |
3465 | "\n -m Output load map to stdout" \ |
3466 | ) \ |
3467 | "\n -x Don't export externs" \ |
3468 | ) \ |
3469 | |
3470 | #endif \ |
3471 | |
3472 | #if !ENABLE_MODPROBE_SMALL \ |
3473 | |
3474 | #define lsmod_trivial_usage \ |
3475 | "" \ |
3476 | |
3477 | #define lsmod_full_usage "\n\n" \ |
3478 | "List the currently loaded kernel modules" \ |
3479 | |
3480 | #endif \ |
3481 | |
3482 | #define modinfo_trivial_usage \ |
3483 | "[-adlpn0] [-F keyword] MODULE" \ |
3484 | |
3485 | #define modinfo_full_usage "\n\n" \ |
3486 | " -a Shortcut for '-F author'" \ |
3487 | "\n -d Shortcut for '-F description'" \ |
3488 | "\n -l Shortcut for '-F license'" \ |
3489 | "\n -p Shortcut for '-F parm'" \ |
3490 | "\n -F keyword Keyword to look for" \ |
3491 | "\n -0 Separate output with NULs" \ |
3492 | |
3493 | #define modinfo_example_usage \ |
3494 | "$ modinfo -F vermagic loop\n" \ |
3495 | |
3496 | #if ENABLE_MODPROBE_SMALL \ |
3497 | |
3498 | #define depmod_trivial_usage NOUSAGE_STR \ |
3499 | |
3500 | #define depmod_full_usage "" \ |
3501 | |
3502 | #define lsmod_trivial_usage \ |
3503 | "" \ |
3504 | |
3505 | #define lsmod_full_usage "\n\n" \ |
3506 | "List the currently loaded kernel modules" \ |
3507 | |
3508 | #define insmod_trivial_usage \ |
3509 | IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ") \ |
3510 | IF_NOT_FEATURE_2_4_MODULES("FILE ") \ |
3511 | "[SYMBOL=VALUE]..." \ |
3512 | |
3513 | #define insmod_full_usage "\n\n" \ |
3514 | "Load kernel module" \ |
3515 | IF_FEATURE_2_4_MODULES( "\n" \ |
3516 | "\n -f Force module to load into the wrong kernel version" \ |
3517 | "\n -k Make module autoclean-able" \ |
3518 | "\n -v Verbose" \ |
3519 | "\n -q Quiet" \ |
3520 | "\n -L Lock: prevent simultaneous loads" \ |
3521 | IF_FEATURE_INSMOD_LOAD_MAP( \ |
3522 | "\n -m Output load map to stdout" \ |
3523 | ) \ |
3524 | "\n -x Don't export externs" \ |
3525 | ) \ |
3526 | |
3527 | #define rmmod_trivial_usage \ |
3528 | "[-wfa] [MODULE]..." \ |
3529 | |
3530 | #define rmmod_full_usage "\n\n" \ |
3531 | "Unload kernel modules\n" \ |
3532 | "\n -w Wait until the module is no longer used" \ |
3533 | "\n -f Force unload" \ |
3534 | "\n -a Remove all unused modules (recursively)" \ |
3535 | |
3536 | #define rmmod_example_usage \ |
3537 | "$ rmmod tulip\n" \ |
3538 | |
3539 | #define modprobe_trivial_usage \ |
3540 | "[-qfwrsv] MODULE [SYMBOL=VALUE]..." \ |
3541 | |
3542 | #define modprobe_full_usage "\n\n" \ |
3543 | " -r Remove MODULE (stacks) or do autoclean" \ |
3544 | "\n -q Quiet" \ |
3545 | "\n -v Verbose" \ |
3546 | "\n -f Force" \ |
3547 | "\n -w Wait for unload" \ |
3548 | "\n -s Report via syslog instead of stderr" \ |
3549 | |
3550 | #endif \ |
3551 | |
3552 | #if !ENABLE_MODPROBE_SMALL \ |
3553 | |
3554 | #define modprobe_notes_usage \ |
3555 | "modprobe can (un)load a stack of modules, passing each module options (when\n" \ |
3556 | "loading). modprobe uses a configuration file to determine what option(s) to\n" \ |
3557 | "pass each module it loads.\n" \ |
3558 | "\n" \ |
3559 | "The configuration file is searched (in this order):\n" \ |
3560 | "\n" \ |
3561 | " /etc/modprobe.conf (2.6 only)\n" \ |
3562 | " /etc/modules.conf\n" \ |
3563 | " /etc/conf.modules (deprecated)\n" \ |
3564 | "\n" \ |
3565 | "They all have the same syntax (see below). If none is present, it is\n" \ |
3566 | "_not_ an error; each loaded module is then expected to load without\n" \ |
3567 | "options. Once a file is found, the others are tested for.\n" \ |
3568 | "\n" \ |
3569 | "/etc/modules.conf entry format:\n" \ |
3570 | "\n" \ |
3571 | " alias <alias_name> <mod_name>\n" \ |
3572 | " Makes it possible to modprobe alias_name, when there is no such module.\n" \ |
3573 | " It makes sense if your mod_name is long, or you want a more representative\n" \ |
3574 | " name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \ |
3575 | " This makes it also possible to use a different set of options (below) for\n" \ |
3576 | " the module and the alias.\n" \ |
3577 | " A module can be aliased more than once.\n" \ |
3578 | "\n" \ |
3579 | " options <mod_name|alias_name> <symbol=value...>\n" \ |
3580 | " When loading module mod_name (or the module aliased by alias_name), pass\n" \ |
3581 | " the \"symbol=value\" pairs as option to that module.\n" \ |
3582 | "\n" \ |
3583 | "Sample /etc/modules.conf file:\n" \ |
3584 | "\n" \ |
3585 | " options tulip irq=3\n" \ |
3586 | " alias tulip tulip2\n" \ |
3587 | " options tulip2 irq=4 io=0x308\n" \ |
3588 | "\n" \ |
3589 | "Other functionality offered by 'classic' modprobe is not available in\n" \ |
3590 | "this implementation.\n" \ |
3591 | "\n" \ |
3592 | "If module options are present both in the config file, and on the command line,\n" \ |
3593 | "then the options from the command line will be passed to the module _after_\n" \ |
3594 | "the options from the config file. That way, you can have defaults in the config\n" \ |
3595 | "file, and override them for a specific usage from the command line.\n" \ |
3596 | |
3597 | #define modprobe_example_usage \ |
3598 | "(with the above /etc/modules.conf):\n\n" \ |
3599 | "$ modprobe tulip\n" \ |
3600 | " will load the module 'tulip' with default option 'irq=3'\n\n" \ |
3601 | "$ modprobe tulip irq=5\n" \ |
3602 | " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \ |
3603 | "$ modprobe tulip2\n" \ |
3604 | " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \ |
3605 | " which are the default for alias 'tulip2'\n\n" \ |
3606 | "$ modprobe tulip2 irq=8\n" \ |
3607 | " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \ |
3608 | " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \ |
3609 | " from the command line\n\n" \ |
3610 | "$ modprobe tulip2 irq=2 io=0x210\n" \ |
3611 | " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \ |
3612 | " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \ |
3613 | " from the command line\n" \ |
3614 | |
3615 | #define modprobe_trivial_usage \ |
3616 | "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]" \ |
3617 | " MODULE [SYMBOL=VALUE]..." \ |
3618 | |
3619 | #define modprobe_full_usage "\n\n" \ |
3620 | " -a Load multiple MODULEs" \ |
3621 | "\n -l List (MODULE is a pattern)" \ |
3622 | "\n -r Remove MODULE (stacks) or do autoclean" \ |
3623 | "\n -q Quiet" \ |
3624 | "\n -v Verbose" \ |
3625 | "\n -s Log to syslog" \ |
3626 | "\n -D Show dependencies" \ |
3627 | IF_FEATURE_MODPROBE_BLACKLIST( \ |
3628 | "\n -b Apply blacklist to module names too" \ |
3629 | ) \ |
3630 | |
3631 | #endif /* !ENABLE_MODPROBE_SMALL */ \ |
3632 | |
3633 | #if !ENABLE_MODPROBE_SMALL \ |
3634 | |
3635 | #define rmmod_trivial_usage \ |
3636 | "[-wfa] [MODULE]..." \ |
3637 | |
3638 | #define rmmod_full_usage "\n\n" \ |
3639 | "Unload kernel modules\n" \ |
3640 | "\n -w Wait until the module is no longer used" \ |
3641 | "\n -f Force unload" \ |
3642 | "\n -a Remove all unused modules (recursively)" \ |
3643 | |
3644 | #define rmmod_example_usage \ |
3645 | "$ rmmod tulip\n" \ |
3646 | |
3647 | #endif \ |
3648 | |
3649 | #define arp_trivial_usage \ |
3650 | "\n[-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME]" \ |
3651 | "\n[-v] [-i IF] -d HOSTNAME [pub]" \ |
3652 | "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]" \ |
3653 | "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub" \ |
3654 | "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub" \ |
3655 | |
3656 | #define arp_full_usage "\n\n" \ |
3657 | "Manipulate ARP cache\n" \ |
3658 | "\n -a Display (all) hosts" \ |
3659 | "\n -d Delete ARP entry" \ |
3660 | "\n -s Set new entry" \ |
3661 | "\n -v Verbose" \ |
3662 | "\n -n Don't resolve names" \ |
3663 | "\n -i IF Network interface" \ |
3664 | "\n -D Read HWADDR from IFACE" \ |
3665 | "\n -A,-p AF Protocol family" \ |
3666 | "\n -H HWTYPE Hardware address type" \ |
3667 | |
3668 | #define arping_trivial_usage \ |
3669 | "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP" \ |
3670 | |
3671 | #define arping_full_usage "\n\n" \ |
3672 | "Send ARP requests/replies\n" \ |
3673 | "\n -f Quit on first ARP reply" \ |
3674 | "\n -q Quiet" \ |
3675 | "\n -b Keep broadcasting, don't go unicast" \ |
3676 | "\n -D Exit with 1 if DST_IP replies" \ |
3677 | "\n -U Unsolicited ARP mode, update your neighbors" \ |
3678 | "\n -A ARP answer mode, update your neighbors" \ |
3679 | "\n -c N Stop after sending N ARP requests" \ |
3680 | "\n -w TIMEOUT Seconds to wait for ARP reply" \ |
3681 | "\n -I IFACE Interface to use (default eth0)" \ |
3682 | "\n -s SRC_IP Sender IP address" \ |
3683 | "\n DST_IP Target IP address" \ |
3684 | |
3685 | #define brctl_trivial_usage \ |
3686 | "COMMAND [BRIDGE [INTERFACE]]" \ |
3687 | |
3688 | #define brctl_full_usage "\n\n" \ |
3689 | "Manage ethernet bridges\n" \ |
3690 | "\nCommands:" \ |
3691 | IF_FEATURE_BRCTL_SHOW( \ |
3692 | "\n show Show a list of bridges" \ |
3693 | ) \ |
3694 | "\n addbr BRIDGE Create BRIDGE" \ |
3695 | "\n delbr BRIDGE Delete BRIDGE" \ |
3696 | "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \ |
3697 | "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \ |
3698 | IF_FEATURE_BRCTL_FANCY( \ |
3699 | "\n setageing BRIDGE TIME Set ageing time" \ |
3700 | "\n setfd BRIDGE TIME Set bridge forward delay" \ |
3701 | "\n sethello BRIDGE TIME Set hello time" \ |
3702 | "\n setmaxage BRIDGE TIME Set max message age" \ |
3703 | "\n setpathcost BRIDGE COST Set path cost" \ |
3704 | "\n setportprio BRIDGE PRIO Set port priority" \ |
3705 | "\n setbridgeprio BRIDGE PRIO Set bridge priority" \ |
3706 | "\n stp BRIDGE [1/yes/on|0/no/off] STP on/off" \ |
3707 | ) \ |
3708 | |
3709 | #define dnsd_trivial_usage \ |
3710 | "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]" \ |
3711 | |
3712 | #define dnsd_full_usage "\n\n" \ |
3713 | "Small static DNS server daemon\n" \ |
3714 | "\n -c FILE Config file" \ |
3715 | "\n -t SEC TTL" \ |
3716 | "\n -p PORT Listen on PORT" \ |
3717 | "\n -i ADDR Listen on ADDR" \ |
3718 | "\n -d Daemonize" \ |
3719 | "\n -v Verbose" \ |
3720 | "\n -s Send successful replies only. Use this if you want" \ |
3721 | "\n to use /etc/resolv.conf with two nameserver lines:" \ |
3722 | "\n nameserver DNSD_SERVER" \ |
3723 | "\n nameserver NORMAL_DNS_SERVER" \ |
3724 | |
3725 | #define ether_wake_trivial_usage \ |
3726 | "[-b] [-i IFACE] [-p aa:bb:cc:dd[:ee:ff]/a.b.c.d] MAC" \ |
3727 | |
3728 | #define ether_wake_full_usage "\n\n" \ |
3729 | "Send a magic packet to wake up sleeping machines.\n" \ |
3730 | "MAC must be a station address (00:11:22:33:44:55) or\n" \ |
3731 | "a hostname with a known 'ethers' entry.\n" \ |
3732 | "\n -b Broadcast the packet" \ |
3733 | "\n -i IFACE Interface to use (default eth0)" \ |
3734 | "\n -p PASSWORD Append four or six byte PASSWORD to the packet" \ |
3735 | |
3736 | #define ftpd_trivial_usage \ |
3737 | "[-wvS] [-t N] [-T N] [DIR]" \ |
3738 | |
3739 | #define ftpd_full_usage "\n\n" \ |
3740 | "Anonymous FTP server\n" \ |
3741 | "\n" \ |
3742 | "ftpd should be used as an inetd service.\n" \ |
3743 | "ftpd's line for inetd.conf:\n" \ |
3744 | " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" \ |
3745 | "It also can be ran from tcpsvd:\n" \ |
3746 | " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" \ |
3747 | "\n -w Allow upload" \ |
3748 | "\n -v Log errors to stderr. -vv: verbose log" \ |
3749 | "\n -S Log errors to syslog. -SS: verbose log" \ |
3750 | "\n -t,-T Idle and absolute timeouts" \ |
3751 | "\n DIR Change root to this directory" \ |
3752 | |
3753 | #define ftpget_trivial_usage \ |
3754 | "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE" \ |
3755 | |
3756 | #define ftpget_full_usage "\n\n" \ |
3757 | "Download a file via FTP\n" \ |
3758 | IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \ |
3759 | "\n -c,--continue Continue previous transfer" \ |
3760 | "\n -v,--verbose Verbose" \ |
3761 | "\n -u,--username USER Username" \ |
3762 | "\n -p,--password PASS Password" \ |
3763 | "\n -P,--port NUM Port" \ |
3764 | ) \ |
3765 | IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \ |
3766 | "\n -c Continue previous transfer" \ |
3767 | "\n -v Verbose" \ |
3768 | "\n -u USER Username" \ |
3769 | "\n -p PASS Password" \ |
3770 | "\n -P NUM Port" \ |
3771 | ) \ |
3772 | |
3773 | #define ftpput_trivial_usage \ |
3774 | "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE" \ |
3775 | |
3776 | #define ftpput_full_usage "\n\n" \ |
3777 | "Upload a file to a FTP server\n" \ |
3778 | IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \ |
3779 | "\n -v,--verbose Verbose" \ |
3780 | "\n -u,--username USER Username" \ |
3781 | "\n -p,--password PASS Password" \ |
3782 | "\n -P,--port NUM Port" \ |
3783 | ) \ |
3784 | IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \ |
3785 | "\n -v Verbose" \ |
3786 | "\n -u USER Username" \ |
3787 | "\n -p PASS Password" \ |
3788 | "\n -P NUM Port number" \ |
3789 | ) \ |
3790 | |
3791 | #define hostname_trivial_usage \ |
3792 | "[OPTIONS] [HOSTNAME | -F FILE]" \ |
3793 | |
3794 | #define hostname_full_usage "\n\n" \ |
3795 | "Get or set hostname or DNS domain name\n" \ |
3796 | "\n -s Short" \ |
3797 | "\n -i Addresses for the hostname" \ |
3798 | "\n -d DNS domain name" \ |
3799 | "\n -f Fully qualified domain name" \ |
3800 | "\n -F FILE Use FILE's content as hostname" \ |
3801 | |
3802 | #define hostname_example_usage \ |
3803 | "$ hostname\n" \ |
3804 | "sage\n" \ |
3805 | |
3806 | #define dnsdomainname_trivial_usage NOUSAGE_STR \ |
3807 | |
3808 | #define dnsdomainname_full_usage "" \ |
3809 | |
3810 | #define httpd_trivial_usage \ |
3811 | "[-ifv[v]]" \ |
3812 | " [-c CONFFILE]" \ |
3813 | " [-p [IP:]PORT]" \ |
3814 | IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") \ |
3815 | IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]") \ |
3816 | " [-h HOME]\n" \ |
3817 | "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING" \ |
3818 | |
3819 | #define httpd_full_usage "\n\n" \ |
3820 | "Listen for incoming HTTP requests\n" \ |
3821 | "\n -i Inetd mode" \ |
3822 | "\n -f Don't daemonize" \ |
3823 | "\n -v[v] Verbose" \ |
3824 | "\n -p [IP:]PORT Bind to IP:PORT (default *:80)" \ |
3825 | IF_FEATURE_HTTPD_SETUID( \ |
3826 | "\n -u USER[:GRP] Set uid/gid after binding to port") \ |
3827 | IF_FEATURE_HTTPD_BASIC_AUTH( \ |
3828 | "\n -r REALM Authentication Realm for Basic Authentication") \ |
3829 | "\n -h HOME Home directory (default .)" \ |
3830 | "\n -c FILE Configuration file (default {/etc,HOME}/httpd.conf)" \ |
3831 | IF_FEATURE_HTTPD_AUTH_MD5( \ |
3832 | "\n -m STRING MD5 crypt STRING") \ |
3833 | "\n -e STRING HTML encode STRING" \ |
3834 | "\n -d STRING URL decode STRING" \ |
3835 | |
3836 | #define ifconfig_trivial_usage \ |
3837 | IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" \ |
3838 | |
3839 | #define ifconfig_full_usage "\n\n" \ |
3840 | "Configure a network interface\n" \ |
3841 | "\n" \ |
3842 | IF_FEATURE_IPV6( \ |
3843 | " [add ADDRESS[/PREFIXLEN]]\n") \ |
3844 | IF_FEATURE_IPV6( \ |
3845 | " [del ADDRESS[/PREFIXLEN]]\n") \ |
3846 | " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \ |
3847 | " [netmask ADDRESS] [dstaddr ADDRESS]\n" \ |
3848 | IF_FEATURE_IFCONFIG_SLIP( \ |
3849 | " [outfill NN] [keepalive NN]\n") \ |
3850 | " " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \ |
3851 | " [[-]trailers] [[-]arp] [[-]allmulti]\n" \ |
3852 | " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \ |
3853 | IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \ |
3854 | " [mem_start NN] [io_addr NN] [irq NN]\n") \ |
3855 | " [up|down] ..." \ |
3856 | |
3857 | #define ifenslave_trivial_usage \ |
3858 | "[-cdf] MASTER_IFACE SLAVE_IFACE..." \ |
3859 | |
3860 | #define ifenslave_full_usage "\n\n" \ |
3861 | "Configure network interfaces for parallel routing\n" \ |
3862 | "\n -c,--change-active Change active slave" \ |
3863 | "\n -d,--detach Remove slave interface from bonding device" \ |
3864 | "\n -f,--force Force, even if interface is not Ethernet" \ |
3865 | |
3866 | #define ifenslave_example_usage \ |
3867 | "To create a bond device, simply follow these three steps:\n" \ |
3868 | "- ensure that the required drivers are properly loaded:\n" \ |
3869 | " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \ |
3870 | "- assign an IP address to the bond device:\n" \ |
3871 | " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \ |
3872 | "- attach all the interfaces you need to the bond device:\n" \ |
3873 | " # ifenslave bond0 eth0 eth1 eth2\n" \ |
3874 | " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \ |
3875 | " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \ |
3876 | " To detach a dead interface without setting the bond device down:\n" \ |
3877 | " # ifenslave -d bond0 eth1\n\n" \ |
3878 | " To set the bond device down and automatically release all the slaves:\n" \ |
3879 | " # ifconfig bond0 down\n\n" \ |
3880 | " To change active slave:\n" \ |
3881 | " # ifenslave -c bond0 eth0\n" \ |
3882 | |
3883 | #define ifplugd_trivial_usage \ |
3884 | "[OPTIONS]" \ |
3885 | |
3886 | #define ifplugd_full_usage "\n\n" \ |
3887 | "Network interface plug detection daemon\n" \ |
3888 | "\n -n Don't daemonize" \ |
3889 | "\n -s Don't log to syslog" \ |
3890 | "\n -i IFACE Interface" \ |
3891 | "\n -f/-F Treat link detection error as link down/link up" \ |
3892 | "\n (otherwise exit on error)" \ |
3893 | "\n -a Don't up interface at each link probe" \ |
3894 | "\n -M Monitor creation/destruction of interface" \ |
3895 | "\n (otherwise it must exist)" \ |
3896 | "\n -r PROG Script to run" \ |
3897 | "\n -x ARG Extra argument for script" \ |
3898 | "\n -I Don't exit on nonzero exit code from script" \ |
3899 | "\n -p Don't run \"up\" script on startup" \ |
3900 | "\n -q Don't run \"down\" script on exit" \ |
3901 | "\n -l Always run script on startup" \ |
3902 | "\n -t SECS Poll time in seconds" \ |
3903 | "\n -u SECS Delay before running script after link up" \ |
3904 | "\n -d SECS Delay after link down" \ |
3905 | "\n -m MODE API mode (mii, priv, ethtool, wlan, iff, auto)" \ |
3906 | "\n -k Kill running daemon" \ |
3907 | |
3908 | #define ifup_trivial_usage \ |
3909 | "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." \ |
3910 | |
3911 | #define ifup_full_usage "\n\n" \ |
3912 | " -a Configure all interfaces" \ |
3913 | "\n -i FILE Use FILE instead of /etc/network/interfaces" \ |
3914 | "\n -n Print out what would happen, but don't do it" \ |
3915 | IF_FEATURE_IFUPDOWN_MAPPING( \ |
3916 | "\n (note: doesn't disable mappings)" \ |
3917 | "\n -m Don't run any mappings" \ |
3918 | ) \ |
3919 | "\n -v Print out what would happen before doing it" \ |
3920 | "\n -f Force configuration" \ |
3921 | |
3922 | #define ifdown_trivial_usage \ |
3923 | "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." \ |
3924 | |
3925 | #define ifdown_full_usage "\n\n" \ |
3926 | " -a Deconfigure all interfaces" \ |
3927 | "\n -i FILE Use FILE for interface definitions" \ |
3928 | "\n -n Print out what would happen, but don't do it" \ |
3929 | IF_FEATURE_IFUPDOWN_MAPPING( \ |
3930 | "\n (note: doesn't disable mappings)" \ |
3931 | "\n -m Don't run any mappings" \ |
3932 | ) \ |
3933 | "\n -v Print out what would happen before doing it" \ |
3934 | "\n -f Force deconfiguration" \ |
3935 | |
3936 | #define inetd_trivial_usage \ |
3937 | "[-fe] [-q N] [-R N] [CONFFILE]" \ |
3938 | |
3939 | #define inetd_full_usage "\n\n" \ |
3940 | "Listen for network connections and launch programs\n" \ |
3941 | "\n -f Run in foreground" \ |
3942 | "\n -e Log to stderr" \ |
3943 | "\n -q N Socket listen queue (default: 128)" \ |
3944 | "\n -R N Pause services after N connects/min" \ |
3945 | "\n (default: 0 - disabled)" \ |
3946 | |
3947 | #define ip_trivial_usage \ |
3948 | "[OPTIONS] {" \ |
3949 | IF_FEATURE_IP_ADDRESS("address | ") \ |
3950 | IF_FEATURE_IP_ROUTE("route | ") \ |
3951 | IF_FEATURE_IP_LINK("link | ") \ |
3952 | IF_FEATURE_IP_TUNNEL("tunnel | ") \ |
3953 | IF_FEATURE_IP_NEIGH("neigh | ") \ |
3954 | IF_FEATURE_IP_RULE("rule") \ |
3955 | "} {COMMAND}" \ |
3956 | |
3957 | #define ip_full_usage "\n\n" \ |
3958 | "ip [OPTIONS] OBJECT {COMMAND}\n" \ |
3959 | "where OBJECT := {" \ |
3960 | IF_FEATURE_IP_ADDRESS("address | ") \ |
3961 | IF_FEATURE_IP_ROUTE("route | ") \ |
3962 | IF_FEATURE_IP_LINK("link | ") \ |
3963 | IF_FEATURE_IP_TUNNEL("tunnel | ") \ |
3964 | IF_FEATURE_IP_NEIGH("neigh | ") \ |
3965 | IF_FEATURE_IP_RULE("rule") \ |
3966 | "}\n" \ |
3967 | "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \ |
3968 | |
3969 | #define ipaddr_trivial_usage \ |
3970 | "{ {add|del} IFADDR dev STRING | {show|flush}\n" \ |
3971 | " [dev STRING] [to PREFIX] }" \ |
3972 | |
3973 | #define ipaddr_full_usage "\n\n" \ |
3974 | "ipaddr {add|change|replace|delete} IFADDR dev STRING\n" \ |
3975 | "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n" \ |
3976 | " [to PREFIX] [label PATTERN]\n" \ |
3977 | " IFADDR := PREFIX | ADDR peer PREFIX\n" \ |
3978 | " [broadcast ADDR] [anycast ADDR]\n" \ |
3979 | " [label STRING] [scope SCOPE-ID]\n" \ |
3980 | " SCOPE-ID := [host | link | global | NUMBER]" \ |
3981 | |
3982 | #define iplink_trivial_usage \ |
3983 | "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }" \ |
3984 | |
3985 | #define iplink_full_usage "\n\n" \ |
3986 | "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \ |
3987 | " dynamic { on | off } |\n" \ |
3988 | " mtu MTU }\n" \ |
3989 | "iplink show [DEVICE]" \ |
3990 | |
3991 | #define iproute_trivial_usage \ |
3992 | "{ list | flush | add | del | change | append |\n" \ |
3993 | " replace | test } ROUTE" \ |
3994 | |
3995 | #define iproute_full_usage "\n\n" \ |
3996 | "iproute { list | flush } SELECTOR\n" \ |
3997 | "iproute get ADDRESS [from ADDRESS iif STRING]\n" \ |
3998 | " [oif STRING] [tos TOS]\n" \ |
3999 | "iproute { add | del | change | append | replace | test } ROUTE\n" \ |
4000 | " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \ |
4001 | " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO] [metric METRIC]" \ |
4002 | |
4003 | #define iprule_trivial_usage \ |
4004 | "{[list | add | del] RULE}" \ |
4005 | |
4006 | #define iprule_full_usage "\n\n" \ |
4007 | "iprule [list | add | del] SELECTOR ACTION\n" \ |
4008 | " SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \ |
4009 | " [dev STRING] [pref NUMBER]\n" \ |
4010 | " ACTION := [table TABLE_ID] [nat ADDRESS]\n" \ |
4011 | " [prohibit | reject | unreachable]\n" \ |
4012 | " [realms [SRCREALM/]DSTREALM]\n" \ |
4013 | " TABLE_ID := [local | main | default | NUMBER]" \ |
4014 | |
4015 | #define iptunnel_trivial_usage \ |
4016 | "{ add | change | del | show } [NAME]\n" \ |
4017 | " [mode { ipip | gre | sit }]\n" \ |
4018 | " [remote ADDR] [local ADDR] [ttl TTL]" \ |
4019 | |
4020 | #define iptunnel_full_usage "\n\n" \ |
4021 | "iptunnel { add | change | del | show } [NAME]\n" \ |
4022 | " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \ |
4023 | " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \ |
4024 | " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \ |
4025 | |
4026 | #define ipneigh_trivial_usage \ |
4027 | "{ show | flush} [ to PREFIX ] [ dev DEV ] [ nud STATE ]" \ |
4028 | |
4029 | #define ipneigh_full_usage "\n\n" \ |
4030 | "ipneigh { show | flush} [ to PREFIX ] [ dev DEV ] [ nud STATE ]" \ |
4031 | |
4032 | #define ipcalc_trivial_usage \ |
4033 | "[OPTIONS] ADDRESS" \ |
4034 | IF_FEATURE_IPCALC_FANCY("[/PREFIX]") " [NETMASK]" \ |
4035 | |
4036 | #define ipcalc_full_usage "\n\n" \ |
4037 | "Calculate IP network settings from a IP address\n" \ |
4038 | IF_FEATURE_IPCALC_LONG_OPTIONS( \ |
4039 | "\n -b,--broadcast Display calculated broadcast address" \ |
4040 | "\n -n,--network Display calculated network address" \ |
4041 | "\n -m,--netmask Display default netmask for IP" \ |
4042 | IF_FEATURE_IPCALC_FANCY( \ |
4043 | "\n -p,--prefix Display the prefix for IP/NETMASK" \ |
4044 | "\n -h,--hostname Display first resolved host name" \ |
4045 | "\n -s,--silent Don't ever display error messages" \ |
4046 | ) \ |
4047 | ) \ |
4048 | IF_NOT_FEATURE_IPCALC_LONG_OPTIONS( \ |
4049 | "\n -b Display calculated broadcast address" \ |
4050 | "\n -n Display calculated network address" \ |
4051 | "\n -m Display default netmask for IP" \ |
4052 | IF_FEATURE_IPCALC_FANCY( \ |
4053 | "\n -p Display the prefix for IP/NETMASK" \ |
4054 | "\n -h Display first resolved host name" \ |
4055 | "\n -s Don't ever display error messages" \ |
4056 | ) \ |
4057 | ) \ |
4058 | |
4059 | #define fakeidentd_trivial_usage \ |
4060 | "[-fiw] [-b ADDR] [STRING]" \ |
4061 | |
4062 | #define fakeidentd_full_usage "\n\n" \ |
4063 | "Provide fake ident (auth) service\n" \ |
4064 | "\n -f Run in foreground" \ |
4065 | "\n -i Inetd mode" \ |
4066 | "\n -w Inetd 'wait' mode" \ |
4067 | "\n -b ADDR Bind to specified address" \ |
4068 | "\n STRING Ident answer string (default: nobody)" \ |
4069 | |
4070 | #define nameif_trivial_usage \ |
4071 | IF_NOT_FEATURE_NAMEIF_EXTENDED( \ |
4072 | "[-s] [-c FILE] [IFNAME HWADDR]..." \ |
4073 | ) \ |
4074 | IF_FEATURE_NAMEIF_EXTENDED( \ |
4075 | "[-s] [-c FILE] [IFNAME SELECTOR]..." \ |
4076 | ) \ |
4077 | |
4078 | #define nameif_full_usage "\n\n" \ |
4079 | "Rename network interface while it in the down state." \ |
4080 | IF_NOT_FEATURE_NAMEIF_EXTENDED( \ |
4081 | "\nThe device with address HWADDR is renamed to IFACE." \ |
4082 | ) \ |
4083 | IF_FEATURE_NAMEIF_EXTENDED( \ |
4084 | "\nThe device matched by SELECTOR is renamed to IFACE." \ |
4085 | "\nSELECTOR can be a combination of:" \ |
4086 | "\n driver=STRING" \ |
4087 | "\n bus=STRING" \ |
4088 | "\n phy_address=NUM" \ |
4089 | "\n [mac=]XX:XX:XX:XX:XX:XX" \ |
4090 | ) \ |
4091 | "\n" \ |
4092 | "\n -c FILE Configuration file (default: /etc/mactab)" \ |
4093 | "\n -s Log to syslog" \ |
4094 | |
4095 | #define nameif_example_usage \ |
4096 | "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \ |
4097 | " or\n" \ |
4098 | "$ nameif -c /etc/my_mactab_file\n" \ |
4099 | |
4100 | #define nbdclient_trivial_usage \ |
4101 | "HOST PORT BLOCKDEV" \ |
4102 | |
4103 | #define nbdclient_full_usage "\n\n" \ |
4104 | "Connect to HOST and provide a network block device on BLOCKDEV" \ |
4105 | |
4106 | #if !ENABLE_NC_110_COMPAT \ |
4107 | |
4108 | #if ENABLE_NC_SERVER || ENABLE_NC_EXTRA \ |
4109 | |
4110 | #define NC_OPTIONS_STR "\n" \ |
4111 | |
4112 | #else \ |
4113 | |
4114 | #define NC_OPTIONS_STR \ |
4115 | |
4116 | #endif \ |
4117 | |
4118 | #define nc_trivial_usage \ |
4119 | IF_NC_EXTRA("[-iN] [-wN] ")IF_NC_SERVER("[-l] [-p PORT] ") \ |
4120 | "["IF_NC_EXTRA("-f FILE|")"IPADDR PORT]"IF_NC_EXTRA(" [-e PROG]") \ |
4121 | |
4122 | #define nc_full_usage "\n\n" \ |
4123 | "Open a pipe to IP:PORT" IF_NC_EXTRA(" or FILE") \ |
4124 | NC_OPTIONS_STR \ |
4125 | IF_NC_SERVER( \ |
4126 | "\n -l Listen mode, for inbound connects" \ |
4127 | IF_NC_EXTRA( \ |
4128 | "\n (use -ll with -e for persistent server)" \ |
4129 | ) \ |
4130 | "\n -p PORT Local port" \ |
4131 | ) \ |
4132 | IF_NC_EXTRA( \ |
4133 | "\n -w SEC Connect timeout" \ |
4134 | "\n -i SEC Delay interval for lines sent" \ |
4135 | "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \ |
4136 | "\n -e PROG Run PROG after connect" \ |
4137 | ) \ |
4138 | |
4139 | #define nc_notes_usage "" \ |
4140 | IF_NC_EXTRA( \ |
4141 | "To use netcat as a terminal emulator on a serial port:\n\n" \ |
4142 | "$ stty 115200 -F /dev/ttyS0\n" \ |
4143 | "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \ |
4144 | ) \ |
4145 | |
4146 | #define nc_example_usage \ |
4147 | "$ nc foobar.somedomain.com 25\n" \ |
4148 | "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \ |
4149 | "help\n" \ |
4150 | "214-Commands supported:\n" \ |
4151 | "214- HELO EHLO MAIL RCPT DATA AUTH\n" \ |
4152 | "214 NOOP QUIT RSET HELP\n" \ |
4153 | "quit\n" \ |
4154 | "221 foobar closing connection\n" \ |
4155 | |
4156 | #endif \ |
4157 | |
4158 | #if ENABLE_NC_110_COMPAT \ |
4159 | |
4160 | #define nc_trivial_usage \ |
4161 | "[OPTIONS] HOST PORT - connect" \ |
4162 | IF_NC_SERVER("\n" \ |
4163 | "nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen" \ |
4164 | ) \ |
4165 | |
4166 | #define nc_full_usage "\n\n" \ |
4167 | " -e PROG Run PROG after connect (must be last)" \ |
4168 | IF_NC_SERVER( \ |
4169 | "\n -l Listen mode, for inbound connects" \ |
4170 | "\n -lk With -e, provides persistent server" \ |
4171 | ) \ |
4172 | "\n -p PORT Local port" \ |
4173 | "\n -s ADDR Local address" \ |
4174 | "\n -w SEC Timeout for connects and final net reads" \ |
4175 | IF_NC_EXTRA( \ |
4176 | "\n -i SEC Delay interval for lines sent" /* ", ports scanned" */ \ |
4177 | ) \ |
4178 | "\n -n Don't do DNS resolution" \ |
4179 | "\n -u UDP mode" \ |
4180 | "\n -v Verbose" \ |
4181 | IF_NC_EXTRA( \ |
4182 | "\n -o FILE Hex dump traffic" \ |
4183 | "\n -z Zero-I/O mode (scanning)" \ |
4184 | ) \ |
4185 | |
4186 | #endif \ |
4187 | |
4188 | #define netstat_trivial_usage \ |
4189 | "[-"IF_ROUTE("r")"al] [-tuwx] [-en"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]" \ |
4190 | |
4191 | #define netstat_full_usage "\n\n" \ |
4192 | "Display networking information\n" \ |
4193 | IF_ROUTE( \ |
4194 | "\n -r Routing table" \ |
4195 | ) \ |
4196 | "\n -a All sockets" \ |
4197 | "\n -l Listening sockets" \ |
4198 | "\n Else: connected sockets" \ |
4199 | "\n -t TCP sockets" \ |
4200 | "\n -u UDP sockets" \ |
4201 | "\n -w Raw sockets" \ |
4202 | "\n -x Unix sockets" \ |
4203 | "\n Else: all socket types" \ |
4204 | "\n -e Other/more information" \ |
4205 | "\n -n Don't resolve names" \ |
4206 | IF_FEATURE_NETSTAT_WIDE( \ |
4207 | "\n -W Wide display" \ |
4208 | ) \ |
4209 | IF_FEATURE_NETSTAT_PRG( \ |
4210 | "\n -p Show PID/program name for sockets" \ |
4211 | ) \ |
4212 | |
4213 | #define nslookup_trivial_usage \ |
4214 | "[HOST] [SERVER]" \ |
4215 | |
4216 | #define nslookup_full_usage "\n\n" \ |
4217 | "Query the nameserver for the IP address of the given HOST\n" \ |
4218 | "optionally using a specified DNS server" \ |
4219 | |
4220 | #define nslookup_example_usage \ |
4221 | "$ nslookup localhost\n" \ |
4222 | "Server: default\n" \ |
4223 | "Address: default\n" \ |
4224 | "\n" \ |
4225 | "Name: debian\n" \ |
4226 | "Address: 127.0.0.1\n" \ |
4227 | |
4228 | #define ntpd_trivial_usage \ |
4229 | "[-dnqNw"IF_FEATURE_NTPD_SERVER("l -I IFACE")"] [-S PROG] [-p PEER]..." \ |
4230 | |
4231 | #define ntpd_full_usage "\n\n" \ |
4232 | "NTP client/server\n" \ |
4233 | "\n -d Verbose" \ |
4234 | "\n -n Do not daemonize" \ |
4235 | "\n -q Quit after clock is set" \ |
4236 | "\n -N Run at high priority" \ |
4237 | "\n -w Do not set time (only query peers), implies -n" \ |
4238 | "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \ |
4239 | "\n -p PEER Obtain time from PEER (may be repeated)" \ |
4240 | IF_FEATURE_NTPD_CONF( \ |
4241 | "\n If -p is not given, 'server HOST' lines" \ |
4242 | "\n from /etc/ntp.conf are used" \ |
4243 | ) \ |
4244 | IF_FEATURE_NTPD_SERVER( \ |
4245 | "\n -l Also run as server on port 123" \ |
4246 | "\n -I IFACE Bind server to IFACE, implies -l" \ |
4247 | ) \ |
4248 | |
4249 | #if !ENABLE_FEATURE_FANCY_PING \ |
4250 | |
4251 | # define ping_trivial_usage \ |
4252 | "HOST" \ |
4253 | |
4254 | # define ping_full_usage "\n\n" \ |
4255 | "Send ICMP ECHO_REQUEST packets to network hosts" \ |
4256 | |
4257 | # define ping6_trivial_usage \ |
4258 | "HOST" \ |
4259 | |
4260 | # define ping6_full_usage "\n\n" \ |
4261 | "Send ICMP ECHO_REQUEST packets to network hosts" \ |
4262 | |
4263 | #else \ |
4264 | |
4265 | # define ping_trivial_usage \ |
4266 | "[OPTIONS] HOST" \ |
4267 | |
4268 | # define ping_full_usage "\n\n" \ |
4269 | "Send ICMP ECHO_REQUEST packets to network hosts\n" \ |
4270 | IF_PING6( \ |
4271 | "\n -4,-6 Force IP or IPv6 name resolution" \ |
4272 | ) \ |
4273 | "\n -c CNT Send only CNT pings" \ |
4274 | "\n -s SIZE Send SIZE data bytes in packets (default:56)" \ |
4275 | "\n -t TTL Set TTL" \ |
4276 | "\n -I IFACE/IP Use interface or IP address as source" \ |
4277 | "\n -W SEC Seconds to wait for the first response (default:10)" \ |
4278 | "\n (after all -c CNT packets are sent)" \ |
4279 | "\n -w SEC Seconds until ping exits (default:infinite)" \ |
4280 | "\n (can exit earlier with -c CNT)" \ |
4281 | "\n -q Quiet, only display output at start" \ |
4282 | "\n and when finished" \ |
4283 | "\n -p Pattern to use for payload" \ |
4284 | |
4285 | # define ping6_trivial_usage \ |
4286 | "[OPTIONS] HOST" \ |
4287 | |
4288 | # define ping6_full_usage "\n\n" \ |
4289 | "Send ICMP ECHO_REQUEST packets to network hosts\n" \ |
4290 | "\n -c CNT Send only CNT pings" \ |
4291 | "\n -s SIZE Send SIZE data bytes in packets (default:56)" \ |
4292 | "\n -I IFACE/IP Use interface or IP address as source" \ |
4293 | "\n -q Quiet, only display output at start" \ |
4294 | "\n and when finished" \ |
4295 | "\n -p Pattern to use for payload" \ |
4296 | |
4297 | #endif \ |
4298 | |
4299 | #define ping_example_usage \ |
4300 | "$ ping localhost\n" \ |
4301 | "PING slag (127.0.0.1): 56 data bytes\n" \ |
4302 | "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ |
4303 | "\n" \ |
4304 | "--- debian ping statistics ---\n" \ |
4305 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ |
4306 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" \ |
4307 | |
4308 | #define ping6_example_usage \ |
4309 | "$ ping6 ip6-localhost\n" \ |
4310 | "PING ip6-localhost (::1): 56 data bytes\n" \ |
4311 | "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \ |
4312 | "\n" \ |
4313 | "--- ip6-localhost ping statistics ---\n" \ |
4314 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ |
4315 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" \ |
4316 | |
4317 | #define pscan_trivial_usage \ |
4318 | "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST" \ |
4319 | |
4320 | #define pscan_full_usage "\n\n" \ |
4321 | "Scan a host, print all open ports\n" \ |
4322 | "\n -c Show closed ports too" \ |
4323 | "\n -b Show blocked ports too" \ |
4324 | "\n -p Scan from this port (default 1)" \ |
4325 | "\n -P Scan up to this port (default 1024)" \ |
4326 | "\n -t Timeout (default 5000 ms)" \ |
4327 | "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \ |
4328 | |
4329 | #define route_trivial_usage \ |
4330 | "[{add|del|delete}]" \ |
4331 | |
4332 | #define route_full_usage "\n\n" \ |
4333 | "Edit kernel routing tables\n" \ |
4334 | "\n -n Don't resolve names" \ |
4335 | "\n -e Display other/more information" \ |
4336 | "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \ |
4337 | |
4338 | #define slattach_trivial_usage \ |
4339 | "[-cehmLF] [-s SPEED] [-p PROTOCOL] DEVICE" \ |
4340 | |
4341 | #define slattach_full_usage "\n\n" \ |
4342 | "Attach network interface(s) to serial line(s)\n" \ |
4343 | "\n -p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)" \ |
4344 | "\n -s SPD Set line speed" \ |
4345 | "\n -e Exit after initializing device" \ |
4346 | "\n -h Exit when the carrier is lost" \ |
4347 | "\n -c PROG Run PROG when the line is hung up" \ |
4348 | "\n -m Do NOT initialize the line in raw 8 bits mode" \ |
4349 | "\n -L Enable 3-wire operation" \ |
4350 | "\n -F Disable RTS/CTS flow control" \ |
4351 | |
4352 | #define tc_trivial_usage \ |
4353 | "OBJECT CMD [dev STRING]" \ |
4354 | |
4355 | #define tc_full_usage "\n\n" \ |
4356 | "OBJECT: {qdisc|class|filter}\n" \ |
4357 | "CMD: {add|del|change|replace|show}\n" \ |
4358 | "\n" \ |
4359 | "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \ |
4360 | " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ |
4361 | " QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \ |
4362 | "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \ |
4363 | "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \ |
4364 | " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ |
4365 | "class show [ dev STRING ] [ root | parent CLASSID ]\n" \ |
4366 | "filter [ pref PRIO ] [ protocol PROTO ]\n" \ |
4367 | " [ root | classid CLASSID ] [ handle FILTERID ]\n" \ |
4368 | " [ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n" \ |
4369 | "filter show [ dev STRING ] [ root | parent CLASSID ]" \ |
4370 | |
4371 | #define tcpsvd_trivial_usage \ |
4372 | "[-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG" \ |
4373 | |
4374 | #define tcpsvd_full_usage "\n\n" \ |
4375 | "Create TCP socket, bind to IP:PORT and listen for incoming connections.\n" \ |
4376 | "Run PROG for each connection.\n" \ |
4377 | "\n IP PORT IP:PORT to listen on" \ |
4378 | "\n PROG ARGS Program to run" \ |
4379 | "\n -u USER[:GRP] Change to user/group after bind" \ |
4380 | "\n -c N Up to N connections simultaneously (default 30)" \ |
4381 | "\n -b N Allow backlog of approximately N TCP SYNs (default 20)" \ |
4382 | "\n -C N[:MSG] Allow only up to N connections from the same IP:" \ |
4383 | "\n new connections from this IP address are closed" \ |
4384 | "\n immediately, MSG is written to the peer before close" \ |
4385 | "\n -E Don't set up environment" \ |
4386 | "\n -h Look up peer's hostname" \ |
4387 | "\n -l NAME Local hostname (else look up local hostname in DNS)" \ |
4388 | "\n -v Verbose" \ |
4389 | "\n" \ |
4390 | "\nEnvironment if no -E:" \ |
4391 | "\nPROTO='TCP'" \ |
4392 | "\nTCPREMOTEADDR='ip:port'" IF_FEATURE_IPV6(" ('[ip]:port' for IPv6)") \ |
4393 | "\nTCPLOCALADDR='ip:port'" \ |
4394 | "\nTCPORIGDSTADDR='ip:port' of destination before firewall" \ |
4395 | "\n Useful for REDIRECTed-to-local connections:" \ |
4396 | "\n iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080" \ |
4397 | "\nTCPCONCURRENCY=num_of_connects_from_this_ip" \ |
4398 | "\nIf -h:" \ |
4399 | "\nTCPLOCALHOST='hostname' (-l NAME is used if specified)" \ |
4400 | "\nTCPREMOTEHOST='hostname'" \ |
4401 | |
4402 | #define udpsvd_trivial_usage \ |
4403 | "[-hEv] [-c N] [-u USER] [-l NAME] IP PORT PROG" \ |
4404 | |
4405 | #define udpsvd_full_usage "\n\n" \ |
4406 | "Create UDP socket, bind to IP:PORT and wait for incoming packets.\n" \ |
4407 | "Run PROG for each packet, redirecting all further packets with same\n" \ |
4408 | "peer ip:port to it.\n" \ |
4409 | "\n IP PORT IP:PORT to listen on" \ |
4410 | "\n PROG ARGS Program to run" \ |
4411 | "\n -u USER[:GRP] Change to user/group after bind" \ |
4412 | "\n -c N Up to N connections simultaneously (default 30)" \ |
4413 | "\n -E Don't set up environment" \ |
4414 | "\n -h Look up peer's hostname" \ |
4415 | "\n -l NAME Local hostname (else look up local hostname in DNS)" \ |
4416 | "\n -v Verbose" \ |
4417 | "\n" \ |
4418 | "\nEnvironment if no -E:" \ |
4419 | "\nPROTO='UDP'" \ |
4420 | "\nUDPREMOTEADDR='ip:port'" IF_FEATURE_IPV6(" ('[ip]:port' for IPv6)") \ |
4421 | "\nUDPLOCALADDR='ip:port'" \ |
4422 | "\nIf -h:" \ |
4423 | "\nUDPLOCALHOST='hostname' (-l NAME is used if specified)" \ |
4424 | "\nUDPREMOTEHOST='hostname'" \ |
4425 | |
4426 | #if ENABLE_FEATURE_TELNET_AUTOLOGIN \ |
4427 | |
4428 | #define telnet_trivial_usage \ |
4429 | "[-a] [-l USER] HOST [PORT]" \ |
4430 | |
4431 | #define telnet_full_usage "\n\n" \ |
4432 | "Connect to telnet server\n" \ |
4433 | "\n -a Automatic login with $USER variable" \ |
4434 | "\n -l USER Automatic login as USER" \ |
4435 | |
4436 | #else \ |
4437 | |
4438 | #define telnet_trivial_usage \ |
4439 | "HOST [PORT]" \ |
4440 | |
4441 | #define telnet_full_usage "\n\n" \ |
4442 | "Connect to telnet server" \ |
4443 | |
4444 | #endif \ |
4445 | |
4446 | #define telnetd_trivial_usage \ |
4447 | "[OPTIONS]" \ |
4448 | |
4449 | #define telnetd_full_usage "\n\n" \ |
4450 | "Handle incoming telnet connections" \ |
4451 | IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \ |
4452 | "\n -l LOGIN Exec LOGIN on connect" \ |
4453 | "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" \ |
4454 | "\n -K Close connection as soon as login exits" \ |
4455 | "\n (normally wait until all programs close slave pty)" \ |
4456 | IF_FEATURE_TELNETD_STANDALONE( \ |
4457 | "\n -p PORT Port to listen on" \ |
4458 | "\n -b ADDR[:PORT] Address to bind to" \ |
4459 | "\n -F Run in foreground" \ |
4460 | "\n -i Inetd mode" \ |
4461 | IF_FEATURE_TELNETD_INETD_WAIT( \ |
4462 | "\n -w SEC Inetd 'wait' mode, linger time SEC" \ |
4463 | "\n -S Log to syslog (implied by -i or without -F and -w)" \ |
4464 | ) \ |
4465 | ) \ |
4466 | |
4467 | #define tftp_trivial_usage \ |
4468 | "[OPTIONS] HOST [PORT]" \ |
4469 | |
4470 | #define tftp_full_usage "\n\n" \ |
4471 | "Transfer a file from/to tftp server\n" \ |
4472 | "\n -l FILE Local FILE" \ |
4473 | "\n -r FILE Remote FILE" \ |
4474 | IF_FEATURE_TFTP_GET( \ |
4475 | "\n -g Get file" \ |
4476 | ) \ |
4477 | IF_FEATURE_TFTP_PUT( \ |
4478 | "\n -p Put file" \ |
4479 | ) \ |
4480 | IF_FEATURE_TFTP_BLOCKSIZE( \ |
4481 | "\n -b SIZE Transfer blocks of SIZE octets" \ |
4482 | ) \ |
4483 | |
4484 | #define tftpd_trivial_usage \ |
4485 | "[-cr] [-u USER] [DIR]" \ |
4486 | |
4487 | #define tftpd_full_usage "\n\n" \ |
4488 | "Transfer a file on tftp client's request\n" \ |
4489 | "\n" \ |
4490 | "tftpd should be used as an inetd service.\n" \ |
4491 | "tftpd's line for inetd.conf:\n" \ |
4492 | " 69 dgram udp nowait root tftpd tftpd -l /files/to/serve\n" \ |
4493 | "It also can be ran from udpsvd:\n" \ |
4494 | " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" \ |
4495 | "\n -r Prohibit upload" \ |
4496 | "\n -c Allow file creation via upload" \ |
4497 | "\n -u Access files as USER" \ |
4498 | "\n -l Log to syslog (inetd mode requires this)" \ |
4499 | |
4500 | #define traceroute_trivial_usage \ |
4501 | "[-"IF_TRACEROUTE6("46")"FIlnrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]\n" \ |
4502 | " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n" \ |
4503 | " [-z PAUSE_MSEC] HOST [BYTES]" \ |
4504 | |
4505 | #define traceroute_full_usage "\n\n" \ |
4506 | "Trace the route to HOST\n" \ |
4507 | IF_TRACEROUTE6( \ |
4508 | "\n -4,-6 Force IP or IPv6 name resolution" \ |
4509 | ) \ |
4510 | "\n -F Set don't fragment bit" \ |
4511 | IF_FEATURE_TRACEROUTE_USE_ICMP( \ |
4512 | "\n -I Use ICMP ECHO instead of UDP datagrams" \ |
4513 | ) \ |
4514 | "\n -l Display TTL value of the returned packet" \ |
4515 | "\n -n Print numeric addresses" \ |
4516 | "\n -r Bypass routing tables, send directly to HOST" \ |
4517 | IF_FEATURE_TRACEROUTE_VERBOSE( \ |
4518 | "\n -v Verbose" \ |
4519 | ) \ |
4520 | "\n -f N First number of hops (default 1)" \ |
4521 | "\n -m N Max number of hops" \ |
4522 | "\n -q N Number of probes per hop (default 3)" \ |
4523 | "\n -p N Base UDP port number used in probes" \ |
4524 | "\n (default 33434)" \ |
4525 | "\n -s IP Source address" \ |
4526 | "\n -i IFACE Source interface" \ |
4527 | "\n -t N Type-of-service in probe packets (default 0)" \ |
4528 | "\n -w SEC Time to wait for a response (default 3)" \ |
4529 | "\n -g IP Loose source route gateway (8 max)" \ |
4530 | |
4531 | #define traceroute6_trivial_usage \ |
4532 | "[-nrv] [-m MAXTTL] [-q PROBES] [-p PORT]\n" \ |
4533 | " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n" \ |
4534 | " HOST [BYTES]" \ |
4535 | |
4536 | #define traceroute6_full_usage "\n\n" \ |
4537 | "Trace the route to HOST\n" \ |
4538 | "\n -n Print numeric addresses" \ |
4539 | "\n -r Bypass routing tables, send directly to HOST" \ |
4540 | IF_FEATURE_TRACEROUTE_VERBOSE( \ |
4541 | "\n -v Verbose" \ |
4542 | ) \ |
4543 | "\n -m N Max number of hops" \ |
4544 | "\n -q N Number of probes per hop (default 3)" \ |
4545 | "\n -p N Base UDP port number used in probes" \ |
4546 | "\n (default 33434)" \ |
4547 | "\n -s IP Source address" \ |
4548 | "\n -i IFACE Source interface" \ |
4549 | "\n -t N Type-of-service in probe packets (default 0)" \ |
4550 | "\n -w SEC Time wait for a response (default 3)" \ |
4551 | |
4552 | #define tunctl_trivial_usage \ |
4553 | "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") \ |
4554 | |
4555 | #define tunctl_full_usage "\n\n" \ |
4556 | "Create or delete tun interfaces\n" \ |
4557 | "\n -f name tun device (/dev/net/tun)" \ |
4558 | "\n -t name Create iface 'name'" \ |
4559 | "\n -d name Delete iface 'name'" \ |
4560 | IF_FEATURE_TUNCTL_UG( \ |
4561 | "\n -u owner Set iface owner" \ |
4562 | "\n -g group Set iface group" \ |
4563 | "\n -b Brief output" \ |
4564 | ) \ |
4565 | |
4566 | #define tunctl_example_usage \ |
4567 | "# tunctl\n" \ |
4568 | "# tunctl -d tun0\n" \ |
4569 | |
4570 | #define vconfig_trivial_usage \ |
4571 | "COMMAND [OPTIONS]" \ |
4572 | |
4573 | #define vconfig_full_usage "\n\n" \ |
4574 | "Create and remove virtual ethernet devices\n" \ |
4575 | "\n add IFACE VLAN_ID" \ |
4576 | "\n rem VLAN_NAME" \ |
4577 | "\n set_flag IFACE 0|1 VLAN_QOS" \ |
4578 | "\n set_egress_map VLAN_NAME SKB_PRIO VLAN_QOS" \ |
4579 | "\n set_ingress_map VLAN_NAME SKB_PRIO VLAN_QOS" \ |
4580 | "\n set_name_type NAME_TYPE" \ |
4581 | |
4582 | #define wget_trivial_usage \ |
4583 | IF_FEATURE_WGET_LONG_OPTIONS( \ |
4584 | "[-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]\n" \ |
4585 | " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ |
4586 | " [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..." \ |
4587 | ) \ |
4588 | IF_NOT_FEATURE_WGET_LONG_OPTIONS( \ |
4589 | "[-cq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT]" \ |
4590 | IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..." \ |
4591 | ) \ |
4592 | |
4593 | #define wget_full_usage "\n\n" \ |
4594 | "Retrieve files via HTTP or FTP\n" \ |
4595 | IF_FEATURE_WGET_LONG_OPTIONS( \ |
4596 | "\n --spider Spider mode - only check file existence" \ |
4597 | ) \ |
4598 | "\n -c Continue retrieval of aborted transfer" \ |
4599 | "\n -q Quiet" \ |
4600 | "\n -P DIR Save to DIR (default .)" \ |
4601 | IF_FEATURE_WGET_TIMEOUT( \ |
4602 | "\n -T SEC Network read timeout is SEC seconds" \ |
4603 | ) \ |
4604 | "\n -O FILE Save to FILE ('-' for stdout)" \ |
4605 | "\n -U STR Use STR for User-Agent header" \ |
4606 | "\n -Y on/off Use proxy" \ |
4607 | |
4608 | #define whois_trivial_usage \ |
4609 | "[-i] [-h SERVER] [-p PORT] NAME..." \ |
4610 | |
4611 | #define whois_full_usage "\n\n" \ |
4612 | "Query WHOIS info about NAME\n" \ |
4613 | "\n -i Show redirect results too" \ |
4614 | "\n -h,-p Server to query" \ |
4615 | |
4616 | #define zcip_trivial_usage \ |
4617 | "[OPTIONS] IFACE SCRIPT" \ |
4618 | |
4619 | #define zcip_full_usage "\n\n" \ |
4620 | "Manage a ZeroConf IPv4 link-local address\n" \ |
4621 | "\n -f Run in foreground" \ |
4622 | "\n -q Quit after obtaining address" \ |
4623 | "\n -r 169.254.x.x Request this address first" \ |
4624 | "\n -l x.x.0.0 Use this range instead of 169.254" \ |
4625 | "\n -v Verbose" \ |
4626 | "\n" \ |
4627 | "\n$LOGGING=none Suppress logging" \ |
4628 | "\n$LOGGING=syslog Log to syslog" \ |
4629 | "\n" \ |
4630 | "\nWith no -q, runs continuously monitoring for ARP conflicts," \ |
4631 | "\nexits only on I/O errors (link down etc)" \ |
4632 | |
4633 | #define lpd_trivial_usage \ |
4634 | "SPOOLDIR [HELPER [ARGS]]" \ |
4635 | |
4636 | #define lpd_full_usage "\n\n" \ |
4637 | "SPOOLDIR must contain (symlinks to) device nodes or directories" \ |
4638 | "\nwith names matching print queue names. In the first case, jobs are" \ |
4639 | "\nsent directly to the device. Otherwise each job is stored in queue" \ |
4640 | "\ndirectory and HELPER program is called. Name of file to print" \ |
4641 | "\nis passed in $DATAFILE variable." \ |
4642 | "\nExample:" \ |
4643 | "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \ |
4644 | |
4645 | #define lpr_trivial_usage \ |
4646 | "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE]..." \ |
4647 | |
4648 | #define lpr_full_usage "\n\n" \ |
4649 | " -P lp service to connect to (else uses $PRINTER)" \ |
4650 | "\n -m Send mail on completion" \ |
4651 | "\n -h Print banner page too" \ |
4652 | "\n -V Verbose" \ |
4653 | |
4654 | #define lpq_trivial_usage \ |
4655 | "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID]... [-fs]" \ |
4656 | |
4657 | #define lpq_full_usage "\n\n" \ |
4658 | " -P lp service to connect to (else uses $PRINTER)" \ |
4659 | "\n -d Delete jobs" \ |
4660 | "\n -f Force any waiting job to be printed" \ |
4661 | "\n -s Short display" \ |
4662 | |
4663 | #define free_trivial_usage \ |
4664 | "" IF_DESKTOP("[-b/k/m/g]") \ |
4665 | |
4666 | #define free_full_usage "\n\n" \ |
4667 | "Display the amount of free and used system memory" \ |
4668 | |
4669 | #define free_example_usage \ |
4670 | "$ free\n" \ |
4671 | " total used free shared buffers\n" \ |
4672 | " Mem: 257628 248724 8904 59644 93124\n" \ |
4673 | " Swap: 128516 8404 120112\n" \ |
4674 | "Total: 386144 257128 129016\n" \ |
4675 | |
4676 | #define fuser_trivial_usage \ |
4677 | "[OPTIONS] FILE or PORT/PROTO" \ |
4678 | |
4679 | #define fuser_full_usage "\n\n" \ |
4680 | "Find processes which use FILEs or PORTs\n" \ |
4681 | "\n -m Find processes which use same fs as FILEs" \ |
4682 | "\n -4,-6 Search only IPv4/IPv6 space" \ |
4683 | "\n -s Don't display PIDs" \ |
4684 | "\n -k Kill found processes" \ |
4685 | "\n -SIGNAL Signal to send (default: KILL)" \ |
4686 | |
4687 | #define iostat_trivial_usage \ |
4688 | "[-c] [-d] [-t] [-z] [-k|-m] [ALL|BLOCKDEV...] [INTERVAL [COUNT]]" \ |
4689 | |
4690 | #define iostat_full_usage "\n\n" \ |
4691 | "Report CPU and I/O statistics\n" \ |
4692 | "\n -c Show CPU utilization" \ |
4693 | "\n -d Show device utilization" \ |
4694 | "\n -t Print current time" \ |
4695 | "\n -z Omit devices with no activity" \ |
4696 | "\n -k Use kb/s" \ |
4697 | "\n -m Use Mb/s" \ |
4698 | |
4699 | #define kill_trivial_usage \ |
4700 | "[-l] [-SIG] PID..." \ |
4701 | |
4702 | #define kill_full_usage "\n\n" \ |
4703 | "Send a signal (default: TERM) to given PIDs\n" \ |
4704 | "\n -l List all signal names and numbers" \ |
4705 | |
4706 | #define kill_example_usage \ |
4707 | "$ ps | grep apache\n" \ |
4708 | "252 root root S [apache]\n" \ |
4709 | "263 www-data www-data S [apache]\n" \ |
4710 | "264 www-data www-data S [apache]\n" \ |
4711 | "265 www-data www-data S [apache]\n" \ |
4712 | "266 www-data www-data S [apache]\n" \ |
4713 | "267 www-data www-data S [apache]\n" \ |
4714 | "$ kill 252\n" \ |
4715 | |
4716 | #define killall_trivial_usage \ |
4717 | "[-l] [-q] [-SIG] PROCESS_NAME..." \ |
4718 | |
4719 | #define killall_full_usage "\n\n" \ |
4720 | "Send a signal (default: TERM) to given processes\n" \ |
4721 | "\n -l List all signal names and numbers" \ |
4722 | "\n -q Don't complain if no processes were killed" \ |
4723 | |
4724 | #define killall_example_usage \ |
4725 | "$ killall apache\n" \ |
4726 | |
4727 | #define killall5_trivial_usage \ |
4728 | "[-l] [-SIG] [-o PID]..." \ |
4729 | |
4730 | #define killall5_full_usage "\n\n" \ |
4731 | "Send a signal (default: TERM) to all processes outside current session\n" \ |
4732 | "\n -l List all signal names and numbers" \ |
4733 | "\n -o PID Don't signal this PID" \ |
4734 | |
4735 | #define lsof_trivial_usage \ |
4736 | "" \ |
4737 | |
4738 | #define lsof_full_usage "\n\n" \ |
4739 | "Show all open files" \ |
4740 | |
4741 | #define mpstat_trivial_usage \ |
4742 | "[-A] [-I SUM|CPU|ALL|SCPU] [-u] [-P num|ALL] [INTERVAL [COUNT]]" \ |
4743 | |
4744 | #define mpstat_full_usage "\n\n" \ |
4745 | "Per-processor statistics\n" \ |
4746 | "\n -A Same as -I ALL -u -P ALL" \ |
4747 | "\n -I SUM|CPU|ALL|SCPU Report interrupt statistics" \ |
4748 | "\n -P num|ALL Processor to monitor" \ |
4749 | "\n -u Report CPU utilization" \ |
4750 | |
4751 | #define nmeter_trivial_usage \ |
4752 | "[-d MSEC] FORMAT_STRING" \ |
4753 | |
4754 | #define nmeter_full_usage "\n\n" \ |
4755 | "Monitor system in real time" \ |
4756 | "\n" \ |
4757 | "\n -d MSEC Milliseconds between updates, default:1000, none:-1" \ |
4758 | "\n" \ |
4759 | "\nFormat specifiers:" \ |
4760 | "\n %Nc or %[cN] CPU. N - bar size (default:10)" \ |
4761 | "\n (displays: S:system U:user N:niced D:iowait I:irq i:softirq)" \ |
4762 | "\n %[nINTERFACE] Network INTERFACE" \ |
4763 | "\n %m Allocated memory" \ |
4764 | "\n %[mf] Free memory" \ |
4765 | "\n %[mt] Total memory" \ |
4766 | "\n %s Allocated swap" \ |
4767 | "\n %f Number of used file descriptors" \ |
4768 | "\n %Ni Total/specific IRQ rate" \ |
4769 | "\n %x Context switch rate" \ |
4770 | "\n %p Forks" \ |
4771 | "\n %[pn] # of processes" \ |
4772 | "\n %b Block io" \ |
4773 | "\n %Nt Time (with N decimal points)" \ |
4774 | "\n %r Print <cr> instead of <lf> at EOL" \ |
4775 | |
4776 | #define pgrep_trivial_usage \ |
4777 | "[-flnovx] [-s SID|-P PPID|PATTERN]" \ |
4778 | |
4779 | #define pgrep_full_usage "\n\n" \ |
4780 | "Display process(es) selected by regex PATTERN\n" \ |
4781 | "\n -l Show command name too" \ |
4782 | "\n -f Match against entire command line" \ |
4783 | "\n -n Show the newest process only" \ |
4784 | "\n -o Show the oldest process only" \ |
4785 | "\n -v Negate the match" \ |
4786 | "\n -x Match whole name (not substring)" \ |
4787 | "\n -s Match session ID (0 for current)" \ |
4788 | "\n -P Match parent process ID" \ |
4789 | |
4790 | #define pkill_trivial_usage \ |
4791 | "[-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN]" \ |
4792 | |
4793 | #define pkill_full_usage "\n\n" \ |
4794 | "Send a signal to process(es) selected by regex PATTERN\n" \ |
4795 | "\n -l List all signals" \ |
4796 | "\n -f Match against entire command line" \ |
4797 | "\n -n Signal the newest process only" \ |
4798 | "\n -o Signal the oldest process only" \ |
4799 | "\n -v Negate the match" \ |
4800 | "\n -x Match whole name (not substring)" \ |
4801 | "\n -s Match session ID (0 for current)" \ |
4802 | "\n -P Match parent process ID" \ |
4803 | |
4804 | #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) \ |
4805 | |
4806 | #define pidof_trivial_usage \ |
4807 | "[OPTIONS] [NAME]..." \ |
4808 | |
4809 | #define USAGE_PIDOF "\n" \ |
4810 | |
4811 | #else \ |
4812 | |
4813 | #define pidof_trivial_usage \ |
4814 | "[NAME]..." \ |
4815 | |
4816 | #define USAGE_PIDOF /* none */ \ |
4817 | |
4818 | #endif \ |
4819 | |
4820 | #define pidof_full_usage "\n\n" \ |
4821 | "List PIDs of all processes with names that match NAMEs" \ |
4822 | USAGE_PIDOF \ |
4823 | IF_FEATURE_PIDOF_SINGLE( \ |
4824 | "\n -s Show only one PID" \ |
4825 | ) \ |
4826 | IF_FEATURE_PIDOF_OMIT( \ |
4827 | "\n -o PID Omit given pid" \ |
4828 | "\n Use %PPID to omit pid of pidof's parent" \ |
4829 | ) \ |
4830 | |
4831 | #define pidof_example_usage \ |
4832 | "$ pidof init\n" \ |
4833 | "1\n" \ |
4834 | IF_FEATURE_PIDOF_OMIT( \ |
4835 | "$ pidof /bin/sh\n20351 5973 5950\n") \ |
4836 | IF_FEATURE_PIDOF_OMIT( \ |
4837 | "$ pidof /bin/sh -o %PPID\n20351 5950") \ |
4838 | |
4839 | #define pmap_trivial_usage \ |
4840 | "[-xq] PID" \ |
4841 | |
4842 | #define pmap_full_usage "\n\n" \ |
4843 | "Display process memory usage" \ |
4844 | "\n" \ |
4845 | "\n -x Show details" \ |
4846 | "\n -q Quiet" \ |
4847 | |
4848 | #define powertop_trivial_usage \ |
4849 | "" \ |
4850 | |
4851 | #define powertop_full_usage "\n\n" \ |
4852 | "Analyze power consumption on Intel-based laptops" \ |
4853 | |
4854 | #if ENABLE_DESKTOP \ |
4855 | |
4856 | #define ps_trivial_usage \ |
4857 | "[-o COL1,COL2=HEADER]" IF_FEATURE_SHOW_THREADS(" [-T]") \ |
4858 | |
4859 | #define ps_full_usage "\n\n" \ |
4860 | "Show list of processes\n" \ |
4861 | "\n -o COL1,COL2=HEADER Select columns for display" \ |
4862 | IF_FEATURE_SHOW_THREADS( \ |
4863 | "\n -T Show threads" \ |
4864 | ) \ |
4865 | |
4866 | #else /* !ENABLE_DESKTOP */ \ |
4867 | |
4868 | #if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE \ |
4869 | |
4870 | #define USAGE_PS "\nThis version of ps accepts no options" \ |
4871 | |
4872 | #else \ |
4873 | |
4874 | #define USAGE_PS "" \ |
4875 | |
4876 | #endif \ |
4877 | |
4878 | #define ps_trivial_usage \ |
4879 | "" \ |
4880 | |
4881 | #define ps_full_usage "\n\n" \ |
4882 | "Show list of processes\n" \ |
4883 | USAGE_PS \ |
4884 | IF_SELINUX( \ |
4885 | "\n -Z Show selinux context" \ |
4886 | ) \ |
4887 | IF_FEATURE_PS_WIDE( \ |
4888 | "\n w Wide output" \ |
4889 | ) \ |
4890 | IF_FEATURE_PS_LONG( \ |
4891 | "\n l Long output" \ |
4892 | ) \ |
4893 | IF_FEATURE_SHOW_THREADS( \ |
4894 | "\n T Show threads" \ |
4895 | ) \ |
4896 | |
4897 | #endif /* ENABLE_DESKTOP */ \ |
4898 | |
4899 | #define ps_example_usage \ |
4900 | "$ ps\n" \ |
4901 | " PID Uid Gid State Command\n" \ |
4902 | " 1 root root S init\n" \ |
4903 | " 2 root root S [kflushd]\n" \ |
4904 | " 3 root root S [kupdate]\n" \ |
4905 | " 4 root root S [kpiod]\n" \ |
4906 | " 5 root root S [kswapd]\n" \ |
4907 | " 742 andersen andersen S [bash]\n" \ |
4908 | " 743 andersen andersen S -bash\n" \ |
4909 | " 745 root root S [getty]\n" \ |
4910 | " 2990 andersen andersen R ps\n" \ |
4911 | |
4912 | #define pstree_trivial_usage \ |
4913 | "[-p] [PID|USER]" \ |
4914 | |
4915 | #define pstree_full_usage "\n\n" \ |
4916 | "Display process tree, optionally start from USER or PID\n" \ |
4917 | "\n -p Show pids" \ |
4918 | |
4919 | #define pwdx_trivial_usage \ |
4920 | "PID..." \ |
4921 | |
4922 | #define pwdx_full_usage "\n\n" \ |
4923 | "Show current directory for PIDs" \ |
4924 | |
4925 | #define renice_trivial_usage \ |
4926 | "[-n] PRIORITY [[-p | -g | -u] ID...]..." \ |
4927 | |
4928 | #define renice_full_usage "\n\n" \ |
4929 | "Change scheduling priority of a running process\n" \ |
4930 | "\n -n Add PRIORITY to current nice value" \ |
4931 | "\n Without -n, nice value is set to PRIORITY" \ |
4932 | "\n -p Process ids (default)" \ |
4933 | "\n -g Process group ids" \ |
4934 | "\n -u Process user names" \ |
4935 | |
4936 | #define smemcap_trivial_usage ">SMEMDATA.TAR" \ |
4937 | |
4938 | #define smemcap_full_usage "\n\n" \ |
4939 | "Collect memory usage data in /proc and write it to stdout" \ |
4940 | |
4941 | #define sysctl_trivial_usage \ |
4942 | "[OPTIONS] [KEY[=VALUE]]..." \ |
4943 | |
4944 | #define sysctl_full_usage "\n\n" \ |
4945 | "Show/set kernel parameters\n" \ |
4946 | "\n -e Don't warn about unknown keys" \ |
4947 | "\n -n Don't show key names" \ |
4948 | "\n -a Show all values" \ |
4949 | "\n -w Set values" \ |
4950 | "\n -p FILE Set values from FILE (default /etc/sysctl.conf)" \ |
4951 | "\n -q Set values silently" \ |
4952 | |
4953 | #define sysctl_example_usage \ |
4954 | "sysctl [-n] [-e] variable...\n" \ |
4955 | "sysctl [-n] [-e] [-q] -w variable=value...\n" \ |
4956 | "sysctl [-n] [-e] -a\n" \ |
4957 | "sysctl [-n] [-e] [-q] -p file (default /etc/sysctl.conf)\n" \ |
4958 | "sysctl [-n] [-e] -A\n" \ |
4959 | |
4960 | #if ENABLE_FEATURE_SHOW_THREADS || ENABLE_FEATURE_TOP_SMP_CPU \ |
4961 | |
4962 | # define IF_SHOW_THREADS_OR_TOP_SMP(...) __VA_ARGS__ \ |
4963 | |
4964 | #else \ |
4965 | |
4966 | # define IF_SHOW_THREADS_OR_TOP_SMP(...) \ |
4967 | |
4968 | #endif \ |
4969 | |
4970 | #define top_trivial_usage \ |
4971 | "[-b] [-nCOUNT] [-dSECONDS]" IF_FEATURE_TOPMEM(" [-m]") \ |
4972 | |
4973 | #define top_full_usage "\n\n" \ |
4974 | "Provide a view of process activity in real time." \ |
4975 | "\n""Read the status of all processes from /proc each SECONDS" \ |
4976 | "\n""and display a screenful of them." \ |
4977 | "\n" \ |
4978 | IF_FEATURE_USE_TERMIOS( \ |
4979 | "Keys:" \ |
4980 | "\n"" N/M" \ |
4981 | IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/P") \ |
4982 | IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/T") \ |
4983 | ": " IF_FEATURE_TOPMEM("show CPU usage, ") "sort by pid/mem" \ |
4984 | IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/cpu") \ |
4985 | IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/time") \ |
4986 | IF_FEATURE_TOPMEM( \ |
4987 | "\n"" S: show memory" \ |
4988 | ) \ |
4989 | "\n"" R: reverse sort" \ |
4990 | IF_SHOW_THREADS_OR_TOP_SMP( \ |
4991 | "\n"" " \ |
4992 | IF_FEATURE_SHOW_THREADS("H: toggle threads") \ |
4993 | IF_FEATURE_SHOW_THREADS(IF_FEATURE_TOP_SMP_CPU(", ")) \ |
4994 | IF_FEATURE_TOP_SMP_CPU("1: toggle SMP") \ |
4995 | ) \ |
4996 | "\n"" Q,^C: exit" \ |
4997 | "\n" \ |
4998 | "\n""Options:" \ |
4999 | ) \ |
5000 | "\n"" -b Batch mode" \ |
5001 | "\n"" -n N Exit after N iterations" \ |
5002 | "\n"" -d N Delay between updates" \ |
5003 | IF_FEATURE_TOPMEM( \ |
5004 | "\n"" -m Same as 's' key" \ |
5005 | ) \ |
5006 | |
5007 | #define uptime_trivial_usage \ |
5008 | "" \ |
5009 | |
5010 | #define uptime_full_usage "\n\n" \ |
5011 | "Display the time since the last boot" \ |
5012 | |
5013 | #define uptime_example_usage \ |
5014 | "$ uptime\n" \ |
5015 | " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" \ |
5016 | |
5017 | #define watch_trivial_usage \ |
5018 | "[-n SEC] [-t] PROG ARGS" \ |
5019 | |
5020 | #define watch_full_usage "\n\n" \ |
5021 | "Run PROG periodically\n" \ |
5022 | "\n -n Loop period in seconds (default 2)" \ |
5023 | "\n -t Don't print header" \ |
5024 | |
5025 | #define watch_example_usage \ |
5026 | "$ watch date\n" \ |
5027 | "Mon Dec 17 10:31:40 GMT 2000\n" \ |
5028 | "Mon Dec 17 10:31:42 GMT 2000\n" \ |
5029 | "Mon Dec 17 10:31:44 GMT 2000" \ |
5030 | |
5031 | #define chpst_trivial_usage \ |
5032 | "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \ |
5033 | " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \ |
5034 | " [-p N] [-f BYTES] [-c BYTES] PROG ARGS" \ |
5035 | |
5036 | #define chpst_full_usage "\n\n" \ |
5037 | "Change the process state, run PROG\n" \ |
5038 | "\n -u USER[:GRP] Set uid and gid" \ |
5039 | "\n -U USER[:GRP] Set $UID and $GID in environment" \ |
5040 | "\n -e DIR Set environment variables as specified by files" \ |
5041 | "\n in DIR: file=1st_line_of_file" \ |
5042 | "\n -/ DIR Chroot to DIR" \ |
5043 | "\n -n NICE Add NICE to nice value" \ |
5044 | "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES" \ |
5045 | "\n -d BYTES Limit data segment" \ |
5046 | "\n -o N Limit number of open files per process" \ |
5047 | "\n -p N Limit number of processes per uid" \ |
5048 | "\n -f BYTES Limit output file sizes" \ |
5049 | "\n -c BYTES Limit core file size" \ |
5050 | "\n -v Verbose" \ |
5051 | "\n -P Create new process group" \ |
5052 | "\n -0 Close stdin" \ |
5053 | "\n -1 Close stdout" \ |
5054 | "\n -2 Close stderr" \ |
5055 | |
5056 | #define envdir_trivial_usage \ |
5057 | "DIR PROG ARGS" \ |
5058 | |
5059 | #define envdir_full_usage "\n\n" \ |
5060 | "Set various environment variables as specified by files\n" \ |
5061 | "in the directory DIR, run PROG" \ |
5062 | |
5063 | #define envuidgid_trivial_usage \ |
5064 | "USER PROG ARGS" \ |
5065 | |
5066 | #define envuidgid_full_usage "\n\n" \ |
5067 | "Set $UID to USER's uid and $GID to USER's gid, run PROG" \ |
5068 | |
5069 | #define setuidgid_trivial_usage \ |
5070 | "USER PROG ARGS" \ |
5071 | |
5072 | #define setuidgid_full_usage "\n\n" \ |
5073 | "Set uid and gid to USER's uid and gid, drop supplementary group ids,\n" \ |
5074 | "run PROG" \ |
5075 | |
5076 | #define softlimit_trivial_usage \ |
5077 | "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" \ |
5078 | " [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" \ |
5079 | " PROG ARGS" \ |
5080 | |
5081 | #define softlimit_full_usage "\n\n" \ |
5082 | "Set soft resource limits, then run PROG\n" \ |
5083 | "\n -a BYTES Limit total size of all segments" \ |
5084 | "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES" \ |
5085 | "\n -d BYTES Limit data segment" \ |
5086 | "\n -s BYTES Limit stack segment" \ |
5087 | "\n -l BYTES Limit locked memory size" \ |
5088 | "\n -o N Limit number of open files per process" \ |
5089 | "\n -p N Limit number of processes per uid" \ |
5090 | "\nOptions controlling file sizes:" \ |
5091 | "\n -f BYTES Limit output file sizes" \ |
5092 | "\n -c BYTES Limit core file size" \ |
5093 | "\nEfficiency opts:" \ |
5094 | "\n -r BYTES Limit resident set size" \ |
5095 | "\n -t N Limit CPU time, process receives" \ |
5096 | "\n a SIGXCPU after N seconds" \ |
5097 | |
5098 | #define runsv_trivial_usage \ |
5099 | "DIR" \ |
5100 | |
5101 | #define runsv_full_usage "\n\n" \ |
5102 | "Start and monitor a service and optionally an appendant log service" \ |
5103 | |
5104 | #define runsvdir_trivial_usage \ |
5105 | "[-P] [-s SCRIPT] DIR" \ |
5106 | |
5107 | #define runsvdir_full_usage "\n\n" \ |
5108 | "Start a runsv process for each subdirectory. If it exits, restart it.\n" \ |
5109 | "\n -P Put each runsv in a new session" \ |
5110 | "\n -s SCRIPT Run SCRIPT <signo> after signal is processed" \ |
5111 | |
5112 | #define sv_trivial_usage \ |
5113 | "[-v] [-w SEC] CMD SERVICE_DIR..." \ |
5114 | |
5115 | #define sv_full_usage "\n\n" \ |
5116 | "Control services monitored by runsv supervisor.\n" \ |
5117 | "Commands (only first character is enough):\n" \ |
5118 | "\n" \ |
5119 | "status: query service status\n" \ |
5120 | "up: if service isn't running, start it. If service stops, restart it\n" \ |
5121 | "once: like 'up', but if service stops, don't restart it\n" \ |
5122 | "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \ |
5123 | " if it exists. After it stops, don't restart service\n" \ |
5124 | "exit: send TERM and CONT signals to service and log service. If they exit,\n" \ |
5125 | " runsv exits too\n" \ |
5126 | "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \ |
5127 | "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \ |
5128 | |
5129 | #define svc_trivial_usage \ |
5130 | "[-udopchaitkx] SERVICE_DIR..." \ |
5131 | |
5132 | #define svc_full_usage "\n\n" \ |
5133 | "Control services monitored by runsv supervisor" \ |
5134 | "\n" \ |
5135 | "\n"" -u If service is not running, start it; restart if it stops" \ |
5136 | "\n"" -d If service is running, send TERM+CONT signals; do not restart it" \ |
5137 | "\n"" -o Once: if service is not running, start it; do not restart it" \ |
5138 | "\n"" -pchaitk Send STOP, CONT, HUP, ALRM, INT, TERM, KILL signal to service" \ |
5139 | "\n"" -x Exit: runsv will exit as soon as the service is down" \ |
5140 | |
5141 | #define svlogd_trivial_usage \ |
5142 | "[-ttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..." \ |
5143 | |
5144 | #define svlogd_full_usage "\n\n" \ |
5145 | "Continuously read log data from stdin and write to rotated log files in DIRs" \ |
5146 | "\n" \ |
5147 | "\n""DIR/config file modifies behavior:" \ |
5148 | "\n""sSIZE - when to rotate logs" \ |
5149 | "\n""nNUM - number of files to retain" \ |
5150 | "\n""!PROG - process rotated log with PROG" \ |
5151 | "\n""+,-PATTERN - (de)select line for logging" \ |
5152 | "\n""E,ePATTERN - (de)select line for stderr" \ |
5153 | |
5154 | #define chcon_trivial_usage \ |
5155 | "[OPTIONS] CONTEXT FILE..." \ |
5156 | "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \ |
5157 | IF_FEATURE_CHCON_LONG_OPTIONS( \ |
5158 | "\n chcon [OPTIONS] --reference=RFILE FILE..." \ |
5159 | ) \ |
5160 | |
5161 | #define chcon_full_usage "\n\n" \ |
5162 | "Change the security context of each FILE to CONTEXT\n" \ |
5163 | IF_FEATURE_CHCON_LONG_OPTIONS( \ |
5164 | "\n -v,--verbose Verbose" \ |
5165 | "\n -c,--changes Report changes made" \ |
5166 | "\n -h,--no-dereference Affect symlinks instead of their targets" \ |
5167 | "\n -f,--silent,--quiet Suppress most error messages" \ |
5168 | "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \ |
5169 | "\n -u,--user=USER Set user/role/type/range in the target" \ |
5170 | "\n -r,--role=ROLE security context" \ |
5171 | "\n -t,--type=TYPE" \ |
5172 | "\n -l,--range=RANGE" \ |
5173 | "\n -R,--recursive Recurse" \ |
5174 | ) \ |
5175 | IF_NOT_FEATURE_CHCON_LONG_OPTIONS( \ |
5176 | "\n -v Verbose" \ |
5177 | "\n -c Report changes made" \ |
5178 | "\n -h Affect symlinks instead of their targets" \ |
5179 | "\n -f Suppress most error messages" \ |
5180 | "\n -u USER Set user/role/type/range in the target security context" \ |
5181 | "\n -r ROLE" \ |
5182 | "\n -t TYPE" \ |
5183 | "\n -l RNG" \ |
5184 | "\n -R Recurse" \ |
5185 | ) \ |
5186 | |
5187 | #define getenforce_trivial_usage NOUSAGE_STR \ |
5188 | |
5189 | #define getenforce_full_usage "" \ |
5190 | |
5191 | #define getsebool_trivial_usage \ |
5192 | "-a or getsebool boolean..." \ |
5193 | |
5194 | #define getsebool_full_usage "\n\n" \ |
5195 | " -a Show all selinux booleans" \ |
5196 | |
5197 | #define load_policy_trivial_usage NOUSAGE_STR \ |
5198 | |
5199 | #define load_policy_full_usage "" \ |
5200 | |
5201 | #define matchpathcon_trivial_usage \ |
5202 | "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]" \ |
5203 | |
5204 | #define matchpathcon_full_usage "\n\n" \ |
5205 | " -n Don't display path" \ |
5206 | "\n -N Don't use translations" \ |
5207 | "\n -f Use alternate file_context file" \ |
5208 | "\n -p Use prefix to speed translations" \ |
5209 | "\n -V Verify file context on disk matches defaults" \ |
5210 | |
5211 | #define runcon_trivial_usage \ |
5212 | "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG ARGS\n" \ |
5213 | "runcon CONTEXT PROG ARGS" \ |
5214 | |
5215 | #define runcon_full_usage "\n\n" \ |
5216 | "Run PROG in a different security context\n" \ |
5217 | "\n CONTEXT Complete security context\n" \ |
5218 | IF_FEATURE_RUNCON_LONG_OPTIONS( \ |
5219 | "\n -c,--compute Compute process transition context before modifying" \ |
5220 | "\n -t,--type=TYPE Type (for same role as parent)" \ |
5221 | "\n -u,--user=USER User identity" \ |
5222 | "\n -r,--role=ROLE Role" \ |
5223 | "\n -l,--range=RNG Levelrange" \ |
5224 | ) \ |
5225 | IF_NOT_FEATURE_RUNCON_LONG_OPTIONS( \ |
5226 | "\n -c Compute process transition context before modifying" \ |
5227 | "\n -t TYPE Type (for same role as parent)" \ |
5228 | "\n -u USER User identity" \ |
5229 | "\n -r ROLE Role" \ |
5230 | "\n -l RNG Levelrange" \ |
5231 | ) \ |
5232 | |
5233 | #define selinuxenabled_trivial_usage NOUSAGE_STR \ |
5234 | |
5235 | #define selinuxenabled_full_usage "" \ |
5236 | |
5237 | #define sestatus_trivial_usage \ |
5238 | "[-vb]" \ |
5239 | |
5240 | #define sestatus_full_usage "\n\n" \ |
5241 | " -v Verbose" \ |
5242 | "\n -b Display current state of booleans" \ |
5243 | |
5244 | #define setenforce_trivial_usage \ |
5245 | "[Enforcing | Permissive | 1 | 0]" \ |
5246 | |
5247 | #define setenforce_full_usage "" \ |
5248 | |
5249 | #define setfiles_trivial_usage \ |
5250 | "[-dnpqsvW] [-e DIR]... [-o FILE] [-r alt_root_path]" \ |
5251 | IF_FEATURE_SETFILES_CHECK_OPTION( \ |
5252 | " [-c policyfile] spec_file" \ |
5253 | ) \ |
5254 | " pathname" \ |
5255 | |
5256 | #define setfiles_full_usage "\n\n" \ |
5257 | "Reset file contexts under pathname according to spec_file\n" \ |
5258 | IF_FEATURE_SETFILES_CHECK_OPTION( \ |
5259 | "\n -c FILE Check the validity of the contexts against the specified binary policy" \ |
5260 | ) \ |
5261 | "\n -d Show which specification matched each file" \ |
5262 | "\n -l Log changes in file labels to syslog" \ |
5263 | "\n -n Don't change any file labels" \ |
5264 | "\n -q Suppress warnings" \ |
5265 | "\n -r DIR Use an alternate root path" \ |
5266 | "\n -e DIR Exclude DIR" \ |
5267 | "\n -F Force reset of context to match file_context for customizable files" \ |
5268 | "\n -o FILE Save list of files with incorrect context" \ |
5269 | "\n -s Take a list of files from stdin (instead of command line)" \ |
5270 | "\n -v Show changes in file labels, if type or role are changing" \ |
5271 | "\n -vv Show changes in file labels, if type, role, or user are changing" \ |
5272 | "\n -W Display warnings about entries that had no matching files" \ |
5273 | |
5274 | #define restorecon_trivial_usage \ |
5275 | "[-iFnRv] [-e EXCLUDEDIR]... [-o FILE] [-f FILE]" \ |
5276 | |
5277 | #define restorecon_full_usage "\n\n" \ |
5278 | "Reset security contexts of files in pathname\n" \ |
5279 | "\n -i Ignore files that don't exist" \ |
5280 | "\n -f FILE File with list of files to process" \ |
5281 | "\n -e DIR Directory to exclude" \ |
5282 | "\n -R,-r Recurse" \ |
5283 | "\n -n Don't change any file labels" \ |
5284 | "\n -o FILE Save list of files with incorrect context" \ |
5285 | "\n -v Verbose" \ |
5286 | "\n -vv Show changed labels" \ |
5287 | "\n -F Force reset of context to match file_context" \ |
5288 | "\n for customizable files, or the user section," \ |
5289 | "\n if it has changed" \ |
5290 | |
5291 | #define setsebool_trivial_usage \ |
5292 | "boolean value" \ |
5293 | |
5294 | #define setsebool_full_usage "\n\n" \ |
5295 | "Change boolean setting" \ |
5296 | |
5297 | #define ash_trivial_usage \ |
5298 | "[-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]" \ |
5299 | |
5300 | #define ash_full_usage "\n\n" \ |
5301 | "Unix shell interpreter" \ |
5302 | |
5303 | #if ENABLE_FEATURE_SH_IS_ASH \ |
5304 | |
5305 | # define sh_trivial_usage ash_trivial_usage \ |
5306 | |
5307 | # define sh_full_usage ash_full_usage \ |
5308 | |
5309 | #endif \ |
5310 | |
5311 | #if ENABLE_FEATURE_BASH_IS_ASH \ |
5312 | |
5313 | # define bash_trivial_usage ash_trivial_usage \ |
5314 | |
5315 | # define bash_full_usage ash_full_usage \ |
5316 | |
5317 | #endif \ |
5318 | |
5319 | #define ash_trivial_usage \ |
5320 | "[-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]" \ |
5321 | |
5322 | #define ash_full_usage "\n\n" \ |
5323 | "Unix shell interpreter" \ |
5324 | |
5325 | #define cttyhack_trivial_usage \ |
5326 | "[PROG ARGS]" \ |
5327 | |
5328 | #define cttyhack_full_usage "\n\n" \ |
5329 | "Give PROG a controlling tty if possible." \ |
5330 | "\nExample for /etc/inittab (for busybox init):" \ |
5331 | "\n ::respawn:/bin/cttyhack /bin/sh" \ |
5332 | "\nGiving controlling tty to shell running with PID 1:" \ |
5333 | "\n $ exec cttyhack sh" \ |
5334 | "\nStarting interactive shell from boot shell script:" \ |
5335 | "\n setsid cttyhack sh" \ |
5336 | |
5337 | #define hush_trivial_usage \ |
5338 | "[-nxl] [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]" \ |
5339 | |
5340 | #define hush_full_usage "\n\n" \ |
5341 | "Unix shell interpreter" \ |
5342 | |
5343 | #define klogd_trivial_usage \ |
5344 | "[-c N] [-n]" \ |
5345 | |
5346 | #define klogd_full_usage "\n\n" \ |
5347 | "Kernel logger\n" \ |
5348 | "\n -c N Print to console messages more urgent than prio N (1-8)" \ |
5349 | "\n -n Run in foreground" \ |
5350 | |
5351 | #define logger_trivial_usage \ |
5352 | "[OPTIONS] [MESSAGE]" \ |
5353 | |
5354 | #define logger_full_usage "\n\n" \ |
5355 | "Write MESSAGE (or stdin) to syslog\n" \ |
5356 | "\n -s Log to stderr as well as the system log" \ |
5357 | "\n -t TAG Log using the specified tag (defaults to user name)" \ |
5358 | "\n -p PRIO Priority (numeric or facility.level pair)" \ |
5359 | |
5360 | #define logger_example_usage \ |
5361 | "$ logger \"hello\"\n" \ |
5362 | |
5363 | #define logread_trivial_usage \ |
5364 | "[-fF]" \ |
5365 | |
5366 | #define logread_full_usage "\n\n" \ |
5367 | "Show messages in syslogd's circular buffer\n" \ |
5368 | "\n -f Output data as log grows" \ |
5369 | "\n -F Same as -f, but dump buffer first" \ |
5370 | |
5371 | #define syslogd_trivial_usage \ |
5372 | "[OPTIONS]" \ |
5373 | |
5374 | #define syslogd_full_usage "\n\n" \ |
5375 | "System logging utility\n" \ |
5376 | IF_NOT_FEATURE_SYSLOGD_CFG( \ |
5377 | "(this version of syslogd ignores /etc/syslog.conf)\n" \ |
5378 | ) \ |
5379 | "\n -n Run in foreground" \ |
5380 | IF_FEATURE_REMOTE_LOG( \ |
5381 | "\n -R HOST[:PORT] Log to HOST:PORT (default PORT:514)" \ |
5382 | "\n -L Log locally and via network (default is network only if -R)" \ |
5383 | ) \ |
5384 | IF_FEATURE_IPC_SYSLOG( \ |
5385 | "\n -C[size_kb] Log to shared mem buffer (use logread to read it)" \ |
5386 | ) \ |
5387 | IF_FEATURE_KMSG_SYSLOG( \ |
5388 | "\n -K Log to kernel printk buffer (use dmesg to read it)" \ |
5389 | ) \ |
5390 | "\n -O FILE Log to FILE (default: /var/log/messages, stdout if -)" \ |
5391 | IF_FEATURE_ROTATE_LOGFILE( \ |
5392 | "\n -s SIZE Max size (KB) before rotation (default:200KB, 0=off)" \ |
5393 | "\n -b N N rotated logs to keep (default:1, max=99, 0=purge)" \ |
5394 | ) \ |
5395 | "\n -l N Log only messages more urgent than prio N (1-8)" \ |
5396 | "\n -S Smaller output" \ |
5397 | IF_FEATURE_SYSLOGD_DUP( \ |
5398 | "\n -D Drop duplicates" \ |
5399 | ) \ |
5400 | IF_FEATURE_SYSLOGD_CFG( \ |
5401 | "\n -f FILE Use FILE as config (default:/etc/syslog.conf)" \ |
5402 | ) \ |
5403 | |
5404 | #define syslogd_example_usage \ |
5405 | "$ syslogd -R masterlog:514\n" \ |
5406 | "$ syslogd -R 192.168.1.1:601\n" \ |
5407 | |
5408 | #define acpid_trivial_usage \ |
5409 | "[-df] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]" \ |
5410 | |
5411 | #define acpid_full_usage "\n\n" \ |
5412 | "Listen to ACPI events and spawn specific helpers on event arrival\n" \ |
5413 | "\n -d Log to stderr, not log file (implies -f)" \ |
5414 | "\n -f Run in foreground" \ |
5415 | "\n -c DIR Config directory [/etc/acpi]" \ |
5416 | "\n -e FILE /proc event file [/proc/acpi/event]" \ |
5417 | "\n -l FILE Log file [/var/log/acpid.log]" \ |
5418 | "\n -p FILE Pid file [/var/run/acpid.pid]" \ |
5419 | "\n -a FILE Action file [/etc/acpid.conf]" \ |
5420 | "\n -M FILE Map file [/etc/acpi.map]" \ |
5421 | IF_FEATURE_ACPID_COMPAT( \ |
5422 | "\n\nAccept and ignore compatibility options -g -m -s -S -v" \ |
5423 | ) \ |
5424 | |
5425 | #define acpid_example_usage \ |
5426 | "Without -e option, acpid uses all /dev/input/event* files\n" \ |
5427 | "# acpid\n" \ |
5428 | "# acpid -l /var/log/my-acpi-log\n" \ |
5429 | "# acpid -e /proc/acpi/event\n" \ |
5430 | |
5431 | #define blkdiscard_trivial_usage \ |
5432 | "[-o OFS] [-l LEN] [-s] DEVICE" \ |
5433 | |
5434 | #define blkdiscard_full_usage "\n\n" \ |
5435 | "Discard sectors on DEVICE\n" \ |
5436 | "\n -o OFS Byte offset into device" \ |
5437 | "\n -l LEN Number of bytes to discard" \ |
5438 | "\n -s Perform a secure discard" \ |
5439 | |
5440 | #define blkdiscard_example_usage \ |
5441 | "$ blkdiscard -o 0 -l 1G /dev/sdb" \ |
5442 | |
5443 | #define blkid_trivial_usage \ |
5444 | "[BLOCKDEV]..." \ |
5445 | |
5446 | #define blkid_full_usage "\n\n" \ |
5447 | "Print UUIDs of all filesystems" \ |
5448 | |
5449 | #define blockdev_trivial_usage \ |
5450 | "OPTION BLOCKDEV" \ |
5451 | |
5452 | #define blockdev_full_usage "\n\n" \ |
5453 | " --setro Set ro" \ |
5454 | "\n --setrw Set rw" \ |
5455 | "\n --getro Get ro" \ |
5456 | "\n --getss Get sector size" \ |
5457 | "\n --getbsz Get block size" \ |
5458 | "\n --setbsz BYTES Set block size" \ |
5459 | "\n --getsz Get device size in 512-byte sectors" \ |
5460 | "\n --getsize64 Get device size in bytes" \ |
5461 | "\n --flushbufs Flush buffers" \ |
5462 | "\n --rereadpt Reread partition table" \ |
5463 | |
5464 | #define dmesg_trivial_usage \ |
5465 | "[-c] [-n LEVEL] [-s SIZE]" \ |
5466 | |
5467 | #define dmesg_full_usage "\n\n" \ |
5468 | "Print or control the kernel ring buffer\n" \ |
5469 | "\n -c Clear ring buffer after printing" \ |
5470 | "\n -n LEVEL Set console logging level" \ |
5471 | "\n -s SIZE Buffer size" \ |
5472 | "\n -r Print raw message buffer" \ |
5473 | |
5474 | #define fatattr_trivial_usage \ |
5475 | "[-+rhsvda] FILE..." \ |
5476 | |
5477 | #define fatattr_full_usage "\n\n" \ |
5478 | "Change file attributes on FAT filesystem\n" \ |
5479 | "\n - Clear attributes" \ |
5480 | "\n + Set attributes" \ |
5481 | "\n r Read only" \ |
5482 | "\n h Hidden" \ |
5483 | "\n s System" \ |
5484 | "\n v Volume label" \ |
5485 | "\n d Directory" \ |
5486 | "\n a Archive" \ |
5487 | |
5488 | #define fbset_trivial_usage \ |
5489 | "[OPTIONS] [MODE]" \ |
5490 | |
5491 | #define fbset_full_usage "\n\n" \ |
5492 | "Show and modify frame buffer settings" \ |
5493 | |
5494 | #define fbset_example_usage \ |
5495 | "$ fbset\n" \ |
5496 | "mode \"1024x768-76\"\n" \ |
5497 | " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \ |
5498 | " geometry 1024 768 1024 768 16\n" \ |
5499 | " timings 12714 128 32 16 4 128 4\n" \ |
5500 | " accel false\n" \ |
5501 | " rgba 5/11,6/5,5/0,0/0\n" \ |
5502 | "endmode\n" \ |
5503 | |
5504 | #define fdformat_trivial_usage \ |
5505 | "[-n] DEVICE" \ |
5506 | |
5507 | #define fdformat_full_usage "\n\n" \ |
5508 | "Format floppy disk\n" \ |
5509 | "\n -n Don't verify after format" \ |
5510 | |
5511 | #ifndef ENABLE_FEATURE_FDISK_BLKSIZE \ |
5512 | |
5513 | # define ENABLE_FEATURE_FDISK_BLKSIZE 0 \ |
5514 | |
5515 | # define IF_FEATURE_FDISK_BLKSIZE(a) \ |
5516 | |
5517 | #endif \ |
5518 | |
5519 | #define fdisk_trivial_usage \ |
5520 | "[-ul" IF_FEATURE_FDISK_BLKSIZE("s") "] " \ |
5521 | "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK" \ |
5522 | |
5523 | #define fdisk_full_usage "\n\n" \ |
5524 | "Change partition table\n" \ |
5525 | "\n -u Start and End are in sectors (instead of cylinders)" \ |
5526 | "\n -l Show partition table for each DISK, then exit" \ |
5527 | IF_FEATURE_FDISK_BLKSIZE( \ |
5528 | "\n -s Show partition sizes in kb for each DISK, then exit" \ |
5529 | ) \ |
5530 | "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \ |
5531 | "\n -C CYLINDERS Set number of cylinders/heads/sectors" \ |
5532 | "\n -H HEADS" \ |
5533 | "\n -S SECTORS" \ |
5534 | |
5535 | #define findfs_trivial_usage \ |
5536 | "LABEL=label or UUID=uuid" \ |
5537 | |
5538 | #define findfs_full_usage "\n\n" \ |
5539 | "Find a filesystem device based on a label or UUID" \ |
5540 | |
5541 | #define findfs_example_usage \ |
5542 | "$ findfs LABEL=MyDevice" \ |
5543 | |
5544 | #define flock_trivial_usage \ |
5545 | "[-sxun] FD|{FILE [-c] PROG ARGS}" \ |
5546 | |
5547 | #define flock_full_usage "\n\n" \ |
5548 | "[Un]lock file descriptor, or lock FILE, run PROG\n" \ |
5549 | "\n -s Shared lock" \ |
5550 | "\n -x Exclusive lock (default)" \ |
5551 | "\n -u Unlock FD" \ |
5552 | "\n -n Fail rather than wait" \ |
5553 | |
5554 | #define freeramdisk_trivial_usage \ |
5555 | "DEVICE" \ |
5556 | |
5557 | #define freeramdisk_full_usage "\n\n" \ |
5558 | "Free all memory used by the specified ramdisk" \ |
5559 | |
5560 | #define freeramdisk_example_usage \ |
5561 | "$ freeramdisk /dev/ram2\n" \ |
5562 | |
5563 | #define fdflush_trivial_usage \ |
5564 | "DEVICE" \ |
5565 | |
5566 | #define fdflush_full_usage "\n\n" \ |
5567 | "Force floppy disk drive to detect disk change" \ |
5568 | |
5569 | #define fsck_minix_trivial_usage \ |
5570 | "[-larvsmf] BLOCKDEV" \ |
5571 | |
5572 | #define fsck_minix_full_usage "\n\n" \ |
5573 | "Check MINIX filesystem\n" \ |
5574 | "\n -l List all filenames" \ |
5575 | "\n -r Perform interactive repairs" \ |
5576 | "\n -a Perform automatic repairs" \ |
5577 | "\n -v Verbose" \ |
5578 | "\n -s Output superblock information" \ |
5579 | "\n -m Show \"mode not cleared\" warnings" \ |
5580 | "\n -f Force file system check" \ |
5581 | |
5582 | #define fstrim_trivial_usage \ |
5583 | "[OPTIONS] MOUNTPOINT" \ |
5584 | |
5585 | #define fstrim_full_usage "\n\n" \ |
5586 | IF_LONG_OPTS( \ |
5587 | " -o,--offset=OFFSET Offset in bytes to discard from" \ |
5588 | "\n -l,--length=LEN Bytes to discard" \ |
5589 | "\n -m,--minimum=MIN Minimum extent length" \ |
5590 | "\n -v,--verbose Print number of discarded bytes" \ |
5591 | ) \ |
5592 | IF_NOT_LONG_OPTS( \ |
5593 | " -o OFFSET Offset in bytes to discard from" \ |
5594 | "\n -l LEN Bytes to discard" \ |
5595 | "\n -m MIN Minimum extent length" \ |
5596 | "\n -v Print number of discarded bytes" \ |
5597 | ) \ |
5598 | |
5599 | #define getopt_trivial_usage \ |
5600 | "[OPTIONS] [--] OPTSTRING PARAMS" \ |
5601 | |
5602 | #define getopt_full_usage "\n\n" \ |
5603 | IF_LONG_OPTS( \ |
5604 | IF_FEATURE_GETOPT_LONG( \ |
5605 | " -a,--alternative Allow long options starting with single -\n" \ |
5606 | " -l,--longoptions=LOPT[,...] Long options to recognize\n" \ |
5607 | ) \ |
5608 | " -n,--name=PROGNAME The name under which errors are reported" \ |
5609 | "\n -o,--options=OPTSTRING Short options to recognize" \ |
5610 | "\n -q,--quiet No error messages on unrecognized options" \ |
5611 | "\n -Q,--quiet-output No normal output" \ |
5612 | "\n -s,--shell=SHELL Set shell quoting conventions" \ |
5613 | "\n -T,--test Version test (exits with 4)" \ |
5614 | "\n -u,--unquoted Don't quote output" \ |
5615 | ) \ |
5616 | IF_NOT_LONG_OPTS( \ |
5617 | IF_FEATURE_GETOPT_LONG( \ |
5618 | " -a Allow long options starting with single -\n" \ |
5619 | " -l LOPT[,...] Long options to recognize\n" \ |
5620 | ) \ |
5621 | " -n PROGNAME The name under which errors are reported" \ |
5622 | "\n -o OPTSTRING Short options to recognize" \ |
5623 | "\n -q No error messages on unrecognized options" \ |
5624 | "\n -Q No normal output" \ |
5625 | "\n -s SHELL Set shell quoting conventions" \ |
5626 | "\n -T Version test (exits with 4)" \ |
5627 | "\n -u Don't quote output" \ |
5628 | ) \ |
5629 | IF_FEATURE_GETOPT_LONG( /* example uses -l, needs FEATURE_GETOPT_LONG */ \ |
5630 | "\n" \ |
5631 | "\nExample:" \ |
5632 | "\n" \ |
5633 | "\nO=`getopt -l bb: -- ab:c:: \"$@\"` || exit 1" \ |
5634 | "\neval set -- \"$O\"" \ |
5635 | "\nwhile true; do" \ |
5636 | "\n case \"$1\" in" \ |
5637 | "\n -a) echo A; shift;;" \ |
5638 | "\n -b|--bb) echo \"B:'$2'\"; shift 2;;" \ |
5639 | "\n -c) case \"$2\" in" \ |
5640 | "\n \"\") echo C; shift 2;;" \ |
5641 | "\n *) echo \"C:'$2'\"; shift 2;;" \ |
5642 | "\n esac;;" \ |
5643 | "\n --) shift; break;;" \ |
5644 | "\n *) echo Error; exit 1;;" \ |
5645 | "\n esac" \ |
5646 | "\ndone" \ |
5647 | ) \ |
5648 | |
5649 | #define getopt_example_usage \ |
5650 | "$ cat getopt.test\n" \ |
5651 | "#!/bin/sh\n" \ |
5652 | "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \ |
5653 | " -n 'example.busybox' -- \"$@\"`\n" \ |
5654 | "if [ $? != 0 ]; then exit 1; fi\n" \ |
5655 | "eval set -- \"$GETOPT\"\n" \ |
5656 | "while true; do\n" \ |
5657 | " case $1 in\n" \ |
5658 | " -a|--a-long) echo \"Option a\"; shift;;\n" \ |
5659 | " -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \ |
5660 | " -c|--c-long)\n" \ |
5661 | " case \"$2\" in\n" \ |
5662 | " \"\") echo \"Option c, no argument\"; shift 2;;\n" \ |
5663 | " *) echo \"Option c, argument '$2'\"; shift 2;;\n" \ |
5664 | " esac;;\n" \ |
5665 | " --) shift; break;;\n" \ |
5666 | " *) echo \"Internal error!\"; exit 1;;\n" \ |
5667 | " esac\n" \ |
5668 | "done\n" \ |
5669 | |
5670 | #define hexdump_trivial_usage \ |
5671 | "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..." \ |
5672 | |
5673 | #define hexdump_full_usage "\n\n" \ |
5674 | "Display FILEs (or stdin) in a user specified format\n" \ |
5675 | "\n -b One-byte octal display" \ |
5676 | "\n -c One-byte character display" \ |
5677 | "\n -C Canonical hex+ASCII, 16 bytes per line" \ |
5678 | "\n -d Two-byte decimal display" \ |
5679 | "\n -e FORMAT_STRING" \ |
5680 | "\n -f FORMAT_FILE" \ |
5681 | "\n -n LENGTH Interpret only LENGTH bytes of input" \ |
5682 | "\n -o Two-byte octal display" \ |
5683 | "\n -s OFFSET Skip OFFSET bytes" \ |
5684 | "\n -v Display all input data" \ |
5685 | "\n -x Two-byte hexadecimal display" \ |
5686 | IF_FEATURE_HEXDUMP_REVERSE( \ |
5687 | "\n -R Reverse of 'hexdump -Cv'") \ |
5688 | |
5689 | #define hd_trivial_usage \ |
5690 | "FILE..." \ |
5691 | |
5692 | #define hd_full_usage "\n\n" \ |
5693 | "hd is an alias for hexdump -C" \ |
5694 | |
5695 | #define hwclock_trivial_usage \ |
5696 | IF_FEATURE_HWCLOCK_LONG_OPTIONS( \ |
5697 | "[-r|--show] [-s|--hctosys] [-w|--systohc] [-t|--systz]" \ |
5698 | " [-l|--localtime] [-u|--utc]" \ |
5699 | " [-f|--rtc FILE]" \ |
5700 | ) \ |
5701 | IF_NOT_FEATURE_HWCLOCK_LONG_OPTIONS( \ |
5702 | "[-r] [-s] [-w] [-t] [-l] [-u] [-f FILE]" \ |
5703 | ) \ |
5704 | |
5705 | #define hwclock_full_usage "\n\n" \ |
5706 | "Query and set hardware clock (RTC)\n" \ |
5707 | "\n -r Show hardware clock time" \ |
5708 | "\n -s Set system time from hardware clock" \ |
5709 | "\n -w Set hardware clock from system time" \ |
5710 | "\n -t Set in-kernel timezone, correct system time" \ |
5711 | "\n if hardware clock is in local time" \ |
5712 | "\n -u Assume hardware clock is kept in UTC" \ |
5713 | "\n -l Assume hardware clock is kept in local time" \ |
5714 | "\n -f FILE Use specified device (e.g. /dev/rtc2)" \ |
5715 | |
5716 | #define ipcrm_trivial_usage \ |
5717 | "[-MQS key] [-mqs id]" \ |
5718 | |
5719 | #define ipcrm_full_usage "\n\n" \ |
5720 | "Upper-case options MQS remove an object by shmkey value.\n" \ |
5721 | "Lower-case options remove an object by shmid value.\n" \ |
5722 | "\n -mM Remove memory segment after last detach" \ |
5723 | "\n -qQ Remove message queue" \ |
5724 | "\n -sS Remove semaphore" \ |
5725 | |
5726 | #define ipcs_trivial_usage \ |
5727 | "[[-smq] -i shmid] | [[-asmq] [-tcplu]]" \ |
5728 | |
5729 | #define ipcs_full_usage "\n\n" \ |
5730 | " -i Show specific resource" \ |
5731 | "\nResource specification:" \ |
5732 | "\n -m Shared memory segments" \ |
5733 | "\n -q Message queues" \ |
5734 | "\n -s Semaphore arrays" \ |
5735 | "\n -a All (default)" \ |
5736 | "\nOutput format:" \ |
5737 | "\n -t Time" \ |
5738 | "\n -c Creator" \ |
5739 | "\n -p Pid" \ |
5740 | "\n -l Limits" \ |
5741 | "\n -u Summary" \ |
5742 | |
5743 | #define losetup_trivial_usage \ |
5744 | "[-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices\n" \ |
5745 | " losetup -d LOOPDEV - disassociate\n" \ |
5746 | " losetup -a - show status\n" \ |
5747 | " losetup -f - show next free loop device" \ |
5748 | |
5749 | #define losetup_full_usage "\n\n" \ |
5750 | " -o OFS Start OFS bytes into FILE" \ |
5751 | "\n -r Read-only" \ |
5752 | "\n -f Show/use next free loop device" \ |
5753 | |
5754 | #define losetup_notes_usage \ |
5755 | "One argument (losetup /dev/loop1) will display the current association\n" \ |
5756 | "(if any), or disassociate it (with -d). The display shows the offset\n" \ |
5757 | "and filename of the file the loop device is currently bound to.\n\n" \ |
5758 | "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \ |
5759 | "with an optional offset (-o 12345). Encryption is not yet supported.\n" \ |
5760 | "losetup -f will show the first loop free loop device\n\n" \ |
5761 | |
5762 | #define lspci_trivial_usage \ |
5763 | "[-mk]" \ |
5764 | |
5765 | #define lspci_full_usage "\n\n" \ |
5766 | "List all PCI devices" \ |
5767 | "\n" \ |
5768 | "\n -m Parsable output" \ |
5769 | "\n -k Show driver" \ |
5770 | |
5771 | #define lsusb_trivial_usage NOUSAGE_STR \ |
5772 | |
5773 | #define lsusb_full_usage "" \ |
5774 | |
5775 | #define mdev_trivial_usage \ |
5776 | "[-s]" \ |
5777 | |
5778 | #define mdev_full_usage "\n\n" \ |
5779 | "mdev -s is to be run during boot to scan /sys and populate /dev.\n" \ |
5780 | "\n" \ |
5781 | "Bare mdev is a kernel hotplug helper. To activate it:\n" \ |
5782 | " echo /sbin/mdev >/proc/sys/kernel/hotplug\n" \ |
5783 | IF_FEATURE_MDEV_CONF( \ |
5784 | "\n" \ |
5785 | "It uses /etc/mdev.conf with lines\n" \ |
5786 | " [-][ENV=regex;]...DEVNAME UID:GID PERM" \ |
5787 | IF_FEATURE_MDEV_RENAME(" [>|=PATH]|[!]") \ |
5788 | IF_FEATURE_MDEV_EXEC(" [@|$|*PROG]") \ |
5789 | "\n" \ |
5790 | "where DEVNAME is device name regex, @major,minor[-minor2], or\n" \ |
5791 | "environment variable regex. A common use of the latter is\n" \ |
5792 | "to load modules for hotplugged devices:\n" \ |
5793 | " $MODALIAS=.* 0:0 660 @modprobe \"$MODALIAS\"\n" \ |
5794 | ) \ |
5795 | "\n" \ |
5796 | "If /dev/mdev.seq file exists, mdev will wait for its value\n" \ |
5797 | "to match $SEQNUM variable. This prevents plug/unplug races.\n" \ |
5798 | "To activate this feature, create empty /dev/mdev.seq at boot.\n" \ |
5799 | "\n" \ |
5800 | "If /dev/mdev.log file exists, debug log will be appended to it." \ |
5801 | |
5802 | #define mkfs_ext2_trivial_usage \ |
5803 | "[-Fn] " \ |
5804 | "[-b BLK_SIZE] " \ |
5805 | "[-i INODE_RATIO] [-I INODE_SIZE] " \ |
5806 | "[-m RESERVED_PERCENT] " \ |
5807 | "[-L LABEL] " \ |
5808 | "BLOCKDEV [KBYTES]" \ |
5809 | |
5810 | #define mkfs_ext2_full_usage "\n\n" \ |
5811 | " -b BLK_SIZE Block size, bytes" \ |
5812 | "\n -F Force" \ |
5813 | "\n -i RATIO Max number of files is filesystem_size / RATIO" \ |
5814 | "\n -I BYTES Inode size (min 128)" \ |
5815 | "\n -L LBL Volume label" \ |
5816 | "\n -m PERCENT Percent of blocks to reserve for admin" \ |
5817 | "\n -n Dry run" \ |
5818 | |
5819 | #define mkfs_minix_trivial_usage \ |
5820 | "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]" \ |
5821 | |
5822 | #define mkfs_minix_full_usage "\n\n" \ |
5823 | "Make a MINIX filesystem\n" \ |
5824 | "\n -c Check device for bad blocks" \ |
5825 | "\n -n [14|30] Maximum length of filenames" \ |
5826 | "\n -i INODES Number of inodes for the filesystem" \ |
5827 | "\n -l FILE Read bad blocks list from FILE" \ |
5828 | "\n -v Make version 2 filesystem" \ |
5829 | |
5830 | #define mkfs_reiser_trivial_usage \ |
5831 | "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]" \ |
5832 | |
5833 | #define mkfs_reiser_full_usage "\n\n" \ |
5834 | "Make a ReiserFS V3 filesystem\n" \ |
5835 | "\n -f Force" \ |
5836 | "\n -l LBL Volume label" \ |
5837 | |
5838 | #define mkfs_vfat_trivial_usage \ |
5839 | "[-v] [-n LABEL] BLOCKDEV [KBYTES]" \ |
5840 | |
5841 | #define mkfs_vfat_full_usage "\n\n" \ |
5842 | "Make a FAT32 filesystem\n" \ |
5843 | "\n -v Verbose" \ |
5844 | "\n -n LBL Volume label" \ |
5845 | |
5846 | #define mkswap_trivial_usage \ |
5847 | "[-L LBL] BLOCKDEV [KBYTES]" \ |
5848 | |
5849 | #define mkswap_full_usage "\n\n" \ |
5850 | "Prepare BLOCKDEV to be used as swap partition\n" \ |
5851 | "\n -L LBL Label" \ |
5852 | |
5853 | #define more_trivial_usage \ |
5854 | "[FILE]..." \ |
5855 | |
5856 | #define more_full_usage "\n\n" \ |
5857 | "View FILE (or stdin) one screenful at a time" \ |
5858 | |
5859 | #define more_example_usage \ |
5860 | "$ dmesg | more\n" \ |
5861 | |
5862 | #define mount_trivial_usage \ |
5863 | "[OPTIONS] [-o OPT] DEVICE NODE" \ |
5864 | |
5865 | #define mount_full_usage "\n\n" \ |
5866 | "Mount a filesystem. Filesystem autodetection requires /proc.\n" \ |
5867 | "\n -a Mount all filesystems in fstab" \ |
5868 | IF_FEATURE_MOUNT_FAKE( \ |
5869 | IF_FEATURE_MTAB_SUPPORT( \ |
5870 | "\n -f Update /etc/mtab, but don't mount" \ |
5871 | ) \ |
5872 | IF_NOT_FEATURE_MTAB_SUPPORT( \ |
5873 | "\n -f Dry run" \ |
5874 | ) \ |
5875 | ) \ |
5876 | IF_FEATURE_MOUNT_HELPERS( \ |
5877 | "\n -i Don't run mount helper" \ |
5878 | ) \ |
5879 | IF_FEATURE_MTAB_SUPPORT( \ |
5880 | "\n -n Don't update /etc/mtab" \ |
5881 | ) \ |
5882 | IF_FEATURE_MOUNT_VERBOSE( \ |
5883 | "\n -v Verbose" \ |
5884 | ) \ |
5885 | "\n -r Read-only mount" \ |
5886 | "\n -t FSTYPE[,...] Filesystem type(s)" \ |
5887 | IF_FEATURE_MOUNT_OTHERTAB( \ |
5888 | "\n -T FILE Read FILE instead of /etc/fstab" \ |
5889 | ) \ |
5890 | "\n -O OPT Mount only filesystems with option OPT (-a only)" \ |
5891 | "\n-o OPT:" \ |
5892 | IF_FEATURE_MOUNT_LOOP( \ |
5893 | "\n loop Ignored (loop devices are autodetected)" \ |
5894 | ) \ |
5895 | IF_FEATURE_MOUNT_FLAGS( \ |
5896 | "\n [a]sync Writes are [a]synchronous" \ |
5897 | "\n [no]atime Disable/enable updates to inode access times" \ |
5898 | "\n [no]diratime Disable/enable atime updates to directories" \ |
5899 | "\n [no]relatime Disable/enable atime updates relative to modification time" \ |
5900 | "\n [no]dev (Dis)allow use of special device files" \ |
5901 | "\n [no]exec (Dis)allow use of executable files" \ |
5902 | "\n [no]suid (Dis)allow set-user-id-root programs" \ |
5903 | "\n [r]shared Convert [recursively] to a shared subtree" \ |
5904 | "\n [r]slave Convert [recursively] to a slave subtree" \ |
5905 | "\n [r]private Convert [recursively] to a private subtree" \ |
5906 | "\n [un]bindable Make mount point [un]able to be bind mounted" \ |
5907 | "\n [r]bind Bind a file or directory [recursively] to another location" \ |
5908 | "\n move Relocate an existing mount point" \ |
5909 | ) \ |
5910 | "\n remount Remount a mounted filesystem, changing flags" \ |
5911 | "\n ro Same as -r" \ |
5912 | "\n" \ |
5913 | "\nThere are filesystem-specific -o flags." \ |
5914 | |
5915 | #define mount_example_usage \ |
5916 | "$ mount\n" \ |
5917 | "/dev/hda3 on / type minix (rw)\n" \ |
5918 | "proc on /proc type proc (rw)\n" \ |
5919 | "devpts on /dev/pts type devpts (rw)\n" \ |
5920 | "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \ |
5921 | "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \ |
5922 | "$ mount cd_image.iso mydir\n" \ |
5923 | |
5924 | #define mount_notes_usage \ |
5925 | "Returns 0 for success, number of failed mounts for -a, or errno for one mount." \ |
5926 | |
5927 | #define nsenter_trivial_usage \ |
5928 | "[OPTIONS] [PROG [ARGS]]" \ |
5929 | |
5930 | #if ENABLE_FEATURE_NSENTER_LONG_OPTS \ |
5931 | |
5932 | #define nsenter_full_usage "\n" \ |
5933 | "\n -t, --target=PID Target process to get namespaces from" \ |
5934 | "\n -m, --mount[=FILE] Enter mount namespace" \ |
5935 | "\n -u, --uts[=FILE] Enter UTS namespace (hostname etc)" \ |
5936 | "\n -i, --ipc[=FILE] Enter System V IPC namespace" \ |
5937 | "\n -n, --net[=FILE] Enter network namespace" \ |
5938 | "\n -p, --pid[=FILE] Enter pid namespace" \ |
5939 | "\n -U, --user[=FILE] Enter user namespace" \ |
5940 | "\n -S, --setuid=UID Set uid in entered namespace" \ |
5941 | "\n -G, --setgid=GID Set gid in entered namespace" \ |
5942 | "\n --preserve-credentials Don't touch uids or gids" \ |
5943 | "\n -r, --root[=DIR] Set root directory" \ |
5944 | "\n -w, --wd[=DIR] Set working directory" \ |
5945 | "\n -F, --no-fork Don't fork before exec'ing PROG" \ |
5946 | |
5947 | #else \ |
5948 | |
5949 | #define nsenter_full_usage "\n" \ |
5950 | "\n -t PID Target process to get namespaces from" \ |
5951 | "\n -m[FILE] Enter mount namespace" \ |
5952 | "\n -u[FILE] Enter UTS namespace (hostname etc)" \ |
5953 | "\n -i[FILE] Enter System V IPC namespace" \ |
5954 | "\n -n[FILE] Enter network namespace" \ |
5955 | "\n -p[FILE] Enter pid namespace" \ |
5956 | "\n -U[FILE] Enter user namespace" \ |
5957 | "\n -S UID Set uid in entered namespace" \ |
5958 | "\n -G GID Set gid in entered namespace" \ |
5959 | "\n -r[DIR] Set root directory" \ |
5960 | "\n -w[DIR] Set working directory" \ |
5961 | "\n -F Don't fork before exec'ing PROG" \ |
5962 | |
5963 | #endif \ |
5964 | |
5965 | #define pivot_root_trivial_usage \ |
5966 | "NEW_ROOT PUT_OLD" \ |
5967 | |
5968 | #define pivot_root_full_usage "\n\n" \ |
5969 | "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \ |
5970 | "the new root file system" \ |
5971 | |
5972 | #define rdate_trivial_usage \ |
5973 | "[-sp] HOST" \ |
5974 | |
5975 | #define rdate_full_usage "\n\n" \ |
5976 | "Get and possibly set system time from a remote HOST\n" \ |
5977 | "\n -s Set system time (default)" \ |
5978 | "\n -p Print time" \ |
5979 | |
5980 | #define rdev_trivial_usage \ |
5981 | "" \ |
5982 | |
5983 | #define rdev_full_usage "\n\n" \ |
5984 | "Print the device node associated with the filesystem mounted at '/'" \ |
5985 | |
5986 | #define rdev_example_usage \ |
5987 | "$ rdev\n" \ |
5988 | "/dev/mtdblock9 /\n" \ |
5989 | |
5990 | #define readprofile_trivial_usage \ |
5991 | "[OPTIONS]" \ |
5992 | |
5993 | #define readprofile_full_usage "\n\n" \ |
5994 | " -m mapfile (Default: /boot/System.map)" \ |
5995 | "\n -p profile (Default: /proc/profile)" \ |
5996 | "\n -M NUM Set the profiling multiplier to NUM" \ |
5997 | "\n -i Print only info about the sampling step" \ |
5998 | "\n -v Verbose" \ |
5999 | "\n -a Print all symbols, even if count is 0" \ |
6000 | "\n -b Print individual histogram-bin counts" \ |
6001 | "\n -s Print individual counters within functions" \ |
6002 | "\n -r Reset all the counters (root only)" \ |
6003 | "\n -n Disable byte order auto-detection" \ |
6004 | |
6005 | #define rev_trivial_usage \ |
6006 | "[FILE]..." \ |
6007 | |
6008 | #define rev_full_usage "\n\n" \ |
6009 | "Reverse lines of FILE" \ |
6010 | |
6011 | #define rtcwake_trivial_usage \ |
6012 | "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]" \ |
6013 | |
6014 | #define rtcwake_full_usage "\n\n" \ |
6015 | "Enter a system sleep state until specified wakeup time\n" \ |
6016 | IF_LONG_OPTS( \ |
6017 | "\n -a,--auto Read clock mode from adjtime" \ |
6018 | "\n -l,--local Clock is set to local time" \ |
6019 | "\n -u,--utc Clock is set to UTC time" \ |
6020 | "\n -d,--device=DEV Specify the RTC device" \ |
6021 | "\n -m,--mode=MODE Set sleep state (default: standby)" \ |
6022 | "\n -s,--seconds=SEC Set timeout in SEC seconds from now" \ |
6023 | "\n -t,--time=TIME Set timeout to TIME seconds from epoch" \ |
6024 | ) \ |
6025 | IF_NOT_LONG_OPTS( \ |
6026 | "\n -a Read clock mode from adjtime" \ |
6027 | "\n -l Clock is set to local time" \ |
6028 | "\n -u Clock is set to UTC time" \ |
6029 | "\n -d DEV Specify the RTC device" \ |
6030 | "\n -m MODE Set sleep state (default: standby)" \ |
6031 | "\n -s SEC Set timeout in SEC seconds from now" \ |
6032 | "\n -t TIME Set timeout to TIME seconds from epoch" \ |
6033 | ) \ |
6034 | |
6035 | #define script_trivial_usage \ |
6036 | "[-afq" IF_SCRIPTREPLAY("t") "] [-c PROG] [OUTFILE]" \ |
6037 | |
6038 | #define script_full_usage "\n\n" \ |
6039 | " -a Append output" \ |
6040 | "\n -c PROG Run PROG, not shell" \ |
6041 | "\n -f Flush output after each write" \ |
6042 | "\n -q Quiet" \ |
6043 | IF_SCRIPTREPLAY( \ |
6044 | "\n -t Send timing to stderr" \ |
6045 | ) \ |
6046 | |
6047 | #define scriptreplay_trivial_usage \ |
6048 | "timingfile [typescript [divisor]]" \ |
6049 | |
6050 | #define scriptreplay_full_usage "\n\n" \ |
6051 | "Play back typescripts, using timing information" \ |
6052 | |
6053 | #define setarch_trivial_usage \ |
6054 | "PERSONALITY [-R] PROG ARGS" \ |
6055 | |
6056 | #define setarch_full_usage "\n\n" \ |
6057 | "PERSONALITY may be:" \ |
6058 | "\n"" linux32 Set 32bit uname emulation" \ |
6059 | "\n"" linux64 Set 64bit uname emulation" \ |
6060 | "\n" \ |
6061 | "\n"" -R Disable address space randomization" \ |
6062 | |
6063 | #define linux32_trivial_usage NOUSAGE_STR \ |
6064 | |
6065 | #define linux32_full_usage "" \ |
6066 | |
6067 | #define linux64_trivial_usage NOUSAGE_STR \ |
6068 | |
6069 | #define linux64_full_usage "" \ |
6070 | |
6071 | #define swapon_trivial_usage \ |
6072 | "[-a] [-e]" IF_FEATURE_SWAPON_DISCARD(" [-d[POL]]") IF_FEATURE_SWAPON_PRI(" [-p PRI]") " [DEVICE]" \ |
6073 | |
6074 | #define swapon_full_usage "\n\n" \ |
6075 | "Start swapping on DEVICE\n" \ |
6076 | "\n -a Start swapping on all swap devices" \ |
6077 | IF_FEATURE_SWAPON_DISCARD( \ |
6078 | "\n -d[POL] Discard blocks at swapon (POL=once)," \ |
6079 | "\n as freed (POL=pages), or both (POL omitted)" \ |
6080 | ) \ |
6081 | "\n -e Silently skip devices that do not exist" \ |
6082 | IF_FEATURE_SWAPON_PRI( \ |
6083 | "\n -p PRI Set swap device priority" \ |
6084 | ) \ |
6085 | |
6086 | #define swapoff_trivial_usage \ |
6087 | "[-a] [DEVICE]" \ |
6088 | |
6089 | #define swapoff_full_usage "\n\n" \ |
6090 | "Stop swapping on DEVICE\n" \ |
6091 | "\n -a Stop swapping on all swap devices" \ |
6092 | |
6093 | #define switch_root_trivial_usage \ |
6094 | "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]" \ |
6095 | |
6096 | #define switch_root_full_usage "\n\n" \ |
6097 | "Free initramfs and switch to another root fs:\n" \ |
6098 | "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n" \ |
6099 | "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n" \ |
6100 | "\n -c DEV Reopen stdio to DEV after switch" \ |
6101 | |
6102 | #define uevent_trivial_usage \ |
6103 | "[PROG [ARGS]]" \ |
6104 | |
6105 | #define uevent_full_usage "\n\n" \ |
6106 | "uevent runs PROG for every netlink notification." \ |
6107 | "\n""PROG's environment contains data passed from the kernel." \ |
6108 | "\n""Typical usage (daemon for dynamic device node creation):" \ |
6109 | "\n"" # uevent mdev & mdev -s" \ |
6110 | |
6111 | #define umount_trivial_usage \ |
6112 | "[OPTIONS] FILESYSTEM|DIRECTORY" \ |
6113 | |
6114 | #define umount_full_usage "\n\n" \ |
6115 | "Unmount file systems\n" \ |
6116 | IF_FEATURE_UMOUNT_ALL( \ |
6117 | "\n -a Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \ |
6118 | ) \ |
6119 | IF_FEATURE_MTAB_SUPPORT( \ |
6120 | "\n -n Don't erase /etc/mtab entries" \ |
6121 | ) \ |
6122 | "\n -r Try to remount devices as read-only if mount is busy" \ |
6123 | "\n -l Lazy umount (detach filesystem)" \ |
6124 | "\n -f Force umount (i.e., unreachable NFS server)" \ |
6125 | IF_FEATURE_MOUNT_LOOP( \ |
6126 | "\n -d Free loop device even if it has been used" \ |
6127 | ) \ |
6128 | |
6129 | #define umount_example_usage \ |
6130 | "$ umount /dev/hdc1\n" \ |
6131 | |
6132 | #define unshare_trivial_usage \ |
6133 | "[OPTIONS] [PROG [ARGS]]" \ |
6134 | |
6135 | #define unshare_full_usage "\n" \ |
6136 | "\n -m, --mount[=FILE] Unshare mount namespace" \ |
6137 | "\n -u, --uts[=FILE] Unshare UTS namespace (hostname etc.)" \ |
6138 | "\n -i, --ipc[=FILE] Unshare System V IPC namespace" \ |
6139 | "\n -n, --net[=FILE] Unshare network namespace" \ |
6140 | "\n -p, --pid[=FILE] Unshare PID namespace" \ |
6141 | "\n -U, --user[=FILE} Unshare user namespace" \ |
6142 | "\n -f, --fork Fork before execing PROG" \ |
6143 | "\n -r, --map-root-user Map current user to root (implies -u)" \ |
6144 | "\n --mount-proc[=DIR] Mount /proc filesystem first (implies -m)" \ |
6145 | "\n --propagation slave|shared|private|unchanged" \ |
6146 | "\n Modify mount propagation in mount namespace" \ |
6147 | "\n --setgroups allow|deny Control the setgroups syscall in user namespaces" \ |
6148 | |
6149 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 \ |
6150 | |
6151 | # define IF_UDHCP_VERBOSE(...) __VA_ARGS__ \ |
6152 | |
6153 | #else \ |
6154 | |
6155 | # define IF_UDHCP_VERBOSE(...) \ |
6156 | |
6157 | #endif \ |
6158 | |
6159 | #define udhcpc6_trivial_usage \ |
6160 | "[-fbnq"IF_UDHCP_VERBOSE("v")"oR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n" \ |
6161 | " [-x OPT:VAL]... [-O OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]") \ |
6162 | |
6163 | #define udhcpc6_full_usage "\n" \ |
6164 | IF_LONG_OPTS( \ |
6165 | "\n -i,--interface IFACE Interface to use (default eth0)" \ |
6166 | "\n -p,--pidfile FILE Create pidfile" \ |
6167 | "\n -s,--script PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \ |
6168 | "\n -B,--broadcast Request broadcast replies" \ |
6169 | "\n -t,--retries N Send up to N discover packets" \ |
6170 | "\n -T,--timeout N Pause between packets (default 3 seconds)" \ |
6171 | "\n -A,--tryagain N Wait N seconds after failure (default 20)" \ |
6172 | "\n -f,--foreground Run in foreground" \ |
6173 | USE_FOR_MMU( \ |
6174 | "\n -b,--background Background if lease is not obtained" \ |
6175 | ) \ |
6176 | "\n -n,--now Exit if lease is not obtained" \ |
6177 | "\n -q,--quit Exit after obtaining lease" \ |
6178 | "\n -R,--release Release IP on exit" \ |
6179 | "\n -S,--syslog Log to syslog too" \ |
6180 | IF_FEATURE_UDHCP_PORT( \ |
6181 | "\n -P,--client-port N Use port N (default 546)" \ |
6182 | ) \ |
6183 | "\n -O,--request-option OPT Request option OPT from server (cumulative)" \ |
6184 | "\n -o,--no-default-options Don't request any options (unless -O is given)" \ |
6185 | "\n -r,--request IP Request this IP address" \ |
6186 | "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \ |
6187 | "\n Examples of string, numeric, and hex byte opts:" \ |
6188 | "\n -x hostname:bbox - option 12" \ |
6189 | "\n -x lease:3600 - option 51 (lease time)" \ |
6190 | "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \ |
6191 | IF_UDHCP_VERBOSE( \ |
6192 | "\n -v Verbose" \ |
6193 | ) \ |
6194 | ) \ |
6195 | IF_NOT_LONG_OPTS( \ |
6196 | "\n -i IFACE Interface to use (default eth0)" \ |
6197 | "\n -p FILE Create pidfile" \ |
6198 | "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \ |
6199 | "\n -B Request broadcast replies" \ |
6200 | "\n -t N Send up to N discover packets" \ |
6201 | "\n -T N Pause between packets (default 3 seconds)" \ |
6202 | "\n -A N Wait N seconds (default 20) after failure" \ |
6203 | "\n -f Run in foreground" \ |
6204 | USE_FOR_MMU( \ |
6205 | "\n -b Background if lease is not obtained" \ |
6206 | ) \ |
6207 | "\n -n Exit if lease is not obtained" \ |
6208 | "\n -q Exit after obtaining lease" \ |
6209 | "\n -R Release IP on exit" \ |
6210 | "\n -S Log to syslog too" \ |
6211 | IF_FEATURE_UDHCP_PORT( \ |
6212 | "\n -P N Use port N (default 546)" \ |
6213 | ) \ |
6214 | "\n -O OPT Request option OPT from server (cumulative)" \ |
6215 | "\n -o Don't request any options (unless -O is given)" \ |
6216 | "\n -r IP Request this IP address" \ |
6217 | "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \ |
6218 | "\n Examples of string, numeric, and hex byte opts:" \ |
6219 | "\n -x hostname:bbox - option 12" \ |
6220 | "\n -x lease:3600 - option 51 (lease time)" \ |
6221 | "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \ |
6222 | IF_UDHCP_VERBOSE( \ |
6223 | "\n -v Verbose" \ |
6224 | ) \ |
6225 | ) \ |
6226 | "\nSignals:" \ |
6227 | "\n USR1 Renew lease" \ |
6228 | "\n USR2 Release lease" \ |
6229 | |
6230 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 \ |
6231 | |
6232 | # define IF_UDHCP_VERBOSE(...) __VA_ARGS__ \ |
6233 | |
6234 | #else \ |
6235 | |
6236 | # define IF_UDHCP_VERBOSE(...) \ |
6237 | |
6238 | #endif \ |
6239 | |
6240 | #define udhcpc_trivial_usage \ |
6241 | "[-fbq"IF_UDHCP_VERBOSE("v")"RB]"IF_FEATURE_UDHCPC_ARPING(" [-a[MSEC]]")" [-t N] [-T SEC] [-A SEC/-n]\n" \ |
6242 | " [-i IFACE]"IF_FEATURE_UDHCP_PORT(" [-P PORT]")" [-s PROG] [-p PIDFILE]\n" \ |
6243 | " [-oC] [-r IP] [-V VENDOR] [-F NAME] [-x OPT:VAL]... [-O OPT]..." \ |
6244 | |
6245 | #define udhcpc_full_usage "\n" \ |
6246 | IF_LONG_OPTS( \ |
6247 | "\n -i,--interface IFACE Interface to use (default eth0)" \ |
6248 | IF_FEATURE_UDHCP_PORT( \ |
6249 | "\n -P,--client-port PORT Use PORT (default 68)" \ |
6250 | ) \ |
6251 | "\n -s,--script PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \ |
6252 | "\n -p,--pidfile FILE Create pidfile" \ |
6253 | "\n -B,--broadcast Request broadcast replies" \ |
6254 | "\n -t,--retries N Send up to N discover packets (default 3)" \ |
6255 | "\n -T,--timeout SEC Pause between packets (default 3)" \ |
6256 | "\n -A,--tryagain SEC Wait if lease is not obtained (default 20)" \ |
6257 | "\n -n,--now Exit if lease is not obtained" \ |
6258 | "\n -q,--quit Exit after obtaining lease" \ |
6259 | "\n -R,--release Release IP on exit" \ |
6260 | "\n -f,--foreground Run in foreground" \ |
6261 | USE_FOR_MMU( \ |
6262 | "\n -b,--background Background if lease is not obtained" \ |
6263 | ) \ |
6264 | "\n -S,--syslog Log to syslog too" \ |
6265 | IF_FEATURE_UDHCPC_ARPING( \ |
6266 | "\n -a[MSEC],--arping[=MSEC] Validate offered address with ARP ping" \ |
6267 | ) \ |
6268 | "\n -r,--request IP Request this IP address" \ |
6269 | "\n -o,--no-default-options Don't request any options (unless -O is given)" \ |
6270 | "\n -O,--request-option OPT Request option OPT from server (cumulative)" \ |
6271 | "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \ |
6272 | "\n Examples of string, numeric, and hex byte opts:" \ |
6273 | "\n -x hostname:bbox - option 12" \ |
6274 | "\n -x lease:3600 - option 51 (lease time)" \ |
6275 | "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \ |
6276 | "\n -F,--fqdn NAME Ask server to update DNS mapping for NAME" \ |
6277 | "\n -V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')" \ |
6278 | "\n -C,--clientid-none Don't send MAC as client identifier" \ |
6279 | IF_UDHCP_VERBOSE( \ |
6280 | "\n -v Verbose" \ |
6281 | ) \ |
6282 | ) \ |
6283 | IF_NOT_LONG_OPTS( \ |
6284 | "\n -i IFACE Interface to use (default eth0)" \ |
6285 | IF_FEATURE_UDHCP_PORT( \ |
6286 | "\n -P PORT Use PORT (default 68)" \ |
6287 | ) \ |
6288 | "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \ |
6289 | "\n -p FILE Create pidfile" \ |
6290 | "\n -B Request broadcast replies" \ |
6291 | "\n -t N Send up to N discover packets (default 3)" \ |
6292 | "\n -T SEC Pause between packets (default 3)" \ |
6293 | "\n -A SEC Wait if lease is not obtained (default 20)" \ |
6294 | "\n -n Exit if lease is not obtained" \ |
6295 | "\n -q Exit after obtaining lease" \ |
6296 | "\n -R Release IP on exit" \ |
6297 | "\n -f Run in foreground" \ |
6298 | USE_FOR_MMU( \ |
6299 | "\n -b Background if lease is not obtained" \ |
6300 | ) \ |
6301 | "\n -S Log to syslog too" \ |
6302 | IF_FEATURE_UDHCPC_ARPING( \ |
6303 | "\n -a[MSEC] Validate offered address with ARP ping" \ |
6304 | ) \ |
6305 | "\n -r IP Request this IP address" \ |
6306 | "\n -o Don't request any options (unless -O is given)" \ |
6307 | "\n -O OPT Request option OPT from server (cumulative)" \ |
6308 | "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \ |
6309 | "\n Examples of string, numeric, and hex byte opts:" \ |
6310 | "\n -x hostname:bbox - option 12" \ |
6311 | "\n -x lease:3600 - option 51 (lease time)" \ |
6312 | "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)" \ |
6313 | "\n -F NAME Ask server to update DNS mapping for NAME" \ |
6314 | "\n -V VENDOR Vendor identifier (default 'udhcp VERSION')" \ |
6315 | "\n -C Don't send MAC as client identifier" \ |
6316 | IF_UDHCP_VERBOSE( \ |
6317 | "\n -v Verbose" \ |
6318 | ) \ |
6319 | ) \ |
6320 | "\nSignals:" \ |
6321 | "\n USR1 Renew lease" \ |
6322 | "\n USR2 Release lease" \ |
6323 | |
6324 | #define udhcpd_trivial_usage \ |
6325 | "[-fS] [-I ADDR]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [CONFFILE]" \ |
6326 | |
6327 | #define udhcpd_full_usage "\n\n" \ |
6328 | "DHCP server\n" \ |
6329 | "\n -f Run in foreground" \ |
6330 | "\n -S Log to syslog too" \ |
6331 | "\n -I ADDR Local address" \ |
6332 | "\n -a MSEC Timeout for ARP ping (default 2000)" \ |
6333 | IF_FEATURE_UDHCP_PORT( \ |
6334 | "\n -P N Use port N (default 67)" \ |
6335 | ) \ |
6336 | |
6337 | #define dhcprelay_trivial_usage \ |
6338 | "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]" \ |
6339 | |
6340 | #define dhcprelay_full_usage "\n\n" \ |
6341 | "Relay DHCP requests between clients and server" \ |
6342 | |
6343 | #define dumpleases_trivial_usage \ |
6344 | "[-r|-a] [-d] [-f LEASEFILE]" \ |
6345 | |
6346 | #define dumpleases_full_usage "\n\n" \ |
6347 | "Display DHCP leases granted by udhcpd\n" \ |
6348 | IF_LONG_OPTS( \ |
6349 | "\n -f,--file=FILE Lease file" \ |
6350 | "\n -r,--remaining Show remaining time" \ |
6351 | "\n -a,--absolute Show expiration time" \ |
6352 | "\n -d,--decimal Show time in seconds" \ |
6353 | ) \ |
6354 | IF_NOT_LONG_OPTS( \ |
6355 | "\n -f FILE Lease file" \ |
6356 | "\n -r Show remaining time" \ |
6357 | "\n -a Show expiration time" \ |
6358 | "\n -d Show time in seconds" \ |
6359 | ) \ |
6360 | |
6361 | #define busybox_notes_usage \ |
6362 | "Hello world!\n" |
6363 | |
6364 | #endif |
6365 |