blob: 5a1715a9d69770d8ab91f7d575ee1aca68738686 [file] [log] [blame]
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001/* vi: set sw=8 ts=8: */
Denis Vlasenkoe2d3ded2006-11-27 23:43:28 +00002/*
3 * This file suffers from chronically incorrect tabification
4 * of messages. Before editing this file:
5 * 1. Switch you editor to 8-space tab mode.
6 * 2. Do not use \t in messages, use real tab character.
7 * 3. Start each source line with message as follows:
Denis Vlasenko1fffe382006-11-28 00:06:39 +00008 * |<7 spaces>"text with tabs"....
Denis Vlasenkoe2d3ded2006-11-27 23:43:28 +00009 */
10
Eric Andersen178de172004-04-06 16:36:20 +000011#ifndef __BB_USAGE_H__
12#define __BB_USAGE_H__
13
Eric Andersenf349e972001-08-21 16:18:59 +000014#define addgroup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000015 "[-g GID] group_name [user_name]"
Eric Andersenf349e972001-08-21 16:18:59 +000016#define addgroup_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000017 "Adds a group to the system\n\n" \
18 "Options:\n" \
19 " -g GID specify gid"
Eric Andersenf349e972001-08-21 16:18:59 +000020
21#define adduser_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000022 "[OPTIONS] user_name"
Eric Andersenf349e972001-08-21 16:18:59 +000023#define adduser_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000024 "Adds a user to the system\n\n" \
25 "Options:\n" \
26 " -h DIR Assign home directory DIR\n" \
27 " -g GECOS Assign gecos field GECOS\n" \
28 " -s SHELL Assign login shell SHELL\n" \
29 " -G Add the user to existing group GROUP\n" \
30 " -S create a system user (ignored)\n" \
31 " -D Do not assign a password (logins still possible via ssh)\n" \
32 " -H Do not create the home directory"
Eric Andersenf349e972001-08-21 16:18:59 +000033
Mark Whitley6f932772001-03-20 19:18:10 +000034#define adjtimex_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000035 "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]"
Mark Whitley6f932772001-03-20 19:18:10 +000036#define adjtimex_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000037 "Reads and optionally sets system timebase parameters.\n" \
38 "See adjtimex(2).\n\n" \
39 "Options:\n" \
40 " -q quiet mode - do not print\n" \
41 " -o offset time offset, microseconds\n" \
42 " -f frequency frequency adjust, integer kernel units (65536 is 1ppm)\n" \
43 " (positive values make the system clock run fast)\n" \
44 " -t tick microseconds per tick, usually 10000\n" \
45 " -p timeconstant"
Mark Whitley6f932772001-03-20 19:18:10 +000046
Eric Andersen7e9276b2001-02-22 01:15:47 +000047#define ar_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000048 "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
Eric Andersen7e9276b2001-02-22 01:15:47 +000049#define ar_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000050 "Extract or list FILES from an ar archive.\n\n" \
51 "Options:\n" \
52 " -o preserve original dates\n" \
53 " -p extract to stdout\n" \
54 " -t list\n" \
55 " -x extract\n" \
56 " -v verbosely list files processed"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000057
Glenn L McGrath9e598412003-01-09 10:06:01 +000058#define arping_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000059 "[-fqbDUA] [-c count] [-w timeout] [-i device] [-s sender] target"
Glenn L McGrath9e598412003-01-09 10:06:01 +000060#define arping_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000061 "Ping hosts by ARP requests/replies.\n\n" \
62 "Options:\n" \
63 " -f Quit on first ARP reply\n" \
64 " -q Be quiet\n" \
65 " -b Keep broadcasting, don't go unicast\n" \
66 " -D Duplicated address detection mode\n" \
67 " -U Unsolicited ARP mode, update your neighbours\n" \
68 " -A ARP answer mode, update your neighbours\n" \
69 " -c count Stop after sending count ARP request packets\n" \
70 " -w timeout Time to wait for ARP reply, in seconds\n" \
71 " -i device Outgoing interface name, default is eth0\n" \
72 " -s sender Set specific sender IP address\n" \
73 " target Target IP address of ARP request"
Glenn L McGrath9e598412003-01-09 10:06:01 +000074
Eric Andersen08f59e32004-03-12 22:07:10 +000075#define ash_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000076 "[FILE]...\n" \
77 "or: ash -c command [args]..."
Eric Andersen08f59e32004-03-12 22:07:10 +000078#define ash_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000079 "The ash shell (command interpreter)"
Eric Andersen08f59e32004-03-12 22:07:10 +000080
81#define awk_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000082 "[OPTION]... [program-text] [FILE ...]"
Eric Andersen08f59e32004-03-12 22:07:10 +000083#define awk_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000084 "Options:\n" \
85 " -v var=val assign value 'val' to variable 'var'\n" \
86 " -F sep use 'sep' as field separator\n" \
87 " -f progname read program source from file 'progname'"
Glenn L McGrath7a32aaa2002-09-15 17:03:48 +000088
Eric Andersen7e9276b2001-02-22 01:15:47 +000089#define basename_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000090 "FILE [SUFFIX]"
Eric Andersen7e9276b2001-02-22 01:15:47 +000091#define basename_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000092 "Strips directory path and suffixes from FILE.\n" \
93 "If specified, also removes any trailing SUFFIX."
Eric Andersen0d3a02e2001-03-15 18:14:25 +000094#define basename_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000095 "$ basename /usr/local/bin/foo\n" \
96 "foo\n" \
97 "$ basename /usr/local/bin/\n" \
98 "bin\n" \
99 "$ basename /foo/bar.txt .txt\n" \
100 "bar"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000101
Glenn L McGrath24e28332001-10-05 03:48:57 +0000102#define bunzip2_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000103 "[OPTION]... [FILE]"
Glenn L McGrath24e28332001-10-05 03:48:57 +0000104#define bunzip2_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000105 "Uncompress FILE (or standard input if FILE is '-' or omitted).\n\n" \
106 "Options:\n" \
107 " -c Write output to standard output\n" \
108 " -f Force"
Glenn L McGrath24e28332001-10-05 03:48:57 +0000109
Rob Landley6130b9b2006-01-23 21:10:38 +0000110#define busybox_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000111 "Hello world!\n"
Rob Landley6130b9b2006-01-23 21:10:38 +0000112
Glenn L McGrathfff11f12001-11-18 14:20:25 +0000113#define bzcat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000114 "FILE"
Glenn L McGrathfff11f12001-11-18 14:20:25 +0000115#define bzcat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000116 "Uncompress to stdout."
Glenn L McGrathfff11f12001-11-18 14:20:25 +0000117
Rob Landleyc1d69902006-01-20 18:28:50 +0000118#define unlzma_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000119 "[OPTION]... [FILE]"
Rob Landleyc1d69902006-01-20 18:28:50 +0000120#define unlzma_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000121 "Uncompress FILE (or standard input if FILE is '-' or omitted).\n\n" \
122 "Options:\n" \
123 " -c Write output to standard output\n" \
124 " -f Force"
Rob Landleyc1d69902006-01-20 18:28:50 +0000125
126#define lzmacat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000127 "FILE"
Rob Landleyc1d69902006-01-20 18:28:50 +0000128#define lzmacat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000129 "Uncompress to stdout."
Rob Landleyc1d69902006-01-20 18:28:50 +0000130
Eric Andersenc98c0622001-12-06 15:16:43 +0000131#define cal_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000132 "[-jy] [[month] year]"
Eric Andersenc98c0622001-12-06 15:16:43 +0000133#define cal_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000134 "Display a calendar.\n" \
135 "\nOptions:\n" \
136 " -j Use julian dates\n" \
137 " -y Display the entire year"
Eric Andersenc98c0622001-12-06 15:16:43 +0000138
Eric Andersen7e9276b2001-02-22 01:15:47 +0000139#define cat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000140 "[-u] [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000141#define cat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000142 "Concatenates FILE(s) and prints them to stdout.\n\n" \
143 "Options:\n" \
144 " -u ignored since unbuffered i/o is always used"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000145#define cat_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000146 "$ cat /proc/uptime\n" \
147 "110716.72 17.67"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000148
Rob Landley8abbee42006-05-31 19:36:04 +0000149#define catv_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000150 "[-etv] [FILE]..."
Rob Landley8abbee42006-05-31 19:36:04 +0000151#define catv_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000152 "Display nonprinting characters as ^x or M-x.\n\n"\
153 " -e End each line with $\n" \
154 " -t Show tabs as ^I\n" \
155 " -v Don't use ^x or M-x escapes."
Mike Frysingerde9f1f72005-04-22 02:33:37 +0000156#define chattr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000157 "[-R] [-+=AacDdijsStTu] [-v version] files..."
Mike Frysingerde9f1f72005-04-22 02:33:37 +0000158#define chattr_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000159 "change file attributes on an ext2 fs\n\n" \
160 "Modifiers:\n" \
161 " - remove attributes\n" \
162 " + add attributes\n" \
163 " = set attributes\n" \
164 "Attributes:\n" \
165 " A don't track atime\n" \
166 " a append mode only\n" \
167 " c enable compress\n" \
168 " D write dir contents synchronously\n" \
169 " d do not backup with dump\n" \
170 " i cannot be modified (immutable)\n" \
171 " j write all data to journal first\n" \
172 " s zero disk storage when deleted\n" \
173 " S write file contents synchronously\n" \
174 " t disable tail-merging of partial blocks with other files\n" \
175 " u allow file to be undeleted\n" \
176 "Options:\n" \
177 " -R recursively list subdirectories\n" \
178 " -v set the file's version/generation number"
Mike Frysingerde9f1f72005-04-22 02:33:37 +0000179
Eric Andersen7e9276b2001-02-22 01:15:47 +0000180#define chgrp_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000181 "[-Rh"USE_DESKTOP("cvf")"]... GROUP FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000182#define chgrp_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000183 "Change the group membership of each FILE to GROUP.\n" \
184 "\nOptions:\n" \
185 " -R Changes files and directories recursively\n" \
186 " -h Do not dereference symbolic links" \
Denis Vlasenkoe80e2a32006-10-27 23:28:38 +0000187 USE_DESKTOP( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000188 "\n -c List changed files" \
189 "\n -v List all files" \
190 "\n -f Hide errors" \
Denis Vlasenkoe80e2a32006-10-27 23:28:38 +0000191 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000192#define chgrp_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000193 "$ ls -l /tmp/foo\n" \
194 "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
195 "$ chgrp root /tmp/foo\n" \
196 "$ ls -l /tmp/foo\n" \
197 "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000198
Eric Andersen7e9276b2001-02-22 01:15:47 +0000199#define chmod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000200 "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000201#define chmod_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000202 "Each MODE is one or more of the letters ugoa, one of the\n" \
203 "symbols +-= and one or more of the letters rwxst.\n\n" \
204 "Options:\n" \
205 " -R Changes files and directories recursively" \
Denis Vlasenkofefb2792006-10-27 15:13:54 +0000206 USE_DESKTOP( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000207 "\n -c List changed files" \
208 "\n -v List all files" \
209 "\n -f Hide errors" \
Denis Vlasenkofefb2792006-10-27 15:13:54 +0000210 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000211#define chmod_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000212 "$ ls -l /tmp/foo\n" \
213 "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
214 "$ chmod u+x /tmp/foo\n" \
215 "$ ls -l /tmp/foo\n" \
216 "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
217 "$ chmod 444 /tmp/foo\n" \
218 "$ ls -l /tmp/foo\n" \
219 "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000220
Eric Andersen7e9276b2001-02-22 01:15:47 +0000221#define chown_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000222 "[-Rh"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000223#define chown_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000224 "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \
225 "\nOptions:\n" \
226 " -R Changes files and directories recursively\n" \
227 " -h Do not dereference symbolic links" \
Denis Vlasenko51b4c922006-10-27 16:07:20 +0000228 USE_DESKTOP( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000229 "\n -c List changed files" \
230 "\n -v List all files" \
231 "\n -f Hide errors" \
Denis Vlasenko51b4c922006-10-27 16:07:20 +0000232 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000233#define chown_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000234 "$ ls -l /tmp/foo\n" \
235 "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
236 "$ chown root /tmp/foo\n" \
237 "$ ls -l /tmp/foo\n" \
238 "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
239 "$ chown root.root /tmp/foo\n" \
240 "ls -l /tmp/foo\n" \
241 "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000242
Denis Vlasenkofe544582006-10-03 15:57:40 +0000243#define chpst_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000244 "[-vP012] [-u user[:group]] [-U user[:group]] [-e dir] " \
245 "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \
246 "[-p processes] [-f bytes] [-c bytes] prog args"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000247#define chpst_full_usage \
248 "Change the process state and run specified program.\n\n" \
249 "-u user[:grp] set uid and gid\n" \
250 "-U user[:grp] set environment variables UID and GID\n" \
251 "-e dir set environment variables as specified by files\n" \
252 " in the directory: file=1st_line_of_file\n" \
253 "-/ dir chroot to dir\n" \
254 "-n inc add inc to nice value\n" \
255 "-m bytes limit data segment, stack segment, locked physical pages,\n" \
256 " and total of all segment per process to bytes bytes each\n" \
257 "-d bytes limit data segment\n" \
258 "-o n limit the number of open file descriptors per process to n\n" \
259 "-p n limit number of processes per uid to n\n" \
260 "-f bytes limit output file size to bytes bytes\n" \
261 "-c bytes limit core file size to bytes bytes\n" \
262 "-v verbose\n" \
263 "-P run prog in a new process group\n" \
264 "-0 close standard input\n" \
265 "-1 close standard output\n" \
266 "-2 close standard error"
267#define setuidgid_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000268 "account prog args"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000269#define setuidgid_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000270 "Sets uid and gid to account's uid and gid, removing all supplementary\n" \
271 "groups, then runs prog"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000272#define envuidgid_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000273 "account prog args"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000274#define envuidgid_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000275 "Sets $UID to account's uid and $GID to account's gid, then runs prog"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000276#define envdir_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000277 "dir prog args"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000278#define envdir_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000279 "Sets various environment variables as specified by files\n" \
280 "in the directory dir, then runs prog"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000281#define softlimit_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000282 "[-a allbytes] [-c corebytes] [-d databytes] [-f filebytes] " \
283 "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \
284 "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000285#define softlimit_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000286 "Sets soft resource limits as specified by options, then runs prog\n" \
287 "\n" \
288 "-m n Same as -d n -s n -l n -a n\n" \
289 "-d n Limit the data segment per process to n bytes\n" \
290 "-s n Limit the stack segment per process to n bytes\n" \
291 "-l n Limit the locked physical pages per process to n bytes\n" \
292 "-a n Limit the total of all segments per process to n bytes\n" \
293 "-o n Limit the number of open file descriptors per process to n\n" \
294 "-p n Limit the number of processes per uid to n\n" \
295 "Options controlling file sizes:\n" \
296 "-f n Limit output file sizes to n bytes\n" \
297 "-c n Limit core file sizes to n bytes\n" \
298 "Efficiency opts:\n" \
299 "-r n Limit the resident set size to n bytes. This limit is not\n" \
300 " enforced unless physical memory is full\n" \
301 "-t n Limit the CPU time to n seconds. This limit is not enforced\n" \
302 " except that the process receives a SIGXCPU signal after n seconds\n" \
303 "\n" \
304 "Some options may have no effect on some operating systems\n" \
305 "n may be =, indicating that soft limit should be set equal to hard limit"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000306
Eric Andersen7e9276b2001-02-22 01:15:47 +0000307#define chroot_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000308 "NEWROOT [COMMAND...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000309#define chroot_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000310 "Run COMMAND with root directory set to NEWROOT."
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000311#define chroot_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000312 "$ ls -l /bin/ls\n" \
313 "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
314 "# mount /dev/hdc1 /mnt -t minix\n" \
315 "# chroot /mnt\n" \
316 "# ls -l /bin/ls\n" \
317 "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000318
Eric Andersen7e9276b2001-02-22 01:15:47 +0000319#define chvt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000320 "N"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000321#define chvt_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000322 "Changes the foreground virtual terminal to /dev/ttyN"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000323
Rob Landley856489b2006-04-18 20:57:28 +0000324#define cksum_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000325 "FILES..."
Rob Landley856489b2006-04-18 20:57:28 +0000326#define cksum_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000327 "Calculates the CRC32 checksums of FILES."
Rob Landley856489b2006-04-18 20:57:28 +0000328
Eric Andersen7e9276b2001-02-22 01:15:47 +0000329#define clear_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000330 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000331#define clear_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000332 "Clear screen."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000333
Eric Andersen7e9276b2001-02-22 01:15:47 +0000334#define cmp_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000335 "[-l] [-s] FILE1 [FILE2]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000336#define cmp_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000337 "Compares FILE1 vs stdin if FILE2 is not specified.\n\n" \
338 "Options:\n" \
339 " -l Write the byte numbers (decimal) and values (octal)\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000340 " for all differing bytes\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000341 " -s quiet mode - do not print"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000342
Rob Landley2acfd7b2005-05-11 23:12:49 +0000343#define comm_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000344 "[-123] FILE1 FILE2"
Rob Landley2acfd7b2005-05-11 23:12:49 +0000345#define comm_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000346 "Compares FILE1 to FILE2, or to stdin if = is specified.\n\n" \
347 "Options:\n" \
348 " -1 Suppress lines unique to FILE1\n" \
349 " -2 Suppress lines unique to FILE2\n" \
350 " -3 Suppress lines common to both files"
Rob Landley2acfd7b2005-05-11 23:12:49 +0000351
Paul Fox79c142d2005-08-01 16:04:40 +0000352#define bbconfig_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000353 ""
Paul Fox79c142d2005-08-01 16:04:40 +0000354#define bbconfig_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000355 "Print the config file which built busybox"
Mike Frysinger036f2992005-09-24 23:50:14 +0000356
Rob Landley69674942006-09-11 00:34:01 +0000357#define bbsh_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000358 "[FILE]...\n" \
359 "or: bbsh -c command [args]..."
Rob Landley69674942006-09-11 00:34:01 +0000360#define bbsh_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000361 "The bbsh shell (command interpreter)"
Rob Landley69674942006-09-11 00:34:01 +0000362
Eric Andersen7e9276b2001-02-22 01:15:47 +0000363#define cp_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000364 "[OPTION]... SOURCE DEST"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000365#define cp_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000366 "Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" \
367 "\n" \
368 " -a Same as -dpR\n" \
369 " -d,-P Preserve links\n" \
370 " -H,-L Dereference all symlinks (implied by default)\n" \
371 " -p Preserve file attributes if possible\n" \
372 " -f force, overwrite\n" \
373 " -i interactive, prompt before overwrite\n" \
374 " -R,-r Copy directories recursively\n" \
375 " -l,-s Create (sym)links"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000376
Glenn L McGrath8f5b63e2001-06-22 09:22:06 +0000377#define cpio_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000378 "-[dimtuv][F cpiofile]"
Glenn L McGrath8f5b63e2001-06-22 09:22:06 +0000379#define cpio_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000380 "Extract or list files from a cpio archive\n" \
381 "Main operation mode:\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000382 " d make leading directories\n" \
383 " i extract\n" \
384 " m preserve mtime\n" \
385 " t list\n" \
386 " v verbose\n" \
387 " u unconditional overwrite\n" \
388 " F input from file"
Tim Riker7b253f82003-12-28 05:02:40 +0000389
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000390#define crond_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000391 "-d[#] -c <crondir> -f -b"
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000392#define crond_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000393 " -d [#] -l [#] -S -L logfile -f -b -c dir\n" \
394 " -d num debug level\n" \
395 " -l num log level (8 - default)\n" \
396 " -S log to syslogd (default)\n" \
397 " -L file log to file\n" \
398 " -f run in foreground\n" \
399 " -b run in background (default)\n" \
400 " -c dir working dir"
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000401
402#define crontab_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000403 "[-c dir] {file|-}|[-u|-l|-e|-d user]"
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000404#define crontab_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000405 " file <opts> replace crontab from file\n" \
406 " - <opts> replace crontab from stdin\n" \
407 " -u user specify user\n" \
408 " -l [user] list crontab for user\n" \
409 " -e [user] edit crontab for user\n" \
410 " -d [user] delete crontab for user\n" \
411 " -c dir specify crontab directory"
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000412
413
Eric Andersen7e9276b2001-02-22 01:15:47 +0000414#define cut_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000415 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000416#define cut_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000417 "Prints selected fields from each input FILE to standard output.\n\n" \
418 "Options:\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000419 " -b LIST Output only bytes from LIST\n" \
420 " -c LIST Output only characters from LIST\n" \
421 " -d CHAR Use CHAR instead of tab as the field delimiter\n" \
422 " -s Output only the lines containing delimiter\n" \
423 " -f N Print only these fields\n" \
424 " -n Ignored"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000425#define cut_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000426 "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
427 "Hello\n" \
428 "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
429 "world\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000430
Eric Andersen7e9276b2001-02-22 01:15:47 +0000431#define date_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000432 "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000433#define date_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000434 "Displays the current time in the given FORMAT, or sets the system date.\n" \
435 "\nOptions:\n" \
436 " -R Outputs RFC-822 compliant date string\n" \
437 " -d STRING Displays time described by STRING, not 'now'\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000438USE_FEATURE_DATE_ISOFMT( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000439 " -I[TIMESPEC] Outputs an ISO-8601 compliant date/time string\n" \
440 " TIMESPEC='date' (or missing) for date only,\n" \
441 " 'hours', 'minutes', or 'seconds' for date and,\n" \
442 " time to the indicated precision\n" \
443 " -D hint Use 'hint' as date format, via strptime()\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000444) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000445 " -s Sets time described by STRING\n" \
446 " -r FILE Displays the last modification time of FILE\n" \
447 " -u Prints or sets Coordinated Universal Time"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000448#define date_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000449 "$ date\n" \
450 "Wed Apr 12 18:52:41 MDT 2000\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000451
Eric Andersen7e9276b2001-02-22 01:15:47 +0000452#define dc_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000453 "expression ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000454#define dc_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000455 "This is a Tiny RPN calculator that understands the\n" \
456 "following operations: +, add, -, sub, *, mul, /, div, %, mod, " \
457 "**, exp, and, or, not, eor.\n" \
458 "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16.\n" \
459 "\nOptions:\n" \
460 "p - Prints the value on the top of the stack, without altering the stack\n" \
461 "f - Prints the entire contents of the stack without altering anything\n" \
462 "o - Pops the value off the top of the stack and uses it to set the output radix\n" \
463 " Only 10 and 16 are supported"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000464#define dc_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000465 "$ dc 2 2 + p\n" \
466 "4\n" \
467 "$ dc 8 8 \\* 2 2 + / p\n" \
468 "16\n" \
469 "$ dc 0 1 and p\n" \
470 "0\n" \
471 "$ dc 0 1 or p\n" \
472 "1\n" \
473 "$ echo 72 9 div 8 mul p | dc\n" \
474 "64\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000475
Eric Andersen7e9276b2001-02-22 01:15:47 +0000476#define dd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000477 "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
478 " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync]")
Eric Andersen7e9276b2001-02-22 01:15:47 +0000479#define dd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000480 "Copy a file, converting and formatting according to options\n\n" \
481 " if=FILE read from FILE instead of stdin\n" \
482 " of=FILE write to FILE instead of stdout\n" \
483 " bs=N read and write N bytes at a time\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000484 USE_FEATURE_DD_IBS_OBS( \
485 " ibs=N read N bytes at a time\n") \
486 USE_FEATURE_DD_IBS_OBS( \
487 " obs=N write N bytes at a time\n") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000488 " count=N copy only N input blocks\n" \
489 " skip=N skip N input blocks\n" \
490 " seek=N skip N output blocks\n" \
Rob Landley2686d3b2006-05-16 16:52:12 +0000491 USE_FEATURE_DD_IBS_OBS( \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000492 " conv=notrunc don't truncate output file\n" \
493 " conv=noerror continue after read errors\n" \
494 " conv=sync pad blocks with zeros\n") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000495 "\n" \
496 "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \
497 "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000498#define dd_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000499 "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
500 "4+0 records in\n" \
501 "4+0 records out\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000502
Eric Andersen7e9276b2001-02-22 01:15:47 +0000503#define deallocvt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000504 "[N]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000505#define deallocvt_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000506 "Deallocate unused virtual terminal /dev/ttyN"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000507
Eric Andersenf349e972001-08-21 16:18:59 +0000508#define delgroup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000509 "GROUP"
Eric Andersenf349e972001-08-21 16:18:59 +0000510#define delgroup_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000511 "Deletes group GROUP from the system"
Eric Andersenf349e972001-08-21 16:18:59 +0000512
513#define deluser_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000514 "USER"
Eric Andersenf349e972001-08-21 16:18:59 +0000515#define deluser_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000516 "Deletes user USER from the system"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000517
Glenn L McGrath17d21fa2003-10-09 11:46:23 +0000518#define devfsd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000519 "mntpnt [-v]" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000520 USE_DEVFSD_FG_NP("[-fg][-np]" )
Glenn L McGrath17d21fa2003-10-09 11:46:23 +0000521#define devfsd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000522 "Optional daemon for managing devfs permissions and old device name symlinks.\n" \
523 "\nOptions:\n" \
524 " mntpnt The mount point where devfs is mounted.\n\n" \
525 " -v Print the protocol version numbers for devfsd\n" \
526 " and the kernel-side protocol version and exits." \
527 USE_DEVFSD_FG_NP( "\n\n -fg Run the daemon in the foreground.\n\n" \
528 " -np Exit after parsing the configuration file\n" \
529 " and processing synthetic REGISTER events.\n" \
530 " Do not poll for events.")
Glenn L McGrath17d21fa2003-10-09 11:46:23 +0000531
Eric Andersen7e9276b2001-02-22 01:15:47 +0000532#define df_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000533 "[-" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILESYSTEM ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000534#define df_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000535 "Print the filesystem space used and space available.\n\n" \
536 "Options:\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000537 USE_FEATURE_HUMAN_READABLE( \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000538 "\n -h print sizes in human readable format (e.g., 1K 243M 2G )\n" \
539 " -m print sizes in megabytes\n" \
540 " -k print sizes in kilobytes(default)") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000541 SKIP_FEATURE_HUMAN_READABLE("\n -k ignored")
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000542#define df_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000543 "$ df\n" \
544 "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
545 "/dev/sda3 8690864 8553540 137324 98% /\n" \
546 "/dev/sda1 64216 36364 27852 57% /boot\n" \
547 "$ df /dev/sda3\n" \
548 "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
549 "/dev/sda3 8690864 8553540 137324 98% /\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000550
Denis Vlasenko736230e2006-11-20 19:40:36 +0000551#define dhcprelay_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000552 "[client_device_list] [server_device]"
Denis Vlasenko736230e2006-11-20 19:40:36 +0000553#define dhcprelay_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000554 "Relays dhcp requests from client devices to server device"
Denis Vlasenko736230e2006-11-20 19:40:36 +0000555
556#define dhcprelay_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000557 "[client_device_list] [server_device]"
Denis Vlasenko736230e2006-11-20 19:40:36 +0000558#define dhcprelay_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000559 "Relays dhcp requests from client devices to server device"
Denis Vlasenko736230e2006-11-20 19:40:36 +0000560
Bernhard Reutner-Fischer8f7d3892006-04-06 08:11:08 +0000561#define diff_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000562 "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
Bernhard Reutner-Fischer8f7d3892006-04-06 08:11:08 +0000563#define diff_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000564 "Compare files line by line and output the differences between them.\n" \
565 "This diff implementation only supports unified diffs.\n\n" \
566 "Options:\n" \
567 " -a Treat all files as text\n" \
568 " -b Ignore changes in the amount of whitespace\n" \
569 " -d Try hard to find a smaller set of changes\n" \
570 " -i Ignore case differences\n" \
571 " -L Use LABEL instead of the filename in the unified header\n" \
572 " -N Treat absent files as empty\n" \
573 " -q Output only whether files differ\n" \
574 " -r Recursively compare any subdirectories\n" \
575 " -S Start with FILE when comparing directories\n" \
576 " -T Make tabs line up by prefixing a tab when necessary\n" \
577 " -s Report when two files are the same\n" \
578 " -t Expand tabs to spaces in output\n" \
579 " -U Output LINES lines of context\n" \
580 " -w Ignore all whitespace\n"
Bernhard Reutner-Fischer8f7d3892006-04-06 08:11:08 +0000581
Eric Andersen7e9276b2001-02-22 01:15:47 +0000582#define dirname_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000583 "FILENAME"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000584#define dirname_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000585 "Strips non-directory suffix from FILENAME"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000586#define dirname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000587 "$ dirname /tmp/foo\n" \
588 "/tmp\n" \
589 "$ dirname /tmp/foo/\n" \
590 "/tmp\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000591
Eric Andersen7e9276b2001-02-22 01:15:47 +0000592#define dmesg_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000593 "[-c] [-n LEVEL] [-s SIZE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000594#define dmesg_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000595 "Prints or controls the kernel ring buffer\n\n" \
596 "Options:\n" \
597 " -c Clears the ring buffer's contents after printing\n" \
598 " -n LEVEL Sets console logging level\n" \
599 " -s SIZE Use a buffer of size SIZE"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000600
"Vladimir N. Oleynik"7b4aa6f2006-01-25 14:19:11 +0000601#define dnsd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000602 "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
"Vladimir N. Oleynik"7b4aa6f2006-01-25 14:19:11 +0000603#define dnsd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000604 "Small and static DNS server daemon\n\n" \
605 "Options:\n" \
606 " -c config filename\n" \
607 " -t TTL in seconds\n" \
608 " -p listening port\n" \
609 " -i listening iface ip (default all)\n" \
610 " -d daemonize"
"Vladimir N. Oleynik"7b4aa6f2006-01-25 14:19:11 +0000611
Eric Andersen7e9276b2001-02-22 01:15:47 +0000612#define dos2unix_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000613 "[option] [FILE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000614#define dos2unix_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000615 "Converts FILE from dos format to unix format. When no option\n" \
616 "is given, the input is converted to the opposite output format.\n" \
617 "When no file is given, uses stdin for input and stdout for output.\n\n" \
618 "Options:\n" \
619 " -u output will be in UNIX format\n" \
620 " -d output will be in DOS format"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000621
Eric Andersen7e9276b2001-02-22 01:15:47 +0000622#define dpkg_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000623 "[-ilCPru] [-F option] package_name"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000624#define dpkg_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000625 "dpkg is a utility to install, remove and manage Debian packages.\n\n" \
626 "Options:\n" \
627 " -i Install the package\n" \
628 " -l List of installed packages\n" \
629 " -C Configure an unpackaged package\n" \
630 " -F depends Ignore dependency problems\n" \
631 " -P Purge all files of a package\n" \
632 " -r Remove all but the configuration files for a package\n" \
633 " -u Unpack a package, but don't configure it"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000634
Eric Andersen7e9276b2001-02-22 01:15:47 +0000635#define dpkg_deb_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000636 "[-cefxX] FILE [argument]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000637#define dpkg_deb_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000638 "Perform actions on Debian packages (.debs)\n\n" \
639 "Options:\n" \
640 " -c List contents of filesystem tree\n" \
641 " -e Extract control files to [argument] directory\n" \
642 " -f Display control field name starting with [argument]\n" \
643 " -x Extract packages filesystem tree to directory\n" \
644 " -X Verbose extract"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000645#define dpkg_deb_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000646 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000647
Eric Andersen7e9276b2001-02-22 01:15:47 +0000648#define du_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000649 "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000650#define du_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000651 "Summarizes disk space used for each FILE and/or directory.\n" \
652 "Disk space is printed in units of " \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000653 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
654 SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000655 " bytes.\n\n" \
656 "Options:\n" \
657 " -a show sizes of files in addition to directories\n" \
658 " -H follow symbolic links that are FILE command line args\n" \
659 " -L follow all symbolic links encountered\n" \
660 " -d N limit output to directories (and files with -a) of depth < N\n" \
661 " -c output a grand total\n" \
662 " -l count sizes many times if hard linked\n" \
663 " -s display only a total for each argument\n" \
664 " -x skip directories on different filesystems\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000665 USE_FEATURE_HUMAN_READABLE( \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000666 " -h print sizes in human readable format (e.g., 1K 243M 2G )\n" \
667 " -m print sizes in megabytes\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000668 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000669 " -k print sizes in kilobytes" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000670 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("(default)")
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000671#define du_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000672 "$ du\n" \
673 "16 ./CVS\n" \
674 "12 ./kernel-patches/CVS\n" \
675 "80 ./kernel-patches\n" \
676 "12 ./tests/CVS\n" \
677 "36 ./tests\n" \
678 "12 ./scripts/CVS\n" \
679 "16 ./scripts\n" \
680 "12 ./docs/CVS\n" \
681 "104 ./docs\n" \
682 "2417 .\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000683
Eric Andersen7e9276b2001-02-22 01:15:47 +0000684#define dumpkmap_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000685 "> keymap"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000686#define dumpkmap_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000687 "Prints out a binary keyboard translation table to standard output."
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000688#define dumpkmap_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000689 "$ dumpkmap > keymap\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000690
Russ Dill61fb4892002-10-14 21:41:28 +0000691#define dumpleases_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000692 "[-r|-a] [-f LEASEFILE]"
Russ Dill61fb4892002-10-14 21:41:28 +0000693#define dumpleases_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000694 "Displays the DHCP leases granted by udhcpd.\n\n" \
695 "Options:\n" \
696 " -f, --file=FILENAME Leases file to load\n" \
697 " -r, --remaining Interpret lease times as time remaining\n" \
698 " -a, --absolute Interpret lease times as expire time"
Russ Dill61fb4892002-10-14 21:41:28 +0000699
Mike Frysinger51a43b42005-09-24 07:11:16 +0000700#define e2fsck_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000701 "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
702 "[-I inode_buffer_blocks] [-P process_inode_size] " \
703 "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
704 "[-E extended-options] device"
Mike Frysinger51a43b42005-09-24 07:11:16 +0000705#define e2fsck_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000706 "Check a Linux ext2/ext3 file system.\n\n" \
707 "Options:\n" \
708 " -p Automatic repair (no questions)\n" \
709 " -n Make no changes to the filesystem\n" \
710 " -y Assume 'yes' to all questions\n" \
711 " -c Check for bad blocks and add them to the badblock list\n" \
712 " -f Force checking even if filesystem is marked clean\n" \
713 " -v Be verbose\n" \
714 " -b superblock Use alternative superblock\n" \
715 " -B blocksize Force blocksize when looking for superblock\n" \
716 " -j journal Set location of the external journal\n" \
717 " -l file Add to badblocks list\n" \
718 " -L file Set badblocks list"
Mike Frysinger51a43b42005-09-24 07:11:16 +0000719
Eric Andersen7e9276b2001-02-22 01:15:47 +0000720#define echo_trivial_usage \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000721 USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000722#define echo_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000723 "Prints the specified ARGs to stdout\n\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000724 USE_FEATURE_FANCY_ECHO( \
725 "Options:\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000726 " -n suppress trailing newline\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +0000727 " -e interpret backslash-escaped characters (i.e., \\t=tab)\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000728 " -E disable interpretation of backslash-escaped characters" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000729 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000730#define echo_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000731 "$ echo \"Erik is cool\"\n" \
732 "Erik is cool\n" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000733 USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000734 "Erik\n" \
735 "is\n" \
736 "cool\n" \
737 "$ echo \"Erik\\nis\\ncool\"\n" \
738 "Erik\\nis\\ncool\n")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000739
Mike Frysinger55e2cf62005-05-11 00:25:47 +0000740#define eject_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000741 "[-t] [-T] [DEVICE]"
Mike Frysinger55e2cf62005-05-11 00:25:47 +0000742#define eject_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000743 "Eject specified DEVICE (or default /dev/cdrom).\n\n" \
744 "Options:\n" \
745 " -t close tray\n" \
746 " -T open/close tray (toggle)"
Mike Frysinger55e2cf62005-05-11 00:25:47 +0000747
Rob Landley3b890392006-05-04 20:56:43 +0000748#define ed_trivial_usage ""
749#define ed_full_usage ""
750
Eric Andersen84e229c2001-03-29 22:48:33 +0000751#define env_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000752 "[-iu] [-] [name=value]... [command]"
Eric Andersen84e229c2001-03-29 22:48:33 +0000753#define env_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000754 "Prints the current environment or runs a program after setting\n" \
755 "up the specified environment.\n\n" \
756 "Options:\n" \
757 " -, -i start with an empty environment\n" \
758 " -u remove variable from the environment"
Eric Andersen84e229c2001-03-29 22:48:33 +0000759
Mike Frysingerb662f0d2005-05-11 03:59:53 +0000760#define ether_wake_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000761 "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
Mike Frysingerb662f0d2005-05-11 03:59:53 +0000762#define ether_wake_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000763 "Send a magic packet to wake up sleeping machines.\n" \
764 "MAC must be a station address (00:11:22:33:44:55) or\n" \
765 " a hostname with a known 'ethers' entry.\n\n" \
766 "Options:\n" \
767 " -b Send wake-up packet to the broadcast address\n" \
768 " -i iface Use interface ifname instead of the default \"eth0\"\n" \
769 " -p pass Append the four or six byte password PW to the packet"
Mike Frysingerb662f0d2005-05-11 03:59:53 +0000770
Eric Andersen7e9276b2001-02-22 01:15:47 +0000771#define expr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000772 "EXPRESSION"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000773#define expr_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000774 "Prints the value of EXPRESSION to standard output.\n\n" \
775 "EXPRESSION may be:\n" \
776 " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
777 " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
778 " ARG1 < ARG2 ARG1 is less than ARG2\n" \
779 " ARG1 <= ARG2 ARG1 is less than or equal to ARG2\n" \
780 " ARG1 = ARG2 ARG1 is equal to ARG2\n" \
781 " ARG1 != ARG2 ARG1 is unequal to ARG2\n" \
782 " ARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n" \
783 " ARG1 > ARG2 ARG1 is greater than ARG2\n" \
784 " ARG1 + ARG2 arithmetic sum of ARG1 and ARG2\n" \
785 " ARG1 - ARG2 arithmetic difference of ARG1 and ARG2\n" \
786 " ARG1 * ARG2 arithmetic product of ARG1 and ARG2\n" \
787 " ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2\n" \
788 " ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2\n" \
789 " STRING : REGEXP anchored pattern match of REGEXP in STRING\n" \
790 " match STRING REGEXP same as STRING : REGEXP\n" \
791 " substr STRING POS LENGTH substring of STRING, POS counted from 1\n" \
792 " index STRING CHARS index in STRING where any CHARS is found,\n" \
793 " or 0\n" \
794 " length STRING length of STRING\n" \
795 " quote TOKEN interpret TOKEN as a string, even if\n" \
796 " it is a keyword like 'match' or an\n" \
797 " operator like '/'\n" \
798 " ( EXPRESSION ) value of EXPRESSION\n\n" \
799 "Beware that many operators need to be escaped or quoted for shells.\n" \
800 "Comparisons are arithmetic if both ARGs are numbers, else\n" \
801 "lexicographical. Pattern matches return the string matched between\n" \
802 "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
803 "of characters matched or 0."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000804
Mike Frysingerfa69f112005-04-17 07:24:19 +0000805#define fakeidentd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000806 "[-b ip] [STRING]"
Mike Frysingerfa69f112005-04-17 07:24:19 +0000807#define fakeidentd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000808 "Returns a set string to auth requests\n\n" \
809 " -b Bind to ip address\n" \
810 " STRING The ident answer string (default is nobody)"
Mike Frysingerfa69f112005-04-17 07:24:19 +0000811
Eric Andersen7e9276b2001-02-22 01:15:47 +0000812#define false_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000813 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000814#define false_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000815 "Return an exit code of FALSE (1)."
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000816#define false_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000817 "$ false\n" \
818 "$ echo $?\n" \
819 "1\n"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000820
821#define fbset_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000822 "[options] [mode]"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000823#define fbset_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000824 "Show and modify frame buffer settings"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000825#define fbset_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000826 "$ fbset\n" \
827 "mode \"1024x768-76\"\n" \
828 " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
829 " geometry 1024 768 1024 768 16\n" \
830 " timings 12714 128 32 16 4 128 4\n" \
831 " accel false\n" \
832 " rgba 5/11,6/5,5/0,0/0\n" \
833 "endmode\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000834
Eric Andersen7e9276b2001-02-22 01:15:47 +0000835#define fdflush_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000836 "DEVICE"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000837#define fdflush_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000838 "Forces floppy disk drive to detect disk change"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000839
Eric Andersen01c3d402003-07-05 07:51:31 +0000840#define fdformat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000841 "[-n] DEVICE"
Eric Andersen01c3d402003-07-05 07:51:31 +0000842#define fdformat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000843 "Low-level formats a floppy disk\n\n" \
844 "Options:\n" \
845 " -n Don't verify after format"
Eric Andersen01c3d402003-07-05 07:51:31 +0000846
Glenn L McGrath441e7ef2002-11-26 22:00:21 +0000847#define fdisk_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000848 "[-luv] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
Glenn L McGrath441e7ef2002-11-26 22:00:21 +0000849#define fdisk_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000850 "Change partition table\n" \
851 "Options:\n" \
852 " -l List partition table(s)\n" \
853 " -u Give Start and End in sector (instead of cylinder) units\n" \
854 " -s PARTITION Give partition size(s) in blocks\n" \
855 " -b 2048: (for certain MO disks) use 2048-byte sectors\n" \
856 " -C CYLINDERS Set the number of cylinders\n" \
857 " -H HEADS Set the number of heads\n" \
858 " -S SECTORS Set the number of sectors\n" \
859 " -v Give fdisk version"
Glenn L McGrath441e7ef2002-11-26 22:00:21 +0000860
Eric Andersen7e9276b2001-02-22 01:15:47 +0000861#define find_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000862 "[PATH...] [EXPRESSION]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000863#define find_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000864 "Search for files in a directory hierarchy. The default PATH is\n" \
865 "the current directory; default EXPRESSION is '-print'\n" \
866 "\nEXPRESSION may consist of:\n" \
867 " -follow Dereference symbolic links\n" \
868 " -name PATTERN File name (leading directories removed) matches PATTERN\n" \
869 " -print Print (default and assumed)\n" \
Paul Foxd7384292006-05-12 14:47:20 +0000870 USE_FEATURE_FIND_PRINT0( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000871 " -print0 Delimit output with null characters rather than\n newlines" \
Paul Foxd7384292006-05-12 14:47:20 +0000872) USE_FEATURE_FIND_TYPE( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000873 "\n -type X Filetype matches X (where X is one of: f,d,l,b,c,...)" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000874) USE_FEATURE_FIND_PERM( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000875 "\n -perm PERMS Permissions match any of (+NNN); all of (-NNN);\n or exactly (NNN)" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000876) USE_FEATURE_FIND_MTIME( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000877 "\n -mtime DAYS Modified time is greater than (+N); less than (-N);\n or exactly (N) days" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000878) USE_FEATURE_FIND_MMIN( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000879 "\n -mmin MINS Modified time is greater than (+N); less than (-N);\n or exactly (N) minutes" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000880) USE_FEATURE_FIND_NEWER( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000881 "\n -newer FILE Modified time is more recent than FILE's" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000882) USE_FEATURE_FIND_INUM( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000883 "\n -inum N File has inode number N" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000884) USE_FEATURE_FIND_EXEC( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000885 "\n -exec CMD Execute CMD with all instances of {} replaced by the" \
886 "\n files matching EXPRESSION")
Rob Landley5d3a0e82005-10-04 03:34:39 +0000887
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000888#define find_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000889 "$ find / -name passwd\n" \
890 "/etc/passwd\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000891
Glenn L McGrathf01b8052003-04-27 06:02:14 +0000892#define fold_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000893 "[-bs] [-w WIDTH] [FILE]"
Glenn L McGrathf01b8052003-04-27 06:02:14 +0000894#define fold_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000895 "Wrap input lines in each FILE (standard input by default), writing to\n" \
896 "standard output.\n\n" \
897 "Options:\n" \
898 " -b count bytes rather than columns\n" \
899 " -s break at spaces\n" \
900 " -w use WIDTH columns instead of 80"
Glenn L McGrathf01b8052003-04-27 06:02:14 +0000901
Eric Andersen7e9276b2001-02-22 01:15:47 +0000902#define free_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000903 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000904#define free_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000905 "Displays the amount of free and used system memory"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000906#define free_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000907 "$ free\n" \
908 " total used free shared buffers\n" \
909 " Mem: 257628 248724 8904 59644 93124\n" \
910 " Swap: 128516 8404 120112\n" \
911 "Total: 386144 257128 129016\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000912
Eric Andersen7e9276b2001-02-22 01:15:47 +0000913#define freeramdisk_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000914 "DEVICE"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000915#define freeramdisk_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000916 "Frees all memory used by the specified ramdisk."
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000917#define freeramdisk_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000918 "$ freeramdisk /dev/ram2\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000919
Mike Frysinger51a43b42005-09-24 07:11:16 +0000920#define fsck_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000921 "[-ANPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]"
Mike Frysinger51a43b42005-09-24 07:11:16 +0000922#define fsck_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000923 "Check and repair filesystems.\n\n" \
924 "Options:\n" \
925 " -A Walk /etc/fstab and check all filesystems\n" \
926 " -N Don't execute, just show what would be done\n" \
927 " -P When using -A, check filesystems in parallel\n" \
928 " -R When using -A, skip the root filesystem\n" \
929 " -T Don't show title on startup\n" \
930 " -V Verbose mode\n" \
931 " -C Write status information to specified filedescriptor\n" \
932 " -t List of filesystem types to check"
Mike Frysinger51a43b42005-09-24 07:11:16 +0000933
Eric Andersen7e9276b2001-02-22 01:15:47 +0000934#define fsck_minix_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000935 "[-larvsmf] /dev/name"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000936#define fsck_minix_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000937 "Performs a consistency check for MINIX filesystems.\n\n" \
938 "Options:\n" \
939 " -l Lists all filenames\n" \
940 " -r Perform interactive repairs\n" \
941 " -a Perform automatic repairs\n" \
942 " -v verbose\n" \
943 " -s Outputs super-block information\n" \
944 " -m Activates MINIX-like \"mode not cleared\" warnings\n" \
945 " -f Force file system check"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000946
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000947#define ftpget_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000948 "[options] remote-host local-file remote-file"
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000949#define ftpget_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000950 "Retrieve a remote file via FTP.\n\n" \
951 "Options:\n" \
952 " -c, --continue Continue a previous transfer\n" \
953 " -v, --verbose Verbose\n" \
954 " -u, --username Username to be used\n" \
955 " -p, --password Password to be used\n" \
956 " -P, --port Port number to be used"
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000957
958#define ftpput_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000959 "[options] remote-host remote-file local-file"
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000960#define ftpput_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000961 "Store a local file on a remote machine via FTP.\n\n" \
962 "Options:\n" \
963 " -v, --verbose Verbose\n" \
964 " -u, --username Username to be used\n" \
965 " -p, --password Password to be used\n" \
966 " -P, --port Port number to be used"
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000967
Rob Landleyaa872762005-10-28 13:05:12 +0000968#define fuser_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000969 "[options] file OR port/proto"
Rob Landleyaa872762005-10-28 13:05:12 +0000970#define fuser_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000971 "Options:\n" \
972 " -m Show all processes on the same mounted fs\n" \
973 " -k Kill all processes that match.\n" \
974 " -s Don't print or kill anything.\n" \
975 " -4 When using port/proto only search IPv4 space\n" \
976 " -6 When using port/proto only search IPv6 space\n" \
977 " -SIGNAL When used with -k, this signal will be used to kill"
Mike Frysingerbf28ed82006-02-21 04:32:03 +0000978
Eric Andersen7e9276b2001-02-22 01:15:47 +0000979#define getopt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000980 "[OPTIONS]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000981#define getopt_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000982 "Parse command options\n" \
983 " -a, --alternative Allow long options starting with single -\n" \
984 " -l, --longoptions=longopts Long options to be recognized\n" \
985 " -n, --name=progname The name under which errors are reported\n" \
986 " -o, --options=optstring Short options to be recognized\n" \
987 " -q, --quiet Disable error reporting by getopt(3)\n" \
988 " -Q, --quiet-output No normal output\n" \
989 " -s, --shell=shell Set shell quoting conventions\n" \
990 " -T, --test Test for getopt(1) version\n" \
991 " -u, --unquoted Do not quote the output"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000992#define getopt_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000993 "$ cat getopt.test\n" \
994 "#!/bin/sh\n" \
995 "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
996 " -n 'example.busybox' -- \"$@\"`\n" \
997 "if [ $? != 0 ] ; then exit 1 ; fi\n" \
998 "eval set -- \"$GETOPT\"\n" \
999 "while true ; do\n" \
1000 " case $1 in\n" \
1001 " -a|--a-long) echo \"Option a\" ; shift ;;\n" \
1002 " -b|--b-long) echo \"Option b, argument '$2'\" ; shift 2 ;;\n" \
1003 " -c|--c-long)\n" \
1004 " case \"$2\" in\n" \
1005 " \"\") echo \"Option c, no argument\"; shift 2 ;;\n" \
1006 " *) echo \"Option c, argument '$2'\" ; shift 2 ;;\n" \
1007 " esac ;;\n" \
1008 " --) shift ; break ;;\n" \
1009 " *) echo \"Internal error!\" ; exit 1 ;;\n" \
1010 " esac\n" \
1011 "done\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001012
Eric Andersenf349e972001-08-21 16:18:59 +00001013#define getty_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001014 "[OPTIONS]... baud_rate,... line [termtype]"
Eric Andersenf349e972001-08-21 16:18:59 +00001015#define getty_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001016 "Opens a tty, prompts for a login name, then invokes /bin/login\n\n" \
1017 "Options:\n" \
1018 " -h Enable hardware (RTS/CTS) flow control\n" \
1019 " -i Do not display /etc/issue before running login\n" \
1020 " -L Local line, so do not do carrier detect\n" \
1021 " -m Get baud rate from modem's CONNECT status message\n" \
1022 " -w Wait for a CR or LF before sending /etc/issue\n" \
1023 " -n Do not prompt the user for a login name\n" \
1024 " -f issue_file Display issue_file instead of /etc/issue\n" \
1025 " -l login_app Invoke login_app instead of /bin/login\n" \
1026 " -t timeout Terminate after timeout if no username is read\n" \
1027 " -I initstring Sets the init string to send before anything else\n" \
1028 " -H login_host Log login_host into the utmp file as the hostname"
Eric Andersenf349e972001-08-21 16:18:59 +00001029
Eric Andersen7e9276b2001-02-22 01:15:47 +00001030#define grep_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001031 "[-rihHnqvso" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +00001032 USE_FEATURE_GREP_EGREP_ALIAS("E") \
1033 USE_FEATURE_GREP_CONTEXT("ABC") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001034 "] PATTERN [FILEs...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001035#define grep_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001036 "Search for PATTERN in each FILE or standard input.\n\n" \
1037 "Options:\n" \
1038 " -H prefix output lines with filename where match was found\n" \
1039 " -h suppress the prefixing filename on output\n" \
1040 " -r recurse subdirectories\n" \
1041 " -i ignore case distinctions\n" \
1042 " -l list names of files that match\n" \
1043 " -L list names of files that do not match\n" \
1044 " -n print line number with output lines\n" \
1045 " -q be quiet. Returns 0 if PATTERN was found, 1 otherwise\n" \
1046 " -v select non-matching lines\n" \
1047 " -s suppress file open/read error messages\n" \
1048 " -c only print count of matching lines\n" \
1049 " -f read PATTERN from file\n" \
1050 " -o show only the part of a line that matches PATTERN\n" \
1051 " -e PATTERN is a regular expression\n" \
1052 " -F PATTERN is a set of newline-separated strings" \
1053 USE_FEATURE_GREP_EGREP_ALIAS("\n -E PATTERN is an extended regular expression") \
1054 USE_FEATURE_GREP_CONTEXT("\n -A print NUM lines of trailing context") \
1055 USE_FEATURE_GREP_CONTEXT("\n -B print NUM lines of leading context") \
1056 USE_FEATURE_GREP_CONTEXT("\n -C print NUM lines of output context")
Bernhard Reutner-Fischer0a44c172005-09-23 15:40:15 +00001057
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001058#define grep_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001059 "$ grep root /etc/passwd\n" \
1060 "root:x:0:0:root:/root:/bin/bash\n" \
1061 "$ grep ^[rR]oo. /etc/passwd\n" \
1062 "root:x:0:0:root:/root:/bin/bash\n"
Mark Whitley40e5e7c2001-03-14 17:45:45 +00001063
Eric Andersen7e9276b2001-02-22 01:15:47 +00001064#define gunzip_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001065 "[OPTION]... FILE"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001066#define gunzip_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001067 "Uncompress FILE (or standard input if FILE is '-').\n\n" \
1068 "Options:\n" \
1069 " -c Write output to standard output\n" \
1070 " -f Force read when source is a terminal\n" \
1071 " -t Test compressed file integrity"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001072#define gunzip_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001073 "$ ls -la /tmp/BusyBox*\n" \
1074 "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
1075 "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
1076 "$ ls -la /tmp/BusyBox*\n" \
1077 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001078
1079#define gzip_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001080 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001081#define gzip_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001082 "Compress FILE(s) with maximum compression.\n" \
1083 "When FILE is '-' or unspecified, reads standard input. Implies -c.\n\n" \
1084 "Options:\n" \
1085 " -c Write output to standard output instead of FILE.gz\n" \
1086 " -d Decompress\n" \
1087 " -f Force write when destination is a terminal"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001088#define gzip_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001089 "$ ls -la /tmp/busybox*\n" \
1090 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
1091 "$ gzip /tmp/busybox.tar\n" \
1092 "$ ls -la /tmp/busybox*\n" \
1093 "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001094
1095#define halt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001096 "[-d<delay>] [-n<nosync>] [-f<force>]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001097#define halt_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001098 "Halt the system.\n" \
1099 "Options:\n" \
1100 " -d delay interval for halting\n" \
1101 " -n no call to sync()\n" \
1102 " -f force halt (don't go through init)"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001103
Eric Andersen3443bd72003-07-22 07:30:36 +00001104#define hdparm_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001105 "[options] [device] .."
Eric Andersen3443bd72003-07-22 07:30:36 +00001106#define hdparm_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001107 USE_FEATURE_HDPARM_GET_IDENTITY(" If no device name is specified try to read from stdin.\n") \
1108 "\nOptions:\n" \
1109 " -a get/set fs readahead\n" \
1110 " -A set drive read-lookahead flag (0/1)\n" \
1111 " -b get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \
1112 " -B set Advanced Power Management setting (1-255)\n" \
1113 " -c get/set IDE 32-bit IO setting\n" \
1114 " -C check IDE power mode status\n" \
1115 USE_FEATURE_HDPARM_HDIO_GETSET_DMA(" -d get/set using_dma flag\n") \
1116 " -D enable/disable drive defect-mgmt\n" \
1117 " -f flush buffer cache for device on exit\n" \
1118 " -g display drive geometry\n" \
1119 " -h display terse usage information\n" \
1120 USE_FEATURE_HDPARM_GET_IDENTITY(" -i display drive identification\n") \
1121 USE_FEATURE_HDPARM_GET_IDENTITY(" -I detailed/current information directly from drive\n") \
1122 " -k get/set keep_settings_over_reset flag (0/1)\n" \
1123 " -K set drive keep_features_over_reset flag (0/1)\n" \
1124 " -L set drive doorlock (0/1) (removable harddisks only)\n" \
1125 " -m get/set multiple sector count\n" \
1126 " -n get/set ignore-write-errors flag (0/1)\n" \
1127 " -p set PIO mode on IDE interface chipset (0,1,2,3,4,...)\n" \
1128 " -P set drive prefetch count\n" \
1129 " -q change next setting quietly\n" \
1130 " -Q get/set DMA tagged-queuing depth (if supported)\n" \
1131 " -r get/set readonly flag (DANGEROUS to set)\n" \
1132 USE_FEATURE_HDPARM_HDIO_SCAN_HWIF(" -R register an IDE interface (DANGEROUS)\n") \
1133 " -S set standby (spindown) timeout\n" \
1134 " -t perform device read timings\n" \
1135 " -T perform cache read timings\n" \
1136 " -u get/set unmaskirq flag (0/1)\n" \
1137 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(" -U un-register an IDE interface (DANGEROUS)\n") \
1138 " -v defaults; same as -mcudkrag for IDE drives\n" \
1139 " -V display program version and exit immediately\n" \
1140 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET(" -w perform device reset (DANGEROUS)\n") \
1141 " -W set drive write-caching flag (0/1) (DANGEROUS)\n" \
1142 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(" -x tristate device for hotswap (0/1) (DANGEROUS)\n") \
1143 " -X set IDE xfer mode (DANGEROUS)\n" \
1144 " -y put IDE drive in standby mode\n" \
1145 " -Y put IDE drive to sleep\n" \
1146 " -Z disable Seagate auto-powersaving mode\n" \
1147 " -z re-read partition table"
Eric Andersen3443bd72003-07-22 07:30:36 +00001148
Eric Andersen7e9276b2001-02-22 01:15:47 +00001149#define head_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001150 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001151#define head_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001152 "Print first 10 lines of each FILE to standard output.\n" \
1153 "With more than one FILE, precede each with a header giving the\n" \
1154 "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
1155 "Options:\n" \
1156 " -n NUM Print first NUM lines instead of first 10" \
Rob Landleya2d9a172006-04-28 19:38:04 +00001157 USE_FEATURE_FANCY_HEAD( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001158 "\n -c NUM output the first NUM bytes\n" \
1159 " -q never output headers giving file names\n" \
1160 " -v always output headers giving file names" )
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001161#define head_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001162 "$ head -n 2 /etc/passwd\n" \
1163 "root:x:0:0:root:/root:/bin/bash\n" \
1164 "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001165
Glenn L McGrath60281112001-11-02 11:39:46 +00001166#define hexdump_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001167 "[-[bcCdefnosvx]] [OPTION] FILE"
Glenn L McGrath60281112001-11-02 11:39:46 +00001168#define hexdump_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001169 "The hexdump utility is a filter which displays the specified files,\n" \
1170 "or the standard input, if no files are specified, in a user specified\n" \
1171 "format\n" \
1172 " -b One-byte octal display\n" \
1173 " -c One-byte character display\n" \
1174 " -C Canonical hex+ASCII, 16 bytes per line\n" \
1175 " -d Two-byte decimal display\n" \
1176 " -e FORMAT STRING\n" \
1177 " -f FORMAT FILE\n" \
1178 " -n LENGTH Interpret only length bytes of input\n" \
1179 " -o Two-byte octal display\n" \
1180 " -s OFFSET Skip offset byte\n" \
1181 " -v display all input data\n" \
1182 " -x Two-byte hexadecimal display"
Glenn L McGrath60281112001-11-02 11:39:46 +00001183
Eric Andersen7e9276b2001-02-22 01:15:47 +00001184#define hostid_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001185 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00001186#define hostid_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001187 "Print out a unique 32-bit identifier for the machine."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001188
1189#define hostname_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001190 "[OPTION] {hostname | -F FILE}"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001191#define hostname_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001192 "Get or set the hostname or DNS domain name. If a hostname is given\n" \
1193 "(or FILE with the -F parameter), the host name will be set.\n\n" \
1194 "Options:\n" \
1195 " -s Short\n" \
1196 " -i Addresses for the hostname\n" \
1197 " -d DNS domain name\n" \
1198 " -f Fully qualified domain name\n" \
1199 " -F FILE Use the contents of FILE to specify the hostname"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001200#define hostname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001201 "$ hostname\n" \
1202 "sage\n"
Eric Andersen40520512003-07-28 09:59:05 +00001203
Glenn L McGrath58c708a2003-01-05 04:01:56 +00001204#define httpd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001205 "[-c <conf file>]" \
1206 " [-p <port>]" \
1207 " [-i] [-f]" \
Denis Vlasenkode59c0f2006-10-05 22:50:22 +00001208 USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
Rob Landleya2d9a172006-04-28 19:38:04 +00001209 USE_FEATURE_HTTPD_BASIC_AUTH(" [-r <realm>]") \
1210 USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001211 " [-h home]" \
1212 " [-d/-e <string>]"
Glenn L McGrath58c708a2003-01-05 04:01:56 +00001213#define httpd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001214 "Listens for incoming http server requests.\n\n" \
1215 "Options:\n" \
1216 " -c FILE Specifies configuration file. (default httpd.conf)\n" \
1217 " -p PORT Server port (default 80)\n" \
1218 " -i Assume that we are started from inetd\n" \
1219 " -f Do not daemonize\n" \
1220 USE_FEATURE_HTTPD_SETUID(" -u USER[:GRP] Set uid/gid after binding to port\n") \
1221 USE_FEATURE_HTTPD_BASIC_AUTH(" -r REALM Authentication Realm for Basic Authentication\n") \
1222 USE_FEATURE_HTTPD_AUTH_MD5(" -m PASS Crypt PASS with md5 algorithm\n") \
1223 " -h HOME Specifies http HOME directory (default ./)\n" \
1224 " -e STRING HTML encode STRING\n" \
1225 " -d STRING URL decode STRING"
Eric Andersen40520512003-07-28 09:59:05 +00001226
Robert Griebl1cd04452002-07-21 16:50:49 +00001227#define hwclock_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001228 "[-r|--show] [-s|--hctosys] [-w|--systohc] [-l|--localtime] [-u|--utc]"
Robert Griebl1cd04452002-07-21 16:50:49 +00001229#define hwclock_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001230 "Query and set the hardware clock (RTC)\n\n" \
1231 "Options:\n" \
1232 " -r read hardware clock and print result\n" \
1233 " -s set the system time from the hardware clock\n" \
1234 " -w set the hardware clock to the current system time\n" \
1235 " -u the hardware clock is kept in coordinated universal time\n" \
1236 " -l the hardware clock is kept in local time"
Robert Griebl1cd04452002-07-21 16:50:49 +00001237
Eric Andersen7e9276b2001-02-22 01:15:47 +00001238#define id_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001239 "[OPTIONS]... [USERNAME]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001240#define id_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001241 "Print information for USERNAME or the current user\n\n" \
1242 "Options:\n" \
1243 USE_SELINUX(" -c prints only the security context\n") \
1244 " -g prints only the group ID\n" \
1245 " -u prints only the user ID\n" \
1246 " -n print a name instead of a number\n" \
1247 " -r prints the real user ID instead of the effective ID"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001248#define id_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001249 "$ id\n" \
1250 "uid=1000(andersen) gid=1000(andersen)\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001251
Eric Andersen7e9276b2001-02-22 01:15:47 +00001252#define ifconfig_trivial_usage \
Denis Vlasenkoce979602006-09-27 23:31:08 +00001253 USE_FEATURE_IFCONFIG_STATUS("[-a]") " <interface> [<address>]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001254#define ifconfig_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001255 "configure a network interface\n\n" \
1256 "Options:\n" \
1257 USE_FEATURE_IPV6(" [add <address>[/<prefixlen>]]\n") \
1258 USE_FEATURE_IPV6(" [del <address>[/<prefixlen>]]\n") \
1259 " [[-]broadcast [<address>]] [[-]pointopoint [<address>]]\n" \
1260 " [netmask <address>] [dstaddr <address>]\n" \
1261 USE_FEATURE_IFCONFIG_SLIP(" [outfill <NN>] [keepalive <NN>]\n") \
1262 " " USE_FEATURE_IFCONFIG_HW("[hw ether <address>] ") \
1263 "[metric <NN>] [mtu <NN>]\n" \
1264 " [[-]trailers] [[-]arp] [[-]allmulti]\n" \
1265 " [multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic]\n" \
1266 USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ(" [mem_start <NN>] [io_addr <NN>] [irq <NN>]\n") \
1267 " [up|down] ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001268
Glenn L McGrath021fa7d2002-11-09 09:34:15 +00001269#define ifup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001270 "<-ahinv> <ifaces...>"
Glenn L McGrath021fa7d2002-11-09 09:34:15 +00001271#define ifup_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001272 "ifup <options> <ifaces...>\n\n" \
1273 "Options:\n" \
1274 " -h this help\n" \
1275 " -a de/configure all interfaces automatically\n" \
1276 " -i FILE use FILE for interface definitions\n" \
1277 " -n print out what would happen, but don't do it\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00001278 " (note that this option doesn't disable mappings)\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001279 " -v print out what would happen before doing it\n" \
1280 " -m don't run any mappings\n" \
1281 " -f force de/configuration"
Glenn L McGrath021fa7d2002-11-09 09:34:15 +00001282
1283#define ifdown_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001284 "<-ahinv> <ifaces...>"
Glenn L McGrath021fa7d2002-11-09 09:34:15 +00001285#define ifdown_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001286 "ifdown <options> <ifaces...>\n\n" \
1287 "Options:\n" \
1288 " -h this help\n" \
1289 " -a de/configure all interfaces automatically\n" \
1290 " -i FILE use FILE for interface definitions\n" \
1291 " -n print out what would happen, but don't do it\n" \
1292 " (note that this option doesn't disable mappings)\n" \
1293 " -v print out what would happen before doing it\n" \
1294 " -m don't run any mappings\n" \
1295 " -f force de/configuration"
Tim Riker7b253f82003-12-28 05:02:40 +00001296
Glenn L McGrath06e95652003-02-09 06:51:14 +00001297#define inetd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001298 "[-f] [-q len] [conf]"
Glenn L McGrath06e95652003-02-09 06:51:14 +00001299#define inetd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001300 "Listens for network connections and launches programs\n\n" \
1301 "Option:\n" \
1302 " -f Run as a foreground progress\n" \
1303 " -q Sets the size of the socket listen queue to\n" \
1304 " the specified value. Default is 128"
Glenn L McGrath06e95652003-02-09 06:51:14 +00001305
Eric Andersen7e9276b2001-02-22 01:15:47 +00001306#define init_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001307 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00001308#define init_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001309 "Init is the parent of all processes."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001310#define init_notes_usage \
1311"This version of init is designed to be run only by the kernel.\n" \
1312"\n" \
1313"BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
Denis Vlasenkoe1a0d482006-10-20 13:28:22 +00001314"the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001315"runlevels, use sysvinit.\n" \
1316"\n" \
Denis Vlasenkoe1a0d482006-10-20 13:28:22 +00001317"BusyBox init works just fine without an inittab. If no inittab is found,\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001318"it has the following default behavior:\n" \
1319"\n" \
1320" ::sysinit:/etc/init.d/rcS\n" \
1321" ::askfirst:/bin/sh\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00001322" ::ctrlaltdel:/sbin/reboot\n" \
1323" ::shutdown:/sbin/swapoff -a\n" \
1324" ::shutdown:/bin/umount -a -r\n" \
Eric Andersen730f8262001-12-17 23:13:08 +00001325" ::restart:/sbin/init\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001326"\n" \
1327"if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
1328"\n" \
1329" tty2::askfirst:/bin/sh\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00001330" tty3::askfirst:/bin/sh\n" \
1331" tty4::askfirst:/bin/sh\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001332"\n" \
1333"If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
1334"\n" \
1335" <id>:<runlevels>:<action>:<process>\n" \
1336"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001337" <id>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001338"\n" \
1339" WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
1340" The id field is used by BusyBox init to specify the controlling tty for\n" \
1341" the specified process to run on. The contents of this field are\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00001342" appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001343" be unique, although if it isn't you may have strange results. If this\n" \
1344" field is left blank, the controlling tty is set to the console. Also\n" \
1345" note that if BusyBox detects that a serial console is in use, then only\n" \
1346" entries whose controlling tty is either the serial console or /dev/null\n" \
1347" will be run. BusyBox init does nothing with utmp. We don't need no\n" \
1348" stinkin' utmp.\n" \
1349"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001350" <runlevels>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001351"\n" \
1352" The runlevels field is completely ignored.\n" \
1353"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001354" <action>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001355"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001356" Valid actions include: sysinit, respawn, askfirst, wait,\n" \
Eric Andersen730f8262001-12-17 23:13:08 +00001357" once, restart, ctrlaltdel, and shutdown.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001358"\n" \
1359" The available actions can be classified into two groups: actions\n" \
1360" that are run only once, and actions that are re-run when the specified\n" \
1361" process exits.\n" \
1362"\n" \
1363" Run only-once actions:\n" \
1364"\n" \
1365" 'sysinit' is the first item run on boot. init waits until all\n" \
1366" sysinit actions are completed before continuing. Following the\n" \
1367" completion of all sysinit actions, all 'wait' actions are run.\n" \
1368" 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
Eric Andersen77d92682001-05-23 20:32:09 +00001369" the specified task completes. 'once' actions are asynchronous,\n" \
Eric Andersen730f8262001-12-17 23:13:08 +00001370" therefore, init does not wait for them to complete. 'restart' is\n" \
1371" the action taken to restart the init process. By default this should\n" \
1372" simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
1373" can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00001374" actions are run when the system detects that someone on the system\n" \
1375" console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
1376" wants to run 'reboot' at this point to cause the system to reboot.\n" \
1377" Finally the 'shutdown' action specifies the actions to taken when\n" \
1378" init is told to reboot. Unmounting filesystems and disabling swap\n" \
1379" is a very good here\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001380"\n" \
1381" Run repeatedly actions:\n" \
1382"\n" \
1383" 'respawn' actions are run after the 'once' actions. When a process\n" \
1384" started with a 'respawn' action exits, init automatically restarts\n" \
1385" it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
1386" respawning out of control. The 'askfirst' actions acts just like\n" \
1387" respawn, except that before running the specified process it\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00001388" displays the line \"Please press Enter to activate this console.\"\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001389" and then waits for the user to press enter before starting the\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001390" specified process.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001391"\n" \
1392" Unrecognized actions (like initdefault) will cause init to emit an\n" \
1393" error message, and then go along with its business. All actions are\n" \
Eric Andersene0f55002002-09-30 20:59:33 +00001394" run in the order they appear in /etc/inittab.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001395"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001396" <process>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001397"\n" \
Glenn L McGrath43596232004-07-23 01:27:56 +00001398" Specifies the process to be executed and its command line.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001399"\n" \
1400"Example /etc/inittab file:\n" \
Mark Whitley0a6f1d32001-03-15 21:19:09 +00001401"\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001402" # This is run first except when booting in single-user mode.\n" \
1403" #\n" \
1404" ::sysinit:/etc/init.d/rcS\n" \
1405" \n" \
1406" # /bin/sh invocations on selected ttys\n" \
1407" #\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00001408" # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001409" ::askfirst:-/bin/sh\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00001410" # Start an \"askfirst\" shell on /dev/tty2-4\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001411" tty2::askfirst:-/bin/sh\n" \
1412" tty3::askfirst:-/bin/sh\n" \
1413" tty4::askfirst:-/bin/sh\n" \
1414" \n" \
1415" # /sbin/getty invocations for selected ttys\n" \
1416" #\n" \
Eric Andersen1713a112002-11-07 02:26:59 +00001417" tty4::respawn:/sbin/getty 38400 tty4\n" \
1418" tty5::respawn:/sbin/getty 38400 tty5\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001419" \n" \
1420" \n" \
1421" # Example of how to put a getty on a serial line (for a terminal)\n" \
1422" #\n" \
1423" #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
1424" #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
1425" #\n" \
1426" # Example how to put a getty on a modem line.\n" \
1427" #::respawn:/sbin/getty 57600 ttyS2\n" \
1428" \n" \
Eric Andersen730f8262001-12-17 23:13:08 +00001429" # Stuff to do when restarting the init process\n" \
1430" ::restart:/sbin/init\n" \
1431" \n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001432" # Stuff to do before rebooting\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00001433" ::ctrlaltdel:/sbin/reboot\n" \
1434" ::shutdown:/bin/umount -a -r\n" \
1435" ::shutdown:/sbin/swapoff -a\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001436
1437#define insmod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001438 "[OPTION]... MODULE [symbol=value]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001439#define insmod_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001440 "Loads the specified kernel modules into the kernel.\n\n" \
1441 "Options:\n" \
1442 " -f Force module to load into the wrong kernel version\n" \
1443 " -k Make module autoclean-able\n" \
1444 " -v verbose output\n" \
1445 " -q quiet output\n" \
1446 " -L Lock to prevent simultaneous loads of a module\n" \
1447 USE_FEATURE_INSMOD_LOAD_MAP(" -m Output load map to stdout\n") \
1448 " -o NAME Set internal module name to NAME\n" \
1449 " -x do not export externs"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001450
Glenn L McGratheebcc1d2003-09-24 03:22:57 +00001451#define install_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001452 "[-cgmops] [sources] <dest|directory>"
Glenn L McGratheebcc1d2003-09-24 03:22:57 +00001453#define install_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001454 "Copies files and set attributes\n\n" \
1455 "Options:\n" \
1456 " -c copy the file, default\n" \
1457 " -d create directories\n" \
1458 " -g set group ownership\n" \
1459 " -m set permission modes\n" \
1460 " -o set ownership\n" \
1461 " -p preserve date\n" \
1462 " -s strip symbol tables"
Glenn L McGratheebcc1d2003-09-24 03:22:57 +00001463
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00001464#define ip_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001465 "[OPTIONS] {address | link | route | tunnel | rule} {COMMAND}"
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00001466#define ip_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001467 "ip [OPTIONS] OBJECT {COMMAND}\n" \
1468 "where OBJECT := {link | addr | route | tunnel |rule}\n" \
1469 "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001470
1471#define ipaddr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001472 "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
1473 " [ dev STRING ] [ to PREFIX ] }"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001474#define ipaddr_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001475 "ipaddr {add|delete} IFADDR dev STRING\n" \
1476 "ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n" \
1477 " [ to PREFIX ] [ label PATTERN ]\n" \
1478 " IFADDR := PREFIX | ADDR peer PREFIX\n" \
1479 " [ broadcast ADDR ] [ anycast ADDR ]\n" \
1480 " [ label STRING ] [ scope SCOPE-ID ]\n" \
1481 " SCOPE-ID := [ host | link | global | NUMBER ]"
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00001482
Eric Andersende4f07e2003-12-11 01:18:07 +00001483#define ipcalc_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001484 "[OPTION]... <ADDRESS>[[/]<NETMASK>] [NETMASK]"
Eric Andersende4f07e2003-12-11 01:18:07 +00001485#define ipcalc_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001486 "Calculate IP network settings from a IP address\n\n" \
1487 "Options:\n" \
1488 " -b --broadcast Display calculated broadcast address\n" \
1489 " -n --network Display calculated network address\n" \
1490 " -m --netmask Display default netmask for IP" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00001491 USE_FEATURE_IPCALC_FANCY( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001492 "\n -p --prefix Display the prefix for IP/NETMASK\n" \
1493 " -h --hostname Display first resolved host name\n" \
1494 " -s --silent Don't ever display error messages")
Glenn L McGrathc11986d2002-11-10 23:42:27 +00001495
Rob Landley6eb1e412005-06-20 04:30:36 +00001496#define ipcrm_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001497 "[-[MQS] key] [-[mqs] id]"
Rob Landley6eb1e412005-06-20 04:30:36 +00001498#define ipcrm_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001499 "The upper-case options MQS are used to remove a shared memory segment by a\n" \
1500 "segment by a shmkey value. The lower-case options mqs are used\n" \
1501 "to remove a segment by shmid value.\n" \
1502 " -[mM] Remove the memory segment after the last detach\n" \
1503 " -[qQ] Remove the message queue\n" \
1504 " -[sS] Remove the semaphore"
Rob Landley6eb1e412005-06-20 04:30:36 +00001505
1506#define ipcs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001507 "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
Rob Landley6eb1e412005-06-20 04:30:36 +00001508#define ipcs_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001509 " -i specify a specific resource id\n" \
1510 "Resource specification:\n" \
1511 " -m shared memory segments\n" \
1512 " -q message queues\n" \
1513 " -s semaphore arrays\n" \
1514 " -a all (default)\n" \
1515 "Output format:\n" \
1516 " -t time\n" \
1517 " -c creator\n" \
1518 " -p pid\n" \
1519 " -l limits\n" \
1520 " -u summary"
Rob Landley6eb1e412005-06-20 04:30:36 +00001521
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001522#define iplink_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001523 "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001524#define iplink_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001525 "iplink set DEVICE { up | down | arp { on | off } |\n" \
1526 " dynamic { on | off } |\n" \
1527 " mtu MTU }\n" \
1528 " iplink show [ DEVICE ]"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001529
1530#define iproute_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001531 "{ list | flush | { add | del | change | append |\n" \
1532 " replace | monitor } ROUTE }"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001533#define iproute_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001534 "iproute { list | flush } SELECTOR\n" \
1535 "iproute get ADDRESS [ from ADDRESS iif STRING ]\n" \
1536 " [ oif STRING ] [ tos TOS ]\n" \
1537 " iproute { add | del | change | append | replace | monitor } ROUTE\n" \
1538 " SELECTOR := [ root PREFIX ] [ match PREFIX ] [ proto RTPROTO ]\n" \
1539 " ROUTE := [ TYPE ] PREFIX [ tos TOS ] [ proto RTPROTO ]"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001540
Bernhard Reutner-Fischer921f5df2006-11-21 15:36:08 +00001541#define iprule_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001542 "{[ list | add | del ] RULE}"
Bernhard Reutner-Fischer921f5df2006-11-21 15:36:08 +00001543#define iprule_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001544 "iprule [ list | add | del ] SELECTOR ACTION\n" \
1545 " SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK ]\n" \
1546 " [ dev STRING ] [ pref NUMBER ]\n" \
1547 " ACTION := [ table TABLE_ID ] [ nat ADDRESS ]\n" \
1548 " [ prohibit | reject | unreachable ]\n" \
1549 " [ realms [SRCREALM/]DSTREALM ]\n" \
1550 " TABLE_ID := [ local | main | default | NUMBER ]"
Bernhard Reutner-Fischer921f5df2006-11-21 15:36:08 +00001551
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001552#define iptunnel_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001553 "{ add | change | del | show } [ NAME ]\n" \
1554 " [ mode { ipip | gre | sit } ]\n" \
1555 " [ remote ADDR ] [ local ADDR ] [ ttl TTL ]"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001556#define iptunnel_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001557 "iptunnel { add | change | del | show } [ NAME ]\n" \
1558 " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" \
1559 " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" \
1560 " [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]"
Glenn L McGrathf112daa2002-12-01 23:04:06 +00001561
Eric Andersen7e9276b2001-02-22 01:15:47 +00001562#define kill_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001563 "[-l] [-signal] process-id [process-id ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001564#define kill_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001565 "Send a signal (default is TERM) to the specified process(es).\n\n" \
1566 "Options:\n" \
1567 " -l List all signal names and numbers"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001568#define kill_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001569 "$ ps | grep apache\n" \
1570 "252 root root S [apache]\n" \
1571 "263 www-data www-data S [apache]\n" \
1572 "264 www-data www-data S [apache]\n" \
1573 "265 www-data www-data S [apache]\n" \
1574 "266 www-data www-data S [apache]\n" \
1575 "267 www-data www-data S [apache]\n" \
1576 "$ kill 252\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001577
1578#define killall_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001579 "[-l] [-q] [-signal] process-name [process-name ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001580#define killall_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001581 "Send a signal (default is TERM) to the specified process(es).\n\n" \
1582 "Options:\n" \
1583 " -l List all signal names and numbers\n" \
1584 " -q Do not complain if no processes were killed"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001585#define killall_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001586 "$ killall apache\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001587
Denis Vlasenko0bb628f2006-09-27 14:25:33 +00001588#define killall5_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001589 "[-l] [-signal]"
Denis Vlasenko0bb628f2006-09-27 14:25:33 +00001590#define killall5_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001591 "Send a signal (default is TERM) to all processes outside current session.\n\n" \
1592 "Options:\n" \
1593 " -l List all signal names and numbers\n" \
Denis Vlasenko0bb628f2006-09-27 14:25:33 +00001594
Mark Whitley6317c4b2001-03-12 22:51:50 +00001595#define klogd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001596 "[-c n] [-n]"
Mark Whitley6317c4b2001-03-12 22:51:50 +00001597#define klogd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001598 "Kernel logger.\n" \
1599 "Options:\n" \
1600 " -c n Sets the default log level of console messages to n\n" \
1601 " -n Run as a foreground process"
Mark Whitley6317c4b2001-03-12 22:51:50 +00001602
Eric Andersen7e9276b2001-02-22 01:15:47 +00001603#define length_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001604 "STRING"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001605#define length_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001606 "Prints out the length of the specified STRING."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001607#define length_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001608 "$ length Hello\n" \
1609 "5\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001610
Rob Landley9200e792005-09-15 19:26:59 +00001611#define less_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001612 "[-EMNmh~?] FILE1 FILE2..."
Rob Landley9200e792005-09-15 19:26:59 +00001613#define less_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001614 "View a file or list of files. The position within files can be\n" \
1615 "changed, and files can be manipulated in various ways with the\n" \
1616 "following options:\n\n" \
1617 " -E Quit once the end of a file is reached\n" \
1618 " -M Display a status line containing the current line numbers\n" \
1619 " and the percentage through the file\n" \
1620 " -N Prefix line numbers to each line\n" \
1621 " -m Display a status line containing the percentage through the\n" \
1622 " file\n" \
1623 " -~ Suppress ~s displayed when input past the end of the file is\n" \
1624 " reached.\n" \
1625 " -h, -? Display this help message"
Rob Landley9200e792005-09-15 19:26:59 +00001626
Mike Frysinger0a6b0bf2006-02-21 04:26:52 +00001627#define setarch_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001628 "<personality> <program> [args ...]"
Mike Frysinger0a6b0bf2006-02-21 04:26:52 +00001629#define setarch_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001630 "Personality may be:\n" \
1631 " linux32 Set 32bit uname emulation\n" \
1632 " linux64 Set 64bit uname emulation"
Mike Frysinger0a6b0bf2006-02-21 04:26:52 +00001633
Eric Andersen7e9276b2001-02-22 01:15:47 +00001634#define ln_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001635 "[OPTION] TARGET... LINK_NAME|DIRECTORY"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001636#define ln_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001637 "Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n" \
1638 "\nYou may use '--' to indicate that all following arguments are non-options.\n\n" \
1639 "Options:\n" \
1640 " -s make symbolic links instead of hard links\n" \
1641 " -f remove existing destination files\n" \
1642 " -n no dereference symlinks - treat like normal file\n" \
1643 " -b make a backup of the target (if exists) before link operation\n" \
1644 " -S suffix use suffix instead of ~ when making backup files"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001645#define ln_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001646 "$ ln -s BusyBox /tmp/ls\n" \
1647 "$ ls -l /tmp/ls\n" \
1648 "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001649
Eric Andersen7e9276b2001-02-22 01:15:47 +00001650#define loadfont_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001651 "< font"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001652#define loadfont_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001653 "Loads a console font from standard input."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001654#define loadfont_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001655 "$ loadfont < /etc/i18n/fontname\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001656
1657#define loadkmap_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001658 "< keymap"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001659#define loadkmap_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001660 "Loads a binary keyboard translation table from standard input."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001661#define loadkmap_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001662 "$ loadkmap < /etc/i18n/lang-keymap\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001663
1664#define logger_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001665 "[OPTION]... [MESSAGE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001666#define logger_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001667 "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n\n" \
1668 "Options:\n" \
1669 " -s Log to stderr as well as the system log\n" \
1670 " -t TAG Log using the specified tag (defaults to user name)\n" \
1671 " -p PRIORITY Enter the message with the specified priority\n" \
1672 " This may be numerical or a 'facility.level' pair"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001673#define logger_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001674 "$ logger \"hello\"\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001675
Robert Griebl1fca5582002-06-04 20:45:46 +00001676#define login_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001677 "[OPTION]... [username] [ENV=VAR ...]"
Robert Griebl1fca5582002-06-04 20:45:46 +00001678#define login_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001679 "Begin a new session on the system\n\n" \
1680 "Options:\n" \
1681 " -f Do not authenticate (user already authenticated)\n" \
1682 " -h Name of the remote host for this login\n" \
1683 " -p Preserve environment"
Robert Griebl1fca5582002-06-04 20:45:46 +00001684
Eric Andersen7e9276b2001-02-22 01:15:47 +00001685#define logname_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001686 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00001687#define logname_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001688 "Print the name of the current user."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001689#define logname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001690 "$ logname\n" \
1691 "root\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001692
Mark Whitley6317c4b2001-03-12 22:51:50 +00001693#define logread_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001694 "[OPTION]..."
Mark Whitley6317c4b2001-03-12 22:51:50 +00001695#define logread_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001696 "Shows the messages from syslogd (using circular buffer).\n\n" \
1697 "Options:\n" \
1698 " -f output data as the log grows"
Mark Whitley6317c4b2001-03-12 22:51:50 +00001699
Matt Kraai83788da2002-03-20 17:38:37 +00001700#define losetup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001701 "[-o OFFSET] [-d] LOOPDEVICE [FILE]]"
Matt Kraai83788da2002-03-20 17:38:37 +00001702#define losetup_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001703 "(Dis)associate LOOPDEVICE with FILE, or display current associations.\n\n" \
1704 "Options:\n" \
1705 " -d Disassociate LOOPDEVICE\n" \
1706 " -o OFFSET Start OFFSET bytes into FILE"
Rob Landley1d589b22005-11-29 23:47:10 +00001707#define losetup_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001708 "No arguments will display all current associations.\n" \
1709 "One argument (losetup /dev/loop1) will display the current association\n" \
1710 "(if any), or disassociate it (with -d). The display shows the offset\n" \
1711 "and filename of the file the loop device is currently bound to.\n\n" \
1712 "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
1713 "with an optional offset (-o 12345). Encryption is not yet supported.\n\n"
Matt Kraai83788da2002-03-20 17:38:37 +00001714
Eric Andersen7e9276b2001-02-22 01:15:47 +00001715#define ls_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001716 "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00001717 USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
1718 USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
1719 USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
1720 USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
1721 USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \
1722 USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \
1723 USE_SELINUX("K") "] [filenames...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001724#define ls_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001725 "List directory contents\n\n" \
1726 "Options:\n" \
1727 " -1 list files in a single column\n" \
1728 " -A do not list implied . and ..\n" \
1729 " -a do not hide entries starting with .\n" \
1730 " -C list entries by columns\n" \
1731 USE_FEATURE_LS_TIMESTAMPS(" -c with -l: show ctime\n") \
1732 USE_FEATURE_LS_COLOR(" --color[={always,never,auto}] to control coloring\n") \
1733 " -d list directory entries instead of contents\n" \
1734 USE_FEATURE_LS_TIMESTAMPS(" -e list both full date and full time\n") \
1735 USE_FEATURE_LS_FILETYPES(" -F append indicator (one of */=@|) to entries\n") \
1736 " -i list the i-node for each file\n" \
1737 " -l use a long listing format\n" \
1738 " -n list numeric UIDs and GIDs instead of names\n" \
1739 USE_FEATURE_LS_FILETYPES(" -p append indicator (one of /=@|) to entries\n") \
1740 USE_FEATURE_LS_FOLLOWLINKS(" -L list entries pointed to by symbolic links\n") \
1741 USE_FEATURE_LS_RECURSIVE(" -R list subdirectories recursively\n") \
1742 USE_FEATURE_LS_SORTFILES(" -r sort the listing in reverse order\n") \
1743 USE_FEATURE_LS_SORTFILES(" -S sort the listing by file size\n") \
1744 " -s list the size of each file, in blocks\n" \
1745 USE_FEATURE_AUTOWIDTH(" -T NUM assume Tabstop every NUM columns\n") \
1746 USE_FEATURE_LS_TIMESTAMPS(" -t with -l: show modification time\n") \
1747 USE_FEATURE_LS_TIMESTAMPS(" -u with -l: show access time\n") \
1748 USE_FEATURE_LS_SORTFILES(" -v sort the listing by version\n") \
1749 USE_FEATURE_AUTOWIDTH(" -w NUM assume the terminal is NUM columns wide\n") \
1750 " -x list entries by lines instead of by columns\n" \
1751 USE_FEATURE_LS_SORTFILES(" -X sort the listing by extension\n") \
Rob Landley5fe8d5b2006-04-25 22:40:53 +00001752 USE_FEATURE_HUMAN_READABLE( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001753 " -h print sizes in human readable format (e.g., 1K 243M 2G )\n") \
1754 USE_SELINUX(" -k print security context\n") \
1755 USE_SELINUX(" -K print security context in long format\n")
Eric Andersen7e9276b2001-02-22 01:15:47 +00001756
Mike Frysingerde9f1f72005-04-22 02:33:37 +00001757#define lsattr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001758 "[-Radlv] [files...]"
Mike Frysingerde9f1f72005-04-22 02:33:37 +00001759#define lsattr_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001760 "list file attributes on an ext2 fs\n\n" \
1761 "Options:\n" \
1762 " -R recursively list subdirectories\n" \
1763 " -a do not hide entries starting with .\n" \
1764 " -d list directory entries instead of contents\n" \
1765 " -l print long flag names\n" \
1766 " -v list the file's version/generation number"
Mike Frysingerde9f1f72005-04-22 02:33:37 +00001767
Eric Andersen7e9276b2001-02-22 01:15:47 +00001768#define lsmod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001769 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00001770#define lsmod_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001771 "List the currently loaded kernel modules."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001772
Eric Andersen3d925622005-06-09 10:16:02 +00001773#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF
Eric Andersen7e9276b2001-02-22 01:15:47 +00001774#define makedevs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001775 "NAME TYPE MAJOR MINOR FIRST LAST [s]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001776#define makedevs_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001777 "Creates a range of block or character special files\n\n" \
1778 "TYPEs include:\n" \
1779 " b: Make a block (buffered) device.\n" \
1780 " c or u: Make a character (un-buffered) device.\n" \
1781 " p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n" \
1782 "FIRST specifies the number appended to NAME to create the first device.\n" \
1783 "LAST specifies the number of the last item that should be created\n" \
1784 "If 's' is the last argument, the base device is created as well.\n\n" \
1785 "For example:\n" \
1786 " makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \
1787 " makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001788#define makedevs_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001789 "# makedevs /dev/ttyS c 4 66 2 63\n" \
1790 "[creates ttyS2-ttyS63]\n" \
1791 "# makedevs /dev/hda b 3 0 0 8 s\n" \
1792 "[creates hda,hda1-hda8]\n"
Eric Andersen3d925622005-06-09 10:16:02 +00001793#endif
1794
1795#ifdef CONFIG_FEATURE_MAKEDEVS_TABLE
1796#define makedevs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001797 "[-d device_table] rootdir"
Eric Andersen3d925622005-06-09 10:16:02 +00001798#define makedevs_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001799 "Creates a range of special files as specified in a device table.\n" \
1800 "Device table entries take the form of:\n" \
1801 "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
1802 "Where name is the file name, type can be one of:\n" \
1803 " f A regular file\n" \
1804 " d Directory\n" \
1805 " c Character special device file\n" \
1806 " b Block special device file\n" \
1807 " p Fifo (named pipe)\n" \
1808 "uid is the user id for the target file, gid is the group id for the\n" \
1809 "target file. The rest of the entries (major, minor, etc) apply to\n" \
1810 "to device special files. A '-' may be used for blank entries."
Eric Andersene8614db2005-07-18 09:28:36 +00001811#define makedevs_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001812 "For example:\n" \
1813 "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
1814 "/dev d 755 0 0 - - - - -\n" \
1815 "/dev/console c 666 0 0 5 1 - - -\n" \
1816 "/dev/null c 666 0 0 1 3 0 0 -\n" \
1817 "/dev/zero c 666 0 0 1 5 0 0 -\n" \
1818 "/dev/hda b 640 0 0 3 0 0 0 -\n" \
1819 "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \
1820 "Will Produce:\n" \
1821 "/dev\n" \
1822 "/dev/console\n" \
1823 "/dev/null\n" \
1824 "/dev/zero\n" \
1825 "/dev/hda\n" \
1826 "/dev/hda[0-15]\n"
Eric Andersen3d925622005-06-09 10:16:02 +00001827#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001828
Eric Andersen7e9276b2001-02-22 01:15:47 +00001829#define md5sum_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001830 "[OPTION] [FILEs...]" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00001831 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
Eric Andersen7e9276b2001-02-22 01:15:47 +00001832#define md5sum_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001833 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums.\n\n" \
1834 "Options:\n" \
1835 "With no FILE, or when FILE is -, read standard input." \
Denis Vlasenkoce979602006-09-27 23:31:08 +00001836 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001837 " -c check MD5 sums against given list\n" \
1838 "\nThe following two options are useful only when verifying checksums:\n" \
1839 " -s don't output anything, status code shows success\n" \
1840 " -w warn about improperly formatted MD5 checksum lines")
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001841#define md5sum_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001842 "$ md5sum < busybox\n" \
1843 "6fd11e98b98a58f64ff3398d7b324003\n" \
1844 "$ md5sum busybox\n" \
1845 "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
1846 "$ md5sum -c -\n" \
1847 "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
1848 "busybox: OK\n" \
1849 "^D\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001850
Rob Landley70f7ef72005-12-13 08:21:33 +00001851#define mdev_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001852 "[-s]"
Rob Landley70f7ef72005-12-13 08:21:33 +00001853#define mdev_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001854 " -s Scan /sys and populate /dev during system boot\n\n" \
1855 "Called with no options (via hotplug) it uses environment variables\n" \
1856 "to determine which device to add/remove."
Rob Landleyef10d522006-06-26 14:11:33 +00001857#define mdev_notes_usage "" \
1858USE_FEATURE_MDEV_CONFIG( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001859 "The mdev config file contains lines that look like:\n" \
1860 " hd[a-z][0-9]* 0:3 660\n\n" \
1861 "That's device name (with regex match), uid:gid, and permissions.\n\n" \
Rob Landleyef10d522006-06-26 14:11:33 +00001862 USE_FEATURE_MDEV_EXEC( \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00001863 "Optionally, that can be followed (on the same line) by a special character\n" \
1864 "and a command line to run after creating/before deleting the corresponding\n" \
1865 "device(s). The environment variable $MDEV indicates the active device node\n" \
1866 "(which is useful if it's a regex match). For example:\n\n" \
1867 " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" \
1868 "The special characters are @ (run after creating), $ (run before deleting),\n" \
1869 "and * (run both after creating and before deleting). The commands run in\n" \
1870 "the /dev directory, and use system() which calls /bin/sh.\n\n" \
Rob Landleyef10d522006-06-26 14:11:33 +00001871 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001872 "Config file parsing stops on the first matching line. If no config\n"\
1873 "entry is matched, devices are created with default 0:0 660. (Make\n"\
1874 "the last line match .* to override this.)\n\n" \
Rob Landleyef10d522006-06-26 14:11:33 +00001875)
Rob Landley70f7ef72005-12-13 08:21:33 +00001876
Glenn L McGrath061c9002002-09-16 04:21:46 +00001877#define mesg_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001878 "[y|n]"
Glenn L McGrath061c9002002-09-16 04:21:46 +00001879#define mesg_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001880 "mesg controls write access to your terminal\n" \
1881 " y Allow write access to your terminal\n" \
1882 " n Disallow write access to your terminal"
Glenn L McGrath061c9002002-09-16 04:21:46 +00001883
Eric Andersen7e9276b2001-02-22 01:15:47 +00001884#define mkdir_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001885 "[OPTION] DIRECTORY..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001886#define mkdir_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001887 "Create the DIRECTORY(ies) if they do not already exist\n\n" \
1888 "Options:\n" \
1889 " -m set permission mode (as in chmod), not rwxrwxrwx - umask\n" \
1890 " -p no error if existing, make parent directories as needed"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001891#define mkdir_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001892 "$ mkdir /tmp/foo\n" \
1893 "$ mkdir /tmp/foo\n" \
1894 "/tmp/foo: File exists\n" \
1895 "$ mkdir /tmp/foo/bar/baz\n" \
1896 "/tmp/foo/bar/baz: No such file or directory\n" \
1897 "$ mkdir -p /tmp/foo/bar/baz\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001898
Mike Frysinger6447ac02005-06-11 05:29:40 +00001899#define mke2fs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001900 "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \
1901 "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \
1902 "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \
1903 "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \
1904 "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
1905 "device [blocks-count]"
Mike Frysinger6447ac02005-06-11 05:29:40 +00001906#define mke2fs_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001907 " -b size block size in bytes\n" \
1908 " -c check for bad blocks before creating\n" \
1909 " -E opts set extended options\n" \
1910 " -f size fragment size in bytes\n" \
1911 " -F force (ignore sanity checks)\n" \
1912 " -g num number of blocks in a block group\n" \
1913 " -i ratio the bytes/inode ratio\n" \
1914 " -j create a journal (ext3)\n" \
1915 " -J opts set journal options (size/device)\n" \
1916 " -l file read bad blocks list from file\n" \
1917 " -L lbl set the volume label\n" \
1918 " -m percent percent of fs blocks to reserve for admin\n" \
1919 " -M dir set last mounted directory\n" \
1920 " -n do not actually create anything\n" \
1921 " -N num number of inodes to create\n" \
1922 " -o os set the 'creator os' field\n" \
1923 " -O features dir_index/filetype/has_journal/journal_dev/sparse_super\n" \
1924 " -q quiet execution\n" \
1925 " -r rev set filesystem revision\n" \
1926 " -S write superblock and group descriptors only\n" \
1927 " -T fs-type set usage type (news/largefile/largefile4)\n" \
1928 " -v verbose execution"
Mike Frysinger6447ac02005-06-11 05:29:40 +00001929
Eric Andersen7e9276b2001-02-22 01:15:47 +00001930#define mkfifo_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001931 "[OPTIONS] name"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001932#define mkfifo_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001933 "Creates a named pipe (identical to 'mknod name p')\n\n" \
1934 "Options:\n" \
1935 " -m create the pipe using the specified mode (default a=rw)"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001936
Eric Andersen7e9276b2001-02-22 01:15:47 +00001937#define mkfs_minix_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001938 "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001939#define mkfs_minix_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001940 "Make a MINIX filesystem.\n\n" \
1941 "Options:\n" \
1942 " -c Check the device for bad blocks\n" \
1943 " -n [14|30] Specify the maximum length of filenames\n" \
1944 " -i INODES Specify the number of inodes for the filesystem\n" \
1945 " -l FILENAME Read the bad blocks list from FILENAME\n" \
1946 " -v Make a Minix version 2 filesystem"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001947
Eric Andersen7e9276b2001-02-22 01:15:47 +00001948#define mknod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001949 "[OPTIONS] NAME TYPE MAJOR MINOR"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001950#define mknod_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001951 "Create a special file (block, character, or pipe).\n\n" \
1952 "Options:\n" \
1953 " -m create the special file using the specified mode (default a=rw)\n\n" \
1954 "TYPEs include:\n" \
1955 " b: Make a block (buffered) device\n" \
1956 " c or u: Make a character (un-buffered) device\n" \
1957 " p: Make a named pipe. MAJOR and MINOR are ignored for named pipes"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001958#define mknod_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001959 "$ mknod /dev/fd0 b 2 0\n" \
1960 "$ mknod -m 644 /tmp/pipe p\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001961
Eric Andersen7e9276b2001-02-22 01:15:47 +00001962#define mkswap_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001963 "[-c] [-v0|-v1] device [block-count]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001964#define mkswap_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001965 "Prepare a disk partition to be used as a swap partition.\n\n" \
1966 "Options:\n" \
1967 " -c Check for read-ability\n" \
1968 " -v0 Make version 0 swap [max 128 Megs]\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00001969 " -v1 Make version 1 swap [big!] (default for kernels >\n" \
1970 " 2.1.117)\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001971 " block-count Number of block to use (default is entire partition)"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001972
Eric Andersen7e9276b2001-02-22 01:15:47 +00001973#define mktemp_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001974 "[-dq] TEMPLATE"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001975#define mktemp_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001976 "Creates a temporary file with its name based on TEMPLATE.\n" \
1977 "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX).\n\n" \
1978 "Options:\n" \
1979 " -d Make a directory instead of a file\n" \
1980 " -q Fail silently if an error occurs"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001981#define mktemp_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001982 "$ mktemp /tmp/temp.XXXXXX\n" \
1983 "/tmp/temp.mWiLjM\n" \
1984 "$ ls -la /tmp/temp.mWiLjM\n" \
1985 "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001986
Eric Andersen8d79ce82001-07-22 23:00:15 +00001987#define modprobe_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001988 "[-knqrsv] MODULE [symbol=value ...]"
Eric Andersen8d79ce82001-07-22 23:00:15 +00001989#define modprobe_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001990 "Options:\n" \
1991 " -k Make module autoclean-able\n" \
1992 " -n Just show what would be done\n" \
1993 " -q Quiet output\n" \
1994 " -r Remove module (stacks) or do autoclean\n" \
1995 " -s Report via syslog instead of stderr\n" \
1996 " -v Verbose output"
Rob Landley9c32a152005-12-11 20:12:24 +00001997#define modprobe_notes_usage \
1998"modprobe can (un)load a stack of modules, passing each module options (when\n" \
1999"loading). modprobe uses a configuration file to determine what option(s) to\n" \
2000"pass each module it loads.\n" \
2001"\n" \
2002"The configuration file is searched (in order) amongst:\n" \
2003"\n" \
2004" /etc/modprobe.conf (2.6 only)\n" \
2005" /etc/modules.conf\n" \
2006" /etc/conf.modules (deprecated)\n" \
2007"\n" \
2008"They all have the same syntax (see below). If none is present, it is\n" \
2009"_not_ an error; each loaded module is then expected to load without\n" \
2010"options. Once a file is found, the others are tested for.\n" \
2011"\n" \
2012"/etc/modules.conf entry format:\n" \
2013"\n" \
2014" alias <alias_name> <mod_name>\n" \
2015" Makes it possible to modprobe alias_name, when there is no such module.\n" \
Mike Frysingerfa6c4842006-05-26 01:48:17 +00002016" It makes sense if your mod_name is long, or you want a more representative\n" \
Rob Landley9c32a152005-12-11 20:12:24 +00002017" name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
2018" This makes it also possible to use a different set of options (below) for\n" \
2019" the module and the alias.\n" \
2020" A module can be aliased more than once.\n" \
2021"\n" \
2022" options <mod_name|alias_name> <symbol=value ...>\n" \
2023" When loading module mod_name (or the module aliased by alias_name), pass\n" \
2024" the \"symbol=value\" pairs as option to that module.\n" \
2025"\n" \
2026"Sample /etc/modules.conf file:\n" \
2027"\n" \
2028" options tulip irq=3\n" \
2029" alias tulip tulip2\n" \
2030" options tulip2 irq=4 io=0x308\n" \
2031"\n" \
2032"Other functionality offered by 'classic' modprobe is not available in\n" \
2033"this implementation.\n" \
2034"\n" \
2035"If module options are present both in the config file, and on the command line,\n" \
2036"then the options from the command line will be passed to the module _after_\n" \
2037"the options from the config file. That way, you can have defaults in the config\n" \
2038"file, and override them for a specific usage from the command line.\n"
Eric Andersen8d79ce82001-07-22 23:00:15 +00002039#define modprobe_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002040 "(with the above /etc/modules.conf):\n\n" \
2041 "$ modprobe tulip\n" \
2042 " will load the module 'tulip' with default option 'irq=3'\n\n" \
2043 "$ modprobe tulip irq=5\n" \
2044 " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
2045 "$ modprobe tulip2\n" \
2046 " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
2047 " which are the default for alias 'tulip2'\n\n" \
2048 "$ modprobe tulip2 irq=8\n" \
2049 " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
2050 " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
2051 " from the command line\n\n" \
2052 "$ modprobe tulip2 irq=2 io=0x210\n" \
2053 " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
2054 " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
2055 " from the command line\n"
Eric Andersen8d79ce82001-07-22 23:00:15 +00002056
Eric Andersen7e9276b2001-02-22 01:15:47 +00002057#define more_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002058 "[FILE ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002059#define more_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002060 "More is a filter for viewing FILE one screenful at a time."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002061#define more_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002062 "$ dmesg | more\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002063
Eric Andersen7e9276b2001-02-22 01:15:47 +00002064#define mount_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002065 "[flags] DEVICE NODE [-o options,more-options]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002066#define mount_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002067 "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n\n" \
2068 "Flags:\n" \
2069 " -a: Mount all filesystems in fstab\n" \
Rob Landleye55a73c2006-08-09 20:55:35 +00002070 USE_FEATURE_MTAB_SUPPORT( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002071 " -f: \"Fake\" Add entry to mount table but don't mount it\n" \
2072 " -n: Don't write a mount table entry\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00002073 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002074 " -o option: One of many filesystem options, listed below\n" \
2075 " -r: Mount the filesystem read-only\n" \
2076 " -t fs-type: Specify the filesystem type\n" \
2077 " -w: Mount for reading and writing (default)\n" \
2078 "\n" \
2079 "Options for use with the \"-o\" flag:\n" \
Rob Landleye55a73c2006-08-09 20:55:35 +00002080 USE_FEATURE_MOUNT_LOOP( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002081 " loop: Ignored (loop devices are autodetected)\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00002082 ) \
Rob Landleye55a73c2006-08-09 20:55:35 +00002083 USE_FEATURE_MOUNT_FLAGS( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002084 " [a]sync: Writes are asynchronous / synchronous\n" \
2085 " [no]atime: Disable / enable updates to inode access times\n" \
2086 " [no]diratime: Disable / enable atime updates to directories\n" \
2087 " [no]dev: Allow use of special device files / disallow them\n" \
2088 " [no]exec: Allow use of executable files / disallow them\n" \
2089 " [no]suid: Allow set-user-id-root programs / disallow them\n" \
2090 " [r]shared: Convert [recursively] to a shared subtree.\n" \
2091 " [r]slave: Convert [recursively] to a slave subtree.\n" \
2092 " [r]private: Convert [recursively] to a private subtree\n" \
2093 " [un]bindable: Make mount point [un]able to be bind mounted.\n" \
2094 " bind: Bind a directory to an additional location\n" \
2095 " move: Relocate an existing mount point.\n" \
Rob Landleye55a73c2006-08-09 20:55:35 +00002096 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002097 " remount: Re-mount a mounted filesystem, changing its flags\n" \
2098 " ro/rw: Mount for read-only / read-write\n" \
2099 "\nThere are EVEN MORE flags that are specific to each filesystem\n" \
2100 "You'll have to see the written documentation for those filesystems"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002101#define mount_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002102 "$ mount\n" \
2103 "/dev/hda3 on / type minix (rw)\n" \
2104 "proc on /proc type proc (rw)\n" \
2105 "devpts on /dev/pts type devpts (rw)\n" \
2106 "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
2107 "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
2108 "$ mount cd_image.iso mydir\n"
Rob Landleye1ee4822006-06-24 22:39:19 +00002109#define mount_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002110 "Returns 0 for success, number of failed mounts for -a, or errno for one mount."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002111
Rob Landleyd00b3a52005-08-20 05:07:08 +00002112#define mountpoint_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002113 "[-q] <[-d] DIR | -x DEVICE>"
Rob Landleyd00b3a52005-08-20 05:07:08 +00002114#define mountpoint_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002115 "mountpoint checks if the directory is a mountpoint\n\n" \
2116 "Options:\n" \
2117 " -q: Be more quiet\n" \
2118 " -d: Print major/minor device number of the filesystem\n" \
2119 " -x: Print major/minor device number of the blockdevice"
Rob Landleyd00b3a52005-08-20 05:07:08 +00002120#define mountpoint_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002121 "$ mountpoint /proc\n" \
2122 "/proc is not a mountpoint\n" \
2123 "$ mountpoint /sys\n" \
2124 "/sys is a mountpoint\n"
Rob Landleyd00b3a52005-08-20 05:07:08 +00002125
Eric Andersen7e9276b2001-02-22 01:15:47 +00002126#define mt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002127 "[-f device] opcode value"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002128#define mt_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002129 "Control magnetic tape drive operation\n" \
2130 "\nAvailable Opcodes:\n\n" \
2131 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
2132 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
2133 "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
2134 "setpart tell unload unlock weof wset"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002135
Eric Andersen7e9276b2001-02-22 01:15:47 +00002136#define mv_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002137 "[OPTION]... SOURCE DEST\n" \
2138 "or: mv [OPTION]... SOURCE... DIRECTORY"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002139#define mv_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002140 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\n" \
2141 "Options:\n" \
2142 " -f don't prompt before overwriting\n" \
2143 " -i interactive, prompt before overwrite"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002144#define mv_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002145 "$ mv /tmp/foo /bin/bar\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002146
Glenn L McGrathf03c9332002-12-13 00:01:44 +00002147#define nameif_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002148 "[-s] [-c FILE] [{IFNAME MACADDR}]"
Glenn L McGrathf03c9332002-12-13 00:01:44 +00002149#define nameif_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002150 "Nameif renames network interface while it in the down state.\n\n" \
2151 "Options:\n" \
2152 " -c FILE Use configuration file (default is /etc/mactab)\n" \
2153 " -s Use syslog (LOCAL0 facility)\n" \
2154 " IFNAME MACADDR new_interface_name interface_mac_address"
Glenn L McGrathf03c9332002-12-13 00:01:44 +00002155#define nameif_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002156 "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
2157 " or\n" \
2158 "$ nameif -c /etc/my_mactab_file\n" \
Glenn L McGrathf03c9332002-12-13 00:01:44 +00002159
Rob Landley1cca9482006-07-10 19:45:20 +00002160#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA
Denis Vlasenkod0e70af2006-10-16 01:10:28 +00002161#define NC_OPTIONS_STR "\n\nOptions:"
Mike Frysinger7dc7f402005-05-06 05:00:34 +00002162#else
Denis Vlasenkod0e70af2006-10-16 01:10:28 +00002163#define NC_OPTIONS_STR
Mike Frysinger7dc7f402005-05-06 05:00:34 +00002164#endif
Rob Landley1cca9482006-07-10 19:45:20 +00002165
Eric Andersen7e9276b2001-02-22 01:15:47 +00002166#define nc_trivial_usage \
Denis Vlasenkof7eaccd2006-11-18 02:17:37 +00002167 USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002168 "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]")
Eric Andersen7e9276b2001-02-22 01:15:47 +00002169#define nc_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002170 "Netcat opens a pipe to IP:port" USE_NC_EXTRA(" or file") \
Denis Vlasenkod0e70af2006-10-16 01:10:28 +00002171 NC_OPTIONS_STR \
Rob Landley1cca9482006-07-10 19:45:20 +00002172 USE_NC_EXTRA( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002173 "\n -e exec rest of command line after connect\n" \
2174 " -i SECS delay interval for lines sent\n" \
2175 " -w SECS timeout for connect\n" \
2176 " -f file use file (ala /dev/ttyS0) instead of network" \
Mike Frysinger7dc7f402005-05-06 05:00:34 +00002177 ) \
Rob Landley1cca9482006-07-10 19:45:20 +00002178 USE_NC_SERVER( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002179 "\n -l listen mode, for inbound connects\n" \
2180 USE_NC_EXTRA(" (use -l twice with -e for persistent server)\n") \
2181 " -p PORT local port number" \
Rob Landley1cca9482006-07-10 19:45:20 +00002182 )
2183
Rob Landley1cca9482006-07-10 19:45:20 +00002184#define nc_notes_usage "" \
2185 USE_NC_EXTRA( \
2186 "To use netcat as a terminal emulator on a serial port:\n\n" \
2187 "$ stty 115200 -F /dev/ttyS0\n" \
2188 "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
2189 ) ""
2190
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002191#define nc_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002192 "$ nc foobar.somedomain.com 25\n" \
2193 "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
2194 "help\n" \
2195 "214-Commands supported:\n" \
2196 "214- HELO EHLO MAIL RCPT DATA AUTH\n" \
2197 "214 NOOP QUIT RSET HELP\n" \
2198 "quit\n" \
2199 "221 foobar closing connection\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002200
Eric Andersen1552ff72001-10-31 11:07:12 +00002201#define netstat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002202 "[-laenrtuwx]"
Eric Andersen1552ff72001-10-31 11:07:12 +00002203#define netstat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002204 "Netstat displays Linux networking information.\n\n" \
2205 "Options:\n" \
2206 " -l display listening server sockets\n" \
2207 " -a display all sockets (default: connected)\n" \
2208 " -e display other/more information\n" \
2209 " -n don't resolve names\n" \
2210 " -r display routing table\n" \
2211 " -t tcp sockets\n" \
2212 " -u udp sockets\n" \
2213 " -w raw sockets\n" \
2214 " -x unix sockets"
Eric Andersen1552ff72001-10-31 11:07:12 +00002215
Manuel Novoa III 2c511602005-02-13 20:14:05 +00002216#define nice_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002217 "[-n ADJUST] [COMMAND [ARG] ...]"
Manuel Novoa III 2c511602005-02-13 20:14:05 +00002218#define nice_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002219 "Nice runs a program with modified scheduling priority.\n\n" \
2220 "Options:\n" \
2221 " -n ADJUST Adjust the scheduling priority by ADJUST"
Manuel Novoa III 2c511602005-02-13 20:14:05 +00002222
Denis Vlasenko1db39b22006-10-11 20:59:02 +00002223#define nmeter_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002224 "format_string"
Denis Vlasenko1db39b22006-10-11 20:59:02 +00002225#define nmeter_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002226 "Nmeter monitors your system in real time.\n\n" \
2227 "Format specifiers:\n" \
2228 "%Nc or %[cN] monitor CPU. N - bar size, default 10\n" \
2229 " (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \
2230 "%[niface] monitor network interface 'iface'\n" \
2231 "%m monitor allocated memory\n" \
2232 "%[mf] monitor free memory\n" \
2233 "%[mt] monitor total memory\n" \
2234 "%s monitor allocated swap\n" \
2235 "%f monitor number of used file descriptors\n" \
2236 "%Ni monitor total/specific IRQ rate\n" \
2237 "%x monitor context switch rate\n" \
2238 "%p monitor forks\n" \
2239 "%[pn] monitor # of processes\n" \
2240 "%b monitor block io\n" \
2241 "%Nt show time (with N decimal points)\n" \
2242 "%Nd milliseconds between updates (default=1000)\n" \
2243 "%r print <cr> instead of <lf> at EOL"
Denis Vlasenko1db39b22006-10-11 20:59:02 +00002244#define nmeter_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002245 "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'"
Denis Vlasenko1db39b22006-10-11 20:59:02 +00002246
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00002247#define nohup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002248 "COMMAND [ARGS]"
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00002249#define nohup_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002250 "run a command immune to hangups, with output to a non-tty"
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00002251#define nohup_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002252 "$ nohup make &"
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00002253
Eric Andersen7e9276b2001-02-22 01:15:47 +00002254#define nslookup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002255 "[HOST] [SERVER]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002256#define nslookup_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002257 "Queries the nameserver for the IP address of the given HOST\n" \
2258 "optionally using a specified DNS server"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002259#define nslookup_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002260 "$ nslookup localhost\n" \
2261 "Server: default\n" \
2262 "Address: default\n" \
2263 "\n" \
2264 "Name: debian\n" \
2265 "Address: 127.0.0.1\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002266
Glenn L McGrath60281112001-11-02 11:39:46 +00002267#define od_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002268 "[-aBbcDdeFfHhIiLlOovXx] [FILE]"
Glenn L McGrath60281112001-11-02 11:39:46 +00002269#define od_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002270 "Write an unambiguous representation, octal bytes by default, of FILE\n" \
2271 "to standard output. With no FILE, or when FILE is -, read standard input."
Glenn L McGrath60281112001-11-02 11:39:46 +00002272
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00002273#define openvt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002274 "<vtnum> <COMMAND> [ARGS...]"
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00002275#define openvt_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002276 "Start a command on a new virtual terminal"
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00002277#define openvt_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002278 "openvt 2 /bin/ash\n"
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00002279
Eric Andersen27f64e12002-06-23 04:24:25 +00002280#define passwd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002281 "[OPTION] [name]"
Eric Andersen27f64e12002-06-23 04:24:25 +00002282#define passwd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002283 "Change a user password. If no name is specified,\n" \
2284 "changes the password for the current user.\n" \
2285 "Options:\n" \
2286 " -a Define which algorithm shall be used for the password\n" \
2287 " (Choices: des, md5, sha1)\n" \
2288 " -d Delete the password for the specified user account\n" \
2289 " -l Locks (disables) the specified user account\n" \
2290 " -u Unlocks (re-enables) the specified user account"
Eric Andersen27f64e12002-06-23 04:24:25 +00002291
Glenn L McGrath655d8142003-06-22 15:32:41 +00002292#define patch_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002293 "[-p<num>] [-i <diff>]"
Glenn L McGrath655d8142003-06-22 15:32:41 +00002294#define patch_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002295 " -p <num> Strip <num> leading components from file names\n" \
2296 " -i <diff> Read <diff> instead of stdin"
Glenn L McGrath655d8142003-06-22 15:32:41 +00002297#define patch_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002298 "$ patch -p1 < example.diff\n" \
2299 "$ patch -p0 -i example.diff"
Glenn L McGrath655d8142003-06-22 15:32:41 +00002300
Bernhard Reutner-Fischer81c3a512005-10-06 15:37:02 +00002301#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
2302#define USAGE_PIDOF "Options:"
2303#else
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002304#define USAGE_PIDOF "\n This version of pidof accepts no options."
Bernhard Reutner-Fischer81c3a512005-10-06 15:37:02 +00002305#endif
2306
Eric Andersen221b2ea2001-07-31 19:06:07 +00002307#define pidof_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002308 "process-name [OPTION] [process-name ...]"
Bernhard Reutner-Fischer81c3a512005-10-06 15:37:02 +00002309
Eric Andersen221b2ea2001-07-31 19:06:07 +00002310#define pidof_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002311 "Lists the PIDs of all processes with names that match the\n" \
2312 "names on the command line.\n" \
Bernhard Reutner-Fischer81c3a512005-10-06 15:37:02 +00002313 USAGE_PIDOF \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002314 USE_FEATURE_PIDOF_SINGLE("\n -s display only a single PID") \
2315 USE_FEATURE_PIDOF_OMIT("\n -o omit given pid.") \
2316 USE_FEATURE_PIDOF_OMIT("\n Use %PPID to omit the parent pid of pidof itself")
Eric Andersen221b2ea2001-07-31 19:06:07 +00002317#define pidof_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002318 "$ pidof init\n" \
2319 "1\n" \
Denis Vlasenko77a1a532006-11-05 00:46:35 +00002320 USE_FEATURE_PIDOF_OMIT("$ pidof /bin/sh\n20351 5973 5950\n") \
2321 USE_FEATURE_PIDOF_OMIT("$ pidof /bin/sh -o %PPID\n20351 5950")
Eric Andersen221b2ea2001-07-31 19:06:07 +00002322
Eric Andersenbdfd0d72001-10-24 05:00:29 +00002323#ifndef CONFIG_FEATURE_FANCY_PING
Eric Andersen7e9276b2001-02-22 01:15:47 +00002324#define ping_trivial_usage "host"
2325#define ping_full_usage "Send ICMP ECHO_REQUEST packets to network hosts"
2326#else
2327#define ping_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002328 "[OPTION]... host"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002329#define ping_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002330 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" \
2331 "Options:\n" \
2332 " -c COUNT Send only COUNT pings\n" \
2333 " -s SIZE Send SIZE data bytes in packets (default=56)\n" \
2334 " -I IPADDR Use IPADDR as source address\n" \
2335 " -q Quiet mode, only displays output at start\n" \
2336 " and when finished"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002337#endif
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002338#define ping_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002339 "$ ping localhost\n" \
2340 "PING slag (127.0.0.1): 56 data bytes\n" \
2341 "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
2342 "\n" \
2343 "--- debian ping statistics ---\n" \
2344 "1 packets transmitted, 1 packets received, 0% packet loss\n" \
2345 "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002346
Eric Andersen51b8bd62002-07-03 11:46:38 +00002347#ifndef CONFIG_FEATURE_FANCY_PING6
2348#define ping6_trivial_usage "host"
2349#define ping6_full_usage "Send ICMP ECHO_REQUEST packets to network hosts"
2350#else
2351#define ping6_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002352 "[OPTION]... host"
Eric Andersen51b8bd62002-07-03 11:46:38 +00002353#define ping6_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002354 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" \
2355 "Options:\n" \
2356 " -c COUNT Send only COUNT pings\n" \
2357 " -s SIZE Send SIZE data bytes in packets (default=56)\n" \
2358 " -q Quiet mode, only displays output at start\n" \
2359 " and when finished"
Eric Andersen51b8bd62002-07-03 11:46:38 +00002360#endif
2361#define ping6_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002362 "$ ping6 ip6-localhost\n" \
2363 "PING ip6-localhost (::1): 56 data bytes\n" \
2364 "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
2365 "\n" \
2366 "--- ip6-localhost ping statistics ---\n" \
2367 "1 packets transmitted, 1 packets received, 0% packet loss\n" \
2368 "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
Eric Andersen51b8bd62002-07-03 11:46:38 +00002369
Eric Andersen7e9276b2001-02-22 01:15:47 +00002370#define pivot_root_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002371 "NEW_ROOT PUT_OLD"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002372#define pivot_root_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002373 "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
2374 "the new root file system."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002375
Eric Andersen7e9276b2001-02-22 01:15:47 +00002376#define poweroff_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002377 "[-d<delay>] [-n<nosync>] [-f<force>]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002378#define poweroff_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002379 "Halt and shut off power.\n" \
2380 "Options:\n" \
2381 " -d delay interval for halting\n" \
2382 " -n no call to sync()\n" \
2383 " -f force power off (don't go through init)"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002384
Mike Frysinger95d3c452005-04-21 23:29:24 +00002385#define printenv_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002386 "[VARIABLES...]"
Mike Frysinger95d3c452005-04-21 23:29:24 +00002387#define printenv_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002388 "print all or part of environment\n\n" \
2389 "If no environment VARIABLE specified, print them all."
Mike Frysinger95d3c452005-04-21 23:29:24 +00002390
Eric Andersen7e9276b2001-02-22 01:15:47 +00002391#define printf_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002392 "FORMAT [ARGUMENT...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002393#define printf_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002394 "Formats and prints ARGUMENT(s) according to FORMAT,\n" \
2395 "Where FORMAT controls the output exactly as in C printf."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002396#define printf_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002397 "$ printf \"Val=%d\\n\" 5\n" \
2398 "Val=5\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002399
Denis Vlasenko94949192006-11-05 00:45:47 +00002400
2401#if ENABLE_DESKTOP
2402
2403#define ps_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002404 ""
Denis Vlasenko94949192006-11-05 00:45:47 +00002405#define ps_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002406 "Report process status\n" \
2407 "\nOptions:" \
2408 "\n -o col1,col2=header Select columns for display" \
Denis Vlasenko94949192006-11-05 00:45:47 +00002409
2410#else /* !ENABLE_DESKTOP */
2411
Bernhard Reutner-Fischer6d6a40c2005-10-04 14:31:18 +00002412#if !defined CONFIG_SELINUX && !ENABLE_FEATURE_PS_WIDE
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002413#define USAGE_PS "\n This version of ps accepts no options."
Rob Landley6eb1e412005-06-20 04:30:36 +00002414#else
2415#define USAGE_PS "\nOptions:"
2416#endif
Eric Andersen15c03c32004-04-06 17:52:02 +00002417
Eric Andersen7e9276b2001-02-22 01:15:47 +00002418#define ps_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002419 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00002420#define ps_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002421 "Report process status\n" \
Rob Landley6eb1e412005-06-20 04:30:36 +00002422 USAGE_PS \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002423 USE_SELINUX("\n -c show SE Linux context") \
2424 USE_FEATURE_PS_WIDE("\n w wide output")
Rob Landley6eb1e412005-06-20 04:30:36 +00002425
Denis Vlasenko94949192006-11-05 00:45:47 +00002426#endif /* ENABLE_DESKTOP */
2427
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002428#define ps_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002429 "$ ps\n" \
2430 " PID Uid Gid State Command\n" \
2431 " 1 root root S init\n" \
2432 " 2 root root S [kflushd]\n" \
2433 " 3 root root S [kupdate]\n" \
2434 " 4 root root S [kpiod]\n" \
2435 " 5 root root S [kswapd]\n" \
2436 " 742 andersen andersen S [bash]\n" \
2437 " 743 andersen andersen S -bash\n" \
2438 " 745 root root S [getty]\n" \
2439 " 2990 andersen andersen R ps\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002440
Denis Vlasenko94949192006-11-05 00:45:47 +00002441
Eric Andersen7e9276b2001-02-22 01:15:47 +00002442#define pwd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002443 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00002444#define pwd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002445 "Print the full filename of the current working directory."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002446#define pwd_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002447 "$ pwd\n" \
2448 "/root\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002449
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00002450#define raidautorun_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002451 "DEVICE"
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00002452#define raidautorun_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002453 "Tells the kernel to automatically search and start RAID arrays"
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00002454#define raidautorun_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002455 "$ raidautorun /dev/md0"
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00002456
Eric Andersen7e9276b2001-02-22 01:15:47 +00002457#define rdate_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002458 "[-sp] HOST"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002459#define rdate_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002460 "Get and possibly set the system date and time from a remote HOST.\n\n" \
2461 "Options:\n" \
2462 " -s Set the system date and time (default)\n" \
2463 " -p Print the date and time"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002464
Rob Landley0e4690d2006-08-20 22:12:18 +00002465#define readahead_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002466 "[FILE]..."
Rob Landley0e4690d2006-08-20 22:12:18 +00002467#define readahead_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002468 "Preloads FILE(s) in RAM cache so that subsequent reads for those" \
2469 "files do not block on disk I/O."
Rob Landley0e4690d2006-08-20 22:12:18 +00002470
Eric Andersen7e9276b2001-02-22 01:15:47 +00002471#define readlink_trivial_usage \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002472 USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002473#define readlink_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002474 "Displays the value of a symbolic link." \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002475 USE_FEATURE_READLINK_FOLLOW("\n\nOptions:\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002476 " -f canonicalize by following all symlinks")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002477
Paul Mundt8b2d02e2005-05-20 17:22:18 +00002478#define readprofile_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002479 "[OPTIONS]..."
Paul Mundt8b2d02e2005-05-20 17:22:18 +00002480#define readprofile_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002481 "Options:\n" \
2482 " -m <mapfile> (default: /boot/System.map)\n" \
2483 " -p <profile> (default: /proc/profile)\n" \
2484 " -M <mult> set the profiling multiplier to <mult>\n" \
2485 " -i print only info about the sampling step\n" \
2486 " -v print verbose data\n" \
2487 " -a print all symbols, even if count is 0\n" \
2488 " -b print individual histogram-bin counts\n" \
2489 " -s print individual counters within functions\n" \
2490 " -r reset all the counters (root only)\n" \
2491 " -n disable byte order auto-detection"
Paul Mundt8b2d02e2005-05-20 17:22:18 +00002492
Glenn L McGrath62fae302002-12-10 00:14:33 +00002493#define realpath_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002494 "pathname ..."
Glenn L McGrath62fae302002-12-10 00:14:33 +00002495#define realpath_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002496 "Returns the absolute pathnames of given argument."
Tim Riker7b253f82003-12-28 05:02:40 +00002497
Eric Andersen7e9276b2001-02-22 01:15:47 +00002498#define reboot_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002499 "[-d<delay>] [-n<nosync>] [-f<force>]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002500#define reboot_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002501 "Reboot the system.\n" \
2502 "Options:\n" \
2503 " -d delay interval for rebooting\n" \
2504 " -n no call to sync()\n" \
2505 " -f force reboot (don't go through init)"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002506
2507#define renice_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002508 "{{-n INCREMENT} | PRIORITY} [[ -p | -g | -u ] ID ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002509#define renice_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002510 "Changes priority of running processes.\n\n" \
2511 "Options:\n" \
2512 " -n adjusts current nice value (smaller is faster)\n" \
2513 " -p process id(s) (default)\n" \
2514 " -g process group id(s)\n" \
2515 " -u process user name(s) and/or id(s)"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002516
Eric Andersen7e9276b2001-02-22 01:15:47 +00002517#define reset_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002518 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00002519#define reset_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002520 "Resets the screen."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002521
Bernhard Reutner-Fischere63a0de2006-10-25 15:07:56 +00002522#define resize_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002523 ""
Bernhard Reutner-Fischere63a0de2006-10-25 15:07:56 +00002524#define resize_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002525 "Resizes the screen."
Bernhard Reutner-Fischere63a0de2006-10-25 15:07:56 +00002526
Eric Andersen7e9276b2001-02-22 01:15:47 +00002527#define rm_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002528 "[OPTION]... FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002529#define rm_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002530 "Remove (unlink) the FILE(s). You may use '--' to\n" \
2531 "indicate that all following arguments are non-options.\n\n" \
2532 "Options:\n" \
2533 " -i always prompt before removing each destination\n" \
2534 " -f remove existing destinations, never prompt\n" \
2535 " -r or -R remove the contents of directories recursively"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002536#define rm_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002537 "$ rm -rf /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002538
Eric Andersen7e9276b2001-02-22 01:15:47 +00002539#define rmdir_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002540 "[OPTION]... DIRECTORY..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002541#define rmdir_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002542 "Remove the DIRECTORY(ies), if they are empty."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002543#define rmdir_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002544 "# rmdir /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002545
Eric Andersen7e9276b2001-02-22 01:15:47 +00002546#define rmmod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002547 "[OPTION]... [MODULE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002548#define rmmod_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002549 "Unloads the specified kernel modules from the kernel.\n\n" \
2550 "Options:\n" \
2551 " -a Remove all unused modules (recursively)"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002552#define rmmod_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002553 "$ rmmod tulip\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002554
Eric Andersen7e9276b2001-02-22 01:15:47 +00002555#define route_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002556 "[{add|del|delete}]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002557#define route_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002558 "Edit the kernel's routing tables.\n\n" \
2559 "Options:\n" \
2560 " -n Dont resolve names\n" \
2561 " -e Display other/more information\n" \
2562 " -A inet" USE_FEATURE_IPV6("{6}") " Select address family"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002563
Glenn L McGrathb72a7352002-12-10 00:17:22 +00002564#define rpm_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002565 "-i -q[ildc]p package.rpm"
Glenn L McGrathb72a7352002-12-10 00:17:22 +00002566#define rpm_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002567 "Manipulates RPM packages" \
2568 "\n\nOptions:" \
2569 "\n -i Install package" \
2570 "\n -q Query package" \
2571 "\n -p Query uninstalled package" \
2572 "\n -i Show information" \
2573 "\n -l List contents" \
2574 "\n -d List documents" \
2575 "\n -c List config files"
Glenn L McGrathb72a7352002-12-10 00:17:22 +00002576
Glenn L McGrathf8736d22001-06-26 01:19:34 +00002577#define rpm2cpio_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002578 "package.rpm"
Glenn L McGrathf8736d22001-06-26 01:19:34 +00002579#define rpm2cpio_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002580 "Outputs a cpio archive of the rpm file."
Glenn L McGrathf8736d22001-06-26 01:19:34 +00002581
Eric Andersen6cf47a72001-10-31 10:24:36 +00002582#define run_parts_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002583 "[-t] [-a ARG] [-u MASK] DIRECTORY"
Eric Andersen6cf47a72001-10-31 10:24:36 +00002584#define run_parts_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002585 "Run a bunch of scripts in a directory.\n\n" \
2586 "Options:\n" \
2587 " -t Prints what would be run, but does not actually run anything\n" \
2588 " -a ARG Pass ARG as an argument for every program invoked\n" \
2589 " -u MASK Set the umask to MASK before executing every program"
Eric Andersen6cf47a72001-10-31 10:24:36 +00002590
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00002591#define runlevel_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002592 "[utmp]"
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00002593#define runlevel_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002594 "Find the current and previous system runlevel.\n\n" \
2595 "If no utmp file exists or if no runlevel record can be found,\n" \
2596 "runlevel prints \"unknown\""
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00002597#define runlevel_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002598 "$ runlevel /var/run/utmp\n" \
2599 "N 2"
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00002600
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002601#define runsv_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002602 "dir"
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002603#define runsv_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002604 "Start and monitor a service and optionally an appendant log service."
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002605
2606#define runsvdir_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002607 "[-P] dir"
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002608#define runsvdir_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002609 "Start a runsv process for each subdirectory."
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002610
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00002611#define rx_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002612 "FILE"
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00002613#define rx_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002614 "Receive a file using the xmodem protocol."
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00002615#define rx_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002616 "$ rx /tmp/foo\n"
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00002617
Eric Andersen7e9276b2001-02-22 01:15:47 +00002618#define sed_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002619 "[-efinr] pattern [files...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002620#define sed_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002621 "Options:\n" \
2622 " -e script add the script to the commands to be executed\n" \
2623 " -f scriptfile add script-file contents to the\n" \
2624 " commands to be executed\n" \
2625 " -i edit files in-place\n" \
2626 " -n suppress automatic printing of pattern space\n" \
2627 " -r use extended regular expression syntax\n" \
2628 "\n" \
2629 "If no -e or -f is given, the first non-option argument is taken as the sed\n" \
2630 "script to interpret. All remaining arguments are names of input files; if no\n" \
2631 "input files are specified, then the standard input is read. Source files\n" \
2632 "will not be modified unless -i option is given."
Eric Andersenf802ff72004-04-12 15:12:06 +00002633
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002634#define sed_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002635 "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
2636 "bar\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002637
Glenn L McGrath82364bb2004-01-27 09:22:20 +00002638#define seq_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002639 "[first [increment]] last"
Glenn L McGrath82364bb2004-01-27 09:22:20 +00002640#define seq_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002641 "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \
2642 "FIRST, INCREMENT default to 1\n" \
2643 "Arguments:\n" \
2644 " LAST\n" \
2645 " FIRST LAST\n" \
2646 " FIRST INCREMENT LAST"
Glenn L McGrath82364bb2004-01-27 09:22:20 +00002647
Paul Foxfc2256a2005-08-01 18:12:30 +00002648#define setconsole_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002649 "[-r|--reset] [DEVICE]"
Paul Foxfc2256a2005-08-01 18:12:30 +00002650#define setconsole_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002651 "Redirects system console output to DEVICE (default: /dev/tty).\n\n" \
2652 "Options:\n" \
2653 " -r Reset output to /dev/console."
Paul Foxfc2256a2005-08-01 18:12:30 +00002654
Eric Andersen7e9276b2001-02-22 01:15:47 +00002655#define setkeycodes_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002656 "SCANCODE KEYCODE ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002657#define setkeycodes_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002658 "Set entries into the kernel's scancode-to-keycode map,\n" \
2659 "allowing unusual keyboards to generate usable keycodes.\n\n" \
2660 "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
2661 "and KEYCODE is given in decimal"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002662#define setkeycodes_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002663 "$ setkeycodes e030 127\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002664
Rob Landley87848d92006-03-27 23:23:43 +00002665#define setlogcons_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002666 "N"
Rob Landley87848d92006-03-27 23:23:43 +00002667#define setlogcons_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002668 "Redirects the kernel output to console N (0 for current)."
Rob Landley87848d92006-03-27 23:23:43 +00002669
Paul Fox42403642005-08-01 22:52:09 +00002670#define setsid_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002671 "program [arg ...]"
Paul Fox42403642005-08-01 22:52:09 +00002672#define setsid_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002673 "Runs any program in a new session by calling setsid() before\n" \
2674 "exec'ing the rest of its arguments. See setsid(2) for details."
Paul Fox42403642005-08-01 22:52:09 +00002675
Matt Kraai2d91deb2001-08-01 17:21:35 +00002676#define lash_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002677 "[FILE]...\n" \
2678 "or: sh -c command [args]..."
Matt Kraai2d91deb2001-08-01 17:21:35 +00002679#define lash_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002680 "The BusyBox LAme SHell (command interpreter)"
Matt Kraai2d91deb2001-08-01 17:21:35 +00002681#define lash_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002682 "This command does not yet have proper documentation.\n\n" \
2683 "Use lash just as you would use any other shell. It properly handles pipes,\n" \
2684 "redirects, job control, can be used as the shell for scripts, and has a\n" \
2685 "sufficient set of builtins to do what is needed. It does not (yet) support\n" \
2686 "Bourne Shell syntax. If you need things like \"if-then-else\", \"while\", and such\n" \
2687 "use ash or bash. If you just need a very simple and extremely small shell,\n" \
2688 "this will do the job."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002689
Eric Andersen2e9c2572003-08-08 22:26:06 +00002690#define last_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002691 ""
Eric Andersen2e9c2572003-08-08 22:26:06 +00002692#define last_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002693 "Shows listing of the last users that logged into the system"
Eric Andersen2e9c2572003-08-08 22:26:06 +00002694
Glenn L McGrathae0f1e72003-02-17 08:23:22 +00002695#define sha1sum_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002696 "[OPTION] [FILEs...]" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002697 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
Glenn L McGrathae0f1e72003-02-17 08:23:22 +00002698#define sha1sum_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002699 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums.\n\n" \
2700 "Options:\n" \
2701 "With no FILE, or when FILE is -, read standard input." \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002702 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002703 " -c check SHA1 sums against given list\n" \
2704 "\nThe following two options are useful only when verifying checksums:\n" \
2705 " -s don't output anything, status code shows success\n" \
2706 " -w warn about improperly formatted SHA1 checksum lines")
Glenn L McGrathae0f1e72003-02-17 08:23:22 +00002707
Eric Andersen7e9276b2001-02-22 01:15:47 +00002708#define sleep_trivial_usage \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002709 USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...")
Eric Andersen7e9276b2001-02-22 01:15:47 +00002710#define sleep_full_usage \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002711 SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds.") \
2712 USE_FEATURE_FANCY_SLEEP( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002713 "Pause for a time equal to the total of the args given, where each arg can\n" \
2714 " have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays.")
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002715#define sleep_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002716 "$ sleep 2\n" \
2717 "[2 second delay results]\n" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002718 USE_FEATURE_FANCY_SLEEP("$ sleep 1d 3h 22m 8s\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002719 "[98528 second delay results]\n")
Eric Andersen7e9276b2001-02-22 01:15:47 +00002720
Eric Andersen7e9276b2001-02-22 01:15:47 +00002721#define sort_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002722 "[-nru" USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o outfile] [-k start[.offset][opts][,end[.offset][opts]] [-t char") "] [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002723#define sort_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002724 "Sorts lines of text in the specified files\n\n" \
2725 "Options:\n" \
Denis Vlasenko77a1a532006-11-05 00:46:35 +00002726 USE_FEATURE_SORT_BIG( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002727 " -b ignore leading blanks\n" \
2728 " -c check whether input is sorted\n" \
2729 " -d dictionary order (blank or alphanumeric only)\n" \
2730 " -f ignore case\n" \
2731 " -g general numerical sort\n" \
2732 " -i ignore unprintable characters\n" \
2733 " -k specify sort key\n" \
2734 " -M sort month\n" \
Rob Landleyc0dedd02005-01-24 07:00:02 +00002735 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002736 " -n sort numbers\n" \
Denis Vlasenko77a1a532006-11-05 00:46:35 +00002737 USE_FEATURE_SORT_BIG( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002738 " -o output to file\n" \
2739 " -k sort by key\n" \
2740 " -t use key separator other than whitespace\n" \
Rob Landleyc0dedd02005-01-24 07:00:02 +00002741 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002742 " -r reverse sort order\n" \
2743 USE_FEATURE_SORT_BIG(" -s stable (don't sort ties alphabetically)\n") \
2744 " -u suppress duplicate lines" \
2745 USE_FEATURE_SORT_BIG("\n -z input terminated by nulls, not newlines\n") \
2746 USE_FEATURE_SORT_BIG(" -mST ignored for GNU compatibility") \
2747 ""
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002748#define sort_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002749 "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
2750 "a\n" \
2751 "b\n" \
2752 "c\n" \
2753 "d\n" \
2754 "e\n" \
2755 "f\n" \
Denis Vlasenko77a1a532006-11-05 00:46:35 +00002756 USE_FEATURE_SORT_BIG( \
Rob Landleyc0dedd02005-01-24 07:00:02 +00002757 "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
2758 "d 2\n" \
2759 "b 2\n" \
2760 "c 3\n" \
2761 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002762 ""
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002763
Eric Andersenc2af1ee2001-10-18 19:33:06 +00002764#define start_stop_daemon_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002765 "[OPTIONS] [--start|--stop] ... [-- arguments...]"
Eric Andersenc2af1ee2001-10-18 19:33:06 +00002766#define start_stop_daemon_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002767 "Program to start and stop services." \
2768 "\n\nOptions:" \
2769 "\n -S|--start start" \
2770 "\n -K|--stop stop" \
2771 "\n -a|--startas <pathname> starts process specified by pathname" \
2772 "\n -b|--background force process into background" \
2773 "\n -u|--user <username>|<uid> stop this user's processes" \
2774 "\n -x|--exec <executable> program to either start or check" \
2775 "\n -m|--make-pidfile create the -p file and enter pid in it" \
2776 "\n -n|--name <process-name> stop processes with this name" \
2777 "\n -p|--pidfile <pid-file> save or load pid using a pid-file" \
2778 "\n -q|--quiet be quiet" \
Bernhard Reutner-Fischera926f8e2006-06-11 17:24:01 +00002779USE_FEATURE_START_STOP_DAEMON_FANCY( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002780 "\n -o|--oknodo exit status 0 if nothing done" \
2781 "\n -v|--verbose be verbose" \
2782 "\n -N|--nicelevel <N> add N to process's nice level" \
Bernhard Reutner-Fischera926f8e2006-06-11 17:24:01 +00002783) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002784 "\n -s|--signal <signal> signal to send (default TERM)" \
2785 "\n -U|--chuid <username>|<uid> start process with this name"
Eric Andersenc2af1ee2001-10-18 19:33:06 +00002786
Mike Frysinger9b5f71e2005-04-23 06:26:38 +00002787#define stat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002788 "[OPTION] FILE..."
Mike Frysinger9b5f71e2005-04-23 06:26:38 +00002789#define stat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002790 "display file (default) or filesystem status.\n\n" \
2791 "Options:\n" \
2792 USE_FEATURE_STAT_FORMAT(" -c fmt use the specified format\n") \
2793 " -f display filesystem status\n" \
2794 " -L,-l dereference links\n" \
2795 " -t display info in terse form\n" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002796 USE_FEATURE_STAT_FORMAT( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002797 "\nValid format sequences for files:\n" \
2798 " %a Access rights in octal\n" \
2799 " %A Access rights in human readable form\n" \
2800 " %b Number of blocks allocated (see %B)\n" \
2801 " %B The size in bytes of each block reported by %b\n" \
2802 " %d Device number in decimal\n" \
2803 " %D Device number in hex\n" \
2804 " %f Raw mode in hex\n" \
2805 " %F File type\n" \
2806 " %g Group ID of owner\n" \
2807 " %G Group name of owner\n" \
2808 " %h Number of hard links\n" \
2809 " %i Inode number\n" \
2810 " %n File name\n" \
2811 " %N Quoted file name with dereference if symbolic link\n" \
2812 " %o I/O block size\n" \
2813 " %s Total size, in bytes\n" \
2814 " %t Major device type in hex\n" \
2815 " %T Minor device type in hex\n" \
2816 " %u User ID of owner\n" \
2817 " %U User name of owner\n" \
2818 " %x Time of last access\n" \
2819 " %X Time of last access as seconds since Epoch\n" \
2820 " %y Time of last modification\n" \
2821 " %Y Time of last modification as seconds since Epoch\n" \
2822 " %z Time of last change\n" \
2823 " %Z Time of last change as seconds since Epoch\n" \
2824 "\nValid format sequences for file systems:\n" \
2825 " %a Free blocks available to non-superuser\n" \
2826 " %b Total data blocks in file system\n" \
2827 " %c Total file nodes in file system\n" \
2828 " %d Free file nodes in file system\n" \
2829 " %f Free blocks in file system\n" \
2830 " %i File System ID in hex\n" \
2831 " %l Maximum length of filenames\n" \
2832 " %n File name\n" \
2833 " %s Block size (for faster transfers)\n" \
2834 " %S Fundamental block size (for block counts)\n" \
2835 " %t Type in hex\n" \
2836 " %T Type in human readable form\n" \
Mike Frysinger9b5f71e2005-04-23 06:26:38 +00002837 )
2838
Eric Andersenef5e8f82002-11-07 02:09:37 +00002839#define strings_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002840 "[-afo] [-n length] [file ... ]"
Eric Andersenef5e8f82002-11-07 02:09:37 +00002841#define strings_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002842 "Display printable strings in a binary file." \
2843 "\n\nOptions:" \
2844 "\n -a Scan the whole files (this is the default)." \
2845 "\n -f Precede each string with the name of the file where it was found." \
2846 "\n -n N Specifies that at least N characters forms a sequence (default 4)" \
2847 "\n -o Each string is preceded by its decimal offset in the file"
Eric Andersenef5e8f82002-11-07 02:09:37 +00002848
Eric Andersen7e9276b2001-02-22 01:15:47 +00002849#define stty_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002850 "[-a|g] [-F DEVICE] [SETTING]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002851#define stty_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002852 "Without arguments, prints baud rate, line discipline," \
2853 "\nand deviations from stty sane." \
2854 "\n\nOptions:" \
2855 "\n -F DEVICE open device instead of stdin" \
2856 "\n -a print all current settings in human-readable form" \
2857 "\n -g print in stty-readable form" \
2858 "\n [SETTING] see manpage"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002859
Robert Griebl1fca5582002-06-04 20:45:46 +00002860#define su_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002861 "[OPTION]... [-] [username]"
Robert Griebl1fca5582002-06-04 20:45:46 +00002862#define su_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002863 "Change user id or become root.\n" \
2864 "Options:\n" \
2865 " -p, -m Preserve environment" \
2866 "\n -c Command to pass to 'sh -c'" \
2867 "\n -s Shell to use instead of default shell"
Robert Griebl1fca5582002-06-04 20:45:46 +00002868
Eric Andersen27f64e12002-06-23 04:24:25 +00002869#define sulogin_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002870 "[OPTION]... [tty-device]"
Eric Andersen27f64e12002-06-23 04:24:25 +00002871#define sulogin_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002872 "Single user login\n" \
2873 "Options:\n" \
2874 " -t Timeout"
Eric Andersen27f64e12002-06-23 04:24:25 +00002875
Mike Frysinger95d3c452005-04-21 23:29:24 +00002876#define sum_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002877 "[rs] [files...]"
Mike Frysinger95d3c452005-04-21 23:29:24 +00002878#define sum_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002879 "checksum and count the blocks in a file\n\n" \
2880 "Options:\n" \
2881 " -r use BSD sum algorithm (1K blocks)\n" \
2882 " -s use System V sum algorithm (512byte blocks)"
Mike Frysinger95d3c452005-04-21 23:29:24 +00002883
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002884#define sv_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002885 "[-v] [-w sec] command service..."
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002886#define sv_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002887 "Report the current status and control the state of services " \
2888 "monitored by the runsv supervisor."
Denis Vlasenko8a00f442006-11-17 18:58:16 +00002889
Denis Vlasenko83ea6432006-11-16 02:27:24 +00002890#define svlogd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002891 "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..."
Denis Vlasenko83ea6432006-11-16 02:27:24 +00002892#define svlogd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002893 "Continuously read log data from standard input, optionally " \
2894 "filter log messages, and write the data to one or more automatically " \
2895 "rotated logs."
Denis Vlasenko83ea6432006-11-16 02:27:24 +00002896
Eric Andersen7e9276b2001-02-22 01:15:47 +00002897#define swapoff_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002898 "[-a] [DEVICE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002899#define swapoff_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002900 "Stop swapping virtual memory pages on DEVICE.\n\n" \
2901 "Options:\n" \
2902 " -a Stop swapping on all swap devices"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002903
Eric Andersen7e9276b2001-02-22 01:15:47 +00002904#define swapon_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002905 "[-a] [DEVICE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002906#define swapon_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002907 "Start swapping virtual memory pages on DEVICE.\n\n" \
2908 "Options:\n" \
2909 " -a Start swapping on all swap devices"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002910
Rob Landley0f34a822005-10-27 22:55:50 +00002911#define switch_root_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002912 "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
Rob Landley0f34a822005-10-27 22:55:50 +00002913#define switch_root_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002914 "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
2915 "and exec NEW_INIT.\n\n" \
2916 "Options:\n" \
2917 " -c Redirect console to device on new root"
Rob Landley0f34a822005-10-27 22:55:50 +00002918
Eric Andersen7e9276b2001-02-22 01:15:47 +00002919#define sync_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002920 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00002921#define sync_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002922 "Write all buffered filesystem blocks to disk."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002923
Eric Andersenb9050282003-12-24 06:02:11 +00002924#define sysctl_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002925 "[OPTIONS]... [VALUE]..."
Eric Andersen5d38f5b2005-09-12 21:42:48 +00002926#define sysctl_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002927 "configure kernel parameters at runtime\n\n" \
2928 "Options:\n" \
2929 " -n Use this option to disable printing of the key name when printing values\n" \
2930 " -w Use this option when you want to change a sysctl setting\n" \
2931 " -p Load in sysctl settings from the file specified or /etc/sysctl.conf if none given\n" \
2932 " -a Display all values currently available\n" \
2933 " -A Display all values currently available in table form"
Eric Andersen5d38f5b2005-09-12 21:42:48 +00002934#define sysctl_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002935 "sysctl [-n] variable ...\n" \
2936 "sysctl [-n] -w variable=value ...\n" \
2937 "sysctl [-n] -a\n" \
2938 "sysctl [-n] -p <file> (default /etc/sysctl.conf)\n" \
2939 "sysctl [-n] -A\n"
Eric Andersenb9050282003-12-24 06:02:11 +00002940
Eric Andersen7e9276b2001-02-22 01:15:47 +00002941#define syslogd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002942 "[OPTION]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002943#define syslogd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002944 "Linux system and kernel logging utility.\n" \
2945 "Note that this version of syslogd ignores /etc/syslog.conf.\n\n" \
2946 "Options:\n" \
2947 " -m MIN Minutes between MARK lines (default=20, 0=off)\n" \
2948 " -n Run as a foreground process\n" \
2949 " -O FILE Use an alternate log file (default=/var/log/messages)\n" \
2950 " -l n Sets the local log level of messages to n\n" \
2951 " -S Make logging output smaller" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002952 USE_FEATURE_ROTATE_LOGFILE( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002953 "\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)\n" \
2954 " -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002955 USE_FEATURE_REMOTE_LOG( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002956 "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)\n" \
2957 " -L Log locally and via network logging (default is network only)") \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002958 USE_FEATURE_IPC_SYSLOG( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002959 "\n -C [size(KiB)] Log to a circular buffer (read the buffer using logread)")
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002960#define syslogd_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002961 "$ syslogd -R masterlog:514\n" \
2962 "$ syslogd -R 192.168.1.1:601\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002963
Eric Andersen7e9276b2001-02-22 01:15:47 +00002964#define tail_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002965 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002966#define tail_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002967 "Print last 10 lines of each FILE to standard output.\n" \
2968 "With more than one FILE, precede each with a header giving the\n" \
2969 "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
2970 "Options:\n" \
2971 USE_FEATURE_FANCY_TAIL(" -c N[kbm] output the last N bytes\n") \
2972 " -n N[kbm] print last N lines instead of last 10\n" \
2973 " -f output data as the file grows" \
2974 USE_FEATURE_FANCY_TAIL( "\n -q never output headers giving file names\n" \
2975 " -s SEC wait SEC seconds between reads with -f\n" \
2976 " -v always output headers giving file names\n\n" \
2977 "If the first character of N (bytes or lines) is a '+', output begins with\n" \
2978 "the Nth item from the start of each file, otherwise, print the last N items\n" \
2979 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." )
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002980#define tail_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002981 "$ tail -n 1 /etc/resolv.conf\n" \
2982 "nameserver 10.0.0.1\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002983
Eric Andersen7e9276b2001-02-22 01:15:47 +00002984#define tar_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002985 "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_TAR_GZIP("z") \
Denis Vlasenkoce979602006-09-27 23:31:08 +00002986 USE_FEATURE_TAR_BZIP2("j") USE_FEATURE_TAR_LZMA("a") \
2987 USE_FEATURE_TAR_COMPRESS("Z") "xtvO] " \
Denis Vlasenkod031ffa2006-11-24 21:54:44 +00002988 USE_FEATURE_TAR_FROM("[-X FILE] ") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002989 "[-f TARFILE] [-C DIR] [FILE(s)] ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00002990#define tar_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002991 "Create, extract, or list files from a tar file.\n\n" \
2992 "Options:\n" \
2993 USE_FEATURE_TAR_CREATE(" c create\n") \
2994 " x extract\n" \
2995 " t list\n" \
2996 "\nArchive format selection:\n" \
2997 USE_FEATURE_TAR_GZIP(" z Filter the archive through gzip\n") \
2998 USE_FEATURE_TAR_BZIP2(" j Filter the archive through bzip2\n") \
2999 USE_FEATURE_TAR_LZMA(" a Filter the archive through lzma\n") \
3000 USE_FEATURE_TAR_COMPRESS(" Z Filter the archive through compress\n") \
3001 "\nFile selection:\n" \
3002 " f name of TARFILE or \"-\" for stdin\n" \
3003 " O extract to stdout\n" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00003004 USE_FEATURE_TAR_FROM( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003005 " exclude file to exclude\n" \
3006 " X file with names to exclude\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00003007 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003008 " C change to directory DIR before operation\n" \
3009 " v verbosely list files processed"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003010#define tar_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003011 "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
3012 "$ tar -cf /tmp/tarball.tar /usr/local\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003013
Bernhard Reutner-Fischer32eddff2006-11-22 16:39:48 +00003014#define taskset_trivial_usage \
3015 "[OPTIONS] [mask] [pid | command [arg]...]"
3016#define taskset_full_usage \
3017 "Set or get CPU affinity.\n\n" \
3018 "Options:\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003019 " -p operate on an existing PID"
Bernhard Reutner-Fischer32eddff2006-11-22 16:39:48 +00003020#define taskset_example_usage \
3021 "$ taskset 0x7 ./dgemm_test&\n" \
3022 "$ taskset -p 0x1 $!\n" \
3023 "pid 4790's current affinity mask: 7\n" \
3024 "pid 4790's new affinity mask: 1\n" \
3025 "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
3026 "pid 6671's current affinity mask: 1\n" \
3027 "pid 6671's new affinity mask: 1\n" \
3028 "$ taskset -p 1\n"
3029 "pid 1's current affinity mask: 3\n"
3030
Eric Andersen7e9276b2001-02-22 01:15:47 +00003031#define tee_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003032 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00003033#define tee_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003034 "Copy standard input to each FILE, and also to standard output.\n\n" \
3035 "Options:\n" \
3036 " -a append to the given FILEs, do not overwrite\n" \
3037 " -i ignore interrupt signals (SIGINT)"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003038#define tee_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003039 "$ echo \"Hello\" | tee /tmp/foo\n" \
3040 "$ cat /tmp/foo\n" \
3041 "Hello\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003042
Eric Andersen539ffc92004-02-22 12:25:47 +00003043#ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN
3044#define telnet_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003045 "[-a] [-l USER] HOST [PORT]"
Eric Andersen539ffc92004-02-22 12:25:47 +00003046#define telnet_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003047 "Telnet is used to establish interactive communication with another\n" \
3048 "computer over a network using the TELNET protocol.\n\n" \
3049 "Options:\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00003050 " -a Attempt an automatic login with the USER variable\n" \
3051 " -l USER Attempt an automatic login with the USER argument\n" \
3052 " HOST The official name, alias or the IP address of the\n" \
3053 " remote host.\n" \
3054 " PORT The remote port number to connect to. If it is not\n" \
3055 " specified, the default telnet (23) port is used."
Eric Andersen539ffc92004-02-22 12:25:47 +00003056#else
Eric Andersen7e9276b2001-02-22 01:15:47 +00003057#define telnet_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003058 "HOST [PORT]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003059#define telnet_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003060 "Telnet is used to establish interactive communication with another\n" \
3061 "computer over a network using the TELNET protocol."
Eric Andersen539ffc92004-02-22 12:25:47 +00003062#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003063
Denis Vlasenko75f8d082006-11-22 15:54:52 +00003064#ifdef CONFIG_FEATURE_TELNETD_STANDALONE
Eric Andersen08a72202002-09-30 20:52:10 +00003065#define telnetd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003066 "[OPTION]"
Eric Andersen08a72202002-09-30 20:52:10 +00003067#define telnetd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003068 "Telnetd listens for incoming TELNET connections on PORT.\n" \
3069 "Options:\n" \
3070 " -p PORT listen for connections on PORT (default 23)\n" \
3071 " -l LOGIN exec LOGIN on connect\n" \
3072 " -f issue_file Display issue_file instead of /etc/issue\n" \
3073 " -F Foreground mode\n" \
3074 " -i Inetd mode"
Denis Vlasenko75f8d082006-11-22 15:54:52 +00003075#else
3076#define telnetd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003077 "[OPTION]"
Denis Vlasenko75f8d082006-11-22 15:54:52 +00003078#define telnetd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003079 "Telnetd uses incoming TELNET connections via inetd.\n" \
3080 "Options:\n" \
3081 " -l LOGIN exec LOGIN on connect\n" \
3082 " -f issue_file Display issue_file instead of /etc/issue"
Glenn L McGrath4a4c6772003-02-15 11:50:33 +00003083#endif
Eric Andersen08a72202002-09-30 20:52:10 +00003084
Eric Andersen7e9276b2001-02-22 01:15:47 +00003085#define test_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003086 "EXPRESSION\n or [ EXPRESSION ]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003087#define test_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003088 "Checks file types and compares values returning an exit\n" \
3089 "code determined by the value of EXPRESSION."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003090#define test_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003091 "$ test 1 -eq 2\n" \
3092 "$ echo $?\n" \
3093 "1\n" \
3094 "$ test 1 -eq 1\n" \
3095 "$ echo $?\n" \
3096 "0\n" \
3097 "$ [ -d /etc ]\n" \
3098 "$ echo $?\n" \
3099 "0\n" \
3100 "$ [ -d /junk ]\n" \
3101 "$ echo $?\n" \
3102 "1\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003103
Mark Whitley450736c2001-03-02 19:08:50 +00003104#define tftp_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003105 "[OPTION]... HOST [PORT]"
Mark Whitley450736c2001-03-02 19:08:50 +00003106#define tftp_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003107 "Transfers a file from/to a tftp server using \"octet\" mode.\n\n" \
3108 "Options:\n" \
3109 " -l FILE Local FILE\n" \
3110 " -r FILE Remote FILE" \
Denis Vlasenkoce979602006-09-27 23:31:08 +00003111 USE_FEATURE_TFTP_GET( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003112 "\n -g Get file" \
Mike Frysinger82e6c0b2005-04-23 06:35:06 +00003113 ) \
Denis Vlasenkoce979602006-09-27 23:31:08 +00003114 USE_FEATURE_TFTP_PUT( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003115 "\n -p Put file" \
Mark Whitley450736c2001-03-02 19:08:50 +00003116 ) \
Denis Vlasenkoce979602006-09-27 23:31:08 +00003117 USE_FEATURE_TFTP_BLOCKSIZE( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003118 "\n -b SIZE Transfer blocks of SIZE octets" \
Tim Riker7b253f82003-12-28 05:02:40 +00003119 )
Eric Andersenc3657422001-11-30 07:54:32 +00003120#define time_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003121 "[OPTION]... COMMAND [ARGS...]"
Eric Andersenc3657422001-11-30 07:54:32 +00003122#define time_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003123 "Runs the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \
3124 "COMMAND's resource usage information is displayed\n\n" \
3125 "Options:\n" \
3126 " -v Displays verbose resource usage information"
Mark Whitley450736c2001-03-02 19:08:50 +00003127
Eric Andersen420b2082002-09-17 22:14:58 +00003128#define top_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003129 "[-b] [-n count] [-d seconds]"
Eric Andersen420b2082002-09-17 22:14:58 +00003130#define top_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003131 "top provides a view of process activity in real time.\n" \
3132 "It reads the status of all processes from /proc each <seconds>\n" \
3133 "and shows the status for however many processes will fit on the screen."
Eric Andersen420b2082002-09-17 22:14:58 +00003134
Eric Andersen7e9276b2001-02-22 01:15:47 +00003135#define touch_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003136 "[-c] FILE [FILE ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003137#define touch_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003138 "Update the last-modified date on the given FILE[s].\n\n" \
3139 "Options:\n" \
3140 " -c Do not create any files"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003141#define touch_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003142 "$ ls -l /tmp/foo\n" \
3143 "/bin/ls: /tmp/foo: No such file or directory\n" \
3144 "$ touch /tmp/foo\n" \
3145 "$ ls -l /tmp/foo\n" \
3146 "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003147
3148#define tr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003149 "[-cds] STRING1 [STRING2]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003150#define tr_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003151 "Translate, squeeze, and/or delete characters from\n" \
3152 "standard input, writing to standard output.\n\n" \
3153 "Options:\n" \
3154 " -c take complement of STRING1\n" \
3155 " -d delete input characters coded STRING1\n" \
3156 " -s squeeze multiple output characters of STRING2 into one character"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003157#define tr_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003158 "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
3159 "hello world\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003160
Eric Andersen5c58d282001-07-10 16:29:00 +00003161#define traceroute_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003162 "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
3163 " [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
3164 " [-z pausemsecs] host [data size]"
Eric Andersen5c58d282001-07-10 16:29:00 +00003165#define traceroute_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003166 "trace the route ip packets follow going to \"host\"\n" \
3167 "Options:\n" \
3168 " -F Set the don't fragment bit\n" \
3169 " -I Use ICMP ECHO instead of UDP datagrams\n" \
3170 " -l Display the ttl value of the returned packet\n" \
3171 " -d Set SO_DEBUG options to socket\n" \
3172 " -n Print hop addresses numerically rather than symbolically\n" \
3173 " -r Bypass the normal routing tables and send directly to a host\n" \
3174 " -v Verbose output\n" \
3175 " -m max_ttl Set the max time-to-live (max number of hops)\n" \
3176 " -p port# Set the base UDP port number used in probes\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00003177 " (default is 33434)\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003178 " -q nqueries Set the number of probes per 'ttl' to nqueries\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00003179 " (default is 3)\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003180 " -s src_addr Use the following IP address as the source address\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00003181 " -t tos Set the type-of-service in probe packets to the following value\n" \
3182 " (default 0)\n" \
3183 " -w wait Set the time (in seconds) to wait for a response to a probe\n" \
3184 " (default 3 sec)\n" \
3185 " -g Specify a loose source route gateway (8 maximum)"
Eric Andersen5c58d282001-07-10 16:29:00 +00003186
3187
Eric Andersen7e9276b2001-02-22 01:15:47 +00003188#define true_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003189 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00003190#define true_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003191 "Return an exit code of TRUE (0)."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003192#define true_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003193 "$ true\n" \
3194 "$ echo $?\n" \
3195 "0\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003196
Eric Andersen7e9276b2001-02-22 01:15:47 +00003197#define tty_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003198 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00003199#define tty_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003200 "Print the file name of the terminal connected to standard input.\n\n" \
3201 "Options:\n" \
3202 " -s print nothing, only return an exit status"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003203#define tty_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003204 "$ tty\n" \
3205 "/dev/tty2\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003206
Mike Frysinger174808c2005-06-11 01:14:09 +00003207#define tune2fs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003208 "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
3209 "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
3210 "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
3211 "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
3212 "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
3213 "[-T last-check-time] [-U UUID] device"
Mike Frysinger174808c2005-06-11 01:14:09 +00003214#define tune2fs_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003215 "Adjust filesystem options on ext[23] filesystems."
Mike Frysinger174808c2005-06-11 01:14:09 +00003216
Glenn L McGrath8eb0dc12002-08-21 10:27:58 +00003217#define udhcpc_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003218 "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]"
Glenn L McGrath8eb0dc12002-08-21 10:27:58 +00003219#define udhcpc_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003220 " -V,--vendorclass=CLASSID Set vendor class identifier\n" \
3221 " -i,--interface=INTERFACE Interface to use (default: eth0)\n" \
3222 " -H,-h,--hostname=HOSTNAME Client hostname\n" \
3223 " -c,--clientid=CLIENTID Set client identifier\n" \
3224 " -C,--clientid-none Suppress default client identifier\n" \
3225 " -p,--pidfile=file Store process ID of daemon in file\n" \
3226 " -r,--request=IP IP address to request (default: none)\n" \
3227 " -s,--script=file Run file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
3228 " -t,--retries=NUM Send up to NUM request packets\n"\
3229 " -f,--foreground Do not fork after getting lease\n" \
3230 " -b,--background Fork to background if lease cannot be immediately negotiated\n" \
3231 " -n,--now Exit with failure if lease cannot be immediately negotiated\n" \
3232 " -q,--quit Quit after obtaining lease\n" \
3233 " -R,--release Release IP on quit\n" \
3234 " -v,--version Display version" \
Glenn L McGrath8eb0dc12002-08-21 10:27:58 +00003235
Russ Dill61fb4892002-10-14 21:41:28 +00003236#define udhcpd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003237 "[configfile]\n" \
Russ Dill61fb4892002-10-14 21:41:28 +00003238
3239#define udhcpd_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003240 ""
Russ Dill61fb4892002-10-14 21:41:28 +00003241
Eric Andersen7e9276b2001-02-22 01:15:47 +00003242#define umount_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003243 "[flags] FILESYSTEM|DIRECTORY"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003244#define umount_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003245 "Unmount file systems\n" \
3246 "\nFlags:\n" " -a Unmount all file systems" \
3247 USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab\n -n Don't erase /etc/mtab entries") \
3248 "\n -r Try to remount devices as read-only if mount is busy" \
3249 "\n -l Lazy umount (detach filesystem)" \
3250 "\n -f Force umount (i.e., unreachable NFS server)" \
3251 USE_FEATURE_MOUNT_LOOP("\n -D Do not free loop device (if a loop device has been used)")
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003252#define umount_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003253 "$ umount /dev/hdc1\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003254
3255#define uname_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003256 "[OPTION]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00003257#define uname_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003258 "Print certain system information. With no OPTION, same as -s.\n\n" \
3259 "Options:\n" \
3260 " -a print all information\n" \
3261 " -m the machine (hardware) type\n" \
3262 " -n print the machine's network node hostname\n" \
3263 " -r print the operating system release\n" \
3264 " -s print the operating system name\n" \
3265 " -p print the host processor type\n" \
3266 " -v print the operating system version"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003267#define uname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003268 "$ uname -a\n" \
3269 "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003270
Glenn L McGrathbf1cc8b2002-11-01 23:38:54 +00003271#define uncompress_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003272 "[-c] [-f] [ name ... ]"
Glenn L McGrathbf1cc8b2002-11-01 23:38:54 +00003273#define uncompress_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003274 "Uncompress .Z file[s]\n" \
3275 "Options:\n" \
3276 " -c extract to stdout\n" \
3277 " -f force overwrite an existing file"
Tim Riker7b253f82003-12-28 05:02:40 +00003278
Eric Andersen7e9276b2001-02-22 01:15:47 +00003279#define uniq_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003280 "[-fscdu]... [INPUT [OUTPUT]]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003281#define uniq_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003282 "Discard all but one of successive identical lines from INPUT\n" \
3283 "(or standard input), writing to OUTPUT (or standard output).\n\n" \
3284 "Options:\n" \
3285 " -c prefix lines by the number of occurrences\n" \
3286 " -d only print duplicate lines\n" \
3287 " -u only print unique lines\n" \
3288 " -f N skip the first N fields\n" \
3289 " -s N skip the first N chars (after any skipped fields)"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003290#define uniq_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003291 "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
3292 "a\n" \
3293 "b\n" \
3294 "c\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003295
3296#define unix2dos_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003297 "[option] [FILE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003298#define unix2dos_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003299 "Converts FILE from unix format to dos format. When no option\n" \
3300 "is given, the input is converted to the opposite output format.\n" \
3301 "When no file is given, uses stdin for input and stdout for output.\n" \
3302 "Options:\n" \
3303 " -u output will be in UNIX format\n" \
3304 " -d output will be in DOS format"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003305
Glenn L McGrath87ac7022002-01-02 13:52:26 +00003306#define unzip_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003307 "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
Glenn L McGrath87ac7022002-01-02 13:52:26 +00003308#define unzip_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003309 "Extracts files from ZIP archives.\n\n" \
3310 "Options:\n" \
3311 " -l list archive contents (short form)\n" \
3312 " -n never overwrite existing files (default)\n" \
3313 " -o overwrite files without prompting\n" \
3314 " -p send output to stdout\n" \
3315 " -q be quiet\n" \
3316 " -x exclude these files\n" \
3317 " -d extract files into this directory"
Glenn L McGrath87ac7022002-01-02 13:52:26 +00003318
Eric Andersen7e9276b2001-02-22 01:15:47 +00003319#define uptime_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003320 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00003321#define uptime_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003322 "Display the time since the last boot."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003323#define uptime_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003324 "$ uptime\n" \
3325 " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003326
3327#define usleep_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003328 "N"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003329#define usleep_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003330 "Pause for N microseconds."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003331#define usleep_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003332 "$ usleep 1000000\n" \
3333 "[pauses for 1 second]\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003334
3335#define uudecode_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003336 "[FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00003337#define uudecode_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003338 "Uudecode a file that is uuencoded.\n\n" \
3339 "Options:\n" \
3340 " -o FILE direct output to FILE"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003341#define uudecode_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003342 "$ uudecode -o busybox busybox.uu\n" \
3343 "$ ls -l busybox\n" \
3344 "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003345
3346#define uuencode_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003347 "[OPTION] [INFILE] REMOTEFILE"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003348#define uuencode_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003349 "Uuencode a file.\n\n" \
3350 "Options:\n" \
3351 " -m use base64 encoding per RFC1521"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003352#define uuencode_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003353 "$ uuencode busybox busybox\n" \
3354 "begin 755 busybox\n" \
3355 "<encoded file snipped>\n" \
3356 "$ uudecode busybox busybox > busybox.uu\n" \
3357 "$\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003358
Eric Andersen853c4942003-01-23 05:59:32 +00003359#define vconfig_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003360 "COMMAND [OPTIONS] ..."
Eric Andersen853c4942003-01-23 05:59:32 +00003361#define vconfig_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003362 "vconfig lets you create and remove virtual ethernet devices.\n\n" \
3363 "Options:\n" \
3364 " add [interface-name] [vlan_id]\n" \
3365 " rem [vlan-name]\n" \
3366 " set_flag [interface-name] [flag-num] [0 | 1]\n" \
3367 " set_egress_map [vlan-name] [skb_priority] [vlan_qos]\n" \
3368 " set_ingress_map [vlan-name] [skb_priority] [vlan_qos]\n" \
3369 " set_name_type [name-type]"
Eric Andersen853c4942003-01-23 05:59:32 +00003370
Eric Andersen3f980402001-04-04 17:31:15 +00003371#define vi_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003372 "[OPTION] [FILE]..."
Eric Andersen3f980402001-04-04 17:31:15 +00003373#define vi_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003374 "edit FILE.\n\n" \
3375 "Options:\n" \
3376 " -R Read-only- do not write to the file"
Eric Andersen3f980402001-04-04 17:31:15 +00003377
Eric Andersen27f64e12002-06-23 04:24:25 +00003378#define vlock_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003379 "[OPTIONS]"
Eric Andersen27f64e12002-06-23 04:24:25 +00003380#define vlock_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003381 "Lock a virtual terminal. A password is required to unlock\n" \
3382 "Options:\n" \
3383 " -a Lock all VTs"
Eric Andersen27f64e12002-06-23 04:24:25 +00003384
Glenn L McGrath18b76e62002-09-16 09:10:04 +00003385#define watch_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003386 "[-n <seconds>] [-t] COMMAND..."
Glenn L McGrath18b76e62002-09-16 09:10:04 +00003387#define watch_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003388 "Executes a program periodically\n\n" \
3389 "Options:\n" \
3390 " -n Loop period in seconds - default is 2\n"
3391 " -t Don't print header"
Glenn L McGrath18b76e62002-09-16 09:10:04 +00003392#define watch_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003393 "$ watch date\n" \
3394 "Mon Dec 17 10:31:40 GMT 2000\n" \
3395 "Mon Dec 17 10:31:42 GMT 2000\n" \
3396 "Mon Dec 17 10:31:44 GMT 2000"
Glenn L McGrath18b76e62002-09-16 09:10:04 +00003397
Eric Andersen7e9276b2001-02-22 01:15:47 +00003398#define watchdog_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003399 "[-t <seconds>] [-F] DEV"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003400#define watchdog_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003401 "Periodically write to watchdog device DEV.\n" \
3402 "Options:\n" \
3403 " -t Timer period in seconds - default is 30\n" \
3404 " -F Stay in the foreground and don't fork"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003405
3406#define wc_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003407 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00003408#define wc_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003409 "Print line, word, and byte counts for each FILE, and a total line if\n" \
3410 "more than one FILE is specified. With no FILE, read standard input.\n\n" \
3411 "Options:\n" \
3412 " -c print the byte counts\n" \
3413 " -l print the newline counts\n" \
3414 " -L print the length of the longest line\n" \
3415 " -w print the word counts"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003416#define wc_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003417 "$ wc /etc/passwd\n" \
3418 " 31 46 1365 /etc/passwd\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003419
3420#define wget_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003421 "[-c|--continue] [-q|--quiet] [-O|--output-document file]\n" \
3422 " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
3423 " [-U|--user-agent agent] url"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003424#define wget_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003425 "wget retrieves files via HTTP or FTP\n\n" \
3426 "Options:\n" \
3427 " -c continue retrieval of aborted transfers\n" \
3428 " -q quiet mode - do not print\n" \
3429 " -P Set directory prefix to DIR\n" \
3430 " -O save to filename ('-' for stdout)\n" \
3431 " -U adjust 'User-Agent' field\n" \
3432 " -Y use proxy ('on' or 'off')"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003433
3434#define which_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003435 "[COMMAND ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003436#define which_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003437 "Locates a COMMAND."
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003438#define which_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003439 "$ which login\n" \
3440 "/bin/login\n"
Glenn L McGrath8f0722a2002-11-11 03:00:12 +00003441
Eric Andersen00a6a752002-04-26 23:53:10 +00003442#define who_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003443 " "
Eric Andersen00a6a752002-04-26 23:53:10 +00003444#define who_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003445 "Prints the current user names and related information"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003446
3447#define whoami_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003448 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00003449#define whoami_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003450 "Prints the user name associated with the current effective user id."
Eric Andersen7e9276b2001-02-22 01:15:47 +00003451
3452#define xargs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003453 "[OPTIONS] [COMMAND] [ARGS...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003454#define xargs_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003455 "Executes COMMAND on every item given by standard input.\n\n" \
3456 "Options:\n" \
3457 USE_FEATURE_XARGS_SUPPORT_CONFIRMATION(" -p Prompt the user about whether to run each command\n") \
3458 " -r Do not run command for empty read lines\n" \
3459 USE_FEATURE_XARGS_SUPPORT_TERMOPT(" -x Exit if the size is exceeded\n") \
3460 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(" -0 Input filenames are terminated by a null character\n") \
3461 " -t Print the command line on stderr before executing it"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003462#define xargs_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003463 "$ ls | xargs gzip\n" \
3464 "$ find . -name '*.c' -print | xargs rm\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003465
3466#define yes_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003467 "[OPTION]... [STRING]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00003468#define yes_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003469 "Repeatedly outputs a line with all specified STRING(s), or 'y'."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003470
Eric Andersen7e9276b2001-02-22 01:15:47 +00003471#define zcat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003472 "FILE"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003473#define zcat_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003474 "Uncompress to stdout."
Eric Andersen178de172004-04-06 16:36:20 +00003475
Rob Landleyad8071f2005-04-30 03:49:37 +00003476#define zcip_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003477 "[OPTIONS] ifname script"
Rob Landleyad8071f2005-04-30 03:49:37 +00003478#define zcip_full_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003479 "zcip manages a ZeroConf IPv4 link-local address.\n" \
3480 "Options:\n" \
3481 " -f foreground mode\n" \
3482 " -q quit after address (no daemon)\n" \
3483 " -r 169.254.x.x request this address first\n" \
3484 " -v verbose"
Rob Landleyad8071f2005-04-30 03:49:37 +00003485
Eric Andersen178de172004-04-06 16:36:20 +00003486#endif /* __BB_USAGE_H__ */