blob: d619d9ed7a2bea1d540f01a1ee621154b8893ef7 [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 Vlasenkocdf62772008-03-17 08:42:43 +00009 * or
10 * |<5 spaces>"\ntext with tabs"....
Denis Vlasenkoe2d3ded2006-11-27 23:43:28 +000011 */
Denis Vlasenkof81e8db2009-04-09 12:35:13 +000012#ifndef BB_USAGE_H
13#define BB_USAGE_H 1
Eric Andersen178de172004-04-06 16:36:20 +000014
Denis Vlasenko4f98e192008-04-13 22:12:19 +000015
16#define NOUSAGE_STR "\b"
17
Denis Vlasenkod16950d2008-11-29 09:05:50 +000018#define acpid_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +010019 "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE]..."
Denis Vlasenkod16950d2008-11-29 09:05:50 +000020#define acpid_full_usage "\n\n" \
21 "Listen to ACPI events and spawn specific helpers on event arrival\n" \
22 "\nOptions:" \
Denys Vlasenko07697852009-10-06 21:11:37 +020023 "\n -d Don't daemonize, log to stderr" \
Denis Vlasenkod16950d2008-11-29 09:05:50 +000024 "\n -c DIR Config directory [/etc/acpi]" \
25 "\n -e FILE /proc event file [/proc/acpi/event]" \
26 "\n -l FILE Log file [/var/log/acpid]" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +000027 IF_FEATURE_ACPID_COMPAT( \
Denis Vlasenkod16950d2008-11-29 09:05:50 +000028 "\n\nAccept and ignore compatibility options -g -m -s -S -v" \
29 )
30
31#define acpid_example_usage \
32 "# acpid -l /var/log/my-acpi-log\n" \
33 "# acpid -d /dev/input/event*\n"
Denis Vlasenko4f98e192008-04-13 22:12:19 +000034
Eric Andersenf349e972001-08-21 16:18:59 +000035#define addgroup_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +010036 "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
Denis Vlasenko4f98e192008-04-13 22:12:19 +000037#define addgroup_full_usage "\n\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +000038 "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +000039 "\nOptions:" \
Denis Vlasenko4f98e192008-04-13 22:12:19 +000040 "\n -g GID Group id" \
Denis Vlasenkoc2931aa2009-04-22 21:35:52 +000041 "\n -S Create a system group" \
Eric Andersenf349e972001-08-21 16:18:59 +000042
43#define adduser_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +010044 "[OPTIONS] USER"
Denis Vlasenko4f98e192008-04-13 22:12:19 +000045#define adduser_full_usage "\n\n" \
Denis Vlasenko73ac0562008-12-25 01:01:23 +000046 "Add a user\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +000047 "\nOptions:" \
48 "\n -h DIR Home directory" \
49 "\n -g GECOS GECOS field" \
50 "\n -s SHELL Login shell" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +020051 "\n -G GRP Add user to existing group" \
Denis Vlasenko397de612008-03-17 08:55:44 +000052 "\n -S Create a system user" \
Denys Vlasenko07697852009-10-06 21:11:37 +020053 "\n -D Don't assign a password" \
54 "\n -H Don't create home directory" \
Denis Vlasenkoc2931aa2009-04-22 21:35:52 +000055 "\n -u UID User id" \
Eric Andersenf349e972001-08-21 16:18:59 +000056
Mark Whitley6f932772001-03-20 19:18:10 +000057#define adjtimex_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +010058 "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +000059#define adjtimex_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +010060 "Read and optionally set system timebase parameters. See adjtimex(2)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +000061 "\nOptions:" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +010062 "\n -q Quiet" \
63 "\n -o OFF Time offset, microseconds" \
64 "\n -f FREQ Frequency adjust, integer kernel units (65536 is 1ppm)" \
65 "\n (positive values make clock run faster)" \
66 "\n -t TICK Microseconds per tick, usually 10000" \
67 "\n -p TCONST" \
Mark Whitley6f932772001-03-20 19:18:10 +000068
Eric Andersen7e9276b2001-02-22 01:15:47 +000069#define ar_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +000070 "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
Denis Vlasenko4f98e192008-04-13 22:12:19 +000071#define ar_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +000072 "Extract or list FILES from an ar archive\n" \
73 "\nOptions:" \
74 "\n -o Preserve original dates" \
75 "\n -p Extract to stdout" \
76 "\n -t List" \
77 "\n -x Extract" \
78 "\n -v Verbose" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000079
Denis Vlasenkofa85b862007-01-07 01:24:12 +000080#define arp_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +010081 "\n[-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME]" \
82 "\n[-v] [-i IF] -d HOSTNAME [pub]" \
83 "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]" \
84 "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub" \
85 "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub"
Denis Vlasenko4f98e192008-04-13 22:12:19 +000086#define arp_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +000087 "Manipulate ARP cache\n" \
88 "\nOptions:" \
Denis Vlasenkofa85b862007-01-07 01:24:12 +000089 "\n -a Display (all) hosts" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +000090 "\n -s Set new ARP entry" \
Denis Vlasenkofa85b862007-01-07 01:24:12 +000091 "\n -d Delete a specified entry" \
92 "\n -v Verbose" \
93 "\n -n Don't resolve names" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +000094 "\n -i IF Network interface" \
Denis Vlasenkofa85b862007-01-07 01:24:12 +000095 "\n -D Read <hwaddr> from given device" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +000096 "\n -A, -p AF Protocol family" \
Denis Vlasenko397de612008-03-17 08:55:44 +000097 "\n -H HWTYPE Hardware address type" \
Denis Vlasenkofa85b862007-01-07 01:24:12 +000098
Glenn L McGrath9e598412003-01-09 10:06:01 +000099#define arping_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100100 "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000101#define arping_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000102 "Send ARP requests/replies\n" \
103 "\nOptions:" \
104 "\n -f Quit on first ARP reply" \
105 "\n -q Quiet" \
106 "\n -b Keep broadcasting, don't go unicast" \
107 "\n -D Duplicated address detection mode" \
108 "\n -U Unsolicited ARP mode, update your neighbors" \
109 "\n -A ARP answer mode, update your neighbors" \
110 "\n -c N Stop after sending N ARP requests" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100111 "\n -w TIMEOUT Time to wait for ARP reply, seconds" \
112 "\n -I IFACE Interface to use (default eth0)" \
113 "\n -s SRC_IP Sender IP address" \
114 "\n DST_IP Target IP address" \
Glenn L McGrath9e598412003-01-09 10:06:01 +0000115
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000116#define sh_trivial_usage NOUSAGE_STR
117#define sh_full_usage ""
118#define ash_trivial_usage NOUSAGE_STR
119#define ash_full_usage ""
120#define hush_trivial_usage NOUSAGE_STR
121#define hush_full_usage ""
Denys Vlasenko1cc4b132009-08-21 00:05:51 +0200122#define lash_trivial_usage NOUSAGE_STR
123#define lash_full_usage ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000124#define msh_trivial_usage NOUSAGE_STR
125#define msh_full_usage ""
Eric Andersen08f59e32004-03-12 22:07:10 +0000126
127#define awk_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200128 "[OPTIONS] [AWK_PROGRAM] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000129#define awk_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000130 "Options:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200131 "\n -v VAR=VAL Set variable" \
132 "\n -F SEP Use SEP as field separator" \
Denys Vlasenko79ae5342010-01-06 12:27:18 +0100133 "\n -f FILE Read program from FILE" \
Glenn L McGrath7a32aaa2002-09-15 17:03:48 +0000134
Eric Andersen7e9276b2001-02-22 01:15:47 +0000135#define basename_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000136 "FILE [SUFFIX]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000137#define basename_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200138 "Strip directory path and .SUFFIX from FILE\n"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000139#define basename_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000140 "$ basename /usr/local/bin/foo\n" \
141 "foo\n" \
142 "$ basename /usr/local/bin/\n" \
143 "bin\n" \
144 "$ basename /foo/bar.txt .txt\n" \
145 "bar"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000146
Bernhard Reutner-Fischer45de0742009-08-21 13:18:31 +0200147#define beep_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +0100148 "-f FREQ -l LEN -d DELAY -r COUNT -n"
Bernhard Reutner-Fischer45de0742009-08-21 13:18:31 +0200149#define beep_full_usage "\n\n" \
Denys Vlasenkoca899ef2009-08-27 03:20:45 +0200150 "Options:" \
Bernhard Reutner-Fischer45de0742009-08-21 13:18:31 +0200151 "\n -f Frequency in Hz" \
152 "\n -l Length in ms" \
153 "\n -d Delay in ms" \
154 "\n -r Repetitions" \
155 "\n -n Start new tone" \
156
Denys Vlasenkoff027d62010-05-04 15:45:25 +0200157#define bootchartd_trivial_usage \
158 "start [PROG ARGS]|stop|init"
159#define bootchartd_full_usage "\n\n" \
160 "Create /var/log/bootchart.tgz with boot chart data\n" \
161 "\nOptions:" \
162 "\nstart: start background logging; with PROG, run PROG, then kill logging with USR1" \
163 "\nstop: send USR1 to all bootchartd processes" \
164 "\ninit: start background logging; stop when getty/xdm is seen (for init scripts)" \
165 "\nUnder PID 1: as init, then exec $bootchart_init, /init, /sbin/init" \
Denis Vlasenko08ec67b2008-03-26 13:32:30 +0000166
Bernhard Reutner-Fischerd27d9252008-01-13 15:23:27 +0000167#define brctl_trivial_usage \
168 "COMMAND [BRIDGE [INTERFACE]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000169#define brctl_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200170 "Manage ethernet bridges\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000171 "\nCommands:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000172 IF_FEATURE_BRCTL_SHOW( \
Denis Vlasenko278a1c22008-04-06 07:17:02 +0000173 "\n show Show a list of bridges" \
174 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +0000175 "\n addbr BRIDGE Create BRIDGE" \
176 "\n delbr BRIDGE Delete BRIDGE" \
177 "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
178 "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000179 IF_FEATURE_BRCTL_FANCY( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000180 "\n setageing BRIDGE TIME Set ageing time" \
181 "\n setfd BRIDGE TIME Set bridge forward delay" \
182 "\n sethello BRIDGE TIME Set hello time" \
183 "\n setmaxage BRIDGE TIME Set max message age" \
184 "\n setpathcost BRIDGE COST Set path cost" \
185 "\n setportprio BRIDGE PRIO Set port priority" \
186 "\n setbridgeprio BRIDGE PRIO Set bridge priority" \
Maciek Borzecki30ebd7b2010-03-23 05:18:38 +0100187 "\n stp BRIDGE [1/yes/on|0/no/off] STP on/off" \
Denis Vlasenko278a1c22008-04-06 07:17:02 +0000188 ) \
189
Glenn L McGrath24e28332001-10-05 03:48:57 +0000190#define bunzip2_trivial_usage \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100191 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000192#define bunzip2_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100193 "Uncompress FILEs (or stdin)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000194 "\nOptions:" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100195 "\n -c Write to stdout" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000196 "\n -f Force" \
Glenn L McGrath24e28332001-10-05 03:48:57 +0000197
Denis Vlasenko77f1ec12007-10-13 03:36:03 +0000198#define bzip2_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200199 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000200#define bzip2_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100201 "Compress FILEs (or stdin) with bzip2 algorithm\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +0000202 "\nOptions:" \
Bernhard Reutner-Fischerbaab3272010-02-14 11:11:47 +0100203 "\n -c Write to stdout" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +0000204 "\n -d Decompress" \
205 "\n -f Force" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000206 "\n -1..-9 Compression level" \
Denis Vlasenko77f1ec12007-10-13 03:36:03 +0000207
Rob Landley6130b9b2006-01-23 21:10:38 +0000208#define busybox_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000209 "Hello world!\n"
Rob Landley6130b9b2006-01-23 21:10:38 +0000210
Denis Vlasenko052ad9a2009-04-29 12:01:51 +0000211#define lzop_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200212 "[-cfvd123456789CF] [FILE]..."
Denis Vlasenko052ad9a2009-04-29 12:01:51 +0000213#define lzop_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100214 " -c Write to stdout" \
Denis Vlasenko052ad9a2009-04-29 12:01:51 +0000215 "\n -f Force" \
216 "\n -v Verbose" \
217 "\n -d Decompress" \
218 "\n -F Don't store or verify checksum" \
219 "\n -C Also write checksum of compressed block" \
220 "\n -1..9 Compression level" \
221
222#define lzopcat_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200223 "[-vCF] [FILE]..."
Denis Vlasenko052ad9a2009-04-29 12:01:51 +0000224#define lzopcat_full_usage "\n\n" \
225 " -v Verbose" \
226 "\n -F Don't store or verify checksum" \
227
228#define unlzop_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200229 "[-cfvCF] [FILE]..."
Denis Vlasenko052ad9a2009-04-29 12:01:51 +0000230#define unlzop_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100231 " -c Write to stdout" \
Denis Vlasenko052ad9a2009-04-29 12:01:51 +0000232 "\n -f Force" \
233 "\n -v Verbose" \
234 "\n -F Don't store or verify checksum" \
235
Glenn L McGrathfff11f12001-11-18 14:20:25 +0000236#define bzcat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000237 "FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000238#define bzcat_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000239 "Uncompress to stdout"
Glenn L McGrathfff11f12001-11-18 14:20:25 +0000240
Rob Landleyc1d69902006-01-20 18:28:50 +0000241#define unlzma_trivial_usage \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100242 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000243#define unlzma_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100244 "Uncompress FILE (or stdin)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000245 "\nOptions:" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100246 "\n -c Write to stdout" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000247 "\n -f Force" \
Rob Landleyc1d69902006-01-20 18:28:50 +0000248
249#define lzmacat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000250 "FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000251#define lzmacat_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000252 "Uncompress to stdout"
Rob Landleyc1d69902006-01-20 18:28:50 +0000253
Eric Andersenc98c0622001-12-06 15:16:43 +0000254#define cal_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100255 "[-jy] [[MONTH] YEAR]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000256#define cal_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000257 "Display a calendar\n" \
258 "\nOptions:" \
259 "\n -j Use julian dates" \
260 "\n -y Display the entire year" \
Eric Andersenc98c0622001-12-06 15:16:43 +0000261
Eric Andersen7e9276b2001-02-22 01:15:47 +0000262#define cat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000263 "[-u] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000264#define cat_full_usage "\n\n" \
Denys Vlasenko8d680b52009-10-06 21:23:02 +0200265 "Concatenate FILEs and print them to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000266 "\nOptions:" \
267 "\n -u Use unbuffered i/o (ignored)" \
268
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000269#define cat_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000270 "$ cat /proc/uptime\n" \
271 "110716.72 17.67"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000272
Rob Landley8abbee42006-05-31 19:36:04 +0000273#define catv_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000274 "[-etv] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000275#define catv_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000276 "Display nonprinting characters as ^x or M-x\n" \
277 "\nOptions:" \
278 "\n -e End each line with $" \
279 "\n -t Show tabs as ^I" \
280 "\n -v Don't use ^x or M-x escapes" \
Denis Vlasenko5233cd32008-02-18 23:24:46 +0000281
282#define chat_trivial_usage \
283 "EXPECT [SEND [EXPECT [SEND...]]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000284#define chat_full_usage "\n\n" \
Denis Vlasenko5233cd32008-02-18 23:24:46 +0000285 "Useful for interacting with a modem connected to stdin/stdout.\n" \
286 "A script consists of one or more \"expect-send\" pairs of strings,\n" \
287 "each pair is a pair of arguments. Example:\n" \
288 "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
289
Mike Frysingerde9f1f72005-04-22 02:33:37 +0000290#define chattr_trivial_usage \
Denys Vlasenko79ae5342010-01-06 12:27:18 +0100291 "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000292#define chattr_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000293 "Change file attributes on an ext2 fs\n" \
294 "\nModifiers:" \
295 "\n - Remove attributes" \
296 "\n + Add attributes" \
297 "\n = Set attributes" \
298 "\nAttributes:" \
299 "\n A Don't track atime" \
300 "\n a Append mode only" \
301 "\n c Enable compress" \
302 "\n D Write dir contents synchronously" \
Denys Vlasenko07697852009-10-06 21:11:37 +0200303 "\n d Don't backup with dump" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000304 "\n i Cannot be modified (immutable)" \
305 "\n j Write all data to journal first" \
306 "\n s Zero disk storage when deleted" \
307 "\n S Write file contents synchronously" \
308 "\n t Disable tail-merging of partial blocks with other files" \
309 "\n u Allow file to be undeleted" \
310 "\nOptions:" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +0100311 "\n -R Recurse" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000312 "\n -v Set the file's version/generation number" \
Mike Frysingerde9f1f72005-04-22 02:33:37 +0000313
Denis Vlasenko49622d72007-03-10 16:58:49 +0000314#define chcon_trivial_usage \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +0000315 "[OPTIONS] CONTEXT FILE..." \
316 "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000317 IF_FEATURE_CHCON_LONG_OPTIONS( \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +0000318 "\n chcon [OPTIONS] --reference=RFILE FILE..." \
319 )
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000320#define chcon_full_usage "\n\n" \
Denis Vlasenko081ef792007-03-17 16:38:21 +0000321 "Change the security context of each FILE to CONTEXT\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000322 IF_FEATURE_CHCON_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000323 "\n -v,--verbose Verbose" \
324 "\n -c,--changes Report changes made" \
325 "\n -h,--no-dereference Affect symlinks instead of their targets" \
326 "\n -f,--silent,--quiet Suppress most error messages" \
327 "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \
328 "\n -u,--user=USER Set user/role/type/range in the target" \
329 "\n -r,--role=ROLE security context" \
330 "\n -t,--type=TYPE" \
331 "\n -l,--range=RANGE" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200332 "\n -R,--recursive Recurse" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +0000333 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000334 IF_NOT_FEATURE_CHCON_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000335 "\n -v Verbose" \
336 "\n -c Report changes made" \
337 "\n -h Affect symlinks instead of their targets" \
338 "\n -f Suppress most error messages" \
339 "\n -u USER Set user/role/type/range in the target security context" \
340 "\n -r ROLE" \
341 "\n -t TYPE" \
342 "\n -l RNG" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200343 "\n -R Recurse" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +0000344 )
345
Eric Andersen7e9276b2001-02-22 01:15:47 +0000346#define chmod_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000347 "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000348#define chmod_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000349 "Each MODE is one or more of the letters ugoa, one of the\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000350 "symbols +-= and one or more of the letters rwxst\n" \
351 "\nOptions:" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200352 "\n -R Recurse" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000353 IF_DESKTOP( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000354 "\n -c List changed files" \
355 "\n -v List all files" \
356 "\n -f Hide errors" \
Denis Vlasenkofefb2792006-10-27 15:13:54 +0000357 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000358#define chmod_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000359 "$ ls -l /tmp/foo\n" \
360 "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
361 "$ chmod u+x /tmp/foo\n" \
362 "$ ls -l /tmp/foo\n" \
363 "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
364 "$ chmod 444 /tmp/foo\n" \
365 "$ ls -l /tmp/foo\n" \
366 "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000367
Denis Vlasenko081ef792007-03-17 16:38:21 +0000368#define chgrp_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000369 "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000370#define chgrp_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000371 "Change the group membership of each FILE to GROUP\n" \
372 "\nOptions:" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200373 "\n -R Recurse" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000374 "\n -h Affect symlinks instead of symlink targets" \
375 "\n -L Traverse all symlinks to directories" \
376 "\n -H Traverse symlinks on command line only" \
Denys Vlasenko07697852009-10-06 21:11:37 +0200377 "\n -P Don't traverse symlinks (default)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000378 IF_DESKTOP( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000379 "\n -c List changed files" \
380 "\n -v Verbose" \
381 "\n -f Hide errors" \
Denis Vlasenko081ef792007-03-17 16:38:21 +0000382 )
383#define chgrp_example_usage \
384 "$ ls -l /tmp/foo\n" \
385 "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
386 "$ chgrp root /tmp/foo\n" \
387 "$ ls -l /tmp/foo\n" \
388 "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
389
Eric Andersen7e9276b2001-02-22 01:15:47 +0000390#define chown_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000391 "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000392#define chown_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000393 "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
394 "\nOptions:" \
Denys Vlasenko691161a2009-08-27 20:38:17 +0200395 "\n -R Recurse" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000396 "\n -h Affect symlinks instead of symlink targets" \
397 "\n -L Traverse all symlinks to directories" \
398 "\n -H Traverse symlinks on command line only" \
Denys Vlasenko07697852009-10-06 21:11:37 +0200399 "\n -P Don't traverse symlinks (default)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000400 IF_DESKTOP( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000401 "\n -c List changed files" \
402 "\n -v List all files" \
403 "\n -f Hide errors" \
Denis Vlasenko51b4c922006-10-27 16:07:20 +0000404 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000405#define chown_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000406 "$ ls -l /tmp/foo\n" \
407 "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
408 "$ chown root /tmp/foo\n" \
409 "$ ls -l /tmp/foo\n" \
410 "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
411 "$ chown root.root /tmp/foo\n" \
412 "ls -l /tmp/foo\n" \
413 "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000414
Denis Vlasenkofe544582006-10-03 15:57:40 +0000415#define chpst_trivial_usage \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000416 "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \
417 " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \
418 " [-p N] [-f BYTES] [-c BYTES] PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000419#define chpst_full_usage "\n\n" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000420 "Change the process state and run PROG\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000421 "\nOptions:" \
422 "\n -u USER[:GRP] Set uid and gid" \
423 "\n -U USER[:GRP] Set $UID and $GID in environment" \
424 "\n -e DIR Set environment variables as specified by files" \
425 "\n in DIR: file=1st_line_of_file" \
426 "\n -/ DIR Chroot to DIR" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000427 "\n -n NICE Add NICE to nice value" \
428 "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000429 "\n -d BYTES Limit data segment" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000430 "\n -o N Limit number of open files per process" \
431 "\n -p N Limit number of processes per uid" \
432 "\n -f BYTES Limit output file sizes" \
433 "\n -c BYTES Limit core file size" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000434 "\n -v Verbose" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000435 "\n -P Create new process group" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100436 "\n -0 Close stdin" \
437 "\n -1 Close stdout" \
438 "\n -2 Close stderr" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000439
Denis Vlasenkofe544582006-10-03 15:57:40 +0000440#define setuidgid_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100441 "USER PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000442#define setuidgid_full_usage "\n\n" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100443 "Set uid and gid to USER's uid and gid, removing all supplementary\n" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000444 "groups and run PROG"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000445#define envuidgid_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100446 "USER PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000447#define envuidgid_full_usage "\n\n" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100448 "Set $UID to USER's uid and $GID to USER's gid and run PROG"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000449#define envdir_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100450 "DIR PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000451#define envdir_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000452 "Set various environment variables as specified by files\n" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000453 "in the directory dir and run PROG"
Denis Vlasenkofe544582006-10-03 15:57:40 +0000454#define softlimit_trivial_usage \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000455 "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" \
456 " [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" \
457 " PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000458#define softlimit_full_usage "\n\n" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000459 "Set soft resource limits, then run PROG\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000460 "\nOptions:" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000461 "\n -a BYTES Limit total size of all segments" \
462 "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES" \
463 "\n -d BYTES Limit data segment" \
464 "\n -s BYTES Limit stack segment" \
465 "\n -l BYTES Limit locked memory size" \
466 "\n -o N Limit number of open files per process" \
467 "\n -p N Limit number of processes per uid" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000468 "\nOptions controlling file sizes:" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000469 "\n -f BYTES Limit output file sizes" \
470 "\n -c BYTES Limit core file size" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000471 "\nEfficiency opts:" \
Denis Vlasenkob3571492008-07-30 21:23:26 +0000472 "\n -r BYTES Limit resident set size" \
473 "\n -t N Limit CPU time, process receives" \
474 "\n a SIGXCPU after N seconds" \
Denis Vlasenkofe544582006-10-03 15:57:40 +0000475
Eric Andersen7e9276b2001-02-22 01:15:47 +0000476#define chroot_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100477 "NEWROOT [PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000478#define chroot_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200479 "Run PROG with root directory set to NEWROOT"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000480#define chroot_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000481 "$ ls -l /bin/ls\n" \
482 "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
483 "# mount /dev/hdc1 /mnt -t minix\n" \
484 "# chroot /mnt\n" \
485 "# ls -l /bin/ls\n" \
486 "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000487
Eric Andersen7e9276b2001-02-22 01:15:47 +0000488#define chvt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000489 "N"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000490#define chvt_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000491 "Change the foreground virtual terminal to /dev/ttyN"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000492
Rob Landley856489b2006-04-18 20:57:28 +0000493#define cksum_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000494 "FILES..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000495#define cksum_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000496 "Calculate the CRC32 checksums of FILES"
Rob Landley856489b2006-04-18 20:57:28 +0000497
Eric Andersen7e9276b2001-02-22 01:15:47 +0000498#define clear_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000499 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000500#define clear_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000501 "Clear screen"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000502
Eric Andersen7e9276b2001-02-22 01:15:47 +0000503#define cmp_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000504 "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]") "]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000505#define cmp_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000506 "Compares FILE1 vs stdin if FILE2 is not specified\n" \
507 "\nOptions:" \
508 "\n -l Write the byte numbers (decimal) and values (octal)" \
509 "\n for all differing bytes" \
510 "\n -s Quiet" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000511
Rob Landley2acfd7b2005-05-11 23:12:49 +0000512#define comm_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000513 "[-123] FILE1 FILE2"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000514#define comm_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000515 "Compare FILE1 to FILE2, or to stdin if - is specified\n" \
516 "\nOptions:" \
517 "\n -1 Suppress lines unique to FILE1" \
518 "\n -2 Suppress lines unique to FILE2" \
519 "\n -3 Suppress lines common to both files" \
Rob Landley2acfd7b2005-05-11 23:12:49 +0000520
Paul Fox79c142d2005-08-01 16:04:40 +0000521#define bbconfig_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000522 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000523#define bbconfig_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000524 "Print the config file which built busybox"
Mike Frysinger036f2992005-09-24 23:50:14 +0000525
Bernhard Reutner-Fischer71bc71a2007-03-09 16:56:38 +0000526#define chrt_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100527 "[OPTIONS] [PRIO] [PID | PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000528#define chrt_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000529 "Manipulate real-time attributes of a process\n" \
530 "\nOptions:" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +0100531 "\n -p Operate on PID" \
532 "\n -r Set SCHED_RR scheduling" \
533 "\n -f Set SCHED_FIFO scheduling" \
534 "\n -o Set SCHED_OTHER scheduling" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000535 "\n -m Show min and max priorities" \
Bernhard Reutner-Fischer71bc71a2007-03-09 16:56:38 +0000536
537#define chrt_example_usage \
Denis Vlasenkof5635f42007-08-13 10:48:33 +0000538 "$ chrt -r 4 sleep 900; x=$!\n" \
539 "$ chrt -f -p 3 $x\n" \
540 "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
Bernhard Reutner-Fischer71bc71a2007-03-09 16:56:38 +0000541
Eric Andersen7e9276b2001-02-22 01:15:47 +0000542#define cp_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200543 "[OPTIONS] SOURCE DEST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000544#define cp_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000545 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
546 "\nOptions:" \
547 "\n -a Same as -dpR" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000548 IF_SELINUX( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000549 "\n -c Preserve security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +0000550 ) \
Denys Vlasenkod084cb92010-01-15 22:30:30 +0100551 "\n -R,-r Recurse" \
552 "\n -d,-P Preserve symlinks (default if -R)" \
553 "\n -L Follow all symlinks" \
554 "\n -H Follow symlinks on command line" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000555 "\n -p Preserve file attributes if possible" \
556 "\n -f Force overwrite" \
557 "\n -i Prompt before overwrite" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000558 "\n -l,-s Create (sym)links" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000559
Glenn L McGrath8f5b63e2001-06-22 09:22:06 +0000560#define cpio_trivial_usage \
Denys Vlasenko607f65d2010-01-09 20:23:03 +0100561 "[-dmvu] [-F FILE]" IF_FEATURE_CPIO_O(" [-H newc]") \
562 " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000563#define cpio_full_usage "\n\n" \
Denis Vlasenko261f2372008-04-05 00:07:46 +0000564 "Extract or list files from a cpio archive" \
Denys Vlasenko93ac7d82010-01-09 19:56:15 +0100565 IF_FEATURE_CPIO_O(", or" \
566 "\ncreate an archive" IF_FEATURE_CPIO_P(" (-o) or copy files (-p)") \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100567 " using file list on stdin" \
Denys Vlasenko93ac7d82010-01-09 19:56:15 +0100568 ) \
569 "\n" \
Denis Vlasenko83518d12009-03-20 22:17:13 +0000570 "\nMain operation mode:" \
571 "\n -t List" \
572 "\n -i Extract" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000573 IF_FEATURE_CPIO_O( \
Denys Vlasenko607f65d2010-01-09 20:23:03 +0100574 "\n -o Create (requires -H newc)" \
Denis Vlasenko261f2372008-04-05 00:07:46 +0000575 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000576 IF_FEATURE_CPIO_P( \
Denys Vlasenko93ac7d82010-01-09 19:56:15 +0100577 "\n -p DIR Copy files to DIR" \
Denis Vlasenko83518d12009-03-20 22:17:13 +0000578 ) \
579 "\nOptions:" \
580 "\n -d Make leading directories" \
581 "\n -m Preserve mtime" \
582 "\n -v Verbose" \
583 "\n -u Overwrite" \
Denys Vlasenko607f65d2010-01-09 20:23:03 +0100584 "\n -F FILE Input (-t,-i,-p) or output (-o) file" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000585 IF_FEATURE_CPIO_O( \
Denys Vlasenko607f65d2010-01-09 20:23:03 +0100586 "\n -H newc Archive format" \
Denis Vlasenko83518d12009-03-20 22:17:13 +0000587 ) \
Tim Riker7b253f82003-12-28 05:02:40 +0000588
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000589#define crond_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000590 "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000591#define crond_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000592 " -f Foreground" \
593 "\n -b Background (default)" \
594 "\n -S Log to syslog (default)" \
595 "\n -l Set log level. 0 is the most verbose, default 8" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000596 IF_FEATURE_CROND_D( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000597 "\n -d Set log level, log to stderr" \
Denis Vlasenko4e6c8122008-03-12 22:10:25 +0000598 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +0000599 "\n -L Log to file" \
600 "\n -c Working dir" \
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000601
602#define crontab_trivial_usage \
Denis Vlasenko069e3472008-02-16 13:17:13 +0000603 "[-c DIR] [-u USER] [-ler]|[FILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000604#define crontab_full_usage "\n\n" \
Denis Vlasenko069e3472008-02-16 13:17:13 +0000605 " -c Crontab directory" \
606 "\n -u User" \
607 "\n -l List crontab" \
608 "\n -e Edit crontab" \
609 "\n -r Delete crontab" \
610 "\n FILE Replace crontab by FILE ('-': stdin)" \
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000611
Denis Vlasenko2211d522008-11-10 18:52:35 +0000612#define cryptpw_trivial_usage \
Denis Vlasenkoe45930e2008-12-04 12:05:26 +0000613 "[OPTIONS] [PASSWORD] [SALT]"
614/* We do support -s, we just don't mention it */
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000615#define cryptpw_full_usage "\n\n" \
Denis Vlasenkoe45930e2008-12-04 12:05:26 +0000616 "Crypt the PASSWORD using crypt(3)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000617 "\nOptions:" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +0200618 IF_LONG_OPTS( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +0100619 "\n -P,--password-fd=N Read password from fd N" \
Denis Vlasenkoe45930e2008-12-04 12:05:26 +0000620/* "\n -s,--stdin Use stdin; like -P0" */ \
621 "\n -m,--method=TYPE Encryption method TYPE" \
622 "\n -S,--salt=SALT" \
623 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +0200624 IF_NOT_LONG_OPTS( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +0100625 "\n -P N Read password from fd N" \
Denis Vlasenkoe45930e2008-12-04 12:05:26 +0000626/* "\n -s Use stdin; like -P0" */ \
627 "\n -m TYPE Encryption method TYPE" \
628 "\n -S SALT" \
629 ) \
630
631/* mkpasswd is an alias to cryptpw */
632
633#define mkpasswd_trivial_usage \
634 "[OPTIONS] [PASSWORD] [SALT]"
635/* We do support -s, we just don't mention it */
636#define mkpasswd_full_usage "\n\n" \
637 "Crypt the PASSWORD using crypt(3)\n" \
638 "\nOptions:" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +0200639 IF_LONG_OPTS( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +0100640 "\n -P,--password-fd=N Read password from fd N" \
Denis Vlasenkoe45930e2008-12-04 12:05:26 +0000641/* "\n -s,--stdin Use stdin; like -P0" */ \
642 "\n -m,--method=TYPE Encryption method TYPE" \
643 "\n -S,--salt=SALT" \
644 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +0200645 IF_NOT_LONG_OPTS( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +0100646 "\n -P N Read password from fd N" \
Denis Vlasenkoe45930e2008-12-04 12:05:26 +0000647/* "\n -s Use stdin; like -P0" */ \
648 "\n -m TYPE Encryption method TYPE" \
649 "\n -S SALT" \
650 ) \
Eric Andersenf6f7bfb2002-10-22 12:24:59 +0000651
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000652#define cttyhack_trivial_usage NOUSAGE_STR
653#define cttyhack_full_usage ""
654
Eric Andersen7e9276b2001-02-22 01:15:47 +0000655#define cut_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200656 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000657#define cut_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100658 "Print selected fields from each input FILE to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000659 "\nOptions:" \
660 "\n -b LIST Output only bytes from LIST" \
661 "\n -c LIST Output only characters from LIST" \
662 "\n -d CHAR Use CHAR instead of tab as the field delimiter" \
663 "\n -s Output only the lines containing delimiter" \
664 "\n -f N Print only these fields" \
665 "\n -n Ignored" \
666
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000667#define cut_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000668 "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
669 "Hello\n" \
670 "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
671 "world\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000672
Eric Andersen7e9276b2001-02-22 01:15:47 +0000673#define date_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200674 "[OPTIONS] [+FMT] [TIME]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000675#define date_full_usage "\n\n" \
Denis Vlasenko9ce4ae82008-03-25 02:43:34 +0000676 "Display time (using +FMT), or set time\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000677 "\nOptions:" \
Bernhard Reutner-Fischerca22cda2009-10-23 15:44:51 +0200678 IF_NOT_LONG_OPTS( \
Denys Vlasenko38dd8aa2009-07-18 04:49:20 +0200679 "\n [-s] TIME Set time to TIME" \
Denis Vlasenko9ce4ae82008-03-25 02:43:34 +0000680 "\n -u Work in UTC (don't convert to local time)" \
Bernhard Reutner-Fischerca22cda2009-10-23 15:44:51 +0200681 "\n -R Output RFC-2822 compliant date string" \
682 ) IF_LONG_OPTS( \
683 "\n [-s,--set] TIME Set time to TIME" \
Denys Vlasenko50be9632009-10-23 16:25:20 +0200684 "\n -u,--utc Work in UTC (don't convert to local time)" \
685 "\n -R,--rfc-2822 Output RFC-2822 compliant date string" \
Bernhard Reutner-Fischerca22cda2009-10-23 15:44:51 +0200686 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000687 IF_FEATURE_DATE_ISOFMT( \
Denis Vlasenko9ce4ae82008-03-25 02:43:34 +0000688 "\n -I[SPEC] Output ISO-8601 compliant date string" \
689 "\n SPEC='date' (default) for date only," \
Denis Vlasenko397de612008-03-17 08:55:44 +0000690 "\n 'hours', 'minutes', or 'seconds' for date and" \
691 "\n time to the indicated precision" \
Bernhard Reutner-Fischerca22cda2009-10-23 15:44:51 +0200692 ) IF_NOT_LONG_OPTS( \
Denis Vlasenko9ce4ae82008-03-25 02:43:34 +0000693 "\n -r FILE Display last modification time of FILE" \
Denys Vlasenko38dd8aa2009-07-18 04:49:20 +0200694 "\n -d TIME Display TIME, not 'now'" \
Bernhard Reutner-Fischerca22cda2009-10-23 15:44:51 +0200695 ) IF_LONG_OPTS( \
Denys Vlasenko50be9632009-10-23 16:25:20 +0200696 "\n -r,--reference FILE Display last modification time of FILE" \
697 "\n -d,--date TIME Display TIME, not 'now'" \
Bernhard Reutner-Fischerca22cda2009-10-23 15:44:51 +0200698 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000699 IF_FEATURE_DATE_ISOFMT( \
Denys Vlasenko38dd8aa2009-07-18 04:49:20 +0200700 "\n -D FMT Use FMT for -d TIME conversion" \
Denis Vlasenko9ce4ae82008-03-25 02:43:34 +0000701 ) \
702 "\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +0200703 "\nRecognized TIME formats:" \
Denis Vlasenko4d89a8b2008-04-25 02:14:07 +0000704 "\n hh:mm[:ss]" \
Denis Vlasenkofa076d42008-03-25 02:49:11 +0000705 "\n [YYYY.]MM.DD-hh:mm[:ss]" \
Denis Vlasenko4d89a8b2008-04-25 02:14:07 +0000706 "\n YYYY-MM-DD hh:mm[:ss]" \
Denys Vlasenko38dd8aa2009-07-18 04:49:20 +0200707 "\n [[[[[YY]YY]MM]DD]hh]mm[.ss]" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000708
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000709#define date_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000710 "$ date\n" \
711 "Wed Apr 12 18:52:41 MDT 2000\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000712
Eric Andersen7e9276b2001-02-22 01:15:47 +0000713#define dc_trivial_usage \
Denis Vlasenkof430cdb2007-11-15 07:02:55 +0000714 "expression..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000715#define dc_full_usage "\n\n" \
Denis Vlasenko68e5e2b2008-03-25 03:17:04 +0000716 "Tiny RPN calculator. Operations:\n" \
717 "+, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not, eor,\n" \
718 "p - print top of the stack (without altering the stack),\n" \
719 "f - print entire stack, o - pop the value and set output radix\n" \
720 "(value must be 10 or 16).\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +0100721 "Examples: 'dc 2 2 add' -> 4, 'dc 8 8 * 2 2 + /' -> 16\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000722
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000723#define dc_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000724 "$ dc 2 2 + p\n" \
725 "4\n" \
726 "$ dc 8 8 \\* 2 2 + / p\n" \
727 "16\n" \
728 "$ dc 0 1 and p\n" \
729 "0\n" \
730 "$ dc 0 1 or p\n" \
731 "1\n" \
732 "$ echo 72 9 div 8 mul p | dc\n" \
733 "64\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000734
Eric Andersen7e9276b2001-02-22 01:15:47 +0000735#define dd_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000736 "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
737 " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000738#define dd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000739 "Copy a file with converting and formatting\n" \
740 "\nOptions:" \
741 "\n if=FILE Read from FILE instead of stdin" \
742 "\n of=FILE Write to FILE instead of stdout" \
743 "\n bs=N Read and write N bytes at a time" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000744 IF_FEATURE_DD_IBS_OBS( \
Denis Vlasenko643dcf02008-04-07 21:11:23 +0000745 "\n ibs=N Read N bytes at a time" \
746 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000747 IF_FEATURE_DD_IBS_OBS( \
Denis Vlasenko643dcf02008-04-07 21:11:23 +0000748 "\n obs=N Write N bytes at a time" \
749 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +0000750 "\n count=N Copy only N input blocks" \
751 "\n skip=N Skip N input blocks" \
752 "\n seek=N Skip N output blocks" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000753 IF_FEATURE_DD_IBS_OBS( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000754 "\n conv=notrunc Don't truncate output file" \
755 "\n conv=noerror Continue after read errors" \
Denis Vlasenko643dcf02008-04-07 21:11:23 +0000756 "\n conv=sync Pad blocks with zeros" \
757 "\n conv=fsync Physically write data out before finishing" \
758 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +0000759 "\n" \
760 "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," \
761 "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" \
762
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000763#define dd_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000764 "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
765 "4+0 records in\n" \
766 "4+0 records out\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000767
Eric Andersen7e9276b2001-02-22 01:15:47 +0000768#define deallocvt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000769 "[N]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000770#define deallocvt_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000771 "Deallocate unused virtual terminal /dev/ttyN"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000772
Eric Andersenf349e972001-08-21 16:18:59 +0000773#define delgroup_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000774 IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000775#define delgroup_full_usage "\n\n" \
Denis Vlasenkobe1a9d42007-04-15 08:43:23 +0000776 "Delete group GROUP from the system" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000777 IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
Eric Andersenf349e972001-08-21 16:18:59 +0000778
779#define deluser_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000780 "USER"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000781#define deluser_full_usage "\n\n" \
Denis Vlasenkoa80d0e42008-06-22 20:14:00 +0000782 "Delete USER from the system"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000783
Denis Vlasenkoa80d0e42008-06-22 20:14:00 +0000784#define depmod_trivial_usage NOUSAGE_STR
785#define depmod_full_usage ""
Bernhard Reutner-Fischer55e547e2008-05-26 12:01:49 +0000786
Denis Vlasenkoc94fa562008-10-26 11:08:14 +0000787#define devmem_trivial_usage \
788 "ADDRESS [WIDTH [VALUE]]"
789
790#define devmem_full_usage "\n\n" \
791 "Read/write from physical address\n" \
792 "\n ADDRESS Address to act upon" \
793 "\n WIDTH Width (8/16/...)" \
794 "\n VALUE Data to be written" \
795
Glenn L McGrath17d21fa2003-10-09 11:46:23 +0000796#define devfsd_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000797 "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000798#define devfsd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000799 "Manage devfs permissions and old device name symlinks\n" \
800 "\nOptions:" \
801 "\n mntpnt The mount point where devfs is mounted" \
802 "\n -v Print the protocol version numbers for devfsd" \
803 "\n and the kernel-side protocol version and exit" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000804 IF_DEVFSD_FG_NP( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000805 "\n -fg Run in foreground" \
806 "\n -np Exit after parsing the configuration file" \
807 "\n and processing synthetic REGISTER events," \
Denys Vlasenko07697852009-10-06 21:11:37 +0200808 "\n don't poll for events" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000809 )
Glenn L McGrath17d21fa2003-10-09 11:46:23 +0000810
Eric Andersen7e9276b2001-02-22 01:15:47 +0000811#define df_trivial_usage \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000812 "[-Pk" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000813 IF_FEATURE_HUMAN_READABLE("mh") \
814 IF_FEATURE_DF_FANCY("ai] [-B SIZE") \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100815 "] [FILESYSTEM]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000816#define df_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000817 "Print filesystem usage statistics\n" \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000818 "\nOptions:" \
819 "\n -P POSIX output format" \
820 "\n -k 1024-byte blocks (default)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000821 IF_FEATURE_HUMAN_READABLE( \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000822 "\n -m 1M-byte blocks" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000823 "\n -h Human readable (e.g. 1K 243M 2G)" \
Denis Vlasenkof430cdb2007-11-15 07:02:55 +0000824 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000825 IF_FEATURE_DF_FANCY( \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000826 "\n -a Show all filesystems" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000827 "\n -i Inodes" \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000828 "\n -B SIZE Blocksize" \
829 ) \
830
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000831#define df_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000832 "$ df\n" \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000833 "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000834 "/dev/sda3 8690864 8553540 137324 98% /\n" \
835 "/dev/sda1 64216 36364 27852 57% /boot\n" \
836 "$ df /dev/sda3\n" \
Denis Vlasenkod66aa3c2008-08-28 22:42:52 +0000837 "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
838 "/dev/sda3 8690864 8553540 137324 98% /\n" \
839 "$ POSIXLY_CORRECT=sure df /dev/sda3\n" \
840 "Filesystem 512B-blocks Used Available Use% Mounted on\n" \
841 "/dev/sda3 17381728 17107080 274648 98% /\n" \
842 "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" \
843 "Filesystem 512-blocks Used Available Capacity Mounted on\n" \
844 "/dev/sda3 17381728 17107080 274648 98% /\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000845
Denis Vlasenko736230e2006-11-20 19:40:36 +0000846#define dhcprelay_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100847 "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000848#define dhcprelay_full_usage "\n\n" \
Denis Vlasenkoe8a79682009-04-13 03:33:46 +0000849 "Relay DHCP requests between clients and server" \
Denis Vlasenko736230e2006-11-20 19:40:36 +0000850
Bernhard Reutner-Fischer8f7d3892006-04-06 08:11:08 +0000851#define diff_trivial_usage \
Matheus Izvekovfe1ce2e2010-01-18 16:07:07 -0200852 "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000853#define diff_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000854 "Compare files line by line and output the differences between them.\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000855 "This implementation supports unified diffs only.\n" \
856 "\nOptions:" \
857 "\n -a Treat all files as text" \
858 "\n -b Ignore changes in the amount of whitespace" \
Matheus Izvekovfe1ce2e2010-01-18 16:07:07 -0200859 "\n -B Ignore changes whose lines are all blank" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000860 "\n -d Try hard to find a smaller set of changes" \
861 "\n -i Ignore case differences" \
862 "\n -L Use LABEL instead of the filename in the unified header" \
863 "\n -N Treat absent files as empty" \
864 "\n -q Output only whether files differ" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +0100865 "\n -r Recurse" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000866 "\n -S Start with FILE when comparing directories" \
867 "\n -T Make tabs line up by prefixing a tab when necessary" \
868 "\n -s Report when two files are the same" \
869 "\n -t Expand tabs to spaces in output" \
870 "\n -U Output LINES lines of context" \
871 "\n -w Ignore all whitespace" \
Bernhard Reutner-Fischer8f7d3892006-04-06 08:11:08 +0000872
Eric Andersen7e9276b2001-02-22 01:15:47 +0000873#define dirname_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000874 "FILENAME"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000875#define dirname_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000876 "Strip non-directory suffix from FILENAME"
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000877#define dirname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000878 "$ dirname /tmp/foo\n" \
879 "/tmp\n" \
880 "$ dirname /tmp/foo/\n" \
881 "/tmp\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000882
Eric Andersen7e9276b2001-02-22 01:15:47 +0000883#define dmesg_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000884 "[-c] [-n LEVEL] [-s SIZE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000885#define dmesg_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000886 "Print or control the kernel ring buffer\n" \
887 "\nOptions:" \
888 "\n -c Clear ring buffer after printing" \
889 "\n -n LEVEL Set console logging level" \
890 "\n -s SIZE Buffer size" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000891
"Vladimir N. Oleynik"7b4aa6f2006-01-25 14:19:11 +0000892#define dnsd_trivial_usage \
Denys Vlasenko343dfd72010-02-07 02:45:03 +0100893 "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000894#define dnsd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000895 "Small static DNS server daemon\n" \
896 "\nOptions:" \
Denys Vlasenkob55d6522010-02-06 23:44:59 +0100897 "\n -c FILE Config file" \
898 "\n -t SEC TTL" \
899 "\n -p PORT Listen on PORT" \
900 "\n -i ADDR Listen on ADDR" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000901 "\n -d Daemonize" \
Denys Vlasenko343dfd72010-02-07 02:45:03 +0100902 "\n -v Verbose" \
903 "\n -s Send successful replies only. Use this if you want" \
904 "\n to use /etc/resolv.conf with two nameserver lines:" \
905 "\n nameserver DNSD_SERVER" \
906 "\n nameserver NORNAL_DNS_SERVER" \
"Vladimir N. Oleynik"7b4aa6f2006-01-25 14:19:11 +0000907
Eric Andersen7e9276b2001-02-22 01:15:47 +0000908#define dos2unix_trivial_usage \
Denys Vlasenko17c838b2009-10-24 17:11:55 +0200909 "[OPTIONS] [FILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000910#define dos2unix_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200911 "Convert FILE in-place from DOS to Unix format.\n" \
912 "When no file is given, use stdin/stdout.\n" \
913 "\nOptions:" \
914 "\n -u dos2unix" \
915 "\n -d unix2dos" \
916
917#define unix2dos_trivial_usage \
Denys Vlasenko17c838b2009-10-24 17:11:55 +0200918 "[OPTIONS] [FILE]"
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +0200919#define unix2dos_full_usage "\n\n" \
920 "Convert FILE in-place from Unix to DOS format.\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +0000921 "When no file is given, use stdin/stdout.\n" \
Denis Vlasenkoafc41132008-03-17 08:44:58 +0000922 "\nOptions:" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +0000923 "\n -u dos2unix" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000924 "\n -d unix2dos" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000925
Eric Andersen7e9276b2001-02-22 01:15:47 +0000926#define dpkg_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +0100927 "[-ilCPru] [-F OPT] PACKAGE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000928#define dpkg_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000929 "Install, remove and manage Debian packages\n" \
930 "\nOptions:" \
Kim B. Heino3d43aed2010-03-29 14:18:27 +0200931 IF_LONG_OPTS( \
932 "\n -i,--install Install the package" \
933 "\n -l,--list List of installed packages" \
934 "\n --configure Configure an unpackaged package" \
935 "\n -P,--purge Purge all files of a package" \
936 "\n -r,--remove Remove all but the configuration files for a package" \
937 "\n --unpack Unpack a package, but don't configure it" \
938 "\n --force-depends Ignore dependency problems" \
939 "\n --force-confnew Overwrite existing config files when installing" \
940 "\n --force-confold Keep old config files when installing" \
941 ) \
942 IF_NOT_LONG_OPTS( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000943 "\n -i Install the package" \
944 "\n -l List of installed packages" \
945 "\n -C Configure an unpackaged package" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000946 "\n -P Purge all files of a package" \
947 "\n -r Remove all but the configuration files for a package" \
948 "\n -u Unpack a package, but don't configure it" \
Kim B. Heino3d43aed2010-03-29 14:18:27 +0200949 "\n -F depends Ignore dependency problems" \
950 "\n -F confnew Overwrite existing config files when installing" \
951 "\n -F confold Keep old config files when installing" \
952 )
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000953
Eric Andersen7e9276b2001-02-22 01:15:47 +0000954#define dpkg_deb_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000955 "[-cefxX] FILE [argument]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000956#define dpkg_deb_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000957 "Perform actions on Debian packages (.debs)\n" \
958 "\nOptions:" \
959 "\n -c List contents of filesystem tree" \
960 "\n -e Extract control files to [argument] directory" \
961 "\n -f Display control field name starting with [argument]" \
962 "\n -x Extract packages filesystem tree to directory" \
963 "\n -X Verbose extract" \
964
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000965#define dpkg_deb_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000966 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000967
Eric Andersen7e9276b2001-02-22 01:15:47 +0000968#define du_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000969 "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +0000970#define du_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +0000971 "Summarize disk space used for each FILE and/or directory.\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000972 "Disk space is printed in units of " \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000973 IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
974 IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
Denis Vlasenko397de612008-03-17 08:55:44 +0000975 " bytes.\n" \
976 "\nOptions:" \
977 "\n -a Show file sizes too" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000978 "\n -L Follow all symlinks" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +0100979 "\n -H Follow symlinks on command line" \
Denis Vlasenko397de612008-03-17 08:55:44 +0000980 "\n -d N Limit output to directories (and files with -a) of depth < N" \
981 "\n -c Show grand total" \
982 "\n -l Count sizes many times if hard linked" \
983 "\n -s Display only a total for each argument" \
984 "\n -x Skip directories on different filesystems" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000985 IF_FEATURE_HUMAN_READABLE( \
Denis Vlasenko397de612008-03-17 08:55:44 +0000986 "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
987 "\n -m Sizes in megabytes" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +0000988 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +0000989 "\n -k Sizes in kilobytes" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +0000990 IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
Denis Vlasenko397de612008-03-17 08:55:44 +0000991
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000992#define du_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +0000993 "$ du\n" \
994 "16 ./CVS\n" \
995 "12 ./kernel-patches/CVS\n" \
996 "80 ./kernel-patches\n" \
997 "12 ./tests/CVS\n" \
998 "36 ./tests\n" \
999 "12 ./scripts/CVS\n" \
1000 "16 ./scripts\n" \
1001 "12 ./docs/CVS\n" \
1002 "104 ./docs\n" \
1003 "2417 .\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001004
Eric Andersen7e9276b2001-02-22 01:15:47 +00001005#define dumpkmap_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001006 "> keymap"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001007#define dumpkmap_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001008 "Print a binary keyboard translation table to stdout"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001009#define dumpkmap_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001010 "$ dumpkmap > keymap\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001011
Russ Dill61fb4892002-10-14 21:41:28 +00001012#define dumpleases_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001013 "[-r|-a] [-f LEASEFILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001014#define dumpleases_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001015 "Display DHCP leases granted by udhcpd\n" \
1016 "\nOptions:" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02001017 IF_LONG_OPTS( \
Denys Vlasenkoc8a2ab12010-03-28 00:02:20 +01001018 "\n -f,--file=FILE Lease file" \
1019 "\n -r,--remaining Show remaining time" \
1020 "\n -a,--absolute Show expiration time" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001021 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02001022 IF_NOT_LONG_OPTS( \
Denys Vlasenkoc8a2ab12010-03-28 00:02:20 +01001023 "\n -f FILE Lease file" \
1024 "\n -r Show remaining time" \
1025 "\n -a Show expiration time" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001026 )
Russ Dill61fb4892002-10-14 21:41:28 +00001027
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01001028/*
Mike Frysinger51a43b42005-09-24 07:11:16 +00001029#define e2fsck_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001030 "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
1031 "[-I inode_buffer_blocks] [-P process_inode_size] " \
1032 "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
1033 "[-E extended-options] device"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001034#define e2fsck_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001035 "Check ext2/ext3 file system\n" \
1036 "\nOptions:" \
1037 "\n -p Automatic repair (no questions)" \
1038 "\n -n Make no changes to the filesystem" \
1039 "\n -y Assume 'yes' to all questions" \
1040 "\n -c Check for bad blocks and add them to the badblock list" \
1041 "\n -f Force checking even if filesystem is marked clean" \
1042 "\n -v Verbose" \
1043 "\n -b superblock Use alternative superblock" \
1044 "\n -B blocksize Force blocksize when looking for superblock" \
1045 "\n -j journal Set location of the external journal" \
1046 "\n -l file Add to badblocks list" \
1047 "\n -L file Set badblocks list" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01001048*/
Mike Frysinger51a43b42005-09-24 07:11:16 +00001049
Eric Andersen7e9276b2001-02-22 01:15:47 +00001050#define echo_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001051 IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001052#define echo_full_usage "\n\n" \
Denis Vlasenko765996a2006-12-24 16:59:27 +00001053 "Print the specified ARGs to stdout" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001054 IF_FEATURE_FANCY_ECHO( "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001055 "\nOptions:" \
1056 "\n -n Suppress trailing newline" \
Denys Vlasenkoc8a2ab12010-03-28 00:02:20 +01001057 "\n -e Interpret backslash escapes (i.e., \\t=tab)" \
1058 "\n -E Don't interpret backslash escapes (default)" \
Rob Landley5fe8d5b2006-04-25 22:40:53 +00001059 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001060#define echo_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001061 "$ echo \"Erik is cool\"\n" \
1062 "Erik is cool\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001063 IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001064 "Erik\n" \
1065 "is\n" \
1066 "cool\n" \
1067 "$ echo \"Erik\\nis\\ncool\"\n" \
1068 "Erik\\nis\\ncool\n")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001069
Mike Frysinger55e2cf62005-05-11 00:25:47 +00001070#define eject_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001071 "[-t] [-T] [DEVICE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001072#define eject_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001073 "Eject DEVICE or default /dev/cdrom\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001074 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001075 IF_FEATURE_EJECT_SCSI( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001076 "\n -s SCSI device" \
1077 ) \
1078 "\n -t Close tray" \
1079 "\n -T Open/close tray (toggle)" \
Mike Frysinger55e2cf62005-05-11 00:25:47 +00001080
Rob Landley3b890392006-05-04 20:56:43 +00001081#define ed_trivial_usage ""
1082#define ed_full_usage ""
1083
Eric Andersen84e229c2001-03-29 22:48:33 +00001084#define env_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001085 "[-iu] [-] [name=value]... [PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001086#define env_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001087 "Print the current environment or run PROG after setting up\n" \
1088 "the specified environment\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001089 "\nOptions:" \
1090 "\n -, -i Start with an empty environment" \
1091 "\n -u Remove variable from the environment" \
Eric Andersen84e229c2001-03-29 22:48:33 +00001092
Mike Frysingerb662f0d2005-05-11 03:59:53 +00001093#define ether_wake_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001094 "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001095#define ether_wake_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001096 "Send a magic packet to wake up sleeping machines.\n" \
1097 "MAC must be a station address (00:11:22:33:44:55) or\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001098 "a hostname with a known 'ethers' entry.\n" \
1099 "\nOptions:" \
1100 "\n -b Send wake-up packet to the broadcast address" \
1101 "\n -i iface Interface to use (default eth0)" \
1102 "\n -p pass Append four or six byte password PW to the packet" \
Mike Frysingerb662f0d2005-05-11 03:59:53 +00001103
Denis Vlasenko3952f202007-08-13 14:10:24 +00001104#define expand_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01001105 "[-i] [-t N] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001106#define expand_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001107 "Convert tabs to spaces, writing to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001108 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001109 IF_FEATURE_EXPAND_LONG_OPTIONS( \
Denys Vlasenko07697852009-10-06 21:11:37 +02001110 "\n -i,--initial Don't convert tabs after non blanks" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001111 "\n -t,--tabs=N Tabstops every N chars" \
Denis Vlasenko99014e82007-10-20 14:54:58 +00001112 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001113 IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( \
Denys Vlasenko07697852009-10-06 21:11:37 +02001114 "\n -i Don't convert tabs after non blanks" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001115 "\n -t Tabstops every N chars" \
Denis Vlasenko99014e82007-10-20 14:54:58 +00001116 )
Denis Vlasenko3952f202007-08-13 14:10:24 +00001117
Eric Andersen7e9276b2001-02-22 01:15:47 +00001118#define expr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001119 "EXPRESSION"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001120#define expr_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001121 "Print the value of EXPRESSION to stdout\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02001122 "\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001123 "EXPRESSION may be:\n" \
Denis Vlasenkof9566d82007-10-11 10:07:24 +00001124 " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
1125 " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
1126 " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \
1127 " ARG1 <= ARG2\n" \
1128 " ARG1 = ARG2\n" \
1129 " ARG1 != ARG2\n" \
1130 " ARG1 >= ARG2\n" \
1131 " ARG1 > ARG2\n" \
1132 " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \
1133 " ARG1 - ARG2\n" \
1134 " ARG1 * ARG2\n" \
1135 " ARG1 / ARG2\n" \
1136 " ARG1 % ARG2\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00001137 " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \
1138 " match STRING REGEXP Same as STRING : REGEXP\n" \
1139 " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \
1140 " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \
1141 " length STRING Length of STRING\n" \
1142 " quote TOKEN Interpret TOKEN as a string, even if\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00001143 " it is a keyword like 'match' or an\n" \
1144 " operator like '/'\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001145 " (EXPRESSION) Value of EXPRESSION\n" \
1146 "\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001147 "Beware that many operators need to be escaped or quoted for shells.\n" \
1148 "Comparisons are arithmetic if both ARGs are numbers, else\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00001149 "lexicographical. Pattern matches return the string matched between\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001150 "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
1151 "of characters matched or 0."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001152
Mike Frysingerfa69f112005-04-17 07:24:19 +00001153#define fakeidentd_trivial_usage \
Denis Vlasenko7a431b32007-01-14 01:29:06 +00001154 "[-fiw] [-b ADDR] [STRING]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001155#define fakeidentd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001156 "Provide fake ident (auth) service\n" \
1157 "\nOptions:" \
1158 "\n -f Run in foreground" \
1159 "\n -i Inetd mode" \
1160 "\n -w Inetd 'wait' mode" \
1161 "\n -b ADDR Bind to specified address" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02001162 "\n STRING Ident answer string (default: nobody)" \
Mike Frysingerfa69f112005-04-17 07:24:19 +00001163
Eric Andersen7e9276b2001-02-22 01:15:47 +00001164#define false_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001165 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001166#define false_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00001167 "Return an exit code of FALSE (1)"
Denis Vlasenko85c24712008-03-17 09:04:04 +00001168
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001169#define false_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001170 "$ false\n" \
1171 "$ echo $?\n" \
1172 "1\n"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001173
Denys Vlasenkoff027d62010-05-04 15:45:25 +02001174#define fbsplash_trivial_usage \
1175 "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]"
1176#define fbsplash_full_usage "\n\n" \
1177 "Options:" \
1178 "\n -s Image" \
1179 "\n -c Hide cursor" \
1180 "\n -d Framebuffer device (default /dev/fb0)" \
1181 "\n -i Config file (var=value):" \
1182 "\n BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT" \
1183 "\n BAR_R,BAR_G,BAR_B" \
1184 "\n -f Control pipe (else exit after drawing image)" \
1185 "\n commands: 'NN' (% for progress bar) or 'exit'" \
1186
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001187#define fbset_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001188 "[OPTIONS] [MODE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001189#define fbset_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001190 "Show and modify frame buffer settings"
Denis Vlasenko397de612008-03-17 08:55:44 +00001191
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001192#define fbset_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001193 "$ fbset\n" \
1194 "mode \"1024x768-76\"\n" \
1195 " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
1196 " geometry 1024 768 1024 768 16\n" \
1197 " timings 12714 128 32 16 4 128 4\n" \
1198 " accel false\n" \
1199 " rgba 5/11,6/5,5/0,0/0\n" \
1200 "endmode\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001201
Eric Andersen7e9276b2001-02-22 01:15:47 +00001202#define fdflush_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001203 "DEVICE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001204#define fdflush_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00001205 "Force floppy disk drive to detect disk change"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001206
Eric Andersen01c3d402003-07-05 07:51:31 +00001207#define fdformat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001208 "[-n] DEVICE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001209#define fdformat_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001210 "Format floppy disk\n" \
1211 "\nOptions:" \
1212 "\n -n Don't verify after format" \
Eric Andersen01c3d402003-07-05 07:51:31 +00001213
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001214/* Looks like someone forgot to add this to config system */
1215#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
1216# define ENABLE_FEATURE_FDISK_BLKSIZE 0
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001217# define IF_FEATURE_FDISK_BLKSIZE(a)
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001218#endif
1219
Glenn L McGrath441e7ef2002-11-26 22:00:21 +00001220#define fdisk_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001221 "[-ul" IF_FEATURE_FDISK_BLKSIZE("s") "] " \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001222 "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001223#define fdisk_full_usage "\n\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001224 "Change partition table\n" \
Denis Vlasenkoafc41132008-03-17 08:44:58 +00001225 "\nOptions:" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001226 "\n -u Start and End are in sectors (instead of cylinders)" \
1227 "\n -l Show partition table for each DISK, then exit" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001228 IF_FEATURE_FDISK_BLKSIZE( \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001229 "\n -s Show partition sizes in kb for each DISK, then exit" \
1230 ) \
1231 "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \
1232 "\n -C CYLINDERS Set number of cylinders/heads/sectors" \
Denys Vlasenko37bc1eb2010-04-06 00:04:08 +02001233 "\n -H HEADS" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001234 "\n -S SECTORS" \
Glenn L McGrath441e7ef2002-11-26 22:00:21 +00001235
Denis Vlasenko1e19afd2008-10-12 11:20:08 +00001236#define blkid_trivial_usage \
1237 ""
1238#define blkid_full_usage "\n\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02001239 "Print UUIDs of all filesystems"
Denis Vlasenko1e19afd2008-10-12 11:20:08 +00001240
Denis Vlasenkode7684a2008-02-18 21:08:49 +00001241#define findfs_trivial_usage \
1242 "LABEL=label or UUID=uuid"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001243#define findfs_full_usage "\n\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02001244 "Find a filesystem device based on a label or UUID"
Denis Vlasenkode7684a2008-02-18 21:08:49 +00001245#define findfs_example_usage \
1246 "$ findfs LABEL=MyDevice"
1247
Eric Andersen7e9276b2001-02-22 01:15:47 +00001248#define find_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001249 "[PATH]... [EXPRESSION]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001250#define find_full_usage "\n\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00001251 "Search for files. The default PATH is the current directory,\n" \
1252 "default EXPRESSION is '-print'\n" \
Denis Vlasenkod786cc52007-06-15 21:17:21 +00001253 "\nEXPRESSION may consist of:" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01001254 "\n -follow Follow symlinks" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001255 IF_FEATURE_FIND_XDEV( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001256 "\n -xdev Don't descend directories on other filesystems") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001257 IF_FEATURE_FIND_MAXDEPTH( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001258 "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
1259 "\n tests/actions to command line arguments only") \
Denys Vlasenko07697852009-10-06 21:11:37 +02001260 "\n -mindepth N Don't act on first N levels" \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001261 "\n -name PATTERN File name (w/o directory name) matches PATTERN" \
Denis Vlasenko75aa6152007-12-09 10:07:39 +00001262 "\n -iname PATTERN Case insensitive -name" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001263 IF_FEATURE_FIND_PATH( \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001264 "\n -path PATTERN Path matches PATTERN") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001265 IF_FEATURE_FIND_REGEX( \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001266 "\n -regex PATTERN Path matches regex PATTERN") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001267 IF_FEATURE_FIND_TYPE( \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001268 "\n -type X File type is X (X is one of: f,d,l,b,c,...)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001269 IF_FEATURE_FIND_PERM( \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001270 "\n -perm NNN Permissions match any of (+NNN), all of (-NNN)," \
Matheus Izvekovd0f601f2010-01-06 09:19:04 +01001271 "\n or exactly NNN") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001272 IF_FEATURE_FIND_MTIME( \
Denis Vlasenkod786cc52007-06-15 21:17:21 +00001273 "\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \
Matheus Izvekovd0f601f2010-01-06 09:19:04 +01001274 "\n or exactly N days") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001275 IF_FEATURE_FIND_MMIN( \
Denis Vlasenkod786cc52007-06-15 21:17:21 +00001276 "\n -mmin MINS Modified time is greater than (+N), less than (-N)," \
Matheus Izvekovd0f601f2010-01-06 09:19:04 +01001277 "\n or exactly N minutes") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001278 IF_FEATURE_FIND_NEWER( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001279 "\n -newer FILE Modified time is more recent than FILE's") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001280 IF_FEATURE_FIND_INUM( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001281 "\n -inum N File has inode number N") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001282 IF_FEATURE_FIND_USER( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001283 "\n -user NAME File is owned by user NAME (numeric user ID allowed)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001284 IF_FEATURE_FIND_GROUP( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001285 "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001286 IF_FEATURE_FIND_DEPTH( \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001287 "\n -depth Process directory name after traversing it") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001288 IF_FEATURE_FIND_SIZE( \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001289 "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))" \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001290 "\n +/-N: file size is bigger/smaller than N") \
Matheus Izvekovd0f601f2010-01-06 09:19:04 +01001291 IF_FEATURE_FIND_LINKS( \
1292 "\n -links N Number of links is greater than (+N), less than (-N)," \
1293 "\n or exactly N") \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001294 "\n -print Print (default and assumed)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001295 IF_FEATURE_FIND_PRINT0( \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001296 "\n -print0 Delimit output with null characters rather than" \
1297 "\n newlines") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001298 IF_FEATURE_FIND_CONTEXT ( \
Denis Vlasenkoa19faf82007-06-19 22:22:57 +00001299 "\n -context File has specified security context") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001300 IF_FEATURE_FIND_EXEC( \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001301 "\n -exec CMD ARG ; Run CMD with all instances of {} replaced by the" \
Denis Vlasenko53a0e972007-06-16 00:30:52 +00001302 "\n matching files") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001303 IF_FEATURE_FIND_PRUNE( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001304 "\n -prune Stop traversing current subtree") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001305 IF_FEATURE_FIND_DELETE( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001306 "\n -delete Delete files, turns on -depth option") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001307 IF_FEATURE_FIND_PAREN( \
Denis Vlasenkob9411292007-06-15 23:43:11 +00001308 "\n (EXPR) Group an expression") \
Rob Landley5d3a0e82005-10-04 03:34:39 +00001309
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001310#define find_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001311 "$ find / -name passwd\n" \
1312 "/etc/passwd\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001313
Denys Vlasenkobf2af9a2009-05-25 04:15:37 +02001314#define flash_lock_trivial_usage \
1315 "MTD_DEVICE OFFSET SECTORS"
1316#define flash_lock_full_usage "\n\n" \
1317 "Lock part or all of an MTD device. If SECTORS is -1, then all sectors\n" \
1318 "will be locked, regardless of the value of OFFSET"
1319
1320#define flash_unlock_trivial_usage \
1321 "MTD_DEVICE"
1322#define flash_unlock_full_usage "\n\n" \
1323 "Unlock an MTD device"
1324
Bernhard Reutner-Fischer0d22d172009-02-18 13:23:46 +00001325#define flash_eraseall_trivial_usage \
1326 "[-jq] MTD_DEVICE"
1327#define flash_eraseall_full_usage "\n\n" \
1328 "Erase an MTD device\n" \
1329 "\nOptions:" \
Stefan Seyfriedd095fd42009-11-21 18:32:19 +01001330 "\n -j Format the device for jffs2" \
1331 "\n -q Don't display progress messages" \
1332
1333#define flashcp_trivial_usage \
1334 "-v FILE MTD_DEVICE"
1335#define flashcp_full_usage "\n\n" \
1336 "Copy an image to MTD device\n" \
1337 "\nOptions:" \
1338 "\n -v Verbose" \
Bernhard Reutner-Fischer0d22d172009-02-18 13:23:46 +00001339
Timo Teras892d4b62010-03-18 22:45:35 +01001340#define flock_trivial_usage \
Denys Vlasenkode9e7722010-03-20 00:07:11 +01001341 "[-sxun] FD|{FILE [-c] PROG ARGS}"
Timo Teras892d4b62010-03-18 22:45:35 +01001342#define flock_full_usage "\n\n" \
Denys Vlasenkode9e7722010-03-20 00:07:11 +01001343 "[Un]lock file descriptor, or lock FILE and run PROG\n" \
Timo Teras892d4b62010-03-18 22:45:35 +01001344 "\nOptions:" \
1345 "\n -s Shared lock" \
1346 "\n -x Exclusive lock (default)" \
Denys Vlasenkode9e7722010-03-20 00:07:11 +01001347 "\n -u Unlock FD" \
Timo Teras892d4b62010-03-18 22:45:35 +01001348 "\n -n Fail rather than wait" \
1349
Glenn L McGrathf01b8052003-04-27 06:02:14 +00001350#define fold_trivial_usage \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001351 "[-bs] [-w WIDTH] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001352#define fold_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001353 "Wrap input lines in each FILE (or stdin), writing to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001354 "\nOptions:" \
1355 "\n -b Count bytes rather than columns" \
1356 "\n -s Break at spaces" \
1357 "\n -w Use WIDTH columns instead of 80" \
Glenn L McGrathf01b8052003-04-27 06:02:14 +00001358
Eric Andersen7e9276b2001-02-22 01:15:47 +00001359#define free_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001360 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001361#define free_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00001362 "Display the amount of free and used system memory"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001363#define free_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001364 "$ free\n" \
1365 " total used free shared buffers\n" \
1366 " Mem: 257628 248724 8904 59644 93124\n" \
1367 " Swap: 128516 8404 120112\n" \
1368 "Total: 386144 257128 129016\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001369
Eric Andersen7e9276b2001-02-22 01:15:47 +00001370#define freeramdisk_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001371 "DEVICE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001372#define freeramdisk_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00001373 "Free all memory used by the specified ramdisk"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001374#define freeramdisk_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001375 "$ freeramdisk /dev/ram2\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001376
Mike Frysinger51a43b42005-09-24 07:11:16 +00001377#define fsck_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001378 "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001379#define fsck_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001380 "Check and repair filesystems\n" \
1381 "\nOptions:" \
1382 "\n -A Walk /etc/fstab and check all filesystems" \
1383 "\n -N Don't execute, just show what would be done" \
1384 "\n -P With -A, check filesystems in parallel" \
1385 "\n -R With -A, skip the root filesystem" \
1386 "\n -T Don't show title on startup" \
1387 "\n -V Verbose" \
1388 "\n -C n Write status information to specified filedescriptor" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001389 "\n -t TYPE List of filesystem types to check" \
Mike Frysinger51a43b42005-09-24 07:11:16 +00001390
Eric Andersen7e9276b2001-02-22 01:15:47 +00001391#define fsck_minix_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001392 "[-larvsmf] BLOCKDEV"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001393#define fsck_minix_full_usage "\n\n" \
Denis Vlasenko68e5e2b2008-03-25 03:17:04 +00001394 "Check MINIX filesystem\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001395 "\nOptions:" \
1396 "\n -l List all filenames" \
1397 "\n -r Perform interactive repairs" \
1398 "\n -a Perform automatic repairs" \
1399 "\n -v Verbose" \
Bernhard Reutner-Fischere1e51742008-07-21 13:33:22 +00001400 "\n -s Output superblock information" \
Denis Vlasenko68e5e2b2008-03-25 03:17:04 +00001401 "\n -m Show \"mode not cleared\" warnings" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001402 "\n -f Force file system check" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00001403
Denis Vlasenko16b4a2d2009-03-08 09:30:56 +00001404#define ftpd_trivial_usage \
Denis Vlasenko20c82162009-03-16 16:19:53 +00001405 "[-wvS] [-t N] [-T N] [DIR]"
Denis Vlasenko16b4a2d2009-03-08 09:30:56 +00001406#define ftpd_full_usage "\n\n" \
Denys Vlasenkoae357bd2009-09-11 23:29:45 +02001407 "Anonymous FTP server\n" \
Denis Vlasenko16b4a2d2009-03-08 09:30:56 +00001408 "\n" \
1409 "ftpd should be used as an inetd service.\n" \
1410 "ftpd's line for inetd.conf:\n" \
1411 " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" \
1412 "It also can be ran from tcpsvd:\n" \
1413 " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" \
1414 "\nOptions:" \
1415 "\n -w Allow upload" \
Denis Vlasenko4221e902009-03-11 15:07:44 +00001416 "\n -v Log to stderr" \
1417 "\n -S Log to syslog" \
Denis Vlasenko20c82162009-03-16 16:19:53 +00001418 "\n -t,-T Idle and absolute timeouts" \
Denis Vlasenko92576712009-03-09 16:25:33 +00001419 "\n DIR Change root to this directory" \
Denis Vlasenko16b4a2d2009-03-08 09:30:56 +00001420
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +00001421#define ftpget_trivial_usage \
Vladimir Dronnikov1dacfbb2009-10-23 23:34:43 +02001422 "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001423#define ftpget_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001424 "Retrieve a remote file via FTP\n" \
1425 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001426 IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001427 "\n -c,--continue Continue previous transfer" \
1428 "\n -v,--verbose Verbose" \
1429 "\n -u,--username Username" \
1430 "\n -p,--password Password" \
1431 "\n -P,--port Port number" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001432 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001433 IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001434 "\n -c Continue previous transfer" \
1435 "\n -v Verbose" \
1436 "\n -u Username" \
1437 "\n -p Password" \
1438 "\n -P Port number" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001439 )
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +00001440
1441#define ftpput_trivial_usage \
Vladimir Dronnikov1dacfbb2009-10-23 23:34:43 +02001442 "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001443#define ftpput_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001444 "Store a local file on a remote machine via FTP\n" \
1445 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001446 IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001447 "\n -v,--verbose Verbose" \
1448 "\n -u,--username Username" \
1449 "\n -p,--password Password" \
1450 "\n -P,--port Port number" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001451 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001452 IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001453 "\n -v Verbose" \
1454 "\n -u Username" \
1455 "\n -p Password" \
1456 "\n -P Port number" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001457 )
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +00001458
Rob Landleyaa872762005-10-28 13:05:12 +00001459#define fuser_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001460 "[OPTIONS] FILE or PORT/PROTO"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001461#define fuser_full_usage "\n\n" \
Denis Vlasenkoafc41132008-03-17 08:44:58 +00001462 "Find processes which use FILEs or PORTs\n" \
1463 "\nOptions:" \
1464 "\n -m Find processes which use same fs as FILEs" \
1465 "\n -4 Search only IPv4 space" \
1466 "\n -6 Search only IPv6 space" \
1467 "\n -s Silent: just exit with 0 if any processes are found" \
1468 "\n -k Kill found processes (otherwise display PIDs)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001469 "\n -SIGNAL Signal to send (default: TERM)" \
Mike Frysingerbf28ed82006-02-21 04:32:03 +00001470
Bernhard Reutner-Fischer62538802008-05-08 12:21:44 +00001471#define getenforce_trivial_usage NOUSAGE_STR
1472#define getenforce_full_usage ""
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00001473
Eric Andersen7e9276b2001-02-22 01:15:47 +00001474#define getopt_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001475 "[OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001476#define getopt_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02001477 "Options:" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02001478 IF_LONG_OPTS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001479 "\n -a,--alternative Allow long options starting with single -" \
1480 "\n -l,--longoptions=longopts Long options to be recognized" \
1481 "\n -n,--name=progname The name under which errors are reported" \
1482 "\n -o,--options=optstring Short options to be recognized" \
1483 "\n -q,--quiet Disable error reporting by getopt(3)" \
1484 "\n -Q,--quiet-output No normal output" \
1485 "\n -s,--shell=shell Set shell quoting conventions" \
1486 "\n -T,--test Test for getopt(1) version" \
1487 "\n -u,--unquoted Don't quote the output" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001488 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02001489 IF_NOT_LONG_OPTS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001490 "\n -a Allow long options starting with single -" \
1491 "\n -l longopts Long options to be recognized" \
1492 "\n -n progname The name under which errors are reported" \
1493 "\n -o optstring Short options to be recognized" \
1494 "\n -q Disable error reporting by getopt(3)" \
1495 "\n -Q No normal output" \
1496 "\n -s shell Set shell quoting conventions" \
1497 "\n -T Test for getopt(1) version" \
1498 "\n -u Don't quote the output" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00001499 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001500#define getopt_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001501 "$ cat getopt.test\n" \
1502 "#!/bin/sh\n" \
1503 "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
1504 " -n 'example.busybox' -- \"$@\"`\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001505 "if [ $? != 0 ]; then exit 1; fi\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001506 "eval set -- \"$GETOPT\"\n" \
Denis Vlasenkob71c6682007-07-21 15:08:09 +00001507 "while true; do\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001508 " case $1 in\n" \
Denis Vlasenkob71c6682007-07-21 15:08:09 +00001509 " -a|--a-long) echo \"Option a\"; shift;;\n" \
1510 " -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001511 " -c|--c-long)\n" \
1512 " case \"$2\" in\n" \
Denis Vlasenkob71c6682007-07-21 15:08:09 +00001513 " \"\") echo \"Option c, no argument\"; shift 2;;\n" \
1514 " *) echo \"Option c, argument '$2'\"; shift 2;;\n" \
1515 " esac;;\n" \
1516 " --) shift; break;;\n" \
1517 " *) echo \"Internal error!\"; exit 1;;\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001518 " esac\n" \
1519 "done\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001520
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00001521#define getsebool_trivial_usage \
1522 "-a or getsebool boolean..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001523#define getsebool_full_usage "\n\n" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01001524 " -a Show all selinux booleans"
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00001525
Eric Andersenf349e972001-08-21 16:18:59 +00001526#define getty_trivial_usage \
Denis Vlasenko397de612008-03-17 08:55:44 +00001527 "[OPTIONS] BAUD_RATE TTY [TERMTYPE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001528#define getty_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001529 "Open a tty, prompt for a login name, then invoke /bin/login\n" \
1530 "\nOptions:" \
1531 "\n -h Enable hardware (RTS/CTS) flow control" \
Denys Vlasenko07697852009-10-06 21:11:37 +02001532 "\n -i Don't display /etc/issue before running login" \
1533 "\n -L Local line, don't do carrier detect" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001534 "\n -m Get baud rate from modem's CONNECT status message" \
1535 "\n -w Wait for a CR or LF before sending /etc/issue" \
Denys Vlasenko07697852009-10-06 21:11:37 +02001536 "\n -n Don't prompt the user for a login name" \
Denys Vlasenkoed1667e2009-09-04 02:21:13 +02001537 "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" \
1538 "\n -l LOGIN Invoke LOGIN instead of /bin/login" \
1539 "\n -t SEC Terminate after SEC if no username is read" \
1540 "\n -I INITSTR Send INITSTR before anything else" \
1541 "\n -H HOST Log HOST into the utmp file as the hostname" \
Eric Andersenf349e972001-08-21 16:18:59 +00001542
Eric Andersen7e9276b2001-02-22 01:15:47 +00001543#define grep_trivial_usage \
Denys Vlasenko05273da2010-04-26 08:45:44 +02001544 "[-HhnlLoqvsriw" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001545 "F" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001546 IF_FEATURE_GREP_EGREP_ALIAS("E") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001547 IF_EXTRA_COMPAT("z") \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001548 "] [-m N] " \
1549 IF_FEATURE_GREP_CONTEXT("[-A/B/C N] ") \
1550 "PATTERN/-e PATTERN.../-f FILE [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001551#define grep_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001552 "Search for PATTERN in FILEs (or stdin)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001553 "\nOptions:" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001554 "\n -H Add 'filename:' prefix" \
1555 "\n -h Do not add 'filename:' prefix" \
1556 "\n -n Add 'line_no:' prefix" \
1557 "\n -l Show only names of files that match" \
1558 "\n -L Show only names of files that don't match" \
1559 "\n -c Show only count of matching lines" \
1560 "\n -o Show only the matching part of line" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001561 "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \
1562 "\n -v Select non-matching lines" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001563 "\n -s Suppress open and read errors" \
1564 "\n -r Recurse" \
1565 "\n -i Ignore case" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001566 "\n -w Match whole words only" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001567 "\n -F PATTERN is a literal (not regexp)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001568 IF_FEATURE_GREP_EGREP_ALIAS( \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001569 "\n -E PATTERN is an extended regexp" \
1570 ) \
1571 IF_EXTRA_COMPAT( \
1572 "\n -z Input is NUL terminated" \
1573 ) \
1574 "\n -m N Match up to N times per file" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001575 IF_FEATURE_GREP_CONTEXT( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01001576 "\n -A N Print N lines of trailing context" \
1577 "\n -B N Print N lines of leading context" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001578 "\n -C N Same as '-A N -B N'" \
1579 ) \
1580 "\n -e PTRN Pattern to match" \
1581 "\n -f FILE Read pattern from file" \
Bernhard Reutner-Fischer0a44c172005-09-23 15:40:15 +00001582
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001583#define grep_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001584 "$ grep root /etc/passwd\n" \
1585 "root:x:0:0:root:/root:/bin/bash\n" \
1586 "$ grep ^[rR]oo. /etc/passwd\n" \
1587 "root:x:0:0:root:/root:/bin/bash\n"
Mark Whitley40e5e7c2001-03-14 17:45:45 +00001588
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001589#define egrep_trivial_usage NOUSAGE_STR
1590#define egrep_full_usage ""
1591
1592#define fgrep_trivial_usage NOUSAGE_STR
1593#define fgrep_full_usage ""
1594
Eric Andersen7e9276b2001-02-22 01:15:47 +00001595#define gunzip_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001596 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001597#define gunzip_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001598 "Uncompress FILEs (or stdin)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001599 "\nOptions:" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001600 "\n -c Write to stdout" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001601 "\n -f Force" \
1602 "\n -t Test file integrity" \
1603
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001604#define gunzip_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001605 "$ ls -la /tmp/BusyBox*\n" \
1606 "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
1607 "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
1608 "$ ls -la /tmp/BusyBox*\n" \
1609 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001610
1611#define gzip_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001612 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001613#define gzip_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001614 "Compress FILEs (or stdin)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001615 "\nOptions:" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001616 "\n -c Write to stdout" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001617 "\n -d Decompress" \
1618 "\n -f Force" \
1619
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001620#define gzip_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001621 "$ ls -la /tmp/busybox*\n" \
1622 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
1623 "$ gzip /tmp/busybox.tar\n" \
1624 "$ ls -la /tmp/busybox*\n" \
1625 "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001626
1627#define halt_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01001628 "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001629#define halt_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001630 "Halt the system\n" \
1631 "\nOptions:" \
1632 "\n -d Delay interval for halting" \
1633 "\n -n No call to sync()" \
1634 "\n -f Force halt (don't go through init)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001635 IF_FEATURE_WTMP( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001636 "\n -w Only write a wtmp record" \
Denis Vlasenko1d290d12008-01-24 02:27:30 +00001637 )
Eric Andersen7e9276b2001-02-22 01:15:47 +00001638
Eric Andersen3443bd72003-07-22 07:30:36 +00001639#define hdparm_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001640 "[OPTIONS] [DEVICE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001641#define hdparm_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001642 "Options:" \
1643 "\n -a Get/set fs readahead" \
1644 "\n -A Set drive read-lookahead flag (0/1)" \
1645 "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)" \
1646 "\n -B Set Advanced Power Management setting (1-255)" \
1647 "\n -c Get/set IDE 32-bit IO setting" \
1648 "\n -C Check IDE power mode status" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001649 IF_FEATURE_HDPARM_HDIO_GETSET_DMA( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001650 "\n -d Get/set using_dma flag") \
1651 "\n -D Enable/disable drive defect-mgmt" \
1652 "\n -f Flush buffer cache for device on exit" \
1653 "\n -g Display drive geometry" \
1654 "\n -h Display terse usage information" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001655 IF_FEATURE_HDPARM_GET_IDENTITY( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001656 "\n -i Display drive identification") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001657 IF_FEATURE_HDPARM_GET_IDENTITY( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001658 "\n -I Detailed/current information directly from drive") \
1659 "\n -k Get/set keep_settings_over_reset flag (0/1)" \
1660 "\n -K Set drive keep_features_over_reset flag (0/1)" \
1661 "\n -L Set drive doorlock (0/1) (removable harddisks only)" \
1662 "\n -m Get/set multiple sector count" \
1663 "\n -n Get/set ignore-write-errors flag (0/1)" \
1664 "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \
1665 "\n -P Set drive prefetch count" \
Denis Vlasenko3c96d022008-03-20 13:44:50 +00001666/* "\n -q Change next setting quietly" - not supported ib bbox */ \
Denis Vlasenko397de612008-03-17 08:55:44 +00001667 "\n -Q Get/set DMA tagged-queuing depth (if supported)" \
1668 "\n -r Get/set readonly flag (DANGEROUS to set)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001669 IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001670 "\n -R Register an IDE interface (DANGEROUS)") \
1671 "\n -S Set standby (spindown) timeout" \
1672 "\n -t Perform device read timings" \
1673 "\n -T Perform cache read timings" \
1674 "\n -u Get/set unmaskirq flag (0/1)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001675 IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01001676 "\n -U Unregister an IDE interface (DANGEROUS)") \
Denis Vlasenko397de612008-03-17 08:55:44 +00001677 "\n -v Defaults; same as -mcudkrag for IDE drives" \
1678 "\n -V Display program version and exit immediately" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001679 IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001680 "\n -w Perform device reset (DANGEROUS)") \
1681 "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001682 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001683 "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
1684 "\n -X Set IDE xfer mode (DANGEROUS)" \
1685 "\n -y Put IDE drive in standby mode" \
1686 "\n -Y Put IDE drive to sleep" \
1687 "\n -Z Disable Seagate auto-powersaving mode" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01001688 "\n -z Reread partition table" \
Eric Andersen3443bd72003-07-22 07:30:36 +00001689
Eric Andersen7e9276b2001-02-22 01:15:47 +00001690#define head_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001691 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001692#define head_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001693 "Print first 10 lines of each FILE (or stdin) to stdout.\n" \
Denys Vlasenko57493282010-03-02 16:18:14 +01001694 "With more than one FILE, precede each with a filename header.\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001695 "\nOptions:" \
Denys Vlasenko57493282010-03-02 16:18:14 +01001696 "\n -n N[kbm] Print first N lines" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001697 IF_FEATURE_FANCY_HEAD( \
Denys Vlasenko57493282010-03-02 16:18:14 +01001698 "\n -c N[kbm] Print first N bytes" \
1699 "\n -q Never print headers" \
1700 "\n -v Always print headers" \
1701 ) \
1702 "\n" \
1703 "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \
Denis Vlasenko397de612008-03-17 08:55:44 +00001704
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001705#define head_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001706 "$ head -n 2 /etc/passwd\n" \
1707 "root:x:0:0:root:/root:/bin/bash\n" \
1708 "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001709
Denys Vlasenko57493282010-03-02 16:18:14 +01001710#define tail_trivial_usage \
1711 "[OPTIONS] [FILE]..."
1712#define tail_full_usage "\n\n" \
1713 "Print last 10 lines of each FILE (or stdin) to stdout.\n" \
1714 "With more than one FILE, precede each with a filename header.\n" \
1715 "\nOptions:" \
1716 "\n -f Print data as file grows" \
1717 IF_FEATURE_FANCY_TAIL( \
1718 "\n -s SECONDS Wait SECONDS between reads with -f" \
1719 ) \
1720 "\n -n N[kbm] Print last N lines" \
1721 IF_FEATURE_FANCY_TAIL( \
1722 "\n -c N[kbm] Print last N bytes" \
1723 "\n -q Never print headers" \
1724 "\n -v Always print headers" \
1725 "\n" \
1726 "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \
1727 "\nIf N starts with a '+', output begins with the Nth item from the start" \
1728 "\nof each file, not from the end." \
1729 ) \
1730
1731#define tail_example_usage \
1732 "$ tail -n 1 /etc/resolv.conf\n" \
1733 "nameserver 10.0.0.1\n"
1734
Glenn L McGrath60281112001-11-02 11:39:46 +00001735#define hexdump_trivial_usage \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001736 "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001737#define hexdump_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01001738 "Display FILEs (or stdin) in a user specified format\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001739 "\nOptions:" \
Denis Vlasenkofbe5f392007-11-18 05:36:50 +00001740 "\n -b One-byte octal display" \
1741 "\n -c One-byte character display" \
1742 "\n -C Canonical hex+ASCII, 16 bytes per line" \
1743 "\n -d Two-byte decimal display" \
1744 "\n -e FORMAT STRING" \
1745 "\n -f FORMAT FILE" \
1746 "\n -n LENGTH Interpret only LENGTH bytes of input" \
1747 "\n -o Two-byte octal display" \
1748 "\n -s OFFSET Skip OFFSET bytes" \
1749 "\n -v Display all input data" \
1750 "\n -x Two-byte hexadecimal display" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001751 IF_FEATURE_HEXDUMP_REVERSE( \
Denis Vlasenkofbe5f392007-11-18 05:36:50 +00001752 "\n -R Reverse of 'hexdump -Cv'") \
1753
1754#define hd_trivial_usage \
1755 "FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001756#define hd_full_usage "\n\n" \
Denis Vlasenkofbe5f392007-11-18 05:36:50 +00001757 "hd is an alias for hexdump -C"
Glenn L McGrath60281112001-11-02 11:39:46 +00001758
Eric Andersen7e9276b2001-02-22 01:15:47 +00001759#define hostid_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001760 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001761#define hostid_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00001762 "Print out a unique 32-bit identifier for the machine"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001763
1764#define hostname_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001765 "[OPTIONS] [HOSTNAME | -F FILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001766#define hostname_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001767 "Get or set hostname or DNS domain name\n" \
1768 "\nOptions:" \
1769 "\n -s Short" \
1770 "\n -i Addresses for the hostname" \
1771 "\n -d DNS domain name" \
1772 "\n -f Fully qualified domain name" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001773 "\n -F FILE Use FILE's content as hostname" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001774
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001775#define hostname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001776 "$ hostname\n" \
1777 "sage\n"
Eric Andersen40520512003-07-28 09:59:05 +00001778
Denys Vlasenkod30b89c2009-06-26 01:55:45 +02001779#define dnsdomainname_trivial_usage NOUSAGE_STR
1780#define dnsdomainname_full_usage ""
1781
Glenn L McGrath58c708a2003-01-05 04:01:56 +00001782#define httpd_trivial_usage \
Denis Vlasenkob0291542009-04-22 00:26:39 +00001783 "[-ifv[v]]" \
1784 " [-c CONFFILE]" \
1785 " [-p [IP:]PORT]" \
1786 IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") \
1787 IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]") \
1788 " [-h HOME]\n" \
1789 "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001790#define httpd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001791 "Listen for incoming HTTP requests\n" \
1792 "\nOptions:" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001793 "\n -i Inetd mode" \
Denys Vlasenko07697852009-10-06 21:11:37 +02001794 "\n -f Don't daemonize" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001795 "\n -v[v] Verbose" \
Denis Vlasenkob0291542009-04-22 00:26:39 +00001796 "\n -p [IP:]PORT Bind to ip:port (default *:80)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001797 IF_FEATURE_HTTPD_SETUID( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001798 "\n -u USER[:GRP] Set uid/gid after binding to port") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001799 IF_FEATURE_HTTPD_BASIC_AUTH( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001800 "\n -r REALM Authentication Realm for Basic Authentication") \
Denis Vlasenko397de612008-03-17 08:55:44 +00001801 "\n -h HOME Home directory (default .)" \
Denys Vlasenko8fc9e6a2010-04-02 10:40:58 +02001802 "\n -c FILE Configuration file (default {/etc,HOME}/httpd.conf)" \
Denis Vlasenkob0291542009-04-22 00:26:39 +00001803 IF_FEATURE_HTTPD_AUTH_MD5( \
1804 "\n -m STRING MD5 crypt STRING") \
Denis Vlasenko397de612008-03-17 08:55:44 +00001805 "\n -e STRING HTML encode STRING" \
1806 "\n -d STRING URL decode STRING" \
Eric Andersen40520512003-07-28 09:59:05 +00001807
Robert Griebl1cd04452002-07-21 16:50:49 +00001808#define hwclock_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001809 IF_FEATURE_HWCLOCK_LONG_OPTIONS( \
Denis Vlasenko673d4bb2007-03-07 23:02:50 +00001810 "[-r|--show] [-s|--hctosys] [-w|--systohc]" \
1811 " [-l|--localtime] [-u|--utc]" \
Denis Vlasenko99014e82007-10-20 14:54:58 +00001812 " [-f FILE]" \
1813 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001814 IF_NOT_FEATURE_HWCLOCK_LONG_OPTIONS( \
Denis Vlasenko99014e82007-10-20 14:54:58 +00001815 "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
1816 )
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001817#define hwclock_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001818 "Query and set hardware clock (RTC)\n" \
1819 "\nOptions:" \
Denis Vlasenko68e5e2b2008-03-25 03:17:04 +00001820 "\n -r Show hardware clock time" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001821 "\n -s Set system time from hardware clock" \
1822 "\n -w Set hardware clock to system time" \
1823 "\n -u Hardware clock is in UTC" \
1824 "\n -l Hardware clock is in local time" \
1825 "\n -f FILE Use specified device (e.g. /dev/rtc2)" \
Robert Griebl1cd04452002-07-21 16:50:49 +00001826
Eric Andersen7e9276b2001-02-22 01:15:47 +00001827#define id_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001828 "[OPTIONS] [USER]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001829#define id_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001830 "Print information about USER or the current user\n" \
1831 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001832 IF_SELINUX( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001833 "\n -Z Print the security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00001834 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00001835 "\n -u Print user ID" \
Denis Vlasenko4f3209b2008-09-13 12:51:10 +00001836 "\n -g Print group ID" \
1837 "\n -G Print supplementary group IDs" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001838 "\n -n Print name instead of a number" \
1839 "\n -r Print real user ID instead of effective ID" \
1840
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001841#define id_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001842 "$ id\n" \
1843 "uid=1000(andersen) gid=1000(andersen)\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001844
Eric Andersen7e9276b2001-02-22 01:15:47 +00001845#define ifconfig_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001846 IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001847#define ifconfig_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001848 "Configure a network interface\n" \
1849 "\nOptions:" \
1850 "\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001851 IF_FEATURE_IPV6( \
Denis Vlasenko21d10142007-07-20 21:28:41 +00001852 " [add ADDRESS[/PREFIXLEN]]\n") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001853 IF_FEATURE_IPV6( \
Denis Vlasenko21d10142007-07-20 21:28:41 +00001854 " [del ADDRESS[/PREFIXLEN]]\n") \
1855 " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
1856 " [netmask ADDRESS] [dstaddr ADDRESS]\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001857 IF_FEATURE_IFCONFIG_SLIP( \
Denis Vlasenko21d10142007-07-20 21:28:41 +00001858 " [outfill NN] [keepalive NN]\n") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001859 " " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00001860 " [[-]trailers] [[-]arp] [[-]allmulti]\n" \
Denis Vlasenko21d10142007-07-20 21:28:41 +00001861 " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001862 IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
Denis Vlasenko21d10142007-07-20 21:28:41 +00001863 " [mem_start NN] [io_addr NN] [irq NN]\n") \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001864 " [up|down] ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001865
Denis Vlasenko06aed432008-02-26 18:25:24 +00001866#define ifenslave_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001867 "[-cdf] MASTER_IFACE SLAVE_IFACE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001868#define ifenslave_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001869 "Configure network interfaces for parallel routing\n" \
1870 "\nOptions:" \
Denis Vlasenko06aed432008-02-26 18:25:24 +00001871 "\n -c, --change-active Change active slave" \
1872 "\n -d, --detach Remove slave interface from bonding device" \
1873 "\n -f, --force Force, even if interface is not Ethernet" \
1874/* "\n -r, --receive-slave Create a receive-only slave" */
Denis Vlasenko397de612008-03-17 08:55:44 +00001875
Denis Vlasenko06aed432008-02-26 18:25:24 +00001876#define ifenslave_example_usage \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001877 "To create a bond device, simply follow these three steps:\n" \
1878 "- ensure that the required drivers are properly loaded:\n" \
Denis Vlasenko06aed432008-02-26 18:25:24 +00001879 " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001880 "- assign an IP address to the bond device:\n" \
Denis Vlasenko06aed432008-02-26 18:25:24 +00001881 " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001882 "- attach all the interfaces you need to the bond device:\n" \
Denis Vlasenko06aed432008-02-26 18:25:24 +00001883 " # ifenslave bond0 eth0 eth1 eth2\n" \
1884 " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \
1885 " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001886 " To detach a dead interface without setting the bond device down:\n" \
1887 " # ifenslave -d bond0 eth1\n\n" \
1888 " To set the bond device down and automatically release all the slaves:\n" \
1889 " # ifconfig bond0 down\n\n" \
1890 " To change active slave:\n" \
1891 " # ifenslave -c bond0 eth0\n" \
1892
1893#define ifplugd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02001894 "[OPTIONS]"
Denis Vlasenko71c16572009-04-26 01:08:51 +00001895#define ifplugd_full_usage "\n\n" \
Denys Vlasenkoca899ef2009-08-27 03:20:45 +02001896 "Network interface plug detection daemon\n" \
1897 "\nOptions:" \
Denys Vlasenko07697852009-10-06 21:11:37 +02001898 "\n -n Don't daemonize" \
1899 "\n -s Don't log to syslog" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001900 "\n -i IFACE Interface" \
1901 "\n -f/-F Treat link detection error as link down/link up" \
1902 "\n (otherwise exit on error)" \
Denys Vlasenko999e4422010-01-08 13:03:48 +01001903 "\n -a Don't up interface at each link probe" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001904 "\n -M Monitor creation/destruction of interface" \
1905 "\n (otherwise it must exist)" \
1906 "\n -r PROG Script to run" \
1907 "\n -x ARG Extra argument for script" \
1908 "\n -I Don't exit on nonzero exit code from script" \
1909 "\n -p Don't run script on daemon startup" \
1910 "\n -q Don't run script on daemon quit" \
1911 "\n -l Run script on startup even if no cable is detected" \
1912 "\n -t SECS Poll time in seconds" \
1913 "\n -u SECS Delay before running script after link up" \
1914 "\n -d SECS Delay after link down" \
Denys Vlasenkob8f0e802010-01-07 14:56:50 +01001915 "\n -m MODE API mode (mii, priv, ethtool, wlan, iff, auto)" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00001916 "\n -k Kill running daemon" \
Denis Vlasenko06aed432008-02-26 18:25:24 +00001917
Glenn L McGrath021fa7d2002-11-09 09:34:15 +00001918#define ifup_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01001919 "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] IFACE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001920#define ifup_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001921 "Options:" \
1922 "\n -a De/configure all interfaces automatically" \
1923 "\n -i FILE Use FILE for interface definitions" \
1924 "\n -n Print out what would happen, but don't do it" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001925 IF_FEATURE_IFUPDOWN_MAPPING( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001926 "\n (note: doesn't disable mappings)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001927 "\n -m Don't run any mappings" \
Bernhard Reutner-Fischer6e38d522008-05-08 10:40:34 +00001928 ) \
1929 "\n -v Print out what would happen before doing it" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001930 "\n -f Force de/configuration" \
Glenn L McGrath021fa7d2002-11-09 09:34:15 +00001931
1932#define ifdown_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001933 "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001934#define ifdown_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001935 "Options:" \
1936 "\n -a De/configure all interfaces automatically" \
1937 "\n -i FILE Use FILE for interface definitions" \
1938 "\n -n Print out what would happen, but don't do it" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00001939 IF_FEATURE_IFUPDOWN_MAPPING( \
Denis Vlasenko397de612008-03-17 08:55:44 +00001940 "\n (note: doesn't disable mappings)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001941 "\n -m Don't run any mappings" \
Bernhard Reutner-Fischer6e38d522008-05-08 10:40:34 +00001942 ) \
1943 "\n -v Print out what would happen before doing it" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001944 "\n -f Force de/configuration" \
Tim Riker7b253f82003-12-28 05:02:40 +00001945
Glenn L McGrath06e95652003-02-09 06:51:14 +00001946#define inetd_trivial_usage \
Denis Vlasenko4e6d5112008-03-12 22:14:34 +00001947 "[-fe] [-q N] [-R N] [CONFFILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001948#define inetd_full_usage "\n\n" \
Denis Vlasenko4e6d5112008-03-12 22:14:34 +00001949 "Listen for network connections and launch programs\n" \
1950 "\nOptions:" \
1951 "\n -f Run in foreground" \
1952 "\n -e Log to stderr" \
1953 "\n -q N Socket listen queue (default: 128)" \
1954 "\n -R N Pause services after N connects/min" \
Denis Vlasenko397de612008-03-17 08:55:44 +00001955 "\n (default: 0 - disabled)" \
Glenn L McGrath06e95652003-02-09 06:51:14 +00001956
Eric Andersen7e9276b2001-02-22 01:15:47 +00001957#define init_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00001958 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00001959#define init_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00001960 "Init is the parent of all processes"
Denis Vlasenko397de612008-03-17 08:55:44 +00001961
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001962#define init_notes_usage \
1963"This version of init is designed to be run only by the kernel.\n" \
1964"\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00001965"BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
Denis Vlasenkoe1a0d482006-10-20 13:28:22 +00001966"the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001967"runlevels, use sysvinit.\n" \
1968"\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00001969"BusyBox init works just fine without an inittab. If no inittab is found,\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001970"it has the following default behavior:\n" \
1971"\n" \
1972" ::sysinit:/etc/init.d/rcS\n" \
1973" ::askfirst:/bin/sh\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00001974" ::ctrlaltdel:/sbin/reboot\n" \
1975" ::shutdown:/sbin/swapoff -a\n" \
1976" ::shutdown:/bin/umount -a -r\n" \
Eric Andersen730f8262001-12-17 23:13:08 +00001977" ::restart:/sbin/init\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001978"\n" \
1979"if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
1980"\n" \
1981" tty2::askfirst:/bin/sh\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00001982" tty3::askfirst:/bin/sh\n" \
1983" tty4::askfirst:/bin/sh\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001984"\n" \
1985"If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
1986"\n" \
1987" <id>:<runlevels>:<action>:<process>\n" \
1988"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00001989" <id>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001990"\n" \
1991" WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
1992" The id field is used by BusyBox init to specify the controlling tty for\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00001993" the specified process to run on. The contents of this field are\n" \
1994" appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
1995" be unique, although if it isn't you may have strange results. If this\n" \
1996" field is left blank, the controlling tty is set to the console. Also\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001997" note that if BusyBox detects that a serial console is in use, then only\n" \
1998" entries whose controlling tty is either the serial console or /dev/null\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00001999" will be run. BusyBox init does nothing with utmp. We don't need no\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002000" stinkin' utmp.\n" \
2001"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00002002" <runlevels>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002003"\n" \
2004" The runlevels field is completely ignored.\n" \
2005"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00002006" <action>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002007"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00002008" Valid actions include: sysinit, respawn, askfirst, wait,\n" \
Eric Andersen730f8262001-12-17 23:13:08 +00002009" once, restart, ctrlaltdel, and shutdown.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002010"\n" \
2011" The available actions can be classified into two groups: actions\n" \
2012" that are run only once, and actions that are re-run when the specified\n" \
2013" process exits.\n" \
2014"\n" \
2015" Run only-once actions:\n" \
2016"\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002017" 'sysinit' is the first item run on boot. init waits until all\n" \
2018" sysinit actions are completed before continuing. Following the\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002019" completion of all sysinit actions, all 'wait' actions are run.\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002020" 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002021" the specified task completes. 'once' actions are asynchronous,\n" \
2022" therefore, init does not wait for them to complete. 'restart' is\n" \
2023" the action taken to restart the init process. By default this should\n" \
Eric Andersen730f8262001-12-17 23:13:08 +00002024" simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002025" can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00002026" actions are run when the system detects that someone on the system\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002027" console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002028" wants to run 'reboot' at this point to cause the system to reboot.\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00002029" Finally the 'shutdown' action specifies the actions to taken when\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002030" init is told to reboot. Unmounting filesystems and disabling swap\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002031" is a very good here.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002032"\n" \
2033" Run repeatedly actions:\n" \
2034"\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002035" 'respawn' actions are run after the 'once' actions. When a process\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002036" started with a 'respawn' action exits, init automatically restarts\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002037" it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
2038" respawning out of control. The 'askfirst' actions acts just like\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002039" respawn, except that before running the specified process it\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00002040" displays the line \"Please press Enter to activate this console.\"\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002041" and then waits for the user to press enter before starting the\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00002042" specified process.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002043"\n" \
2044" Unrecognized actions (like initdefault) will cause init to emit an\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002045" error message, and then go along with its business. All actions are\n" \
Eric Andersene0f55002002-09-30 20:59:33 +00002046" run in the order they appear in /etc/inittab.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002047"\n" \
Eric Andersen63a1a7a2004-03-13 08:33:10 +00002048" <process>:\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002049"\n" \
Glenn L McGrath43596232004-07-23 01:27:56 +00002050" Specifies the process to be executed and its command line.\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002051"\n" \
2052"Example /etc/inittab file:\n" \
Mark Whitley0a6f1d32001-03-15 21:19:09 +00002053"\n" \
Denis Vlasenkob6488c12006-12-25 14:25:14 +00002054" # This is run first except when booting in single-user mode\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002055" #\n" \
2056" ::sysinit:/etc/init.d/rcS\n" \
2057" \n" \
2058" # /bin/sh invocations on selected ttys\n" \
2059" #\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00002060" # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002061" ::askfirst:-/bin/sh\n" \
Mike Frysinger058e7402005-04-23 07:00:33 +00002062" # Start an \"askfirst\" shell on /dev/tty2-4\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002063" tty2::askfirst:-/bin/sh\n" \
2064" tty3::askfirst:-/bin/sh\n" \
2065" tty4::askfirst:-/bin/sh\n" \
2066" \n" \
2067" # /sbin/getty invocations for selected ttys\n" \
2068" #\n" \
Eric Andersen1713a112002-11-07 02:26:59 +00002069" tty4::respawn:/sbin/getty 38400 tty4\n" \
2070" tty5::respawn:/sbin/getty 38400 tty5\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002071" \n" \
2072" \n" \
2073" # Example of how to put a getty on a serial line (for a terminal)\n" \
2074" #\n" \
2075" #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
2076" #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
2077" #\n" \
Denis Vlasenkob6488c12006-12-25 14:25:14 +00002078" # Example how to put a getty on a modem line\n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002079" #::respawn:/sbin/getty 57600 ttyS2\n" \
2080" \n" \
Eric Andersen730f8262001-12-17 23:13:08 +00002081" # Stuff to do when restarting the init process\n" \
2082" ::restart:/sbin/init\n" \
2083" \n" \
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002084" # Stuff to do before rebooting\n" \
Eric Andersenc97ec342001-04-03 18:01:51 +00002085" ::ctrlaltdel:/sbin/reboot\n" \
2086" ::shutdown:/bin/umount -a -r\n" \
2087" ::shutdown:/sbin/swapoff -a\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002088
Denis Vlasenko8e2c9e12008-05-24 20:47:18 +00002089#define inotifyd_trivial_usage \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002090 "PROG FILE1[:MASK]..."
Denis Vlasenko8e2c9e12008-05-24 20:47:18 +00002091#define inotifyd_full_usage "\n\n" \
Denis Vlasenko9a4c0d52008-11-20 01:24:39 +00002092 "Run PROG on filesystem changes." \
2093 "\nWhen a filesystem event matching MASK occurs on FILEn," \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002094 "\nPROG ACTUAL_EVENTS FILEn [SUBFILE] is run." \
Denis Vlasenko289ff0e2008-11-14 21:52:16 +00002095 "\nEvents:" \
Denis Vlasenko8e2c9e12008-05-24 20:47:18 +00002096 "\n a File is accessed" \
2097 "\n c File is modified" \
2098 "\n e Metadata changed" \
Denys Vlasenko5370bfb2009-09-06 02:58:59 +02002099 "\n w Writable file is closed" \
2100 "\n 0 Unwritable file is closed" \
Denis Vlasenko8e2c9e12008-05-24 20:47:18 +00002101 "\n r File is opened" \
Denis Vlasenkoa09a42c2008-11-17 22:19:18 +00002102 "\n D File is deleted" \
2103 "\n M File is moved" \
2104 "\n u Backing fs is unmounted" \
2105 "\n o Event queue overflowed" \
2106 "\n x File can't be watched anymore" \
2107 "\nIf watching a directory:" \
2108 "\n m Subfile is moved into dir" \
2109 "\n y Subfile is moved out of dir" \
Denis Vlasenko8e2c9e12008-05-24 20:47:18 +00002110 "\n n Subfile is created" \
2111 "\n d Subfile is deleted" \
Denis Vlasenko9a4c0d52008-11-20 01:24:39 +00002112 "\n" \
2113 "\ninotifyd waits for PROG to exit." \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002114 "\nWhen x event happens for all FILEs, inotifyd exits." \
Denis Vlasenko8e2c9e12008-05-24 20:47:18 +00002115
Denis Vlasenko36309cf2008-11-22 18:29:01 +00002116/* 2.6 style insmod has no options and required filename
2117 * (not module name - .ko can't be omitted) */
Eric Andersen7e9276b2001-02-22 01:15:47 +00002118#define insmod_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002119 IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002120 IF_NOT_FEATURE_2_4_MODULES("FILE ") \
Denis Vlasenko36309cf2008-11-22 18:29:01 +00002121 "[symbol=value]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002122#define insmod_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00002123 "Load the specified kernel modules into the kernel" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002124 IF_FEATURE_2_4_MODULES( "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002125 "\nOptions:" \
2126 "\n -f Force module to load into the wrong kernel version" \
2127 "\n -k Make module autoclean-able" \
2128 "\n -v Verbose" \
2129 "\n -q Quiet" \
2130 "\n -L Lock to prevent simultaneous loads of a module" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002131 IF_FEATURE_INSMOD_LOAD_MAP( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002132 "\n -m Output load map to stdout" \
Denis Vlasenkoa5457262007-09-24 20:14:32 +00002133 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00002134 "\n -o NAME Set internal module name to NAME" \
Denys Vlasenko07697852009-10-06 21:11:37 +02002135 "\n -x Don't export externs" \
Denis Vlasenkoa5457262007-09-24 20:14:32 +00002136 )
Eric Andersen7e9276b2001-02-22 01:15:47 +00002137
Bernhard Reutner-Fischer161931e2008-09-04 09:33:23 +00002138/* -v, -b, -c are ignored */
Glenn L McGratheebcc1d2003-09-24 03:22:57 +00002139#define install_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002140 "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002141#define install_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002142 "Copy files and set attributes\n" \
2143 "\nOptions:" \
Denis Vlasenkod4b71982008-09-03 21:54:46 +00002144 "\n -c Just copy (default)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002145 "\n -d Create directories" \
Bernhard Reutner-Fischer161931e2008-09-04 09:33:23 +00002146 "\n -D Create leading target directories" \
Denis Vlasenkod4b71982008-09-03 21:54:46 +00002147 "\n -s Strip symbol table" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002148 "\n -p Preserve date" \
Denis Vlasenkod4b71982008-09-03 21:54:46 +00002149 "\n -o USER Set ownership" \
2150 "\n -g GRP Set group ownership" \
2151 "\n -m MODE Set permissions" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002152 IF_SELINUX( \
Denis Vlasenkod4b71982008-09-03 21:54:46 +00002153 "\n -Z Set security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00002154 )
Denis Vlasenko397de612008-03-17 08:55:44 +00002155
Denis Vlasenko4acdb462009-01-31 21:45:57 +00002156#define ionice_trivial_usage \
2157 "[-c 1-3] [-n 0-7] [-p PID] [PROG]"
2158#define ionice_full_usage "\n\n" \
2159 "Change I/O scheduling class and priority\n" \
2160 "\nOptions:" \
2161 "\n -c Class. 1:realtime 2:best-effort 3:idle" \
2162 "\n -n Priority" \
2163
Denis Vlasenko397de612008-03-17 08:55:44 +00002164/* would need to make the " | " optional depending on more than one selected: */
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00002165#define ip_trivial_usage \
Bernhard Reutner-Fischerf73cac82007-04-10 19:00:08 +00002166 "[OPTIONS] {" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002167 IF_FEATURE_IP_ADDRESS("address | ") \
2168 IF_FEATURE_IP_ROUTE("route | ") \
2169 IF_FEATURE_IP_LINK("link | ") \
2170 IF_FEATURE_IP_TUNNEL("tunnel | ") \
2171 IF_FEATURE_IP_RULE("rule") \
Denis Vlasenkof5635f42007-08-13 10:48:33 +00002172 "} {COMMAND}"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002173#define ip_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002174 "ip [OPTIONS] OBJECT {COMMAND}\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002175 "where OBJECT := {" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002176 IF_FEATURE_IP_ADDRESS("address | ") \
2177 IF_FEATURE_IP_ROUTE("route | ") \
2178 IF_FEATURE_IP_LINK("link | ") \
2179 IF_FEATURE_IP_TUNNEL("tunnel | ") \
2180 IF_FEATURE_IP_RULE("rule") \
Denis Vlasenkof5635f42007-08-13 10:48:33 +00002181 "}\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002182 "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
Glenn L McGrathf112daa2002-12-01 23:04:06 +00002183
2184#define ipaddr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002185 "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002186 " [dev STRING] [to PREFIX] }"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002187#define ipaddr_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002188 "ipaddr {add|delete} IFADDR dev STRING\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002189 "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n" \
2190 " [to PREFIX] [label PATTERN]\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00002191 " IFADDR := PREFIX | ADDR peer PREFIX\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002192 " [broadcast ADDR] [anycast ADDR]\n" \
2193 " [label STRING] [scope SCOPE-ID]\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002194 " SCOPE-ID := [host | link | global | NUMBER]" \
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00002195
Eric Andersende4f07e2003-12-11 01:18:07 +00002196#define ipcalc_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002197 "[OPTIONS] ADDRESS[[/]NETMASK] [NETMASK]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002198#define ipcalc_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002199 "Calculate IP network settings from a IP address\n" \
2200 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002201 IF_FEATURE_IPCALC_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002202 "\n -b,--broadcast Display calculated broadcast address" \
2203 "\n -n,--network Display calculated network address" \
2204 "\n -m,--netmask Display default netmask for IP" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002205 IF_FEATURE_IPCALC_FANCY( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002206 "\n -p,--prefix Display the prefix for IP/NETMASK" \
2207 "\n -h,--hostname Display first resolved host name" \
2208 "\n -s,--silent Don't ever display error messages" \
Denis Vlasenko03630782007-10-18 11:11:12 +00002209 ) \
2210 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002211 IF_NOT_FEATURE_IPCALC_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002212 "\n -b Display calculated broadcast address" \
2213 "\n -n Display calculated network address" \
2214 "\n -m Display default netmask for IP" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002215 IF_FEATURE_IPCALC_FANCY( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002216 "\n -p Display the prefix for IP/NETMASK" \
2217 "\n -h Display first resolved host name" \
2218 "\n -s Don't ever display error messages" \
Denis Vlasenko03630782007-10-18 11:11:12 +00002219 ) \
2220 )
Glenn L McGrathc11986d2002-11-10 23:42:27 +00002221
Rob Landley6eb1e412005-06-20 04:30:36 +00002222#define ipcrm_trivial_usage \
Denis Vlasenko397de612008-03-17 08:55:44 +00002223 "[-MQS key] [-mqs id]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002224#define ipcrm_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002225 "Upper-case options MQS remove an object by shmkey value.\n" \
2226 "Lower-case options remove an object by shmid value.\n" \
2227 "\nOptions:" \
2228 "\n -mM Remove memory segment after last detach" \
2229 "\n -qQ Remove message queue" \
2230 "\n -sS Remove semaphore" \
Rob Landley6eb1e412005-06-20 04:30:36 +00002231
2232#define ipcs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002233 "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002234#define ipcs_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002235 " -i Show specific resource" \
2236 "\nResource specification:" \
2237 "\n -m Shared memory segments" \
2238 "\n -q Message queues" \
2239 "\n -s Semaphore arrays" \
2240 "\n -a All (default)" \
2241 "\nOutput format:" \
2242 "\n -t Time" \
2243 "\n -c Creator" \
2244 "\n -p Pid" \
2245 "\n -l Limits" \
2246 "\n -u Summary" \
Rob Landley6eb1e412005-06-20 04:30:36 +00002247
Glenn L McGrathf112daa2002-12-01 23:04:06 +00002248#define iplink_trivial_usage \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002249 "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002250#define iplink_full_usage "\n\n" \
Bernhard Reutner-Fischer8ca35d22007-01-28 00:39:30 +00002251 "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002252 " dynamic { on | off } |\n" \
2253 " mtu MTU }\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002254 "iplink show [DEVICE]" \
Glenn L McGrathf112daa2002-12-01 23:04:06 +00002255
2256#define iproute_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002257 "{ list | flush | { add | del | change | append |\n" \
2258 " replace | monitor } ROUTE }"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002259#define iproute_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002260 "iproute { list | flush } SELECTOR\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002261 "iproute get ADDRESS [from ADDRESS iif STRING]\n" \
2262 " [oif STRING] [tos TOS]\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002263 "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002264 " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
Bernhard Reutner-Fischer578de862008-10-07 17:00:58 +00002265 " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]\n" \
2266 " [metric METRIC]" \
Glenn L McGrathf112daa2002-12-01 23:04:06 +00002267
Bernhard Reutner-Fischer921f5df2006-11-21 15:36:08 +00002268#define iprule_trivial_usage \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002269 "{[list | add | del] RULE}"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002270#define iprule_full_usage "\n\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002271 "iprule [list | add | del] SELECTOR ACTION\n" \
2272 " SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \
2273 " [dev STRING] [pref NUMBER]\n" \
2274 " ACTION := [table TABLE_ID] [nat ADDRESS]\n" \
2275 " [prohibit | reject | unreachable]\n" \
2276 " [realms [SRCREALM/]DSTREALM]\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002277 " TABLE_ID := [local | main | default | NUMBER]" \
Bernhard Reutner-Fischer921f5df2006-11-21 15:36:08 +00002278
Glenn L McGrathf112daa2002-12-01 23:04:06 +00002279#define iptunnel_trivial_usage \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002280 "{ add | change | del | show } [NAME]\n" \
2281 " [mode { ipip | gre | sit }]\n" \
2282 " [remote ADDR] [local ADDR] [ttl TTL]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002283#define iptunnel_full_usage "\n\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002284 "iptunnel { add | change | del | show } [NAME]\n" \
2285 " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \
2286 " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002287 " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
Glenn L McGrathf112daa2002-12-01 23:04:06 +00002288
Denis Vlasenkoaa7a8882007-10-20 00:17:34 +00002289#define kbd_mode_trivial_usage \
Denis Vlasenkodc700692008-11-08 21:39:06 +00002290 "[-a|k|s|u] [-C TTY]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002291#define kbd_mode_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002292 "Report or set the keyboard mode\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002293 "\nOptions:" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002294 "\n -a Default (ASCII)" \
2295 "\n -k Medium-raw (keyboard)" \
2296 "\n -s Raw (scancode)" \
2297 "\n -u Unicode (utf-8)" \
Denis Vlasenkodc700692008-11-08 21:39:06 +00002298 "\n -C TTY Affect TTY instead of /dev/tty" \
Denis Vlasenkoaa7a8882007-10-20 00:17:34 +00002299
Eric Andersen7e9276b2001-02-22 01:15:47 +00002300#define kill_trivial_usage \
Denis Vlasenkob9b344a2008-10-31 00:30:48 +00002301 "[-l] [-SIG] PID..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002302#define kill_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002303 "Send a signal (default: TERM) to given PIDs\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002304 "\nOptions:" \
2305 "\n -l List all signal names and numbers" \
Denis Vlasenkob9b344a2008-10-31 00:30:48 +00002306/* "\n -s SIG Yet another way of specifying SIG" */ \
Denis Vlasenko397de612008-03-17 08:55:44 +00002307
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002308#define kill_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002309 "$ ps | grep apache\n" \
2310 "252 root root S [apache]\n" \
2311 "263 www-data www-data S [apache]\n" \
2312 "264 www-data www-data S [apache]\n" \
2313 "265 www-data www-data S [apache]\n" \
2314 "266 www-data www-data S [apache]\n" \
2315 "267 www-data www-data S [apache]\n" \
2316 "$ kill 252\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002317
2318#define killall_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002319 "[-l] [-q] [-SIG] PROCESS_NAME..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002320#define killall_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002321 "Send a signal (default: TERM) to given processes\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002322 "\nOptions:" \
2323 "\n -l List all signal names and numbers" \
Denis Vlasenkob9b344a2008-10-31 00:30:48 +00002324/* "\n -s SIG Yet another way of specifying SIG" */ \
Denys Vlasenko07697852009-10-06 21:11:37 +02002325 "\n -q Don't complain if no processes were killed" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002326
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002327#define killall_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002328 "$ killall apache\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002329
Denis Vlasenko0bb628f2006-09-27 14:25:33 +00002330#define killall5_trivial_usage \
Denis Vlasenkoa0ab9432009-02-07 22:30:39 +00002331 "[-l] [-SIG] [-o PID]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002332#define killall5_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002333 "Send a signal (default: TERM) to all processes outside current session\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002334 "\nOptions:" \
2335 "\n -l List all signal names and numbers" \
Denys Vlasenko07697852009-10-06 21:11:37 +02002336 "\n -o PID Don't signal this PID" \
Denis Vlasenkob9b344a2008-10-31 00:30:48 +00002337/* "\n -s SIG Yet another way of specifying SIG" */ \
Denis Vlasenko0bb628f2006-09-27 14:25:33 +00002338
Mark Whitley6317c4b2001-03-12 22:51:50 +00002339#define klogd_trivial_usage \
Denis Vlasenko7bdf0c82008-06-06 16:08:04 +00002340 "[-c N] [-n]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002341#define klogd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002342 "Kernel logger\n" \
2343 "\nOptions:" \
Denis Vlasenko7bdf0c82008-06-06 16:08:04 +00002344 "\n -c N Only messages with level < N are printed to console" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002345 "\n -n Run in foreground" \
Mark Whitley6317c4b2001-03-12 22:51:50 +00002346
Eric Andersen7e9276b2001-02-22 01:15:47 +00002347#define length_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002348 "STRING"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002349#define length_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002350 "Print STRING's length"
2351
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002352#define length_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002353 "$ length Hello\n" \
2354 "5\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002355
Rob Landley9200e792005-09-15 19:26:59 +00002356#define less_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002357 "[-EMNmh~I?] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002358#define less_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002359 "View FILE (or stdin) one screenful at a time\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002360 "\nOptions:" \
2361 "\n -E Quit once the end of a file is reached" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002362 "\n -M,-m Display status line with line numbers" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002363 "\n and percentage through the file" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002364 "\n -N Prefix line number to each line" \
Bernhard Reutner-Fischer48a67732008-09-26 14:10:17 +00002365 "\n -I Ignore case in all searches" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002366 "\n -~ Suppress ~s displayed past the end of the file" \
Rob Landley9200e792005-09-15 19:26:59 +00002367
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002368#define linux32_trivial_usage NOUSAGE_STR
2369#define linux32_full_usage ""
2370#define linux64_trivial_usage NOUSAGE_STR
2371#define linux64_full_usage ""
2372
2373#define linuxrc_trivial_usage NOUSAGE_STR
2374#define linuxrc_full_usage ""
2375
Mike Frysinger0a6b0bf2006-02-21 04:26:52 +00002376#define setarch_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002377 "personality PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002378#define setarch_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002379 "Personality may be:\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002380 " linux32 Set 32bit uname emulation\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002381 " linux64 Set 64bit uname emulation" \
Mike Frysinger0a6b0bf2006-02-21 04:26:52 +00002382
Eric Andersen7e9276b2001-02-22 01:15:47 +00002383#define ln_trivial_usage \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01002384 "[OPTIONS] TARGET... LINK|DIR"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002385#define ln_full_usage "\n\n" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01002386 "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002387 "\nOptions:" \
2388 "\n -s Make symlinks instead of hardlinks" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01002389 "\n -f Remove existing destinations" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002390 "\n -n Don't dereference symlinks - treat like normal file" \
2391 "\n -b Make a backup of the target (if exists) before link operation" \
2392 "\n -S suf Use suffix instead of ~ when making backup files" \
2393
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002394#define ln_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002395 "$ ln -s BusyBox /tmp/ls\n" \
2396 "$ ls -l /tmp/ls\n" \
2397 "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002398
Bernhard Reutner-Fischer62538802008-05-08 12:21:44 +00002399#define load_policy_trivial_usage NOUSAGE_STR
Bernhard Reutner-Fischer62538802008-05-08 12:21:44 +00002400#define load_policy_full_usage ""
Denis Vlasenko1fc6e562007-03-24 15:37:57 +00002401
Eric Andersen7e9276b2001-02-22 01:15:47 +00002402#define loadfont_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002403 "< font"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002404#define loadfont_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002405 "Load a console font from stdin" \
Denis Vlasenkodc700692008-11-08 21:39:06 +00002406/* "\n -C TTY Affect TTY instead of /dev/tty" */ \
2407
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002408#define loadfont_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002409 "$ loadfont < /etc/i18n/fontname\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002410
2411#define loadkmap_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002412 "< keymap"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002413#define loadkmap_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002414 "Load a binary keyboard translation table from stdin\n" \
Denis Vlasenkodc700692008-11-08 21:39:06 +00002415/* "\n -C TTY Affect TTY instead of /dev/tty" */ \
2416
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002417#define loadkmap_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002418 "$ loadkmap < /etc/i18n/lang-keymap\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002419
2420#define logger_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002421 "[OPTIONS] [MESSAGE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002422#define logger_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01002423 "Write MESSAGE (or stdin) to syslog\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002424 "\nOptions:" \
2425 "\n -s Log to stderr as well as the system log" \
2426 "\n -t TAG Log using the specified tag (defaults to user name)" \
2427 "\n -p PRIO Priority (numeric or facility.level pair)" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00002428
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002429#define logger_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002430 "$ logger \"hello\"\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002431
Robert Griebl1fca5582002-06-04 20:45:46 +00002432#define login_trivial_usage \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00002433 "[-p] [-h HOST] [[-f] USER]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002434#define login_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002435 "Begin a new session on the system\n" \
2436 "\nOptions:" \
Denys Vlasenko07697852009-10-06 21:11:37 +02002437 "\n -f Don't authenticate (user already authenticated)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002438 "\n -h Name of the remote host" \
2439 "\n -p Preserve environment" \
Robert Griebl1fca5582002-06-04 20:45:46 +00002440
Eric Andersen7e9276b2001-02-22 01:15:47 +00002441#define logname_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002442 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002443#define logname_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00002444 "Print the name of the current user"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002445#define logname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002446 "$ logname\n" \
2447 "root\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002448
Mark Whitley6317c4b2001-03-12 22:51:50 +00002449#define logread_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002450 "[OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002451#define logread_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002452 "Show messages in syslogd's circular buffer\n" \
2453 "\nOptions:" \
2454 "\n -f Output data as log grows" \
Mark Whitley6317c4b2001-03-12 22:51:50 +00002455
Matt Kraai83788da2002-03-20 17:38:37 +00002456#define losetup_trivial_usage \
Denis Vlasenko7ae209c2007-09-26 17:54:18 +00002457 "[-o OFS] LOOPDEV FILE - associate loop devices\n" \
2458 " losetup -d LOOPDEV - disassociate\n" \
2459 " losetup [-f] - show"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002460#define losetup_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002461 "Options:" \
2462 "\n -o OFS Start OFS bytes into FILE" \
2463 "\n -f Show first free loop device" \
2464
Rob Landley1d589b22005-11-29 23:47:10 +00002465#define losetup_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002466 "No arguments will display all current associations.\n" \
2467 "One argument (losetup /dev/loop1) will display the current association\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002468 "(if any), or disassociate it (with -d). The display shows the offset\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002469 "and filename of the file the loop device is currently bound to.\n\n" \
2470 "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
Denis Vlasenko7ae209c2007-09-26 17:54:18 +00002471 "with an optional offset (-o 12345). Encryption is not yet supported.\n" \
2472 "losetup -f will show the first loop free loop device\n\n"
Matt Kraai83788da2002-03-20 17:38:37 +00002473
Denis Vlasenkof99afb52008-02-24 23:32:36 +00002474#define lpd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002475 "SPOOLDIR [HELPER [ARGS]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002476#define lpd_full_usage "\n\n" \
Denis Vlasenko040e32f2008-07-23 08:39:19 +00002477 "SPOOLDIR must contain (symlinks to) device nodes or directories" \
2478 "\nwith names matching print queue names. In the first case, jobs are" \
Denis Vlasenko49a5eba2008-07-23 08:41:08 +00002479 "\nsent directly to the device. Otherwise each job is stored in queue" \
Denis Vlasenko040e32f2008-07-23 08:39:19 +00002480 "\ndirectory and HELPER program is called. Name of file to print" \
2481 "\nis passed in $DATAFILE variable." \
2482 "\nExample:" \
2483 "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \
Denis Vlasenkof99afb52008-02-24 23:32:36 +00002484
Denis Vlasenko68444b92008-02-22 22:24:48 +00002485#define lpq_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002486 "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID]... [-fs]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002487#define lpq_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002488 "Options:" \
Denis Vlasenko68444b92008-02-22 22:24:48 +00002489 "\n -P lp service to connect to (else uses $PRINTER)" \
Denis Vlasenko4f82bdb2008-02-24 18:44:20 +00002490 "\n -d Delete jobs" \
Denis Vlasenko68444b92008-02-22 22:24:48 +00002491 "\n -f Force any waiting job to be printed" \
2492 "\n -s Short display" \
2493
2494#define lpr_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002495 "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE]..."
Denis Vlasenko4f82bdb2008-02-24 18:44:20 +00002496/* -C CLASS exists too, not shown.
2497 * CLASS is supposed to be printed on banner page, if one is requested */
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002498#define lpr_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002499 "Options:" \
Denis Vlasenko68444b92008-02-22 22:24:48 +00002500 "\n -P lp service to connect to (else uses $PRINTER)"\
Denis Vlasenko4f82bdb2008-02-24 18:44:20 +00002501 "\n -m Send mail on completion" \
2502 "\n -h Print banner page too" \
Denis Vlasenko68444b92008-02-22 22:24:48 +00002503 "\n -V Verbose" \
2504
Eric Andersen7e9276b2001-02-22 01:15:47 +00002505#define ls_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002506 "[-1Aa" IF_FEATURE_LS_TIMESTAMPS("c") "Cd" \
2507 IF_FEATURE_LS_TIMESTAMPS("e") IF_FEATURE_LS_FILETYPES("F") "iln" \
2508 IF_FEATURE_LS_FILETYPES("p") IF_FEATURE_LS_FOLLOWLINKS("L") \
2509 IF_FEATURE_LS_RECURSIVE("R") IF_FEATURE_LS_SORTFILES("rS") "s" \
2510 IF_FEATURE_AUTOWIDTH("T") IF_FEATURE_LS_TIMESTAMPS("tu") \
2511 IF_FEATURE_LS_SORTFILES("v") IF_FEATURE_AUTOWIDTH("w") "x" \
2512 IF_FEATURE_LS_SORTFILES("X") IF_FEATURE_HUMAN_READABLE("h") "k" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002513 IF_SELINUX("K") "] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002514#define ls_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002515 "List directory contents\n" \
2516 "\nOptions:" \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002517 "\n -1 List in a single column" \
2518 "\n -A Don't list . and .." \
2519 "\n -a Don't hide entries starting with ." \
2520 "\n -C List by columns" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002521 IF_FEATURE_LS_TIMESTAMPS( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002522 "\n -c With -l: sort by ctime") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002523 IF_FEATURE_LS_COLOR( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002524 "\n --color[={always,never,auto}] Control coloring") \
2525 "\n -d List directory entries instead of contents" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002526 IF_FEATURE_LS_TIMESTAMPS( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002527 "\n -e List full date and time") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002528 IF_FEATURE_LS_FILETYPES( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002529 "\n -F Append indicator (one of */=@|) to entries") \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002530 "\n -i List inode numbers" \
2531 "\n -l Long listing format" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002532 "\n -n List numeric UIDs and GIDs instead of names" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002533 IF_FEATURE_LS_FILETYPES( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002534 "\n -p Append indicator (one of /=@|) to entries") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002535 IF_FEATURE_LS_FOLLOWLINKS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002536 "\n -L List entries pointed to by symlinks") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002537 IF_FEATURE_LS_RECURSIVE( \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01002538 "\n -R Recurse") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002539 IF_FEATURE_LS_SORTFILES( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002540 "\n -r Sort in reverse order") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002541 IF_FEATURE_LS_SORTFILES( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002542 "\n -S Sort by file size") \
Denis Vlasenko397de612008-03-17 08:55:44 +00002543 "\n -s List the size of each file, in blocks" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002544 IF_FEATURE_AUTOWIDTH( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01002545 "\n -T N Assume tabstop every N columns") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002546 IF_FEATURE_LS_TIMESTAMPS( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002547 "\n -t With -l: sort by modification time") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002548 IF_FEATURE_LS_TIMESTAMPS( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002549 "\n -u With -l: sort by access time") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002550 IF_FEATURE_LS_SORTFILES( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002551 "\n -v Sort by version") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002552 IF_FEATURE_AUTOWIDTH( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01002553 "\n -w N Assume the terminal is N columns wide") \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002554 "\n -x List by lines" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002555 IF_FEATURE_LS_SORTFILES( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002556 "\n -X Sort by extension") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002557 IF_FEATURE_HUMAN_READABLE( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002558 "\n -h List sizes in human readable format (1K 243M 2G)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002559 IF_SELINUX( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002560 "\n -k List security context") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002561 IF_SELINUX( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002562 "\n -K List security context in long format") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002563 IF_SELINUX( \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002564 "\n -Z List security context and permission") \
Eric Andersen7e9276b2001-02-22 01:15:47 +00002565
Mike Frysingerde9f1f72005-04-22 02:33:37 +00002566#define lsattr_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002567 "[-Radlv] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002568#define lsattr_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002569 "List file attributes on an ext2 fs\n" \
2570 "\nOptions:" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01002571 "\n -R Recurse" \
Denys Vlasenko07697852009-10-06 21:11:37 +02002572 "\n -a Don't hide entries starting with ." \
Denis Vlasenko397de612008-03-17 08:55:44 +00002573 "\n -d List directory entries instead of contents" \
Denis Vlasenkode5f6452008-10-27 12:37:22 +00002574 "\n -l List long flag names" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002575 "\n -v List the file's version/generation number" \
Mike Frysingerde9f1f72005-04-22 02:33:37 +00002576
Eric Andersen7e9276b2001-02-22 01:15:47 +00002577#define lsmod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002578 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002579#define lsmod_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00002580 "List the currently loaded kernel modules"
Eric Andersen7e9276b2001-02-22 01:15:47 +00002581
Souf Oued982bc712009-12-05 17:56:25 +01002582#define lspci_trivial_usage \
2583 "[-mk]"
2584#define lspci_full_usage "\n\n" \
2585 "List all PCI devices" \
2586 "\n" \
2587 "\n -m Parseable output" \
2588 "\n -k Show driver" \
2589
Souf Oued11a802a2009-12-07 01:37:34 +01002590#define lsusb_trivial_usage NOUSAGE_STR
2591#define lsusb_full_usage ""
2592
Denis Vlasenkoe3241842007-08-13 10:36:25 +00002593#if ENABLE_FEATURE_MAKEDEVS_LEAF
Eric Andersen7e9276b2001-02-22 01:15:47 +00002594#define makedevs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002595 "NAME TYPE MAJOR MINOR FIRST LAST [s]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002596#define makedevs_full_usage "\n\n" \
Denis Vlasenko9ef1a5d2008-08-01 02:15:51 +00002597 "Create a range of block or character special files" \
2598 "\n" \
2599 "\nTYPE is:" \
2600 "\n b Block device" \
2601 "\n c Character device" \
2602 "\n f FIFO, MAJOR and MINOR are ignored" \
2603 "\n" \
2604 "\nFIRST..LAST specify numbers appended to NAME." \
2605 "\nIf 's' is the last argument, the base device is created as well." \
2606 "\n" \
2607 "\nExamples:" \
2608 "\n makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63" \
2609 "\n makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002610#define makedevs_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002611 "# makedevs /dev/ttyS c 4 66 2 63\n" \
2612 "[creates ttyS2-ttyS63]\n" \
2613 "# makedevs /dev/hda b 3 0 0 8 s\n" \
2614 "[creates hda,hda1-hda8]\n"
Eric Andersen3d925622005-06-09 10:16:02 +00002615#endif
2616
Denis Vlasenkoe3241842007-08-13 10:36:25 +00002617#if ENABLE_FEATURE_MAKEDEVS_TABLE
Eric Andersen3d925622005-06-09 10:16:02 +00002618#define makedevs_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002619 "[-d device_table] rootdir"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002620#define makedevs_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00002621 "Create a range of special files as specified in a device table.\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002622 "Device table entries take the form of:\n" \
2623 "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002624 "Where name is the file name, type can be one of:\n" \
Denis Vlasenko9ef1a5d2008-08-01 02:15:51 +00002625 " f Regular file\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002626 " d Directory\n" \
Denis Vlasenko9ef1a5d2008-08-01 02:15:51 +00002627 " c Character device\n" \
2628 " b Block device\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00002629 " p Fifo (named pipe)\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002630 "uid is the user id for the target file, gid is the group id for the\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002631 "target file. The rest of the entries (major, minor, etc) apply to\n" \
2632 "to device special files. A '-' may be used for blank entries."
Eric Andersene8614db2005-07-18 09:28:36 +00002633#define makedevs_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002634 "For example:\n" \
2635 "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
2636 "/dev d 755 0 0 - - - - -\n" \
2637 "/dev/console c 666 0 0 5 1 - - -\n" \
2638 "/dev/null c 666 0 0 1 3 0 0 -\n" \
2639 "/dev/zero c 666 0 0 1 5 0 0 -\n" \
2640 "/dev/hda b 640 0 0 3 0 0 0 -\n" \
2641 "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \
2642 "Will Produce:\n" \
2643 "/dev\n" \
2644 "/dev/console\n" \
2645 "/dev/null\n" \
2646 "/dev/zero\n" \
2647 "/dev/hda\n" \
2648 "/dev/hda[0-15]\n"
Eric Andersen3d925622005-06-09 10:16:02 +00002649#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002650
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00002651#define makemime_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002652 "[OPTIONS] [FILE]..."
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00002653#define makemime_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002654 "Create multipart MIME-encoded message from FILEs\n" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02002655/* "Transfer encoding is base64, disposition is inline (not attachment)\n" */ \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00002656 "\nOptions:" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02002657 "\n -o FILE Output. Default: stdout" \
2658 "\n -a HDR Add header. Examples:" \
2659 "\n \"From: user@host.org\", \"Date: `date -R`\"" \
2660 "\n -c CT Content type. Default: text/plain" \
2661 "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET \
2662/* "\n -e ENC Transfer encoding. Ignored. base64 is assumed" */ \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00002663 "\n" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02002664 "\nOther options are silently ignored" \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00002665
Denis Vlasenkoffa44992008-04-13 08:20:00 +00002666#define man_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002667 "[OPTIONS] [MANPAGE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002668#define man_full_usage "\n\n" \
Denis Vlasenkoffa44992008-04-13 08:20:00 +00002669 "Format and display manual page\n" \
2670 "\nOptions:" \
2671 "\n -a Display all pages" \
2672 "\n -w Show page locations" \
2673
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00002674#define matchpathcon_trivial_usage \
2675 "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002676#define matchpathcon_full_usage "\n\n" \
Denys Vlasenko07697852009-10-06 21:11:37 +02002677 " -n Don't display path" \
2678 "\n -N Don't use translations" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002679 "\n -f Use alternate file_context file" \
2680 "\n -p Use prefix to speed translations" \
2681 "\n -V Verify file context on disk matches defaults" \
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00002682
Eric Andersen7e9276b2001-02-22 01:15:47 +00002683#define md5sum_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002684 "[OPTIONS] [FILE]..." \
2685 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTIONS] -c [FILE]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002686#define md5sum_full_usage "\n\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002687 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
2688 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002689 "\nOptions:" \
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002690 "\n -c Check sums against given list" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002691 "\n -s Don't output anything, status code shows success" \
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002692 "\n -w Warn about improperly formatted checksum lines" \
2693 )
Denis Vlasenko397de612008-03-17 08:55:44 +00002694
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002695#define md5sum_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002696 "$ md5sum < busybox\n" \
2697 "6fd11e98b98a58f64ff3398d7b324003\n" \
2698 "$ md5sum busybox\n" \
2699 "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
2700 "$ md5sum -c -\n" \
2701 "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
2702 "busybox: OK\n" \
2703 "^D\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002704
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002705#define sha1sum_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002706 "[OPTIONS] [FILE]..." \
2707 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTIONS] -c [FILE]")
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002708#define sha1sum_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002709 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002710 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002711 "\nOptions:" \
2712 "\n -c Check sums against given list" \
2713 "\n -s Don't output anything, status code shows success" \
2714 "\n -w Warn about improperly formatted checksum lines" \
2715 )
2716
2717#define sha256sum_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002718 "[OPTIONS] [FILE]..." \
2719 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTIONS] -c [FILE]")
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002720#define sha256sum_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002721 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002722 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002723 "\nOptions:" \
2724 "\n -c Check sums against given list" \
2725 "\n -s Don't output anything, status code shows success" \
2726 "\n -w Warn about improperly formatted checksum lines" \
2727 )
2728
2729#define sha512sum_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002730 "[OPTIONS] [FILE]..." \
2731 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTIONS] -c [FILE]")
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002732#define sha512sum_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002733 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002734 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
Denis Vlasenko56dceb92008-11-10 13:32:50 +00002735 "\nOptions:" \
2736 "\n -c Check sums against given list" \
2737 "\n -s Don't output anything, status code shows success" \
2738 "\n -w Warn about improperly formatted checksum lines" \
2739 )
2740
Rob Landley70f7ef72005-12-13 08:21:33 +00002741#define mdev_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002742 "[-s]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002743#define mdev_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002744 " -s Scan /sys and populate /dev during system boot\n" \
2745 "\n" \
Denis Vlasenkoaafbae62009-04-13 13:33:02 +00002746 "It can be run by kernel as a hotplug helper. To activate it:\n" \
Denys Vlasenkof92874e2009-12-05 15:59:05 +01002747 " echo /sbin/mdev > /proc/sys/kernel/hotplug\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002748 IF_FEATURE_MDEV_CONF( \
Denis Vlasenkoaafbae62009-04-13 13:33:02 +00002749 "It uses /etc/mdev.conf with lines\n" \
Denis Vlasenkof2b39e02009-04-13 23:18:52 +00002750 "[-]DEVNAME UID:GID PERM" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002751 IF_FEATURE_MDEV_RENAME(" [>|=PATH]") \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002752 IF_FEATURE_MDEV_EXEC(" [@|$|*PROG]") \
Denis Vlasenkoaafbae62009-04-13 13:33:02 +00002753 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00002754
Rob Landleyef10d522006-06-26 14:11:33 +00002755#define mdev_notes_usage "" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002756 IF_FEATURE_MDEV_CONFIG( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002757 "The mdev config file contains lines that look like:\n" \
2758 " hd[a-z][0-9]* 0:3 660\n\n" \
2759 "That's device name (with regex match), uid:gid, and permissions.\n\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002760 IF_FEATURE_MDEV_EXEC( \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00002761 "Optionally, that can be followed (on the same line) by a special character\n" \
2762 "and a command line to run after creating/before deleting the corresponding\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002763 "device(s). The environment variable $MDEV indicates the active device node\n" \
2764 "(which is useful if it's a regex match). For example:\n\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00002765 " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" \
2766 "The special characters are @ (run after creating), $ (run before deleting),\n" \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00002767 "and * (run both after creating and before deleting). The commands run in\n" \
Denis Vlasenko7df69b82006-11-28 00:46:49 +00002768 "the /dev directory, and use system() which calls /bin/sh.\n\n" \
Rob Landleyef10d522006-06-26 14:11:33 +00002769 ) \
Denis Vlasenko223bc972007-11-22 00:58:49 +00002770 "Config file parsing stops on the first matching line. If no config\n" \
2771 "entry is matched, devices are created with default 0:0 660. (Make\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002772 "the last line match .* to override this.)\n\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00002773 )
Rob Landley70f7ef72005-12-13 08:21:33 +00002774
Glenn L McGrath061c9002002-09-16 04:21:46 +00002775#define mesg_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002776 "[y|n]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002777#define mesg_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00002778 "Control write access to your terminal\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002779 " y Allow write access to your terminal\n" \
2780 " n Disallow write access to your terminal"
Glenn L McGrath061c9002002-09-16 04:21:46 +00002781
Denis Vlasenkoefd3f382007-09-21 13:43:28 +00002782#define microcom_trivial_usage \
Denis Vlasenkod56e3cc2008-02-09 11:37:21 +00002783 "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002784#define microcom_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002785 "Copy bytes for stdin to TTY and from TTY to stdout\n" \
2786 "\nOptions:" \
2787 "\n -d Wait up to DELAY ms for TTY output before sending every" \
2788 "\n next byte to it" \
2789 "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \
2790 "\n -s Set serial line to SPEED" \
2791 "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \
Denis Vlasenkoefd3f382007-09-21 13:43:28 +00002792
Eric Andersen7e9276b2001-02-22 01:15:47 +00002793#define mkdir_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02002794 "[OPTIONS] DIRECTORY..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002795#define mkdir_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002796 "Create DIRECTORY\n" \
2797 "\nOptions:" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02002798 "\n -m Mode" \
2799 "\n -p No error if exists; make parent directories as needed" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002800 IF_SELINUX( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002801 "\n -Z Set security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00002802 )
2803
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002804#define mkdir_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002805 "$ mkdir /tmp/foo\n" \
2806 "$ mkdir /tmp/foo\n" \
2807 "/tmp/foo: File exists\n" \
2808 "$ mkdir /tmp/foo/bar/baz\n" \
2809 "/tmp/foo/bar/baz: No such file or directory\n" \
2810 "$ mkdir -p /tmp/foo/bar/baz\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002811
Eric Andersen7e9276b2001-02-22 01:15:47 +00002812#define mkfifo_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002813 "[OPTIONS] name"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002814#define mkfifo_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002815 "Create named pipe (identical to 'mknod name p')\n" \
2816 "\nOptions:" \
2817 "\n -m MODE Mode (default a=rw)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002818 IF_SELINUX( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002819 "\n -Z Set security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00002820 )
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002821
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002822#define mkfs_ext2_trivial_usage \
Denys Vlasenkoc1ab01b2009-10-22 12:24:48 +02002823 "[-Fn] " \
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002824 /* "[-c|-l filename] " */ \
2825 "[-b BLK_SIZE] " \
2826 /* "[-f fragment-size] [-g blocks-per-group] " */ \
Denys Vlasenko149a32a2009-10-22 12:12:17 +02002827 "[-i INODE_RATIO] [-I INODE_SIZE] " \
Denys Vlasenko77da1ca2009-10-18 16:29:30 +02002828 /* "[-j] [-J journal-options] [-N number-of-inodes] " */ \
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002829 "[-m RESERVED_PERCENT] " \
2830 /* "[-o creator-os] [-O feature[,...]] [-q] " */ \
2831 /* "[r fs-revision-level] [-E extended-options] [-v] [-F] " */ \
2832 "[-L LABEL] " \
2833 /* "[-M last-mounted-directory] [-S] [-T filesystem-type] " */ \
Denys Vlasenko149a32a2009-10-22 12:12:17 +02002834 "BLOCKDEV [KBYTES]"
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002835#define mkfs_ext2_full_usage "\n\n" \
2836 " -b BLK_SIZE Block size, bytes" \
Denys Vlasenko149a32a2009-10-22 12:12:17 +02002837/* "\n -c Check device for bad blocks" */ \
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002838/* "\n -E opts Set extended options" */ \
2839/* "\n -f size Fragment size in bytes" */ \
Denys Vlasenkoc1ab01b2009-10-22 12:24:48 +02002840 "\n -F Force" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01002841/* "\n -g N Number of blocks in a block group" */ \
Denys Vlasenko838e07a2009-10-22 12:15:33 +02002842 "\n -i RATIO Max number of files is filesystem_size / RATIO" \
Denys Vlasenko149a32a2009-10-22 12:12:17 +02002843 "\n -I BYTES Inode size (min 128)" \
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002844/* "\n -j Create a journal (ext3)" */ \
2845/* "\n -J opts Set journal options (size/device)" */ \
2846/* "\n -l file Read bad blocks list from file" */ \
Denys Vlasenko6a8cfdc2009-10-17 23:41:15 +02002847 "\n -L LBL Volume label" \
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002848 "\n -m PERCENT Percent of blocks to reserve for admin" \
2849/* "\n -M dir Set last mounted directory" */ \
Denys Vlasenko77da1ca2009-10-18 16:29:30 +02002850 "\n -n Dry run" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01002851/* "\n -N N Number of inodes to create" */ \
Vladimir Dronnikov823b4e62009-10-17 21:38:19 +02002852/* "\n -o os Set the 'creator os' field" */ \
2853/* "\n -O features Dir_index/filetype/has_journal/journal_dev/sparse_super" */ \
2854/* "\n -q Quiet" */ \
2855/* "\n -r rev Set filesystem revision" */ \
2856/* "\n -S Write superblock and group descriptors only" */ \
2857/* "\n -T fs-type Set usage type (news/largefile/largefile4)" */ \
2858/* "\n -v Verbose" */ \
2859
Eric Andersen7e9276b2001-02-22 01:15:47 +00002860#define mkfs_minix_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002861 "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002862#define mkfs_minix_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002863 "Make a MINIX filesystem\n" \
2864 "\nOptions:" \
2865 "\n -c Check device for bad blocks" \
2866 "\n -n [14|30] Maximum length of filenames" \
2867 "\n -i INODES Number of inodes for the filesystem" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002868 "\n -l FILE Read bad blocks list from FILE" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002869 "\n -v Make version 2 filesystem" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002870
Vladimir Dronnikov0d8ea642009-11-02 10:41:46 +01002871#define mkfs_reiser_trivial_usage \
2872 "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]"
2873
2874#define mkfs_reiser_full_usage "\n\n" \
2875 "Make a ReiserFS V3 filesystem\n" \
2876 "\nOptions:" \
2877 "\n -f Force" \
2878 "\n -l LBL Volume label" \
2879
Denis Vlasenko9d04b6b2009-03-28 02:13:01 +00002880#define mkfs_vfat_trivial_usage \
Denys Vlasenko149a32a2009-10-22 12:12:17 +02002881 "[-v] [-n LABEL] BLOCKDEV [KBYTES]"
Denis Vlasenko9d04b6b2009-03-28 02:13:01 +00002882/* Accepted but ignored:
2883 "[-c] [-C] [-I] [-l bad-block-file] [-b backup-boot-sector] "
2884 "[-m boot-msg-file] [-i volume-id] "
2885 "[-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs] "
2886 "[-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors] "
2887*/
2888#define mkfs_vfat_full_usage "\n\n" \
2889 "Make a FAT32 filesystem\n" \
2890 "\nOptions:" \
2891/* "\n -c Check device for bad blocks" */ \
2892 "\n -v Verbose" \
2893/* "\n -I Allow to use entire disk device (e.g. /dev/hda)" */ \
2894 "\n -n LBL Volume label" \
2895
Eric Andersen7e9276b2001-02-22 01:15:47 +00002896#define mknod_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002897 "[OPTIONS] NAME TYPE MAJOR MINOR"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002898#define mknod_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002899 "Create a special file (block, character, or pipe)\n" \
2900 "\nOptions:" \
2901 "\n -m Create the special file using the specified mode (default a=rw)" \
2902 "\nTYPEs include:" \
2903 "\n b: Make a block device" \
2904 "\n c or u: Make a character device" \
2905 "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002906 IF_SELINUX( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002907 "\n -Z Set security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00002908 )
2909
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002910#define mknod_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002911 "$ mknod /dev/fd0 b 2 0\n" \
2912 "$ mknod -m 644 /tmp/pipe p\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002913
Eric Andersen7e9276b2001-02-22 01:15:47 +00002914#define mkswap_trivial_usage \
Denys Vlasenko40e7d252010-02-01 23:48:27 +01002915 "[OPTIONS] BLOCKDEV [KBYTES]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002916#define mkswap_full_usage "\n\n" \
Denys Vlasenko68c67462009-11-03 05:51:20 +01002917 "Prepare BLOCKDEV to be used as swap partition\n" \
2918 "\nOptions:" \
2919 "\n -L LBL Label" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002920
Eric Andersen7e9276b2001-02-22 01:15:47 +00002921#define mktemp_trivial_usage \
Denis Vlasenkoc05b1682008-06-05 12:06:00 +00002922 "[-dt] [-p DIR] [TEMPLATE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002923#define mktemp_full_usage "\n\n" \
Denis Vlasenkoc05b1682008-06-05 12:06:00 +00002924 "Create a temporary file with name based on TEMPLATE and print its name.\n" \
Denis Vlasenkof2cccbc2008-06-08 20:40:33 +00002925 "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002926 "\nOptions:" \
2927 "\n -d Make a directory instead of a file" \
2928/* "\n -q Fail silently if an error occurs" - we ignore it */ \
2929 "\n -t Generate a path rooted in temporary directory" \
2930 "\n -p DIR Use DIR as a temporary directory (implies -t)" \
2931 "\n" \
Denis Vlasenkoc05b1682008-06-05 12:06:00 +00002932 "\nFor -t or -p, directory is chosen as follows:" \
2933 "\n$TMPDIR if set, else -p DIR, else /tmp" \
Denis Vlasenko65581f32008-02-09 06:26:53 +00002934
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002935#define mktemp_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00002936 "$ mktemp /tmp/temp.XXXXXX\n" \
2937 "/tmp/temp.mWiLjM\n" \
2938 "$ ls -la /tmp/temp.mWiLjM\n" \
2939 "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002940
Eric Andersen8d79ce82001-07-22 23:00:15 +00002941#define modprobe_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002942 IF_MODPROBE_SMALL("[-qfwrsv] MODULE [symbol=value]...") \
Denys Vlasenko0c6914e2009-09-07 02:38:26 +02002943 IF_NOT_MODPROBE_SMALL("[-" \
2944 IF_FEATURE_2_4_MODULES("k")"nqrsv" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01002945 IF_FEATURE_MODPROBE_BLACKLIST("b")"] MODULE [symbol=value]...")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00002946#define modprobe_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00002947 "Options:" \
Denys Vlasenko0c6914e2009-09-07 02:38:26 +02002948 IF_MODPROBE_SMALL( \
2949 "\n -q Quiet" \
2950 "\n -f Force" \
2951 "\n -w Wait for unload" \
2952 "\n -r Remove module (stacks) or do autoclean" \
2953 "\n -s Report via syslog instead of stderr" \
2954 "\n -v Verbose" \
2955 ) \
2956 IF_NOT_MODPROBE_SMALL( \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002957 IF_FEATURE_2_4_MODULES( \
Denis Vlasenko397de612008-03-17 08:55:44 +00002958 "\n -k Make module autoclean-able" \
Denis Vlasenkoba1315d2008-09-13 14:59:38 +00002959 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00002960 "\n -n Dry run" \
2961 "\n -q Quiet" \
2962 "\n -r Remove module (stacks) or do autoclean" \
2963 "\n -s Report via syslog instead of stderr" \
2964 "\n -v Verbose" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00002965 IF_FEATURE_MODPROBE_BLACKLIST( \
Denis Vlasenkoba1315d2008-09-13 14:59:38 +00002966 "\n -b Apply blacklist to module names too" \
Denys Vlasenko0c6914e2009-09-07 02:38:26 +02002967 ) \
2968 )
Denis Vlasenko397de612008-03-17 08:55:44 +00002969
Rob Landley9c32a152005-12-11 20:12:24 +00002970#define modprobe_notes_usage \
2971"modprobe can (un)load a stack of modules, passing each module options (when\n" \
2972"loading). modprobe uses a configuration file to determine what option(s) to\n" \
2973"pass each module it loads.\n" \
2974"\n" \
Bernhard Reutner-Fischer12aca792009-02-24 10:03:22 +00002975"The configuration file is searched (in this order):\n" \
Rob Landley9c32a152005-12-11 20:12:24 +00002976"\n" \
2977" /etc/modprobe.conf (2.6 only)\n" \
2978" /etc/modules.conf\n" \
2979" /etc/conf.modules (deprecated)\n" \
2980"\n" \
2981"They all have the same syntax (see below). If none is present, it is\n" \
2982"_not_ an error; each loaded module is then expected to load without\n" \
2983"options. Once a file is found, the others are tested for.\n" \
2984"\n" \
2985"/etc/modules.conf entry format:\n" \
2986"\n" \
2987" alias <alias_name> <mod_name>\n" \
2988" Makes it possible to modprobe alias_name, when there is no such module.\n" \
Mike Frysingerfa6c4842006-05-26 01:48:17 +00002989" It makes sense if your mod_name is long, or you want a more representative\n" \
Rob Landley9c32a152005-12-11 20:12:24 +00002990" name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
2991" This makes it also possible to use a different set of options (below) for\n" \
2992" the module and the alias.\n" \
2993" A module can be aliased more than once.\n" \
2994"\n" \
Denis Vlasenkof430cdb2007-11-15 07:02:55 +00002995" options <mod_name|alias_name> <symbol=value...>\n" \
Rob Landley9c32a152005-12-11 20:12:24 +00002996" When loading module mod_name (or the module aliased by alias_name), pass\n" \
2997" the \"symbol=value\" pairs as option to that module.\n" \
2998"\n" \
2999"Sample /etc/modules.conf file:\n" \
3000"\n" \
3001" options tulip irq=3\n" \
3002" alias tulip tulip2\n" \
3003" options tulip2 irq=4 io=0x308\n" \
3004"\n" \
3005"Other functionality offered by 'classic' modprobe is not available in\n" \
3006"this implementation.\n" \
3007"\n" \
3008"If module options are present both in the config file, and on the command line,\n" \
3009"then the options from the command line will be passed to the module _after_\n" \
3010"the options from the config file. That way, you can have defaults in the config\n" \
3011"file, and override them for a specific usage from the command line.\n"
Eric Andersen8d79ce82001-07-22 23:00:15 +00003012#define modprobe_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003013 "(with the above /etc/modules.conf):\n\n" \
3014 "$ modprobe tulip\n" \
3015 " will load the module 'tulip' with default option 'irq=3'\n\n" \
3016 "$ modprobe tulip irq=5\n" \
3017 " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
3018 "$ modprobe tulip2\n" \
3019 " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
3020 " which are the default for alias 'tulip2'\n\n" \
3021 "$ modprobe tulip2 irq=8\n" \
3022 " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
3023 " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
3024 " from the command line\n\n" \
3025 "$ modprobe tulip2 irq=2 io=0x210\n" \
3026 " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
3027 " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
3028 " from the command line\n"
Eric Andersen8d79ce82001-07-22 23:00:15 +00003029
Eric Andersen7e9276b2001-02-22 01:15:47 +00003030#define more_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003031 "[FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003032#define more_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01003033 "View FILE (or stdin) one screenful at a time"
Denis Vlasenko397de612008-03-17 08:55:44 +00003034
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003035#define more_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003036 "$ dmesg | more\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003037
Eric Andersen7e9276b2001-02-22 01:15:47 +00003038#define mount_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003039 "[OPTIONS] [-o OPTS] DEVICE NODE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003040#define mount_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02003041 "Mount a filesystem. Filesystem autodetection requires /proc.\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003042 "\nOptions:" \
3043 "\n -a Mount all filesystems in fstab" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003044 IF_FEATURE_MOUNT_FAKE( \
3045 IF_FEATURE_MTAB_SUPPORT( \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003046 "\n -f Update /etc/mtab, but don't mount" \
3047 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003048 IF_NOT_FEATURE_MTAB_SUPPORT( \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003049 "\n -f Dry run" \
3050 ) \
Denis Vlasenkob1d8e7d2008-02-16 23:28:42 +00003051 ) \
Denys Vlasenkoe2e4cc22009-06-19 11:48:29 +02003052 IF_FEATURE_MOUNT_HELPERS( \
3053 "\n -i Don't run mount helper" \
3054 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003055 IF_FEATURE_MTAB_SUPPORT( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003056 "\n -n Don't update /etc/mtab" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00003057 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00003058 "\n -r Read-only mount" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003059 "\n -w Read-write mount (default)" \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003060 "\n -t FSTYPE Filesystem type" \
3061 "\n -O OPT Mount only filesystems with option OPT (-a only)" \
3062 "\n-o OPT:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003063 IF_FEATURE_MOUNT_LOOP( \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003064 "\n loop Ignored (loop devices are autodetected)" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00003065 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003066 IF_FEATURE_MOUNT_FLAGS( \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003067 "\n [a]sync Writes are [a]synchronous" \
3068 "\n [no]atime Disable/enable updates to inode access times" \
3069 "\n [no]diratime Disable/enable atime updates to directories" \
3070 "\n [no]relatime Disable/enable atime updates relative to modification time" \
3071 "\n [no]dev (Dis)allow use of special device files" \
3072 "\n [no]exec (Dis)allow use of executable files" \
3073 "\n [no]suid (Dis)allow set-user-id-root programs" \
3074 "\n [r]shared Convert [recursively] to a shared subtree" \
3075 "\n [r]slave Convert [recursively] to a slave subtree" \
3076 "\n [r]private Convert [recursively] to a private subtree" \
3077 "\n [un]bindable Make mount point [un]able to be bind mounted" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003078 "\n bind Bind a file or directory to another location" \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003079 "\n move Relocate an existing mount point" \
Rob Landleye55a73c2006-08-09 20:55:35 +00003080 ) \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003081 "\n remount Remount a mounted filesystem, changing flags" \
3082 "\n ro/rw Same as -r/-w" \
Denis Vlasenko7aaedcf2009-03-14 22:57:20 +00003083 "\n" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003084 "\nThere are filesystem-specific -o flags." \
Denis Vlasenko397de612008-03-17 08:55:44 +00003085
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003086#define mount_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003087 "$ mount\n" \
3088 "/dev/hda3 on / type minix (rw)\n" \
3089 "proc on /proc type proc (rw)\n" \
3090 "devpts on /dev/pts type devpts (rw)\n" \
3091 "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
3092 "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
3093 "$ mount cd_image.iso mydir\n"
Rob Landleye1ee4822006-06-24 22:39:19 +00003094#define mount_notes_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003095 "Returns 0 for success, number of failed mounts for -a, or errno for one mount."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003096
Rob Landleyd00b3a52005-08-20 05:07:08 +00003097#define mountpoint_trivial_usage \
Denis Vlasenko7a1ddf22008-11-29 12:54:16 +00003098 "[-q] <[-dn] DIR | -x DEVICE>"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003099#define mountpoint_full_usage "\n\n" \
Denis Vlasenko7a1ddf22008-11-29 12:54:16 +00003100 "Check if the directory is a mountpoint\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003101 "\nOptions:" \
3102 "\n -q Quiet" \
3103 "\n -d Print major/minor device number of the filesystem" \
Denis Vlasenko7a1ddf22008-11-29 12:54:16 +00003104 "\n -n Print device name of the filesystem" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003105 "\n -x Print major/minor device number of the blockdevice" \
3106
Rob Landleyd00b3a52005-08-20 05:07:08 +00003107#define mountpoint_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003108 "$ mountpoint /proc\n" \
3109 "/proc is not a mountpoint\n" \
3110 "$ mountpoint /sys\n" \
3111 "/sys is a mountpoint\n"
Rob Landleyd00b3a52005-08-20 05:07:08 +00003112
Eric Andersen7e9276b2001-02-22 01:15:47 +00003113#define mt_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003114 "[-f device] opcode value"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003115#define mt_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003116 "Control magnetic tape drive operation\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003117 "\n" \
3118 "Available Opcodes:\n" \
3119 "\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003120 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
3121 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
3122 "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003123 "setpart tell unload unlock weof wset" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003124
Eric Andersen7e9276b2001-02-22 01:15:47 +00003125#define mv_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003126 "[OPTIONS] SOURCE DEST\n" \
3127 "or: mv [OPTIONS] SOURCE... DIRECTORY"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003128#define mv_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003129 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \
3130 "\nOptions:" \
3131 "\n -f Don't prompt before overwriting" \
3132 "\n -i Interactive, prompt before overwrite" \
3133
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003134#define mv_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003135 "$ mv /tmp/foo /bin/bar\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003136
Glenn L McGrathf03c9332002-12-13 00:01:44 +00003137#define nameif_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003138 "[-s] [-c FILE] [{IFNAME MACADDR}]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003139#define nameif_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003140 "Rename network interface while it in the down state\n" \
3141 "\nOptions:" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02003142 "\n -c FILE Use configuration file (default: /etc/mactab)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003143 "\n -s Use syslog (LOCAL0 facility)" \
3144 "\n IFNAME MACADDR new_interface_name interface_mac_address" \
3145
Glenn L McGrathf03c9332002-12-13 00:01:44 +00003146#define nameif_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003147 "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
3148 " or\n" \
3149 "$ nameif -c /etc/my_mactab_file\n" \
Glenn L McGrathf03c9332002-12-13 00:01:44 +00003150
Denis Vlasenko29fe7262007-04-05 20:26:28 +00003151#if !ENABLE_DESKTOP
3152
Rob Landley1cca9482006-07-10 19:45:20 +00003153#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA
Denis Vlasenkod0e70af2006-10-16 01:10:28 +00003154#define NC_OPTIONS_STR "\n\nOptions:"
Mike Frysinger7dc7f402005-05-06 05:00:34 +00003155#else
Denis Vlasenkod0e70af2006-10-16 01:10:28 +00003156#define NC_OPTIONS_STR
Mike Frysinger7dc7f402005-05-06 05:00:34 +00003157#endif
Rob Landley1cca9482006-07-10 19:45:20 +00003158
Eric Andersen7e9276b2001-02-22 01:15:47 +00003159#define nc_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003160 IF_NC_EXTRA("[-iN] [-wN] ")IF_NC_SERVER("[-l] [-p PORT] ") \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003161 "["IF_NC_EXTRA("-f FILENAME|")"IPADDR PORT]"IF_NC_EXTRA(" [-e PROG]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003162#define nc_full_usage "\n\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003163 "Open a pipe to IP:port" IF_NC_EXTRA(" or file") \
Denis Vlasenkod0e70af2006-10-16 01:10:28 +00003164 NC_OPTIONS_STR \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003165 IF_NC_EXTRA( \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003166 "\n -e PROG Run PROG after connect" \
3167 "\n -i SEC Delay interval for lines sent" \
3168 "\n -w SEC Timeout for connect" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003169 "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
Mike Frysinger7dc7f402005-05-06 05:00:34 +00003170 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003171 IF_NC_SERVER( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003172 "\n -l Listen mode, for inbound connects" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003173 IF_NC_EXTRA( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003174 "\n (use -l twice with -e for persistent server)") \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003175 "\n -p PORT Local port" \
Rob Landley1cca9482006-07-10 19:45:20 +00003176 )
3177
Rob Landley1cca9482006-07-10 19:45:20 +00003178#define nc_notes_usage "" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003179 IF_NC_EXTRA( \
Denis Vlasenko765996a2006-12-24 16:59:27 +00003180 "To use netcat as a terminal emulator on a serial port:\n\n" \
3181 "$ stty 115200 -F /dev/ttyS0\n" \
3182 "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
3183 )
Rob Landley1cca9482006-07-10 19:45:20 +00003184
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003185#define nc_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003186 "$ nc foobar.somedomain.com 25\n" \
3187 "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
3188 "help\n" \
3189 "214-Commands supported:\n" \
3190 "214- HELO EHLO MAIL RCPT DATA AUTH\n" \
3191 "214 NOOP QUIT RSET HELP\n" \
3192 "quit\n" \
3193 "221 foobar closing connection\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003194
Denis Vlasenko29fe7262007-04-05 20:26:28 +00003195#else /* DESKTOP nc - much more compatible with nc 1.10 */
3196
3197#define nc_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003198 "[OPTIONS] HOST PORT - connect" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003199 IF_NC_SERVER("\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003200 "nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003201#define nc_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003202 "Options:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003203 "\n -e PROG Run PROG after connect (must be last)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003204 IF_NC_SERVER( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003205 "\n -l Listen mode, for inbound connects" \
Denis Vlasenko29fe7262007-04-05 20:26:28 +00003206 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00003207 "\n -n Don't do DNS resolution" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003208 "\n -s ADDR Local address" \
3209 "\n -p PORT Local port" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003210 "\n -u UDP mode" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003211 "\n -v Verbose" \
3212 "\n -w SEC Timeout for connects and final net reads" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003213 IF_NC_EXTRA( \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003214 "\n -i SEC Delay interval for lines sent" /* ", ports scanned" */ \
3215 "\n -o FILE Hex dump traffic" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003216 "\n -z Zero-I/O mode (scanning)" \
Denis Vlasenko29fe7262007-04-05 20:26:28 +00003217 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00003218/* "\n -r Randomize local and remote ports" */
3219/* "\n -g gateway Source-routing hop point[s], up to 8" */
3220/* "\n -G num Source-routing pointer: 4, 8, 12, ..." */
Denis Vlasenko29fe7262007-04-05 20:26:28 +00003221/* "\nport numbers can be individual or ranges: lo-hi [inclusive]" */
3222
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003223/* -e PROG can take ARGS too: "nc ... -e ls -l", but we don't document it
3224 * in help text: nc 1.10 does not allow that. We don't want to entice
3225 * users to use this incompatibility */
3226
Denis Vlasenko29fe7262007-04-05 20:26:28 +00003227#endif
3228
Eric Andersen1552ff72001-10-31 11:07:12 +00003229#define netstat_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003230 "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003231#define netstat_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003232 "Display networking information\n" \
3233 "\nOptions:" \
Denis Vlasenko418a7fb2007-05-15 23:57:46 +00003234 "\n -l Display listening server sockets" \
3235 "\n -a Display all sockets (default: connected)" \
3236 "\n -e Display other/more information" \
3237 "\n -n Don't resolve names" \
3238 "\n -t Tcp sockets" \
3239 "\n -u Udp sockets" \
3240 "\n -w Raw sockets" \
3241 "\n -x Unix sockets" \
3242 "\n -r Display routing table" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003243 IF_FEATURE_NETSTAT_WIDE( \
Denis Vlasenko418a7fb2007-05-15 23:57:46 +00003244 "\n -W Display with no column truncation" \
Denis Vlasenko6e69e422008-07-27 12:10:07 +00003245 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003246 IF_FEATURE_NETSTAT_PRG( \
Denis Vlasenko6e69e422008-07-27 12:10:07 +00003247 "\n -p Display PID/Program name for sockets" \
Denis Vlasenko418a7fb2007-05-15 23:57:46 +00003248 )
Eric Andersen1552ff72001-10-31 11:07:12 +00003249
Manuel Novoa III 2c511602005-02-13 20:14:05 +00003250#define nice_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003251 "[-n ADJUST] [PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003252#define nice_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003253 "Run PROG with modified scheduling priority\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003254 "\nOptions:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003255 "\n -n ADJUST Adjust priority by ADJUST" \
Manuel Novoa III 2c511602005-02-13 20:14:05 +00003256
Denis Vlasenko1db39b22006-10-11 20:59:02 +00003257#define nmeter_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003258 "format_string"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003259#define nmeter_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003260 "Monitor system in real time\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003261 "Format specifiers:\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02003262 " %Nc or %[cN] Monitor CPU. N - bar size, default 10\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003263 " (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02003264 " %[niface] Monitor network interface 'iface'\n" \
3265 " %m Monitor allocated memory\n" \
3266 " %[mf] Monitor free memory\n" \
3267 " %[mt] Monitor total memory\n" \
3268 " %s Monitor allocated swap\n" \
3269 " %f Monitor number of used file descriptors\n" \
3270 " %Ni Monitor total/specific IRQ rate\n" \
3271 " %x Monitor context switch rate\n" \
3272 " %p Monitor forks\n" \
3273 " %[pn] Monitor # of processes\n" \
3274 " %b Monitor block io\n" \
3275 " %Nt Show time (with N decimal points)\n" \
3276 " %Nd Milliseconds between updates (default:1000)\n" \
3277 " %r Print <cr> instead of <lf> at EOL" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003278
Denis Vlasenko1db39b22006-10-11 20:59:02 +00003279#define nmeter_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003280 "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'"
Denis Vlasenko1db39b22006-10-11 20:59:02 +00003281
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00003282#define nohup_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003283 "PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003284#define nohup_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003285 "Run PROG immune to hangups, with output to a non-tty"
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00003286#define nohup_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003287 "$ nohup make &"
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +00003288
Eric Andersen7e9276b2001-02-22 01:15:47 +00003289#define nslookup_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003290 "[HOST] [SERVER]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003291#define nslookup_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003292 "Query the nameserver for the IP address of the given HOST\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003293 "optionally using a specified DNS server"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003294#define nslookup_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003295 "$ nslookup localhost\n" \
3296 "Server: default\n" \
3297 "Address: default\n" \
3298 "\n" \
3299 "Name: debian\n" \
3300 "Address: 127.0.0.1\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003301
Adam Tkacb1585062009-11-22 03:43:55 +01003302#define ntpd_trivial_usage \
Denys Vlasenkoede737b2010-01-06 12:27:47 +01003303 "[-dnqwl] [-S PROG] [-p PEER]..."
Adam Tkacb1585062009-11-22 03:43:55 +01003304#define ntpd_full_usage "\n\n" \
3305 "NTP client/server\n" \
3306 "\nOptions:" \
3307 "\n -d Verbose" \
3308 "\n -n Do not daemonize" \
Denys Vlasenko8d580c72009-11-23 16:27:16 +01003309 "\n -q Quit after clock is set" \
Denys Vlasenko907647f2009-12-02 23:17:45 +01003310/* -N exists for mostly compat reasons, thus not essential to inform */ \
Denys Vlasenkob2e5fc32009-11-25 14:52:47 +01003311/* the user that it exists: user may use nice as well */ \
3312/* "\n -N Run at high priority" */ \
Denys Vlasenko074e8dc2010-01-04 23:58:13 +01003313 "\n -w Do not set time (only query peers), implies -n" \
Adam Tkacb1585062009-11-22 03:43:55 +01003314 "\n -l Run as server on port 123" \
Denys Vlasenkoede737b2010-01-06 12:27:47 +01003315 "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \
Adam Tkacb1585062009-11-22 03:43:55 +01003316 "\n -p PEER Obtain time from PEER (may be repeated)" \
3317
Glenn L McGrath60281112001-11-02 11:39:46 +00003318#define od_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003319 "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003320#define od_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003321 "Write an unambiguous representation, octal bytes by default, of FILE\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01003322 "(or stdin) to stdout"
Glenn L McGrath60281112001-11-02 11:39:46 +00003323
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00003324#define openvt_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003325 "[-c N] [-sw] [PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003326#define openvt_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003327 "Start PROG on a new virtual terminal\n" \
Denis Vlasenko95891fc2008-03-27 16:26:35 +00003328 "\nOptions:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003329 "\n -c N Use specified VT" \
Denis Vlasenko95891fc2008-03-27 16:26:35 +00003330 "\n -s Switch to the VT" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003331/* "\n -l Run PROG as login shell (by prepending '-')" */ \
3332 "\n -w Wait for PROG to exit" \
Denis Vlasenko95891fc2008-03-27 16:26:35 +00003333
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00003334#define openvt_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003335 "openvt 2 /bin/ash\n"
Glenn L McGrathec0c48c2002-09-16 03:16:06 +00003336
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003337/*
Denis Vlasenko2e157dd2008-07-19 09:27:19 +00003338#define parse_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003339 "[-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..."
3340#define parse_full_usage ""
3341*/
Denis Vlasenko2e157dd2008-07-19 09:27:19 +00003342
Eric Andersen27f64e12002-06-23 04:24:25 +00003343#define passwd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003344 "[OPTIONS] [USER]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003345#define passwd_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003346 "Change USER's password. If no USER is specified,\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003347 "changes the password for the current user.\n" \
3348 "\nOptions:" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003349 "\n -a Algorithm to use for password (des, md5)" /* ", sha1)" */ \
Denis Vlasenko397de612008-03-17 08:55:44 +00003350 "\n -d Delete password for the account" \
3351 "\n -l Lock (disable) account" \
3352 "\n -u Unlock (re-enable) account" \
Eric Andersen27f64e12002-06-23 04:24:25 +00003353
Denis Vlasenko21d10142007-07-20 21:28:41 +00003354#define chpasswd_trivial_usage \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02003355 IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003356#define chpasswd_full_usage "\n\n" \
Denys Vlasenko33d7b722009-08-27 20:47:35 +02003357 "Read user:password from stdin and update /etc/passwd\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003358 "\nOptions:" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02003359 IF_LONG_OPTS( \
Bernhard Reutner-Fischer9b446132008-08-05 09:56:56 +00003360 "\n -e,--encrypted Supplied passwords are in encrypted form" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003361 "\n -m,--md5 Use MD5 encryption instead of DES" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00003362 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02003363 IF_NOT_LONG_OPTS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003364 "\n -e Supplied passwords are in encrypted form" \
3365 "\n -m Use MD5 encryption instead of DES" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00003366 )
Denis Vlasenko21d10142007-07-20 21:28:41 +00003367
Glenn L McGrath655d8142003-06-22 15:32:41 +00003368#define patch_trivial_usage \
Denys Vlasenko17c838b2009-10-24 17:11:55 +02003369 "[OPTIONS] [ORIGFILE [PATCHFILE]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003370#define patch_full_usage "\n\n" \
Denys Vlasenko17c838b2009-10-24 17:11:55 +02003371 IF_LONG_OPTS( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003372 " -p,--strip N Strip N leading components from file names" \
Denys Vlasenko17c838b2009-10-24 17:11:55 +02003373 "\n -i,--input DIFF Read DIFF instead of stdin" \
3374 "\n -R,--reverse Reverse patch" \
3375 "\n -N,--forward Ignore already applied patches" \
3376 "\n --dry-run Don't actually change files" \
3377 ) \
3378 IF_NOT_LONG_OPTS( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003379 " -p N Strip N leading components from file names" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003380 "\n -i DIFF Read DIFF instead of stdin" \
Denis Vlasenko08ec67b2008-03-26 13:32:30 +00003381 "\n -R Reverse patch" \
Denys Vlasenkod7874ed2009-08-20 23:33:19 +02003382 "\n -N Ignore already applied patches" \
Denys Vlasenko17c838b2009-10-24 17:11:55 +02003383 )
Denis Vlasenko397de612008-03-17 08:55:44 +00003384
Glenn L McGrath655d8142003-06-22 15:32:41 +00003385#define patch_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003386 "$ patch -p1 < example.diff\n" \
3387 "$ patch -p0 -i example.diff"
Glenn L McGrath655d8142003-06-22 15:32:41 +00003388
Denis Vlasenko72e1c892007-09-29 22:26:01 +00003389#define pgrep_trivial_usage \
Denys Vlasenko57dc5342009-07-06 00:00:12 +02003390 "[-flnovx] [-s SID|-P PPID|PATTERN]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003391#define pgrep_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003392 "Display process(es) selected by regex PATTERN\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003393 "\nOptions:" \
3394 "\n -l Show command name too" \
3395 "\n -f Match against entire command line" \
3396 "\n -n Show the newest process only" \
3397 "\n -o Show the oldest process only" \
Denys Vlasenko57dc5342009-07-06 00:00:12 +02003398 "\n -v Negate the match" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003399 "\n -x Match whole name (not substring)" \
Denys Vlasenko57dc5342009-07-06 00:00:12 +02003400 "\n -s Match session ID (0 for current)" \
3401 "\n -P Match parent process ID" \
Denis Vlasenko72e1c892007-09-29 22:26:01 +00003402
Bernhard Reutner-Fischer81c3a512005-10-06 15:37:02 +00003403#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
Eric Andersen221b2ea2001-07-31 19:06:07 +00003404#define pidof_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003405 "[OPTIONS] [NAME]..."
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003406#define USAGE_PIDOF "\n\nOptions:"
3407#else
3408#define pidof_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003409 "[NAME]..."
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003410#define USAGE_PIDOF /* none */
3411#endif
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003412#define pidof_full_usage "\n\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003413 "List PIDs of all processes with names that match NAMEs" \
Bernhard Reutner-Fischer81c3a512005-10-06 15:37:02 +00003414 USAGE_PIDOF \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003415 IF_FEATURE_PIDOF_SINGLE( \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003416 "\n -s Show only one PID") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003417 IF_FEATURE_PIDOF_OMIT( \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003418 "\n -o PID Omit given pid" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003419 "\n Use %PPID to omit pid of pidof's parent") \
3420
Eric Andersen221b2ea2001-07-31 19:06:07 +00003421#define pidof_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003422 "$ pidof init\n" \
3423 "1\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003424 IF_FEATURE_PIDOF_OMIT( \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00003425 "$ pidof /bin/sh\n20351 5973 5950\n") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003426 IF_FEATURE_PIDOF_OMIT( \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00003427 "$ pidof /bin/sh -o %PPID\n20351 5950")
Eric Andersen221b2ea2001-07-31 19:06:07 +00003428
Denis Vlasenkoe3241842007-08-13 10:36:25 +00003429#if !ENABLE_FEATURE_FANCY_PING
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003430#define ping_trivial_usage \
3431 "host"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003432#define ping_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003433 "Send ICMP ECHO_REQUEST packets to network hosts"
Denis Vlasenkob9a279b2007-01-24 23:53:22 +00003434#define ping6_trivial_usage \
3435 "host"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003436#define ping6_full_usage "\n\n" \
Denis Vlasenkob9a279b2007-01-24 23:53:22 +00003437 "Send ICMP ECHO_REQUEST packets to network hosts"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003438#else
3439#define ping_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003440 "[OPTIONS] HOST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003441#define ping_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003442 "Send ICMP ECHO_REQUEST packets to network hosts\n" \
3443 "\nOptions:" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01003444 "\n -4, -6 Force IP or IPv6 name resolution" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003445 "\n -c CNT Send only CNT pings" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003446 "\n -s SIZE Send SIZE data bytes in packets (default:56)" \
3447 "\n -I IFACE/IP Use interface or IP address as source" \
3448 "\n -W SEC Seconds to wait for the first response (default:10)" \
Denis Vlasenko90c31b32008-04-07 00:46:29 +00003449 "\n (after all -c CNT packets are sent)" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003450 "\n -w SEC Seconds until ping exits (default:infinite)" \
Denis Vlasenko90c31b32008-04-07 00:46:29 +00003451 "\n (can exit earlier with -c CNT)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003452 "\n -q Quiet, only displays output at start" \
3453 "\n and when finished" \
3454
Eric Andersen51b8bd62002-07-03 11:46:38 +00003455#define ping6_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003456 "[OPTIONS] HOST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003457#define ping6_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003458 "Send ICMP ECHO_REQUEST packets to network hosts\n" \
3459 "\nOptions:" \
3460 "\n -c CNT Send only CNT pings" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003461 "\n -s SIZE Send SIZE data bytes in packets (default:56)" \
3462 "\n -I IFACE/IP Use interface or IP address as source" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003463 "\n -q Quiet, only displays output at start" \
3464 "\n and when finished" \
3465
Eric Andersen51b8bd62002-07-03 11:46:38 +00003466#endif
Denis Vlasenkob9a279b2007-01-24 23:53:22 +00003467#define ping_example_usage \
3468 "$ ping localhost\n" \
3469 "PING slag (127.0.0.1): 56 data bytes\n" \
3470 "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
3471 "\n" \
3472 "--- debian ping statistics ---\n" \
3473 "1 packets transmitted, 1 packets received, 0% packet loss\n" \
3474 "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
Eric Andersen51b8bd62002-07-03 11:46:38 +00003475#define ping6_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003476 "$ ping6 ip6-localhost\n" \
3477 "PING ip6-localhost (::1): 56 data bytes\n" \
3478 "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
3479 "\n" \
3480 "--- ip6-localhost ping statistics ---\n" \
3481 "1 packets transmitted, 1 packets received, 0% packet loss\n" \
3482 "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
Eric Andersen51b8bd62002-07-03 11:46:38 +00003483
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003484#define pipe_progress_trivial_usage NOUSAGE_STR
3485#define pipe_progress_full_usage ""
3486
Eric Andersen7e9276b2001-02-22 01:15:47 +00003487#define pivot_root_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003488 "NEW_ROOT PUT_OLD"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003489#define pivot_root_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003490 "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00003491 "the new root file system"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003492
Denis Vlasenko72e1c892007-09-29 22:26:01 +00003493#define pkill_trivial_usage \
Denys Vlasenko57dc5342009-07-06 00:00:12 +02003494 "[-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003495#define pkill_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003496 "Send a signal to process(es) selected by regex PATTERN\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003497 "\nOptions:" \
3498 "\n -l List all signals" \
3499 "\n -f Match against entire command line" \
3500 "\n -n Signal the newest process only" \
3501 "\n -o Signal the oldest process only" \
Denys Vlasenko57dc5342009-07-06 00:00:12 +02003502 "\n -v Negate the match" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003503 "\n -x Match whole name (not substring)" \
Denys Vlasenko57dc5342009-07-06 00:00:12 +02003504 "\n -s Match session ID (0 for current)" \
3505 "\n -P Match parent process ID" \
Denis Vlasenko72e1c892007-09-29 22:26:01 +00003506
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003507#define popmaildir_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003508 "[OPTIONS] MAILDIR [CONN_HELPER ARGS]"
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003509#define popmaildir_full_usage "\n\n" \
3510 "Fetch content of remote mailbox to local maildir\n" \
3511 "\nOptions:" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003512/* "\n -b Binary mode. Ignored" */ \
3513/* "\n -d Debug. Ignored" */ \
3514/* "\n -m Show used memory. Ignored" */ \
3515/* "\n -V Show version. Ignored" */ \
3516/* "\n -c Use tcpclient. Ignored" */ \
3517/* "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" */ \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003518 "\n -s Skip authorization" \
Denys Vlasenkoeae697f2010-03-10 13:01:14 +01003519 "\n -T Get messages with TOP instead of RETR" \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003520 "\n -k Keep retrieved messages on the server" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003521 "\n -t SEC Network timeout" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02003522 IF_FEATURE_POPMAILDIR_DELIVERY( \
Denys Vlasenkoeae697f2010-03-10 13:01:14 +01003523 "\n -F \"PROG ARGS\" Filter program (may be repeated)" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003524 "\n -M \"PROG ARGS\" Delivery program" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02003525 ) \
Denys Vlasenkoeae697f2010-03-10 13:01:14 +01003526 "\n" \
3527 "\nFetch from plain POP3 server:" \
3528 "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt" \
3529 "\nFetch from SSLed POP3 server and delete fetched emails:" \
3530 "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt"
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003531/* "\n -R BYTES Remove old messages on the server >= BYTES. Ignored" */
3532/* "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" */
3533/* "\n -L BYTES Don't retrieve new messages >= BYTES. Ignored" */
3534/* "\n -H LINES Type first LINES of a message. Ignored" */
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003535#define popmaildir_example_usage \
3536 "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
3537 "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
3538
Eric Andersen7e9276b2001-02-22 01:15:47 +00003539#define poweroff_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003540 "[-d DELAY] [-n] [-f]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003541#define poweroff_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003542 "Halt and shut off power\n" \
3543 "\nOptions:" \
3544 "\n -d Delay interval for halting" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003545 "\n -n Do not sync" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003546 "\n -f Force power off (don't go through init)" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003547
Mike Frysinger95d3c452005-04-21 23:29:24 +00003548#define printenv_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003549 "[VARIABLE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003550#define printenv_full_usage "\n\n" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003551 "Print environment VARIABLEs.\n" \
3552 "If no VARIABLE specified, print all."
Mike Frysinger95d3c452005-04-21 23:29:24 +00003553
Eric Andersen7e9276b2001-02-22 01:15:47 +00003554#define printf_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003555 "FORMAT [ARGUMENT]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003556#define printf_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003557 "Format and print ARGUMENT(s) according to FORMAT,\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00003558 "where FORMAT controls the output exactly as in C printf"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003559#define printf_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003560 "$ printf \"Val=%d\\n\" 5\n" \
3561 "Val=5\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003562
Denis Vlasenko94949192006-11-05 00:45:47 +00003563
3564#if ENABLE_DESKTOP
3565
3566#define ps_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003567 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003568#define ps_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003569 "Report process status\n" \
3570 "\nOptions:" \
3571 "\n -o col1,col2=header Select columns for display" \
Denys Vlasenko532609e2009-09-20 20:29:25 +02003572 IF_FEATURE_SHOW_THREADS( \
3573 "\n -T Show threads" \
3574 )
Denis Vlasenko94949192006-11-05 00:45:47 +00003575
3576#else /* !ENABLE_DESKTOP */
3577
Denis Vlasenko397de612008-03-17 08:55:44 +00003578#if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00003579#define USAGE_PS "\nThis version of ps accepts no options"
Rob Landley6eb1e412005-06-20 04:30:36 +00003580#else
3581#define USAGE_PS "\nOptions:"
3582#endif
Eric Andersen15c03c32004-04-06 17:52:02 +00003583
Eric Andersen7e9276b2001-02-22 01:15:47 +00003584#define ps_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003585 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003586#define ps_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003587 "Report process status\n" \
Rob Landley6eb1e412005-06-20 04:30:36 +00003588 USAGE_PS \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003589 IF_SELINUX( \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003590 "\n -Z Show selinux context" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003591 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003592 IF_FEATURE_PS_WIDE( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003593 "\n w Wide output" \
3594 )
Rob Landley6eb1e412005-06-20 04:30:36 +00003595
Denis Vlasenko94949192006-11-05 00:45:47 +00003596#endif /* ENABLE_DESKTOP */
3597
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003598#define ps_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003599 "$ ps\n" \
3600 " PID Uid Gid State Command\n" \
3601 " 1 root root S init\n" \
3602 " 2 root root S [kflushd]\n" \
3603 " 3 root root S [kupdate]\n" \
3604 " 4 root root S [kpiod]\n" \
3605 " 5 root root S [kswapd]\n" \
3606 " 742 andersen andersen S [bash]\n" \
3607 " 743 andersen andersen S -bash\n" \
3608 " 745 root root S [getty]\n" \
Denis Vlasenko6ea75e22008-06-28 21:46:41 +00003609 " 2990 andersen andersen R ps\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003610
Denis Vlasenko7b72fc12007-06-16 13:37:59 +00003611#define pscan_trivial_usage \
Denis Vlasenko715c16a2008-03-23 14:46:14 +00003612 "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003613#define pscan_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003614 "Scan a host, print all open ports\n" \
3615 "\nOptions:" \
Denis Vlasenko715c16a2008-03-23 14:46:14 +00003616 "\n -c Show closed ports too" \
Denis Vlasenko324d26f2008-03-23 18:44:59 +00003617 "\n -b Show blocked ports too" \
Denis Vlasenko7b72fc12007-06-16 13:37:59 +00003618 "\n -p Scan from this port (default 1)" \
3619 "\n -P Scan up to this port (default 1024)" \
3620 "\n -t Timeout (default 5000 ms)" \
3621 "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \
3622
Eric Andersen7e9276b2001-02-22 01:15:47 +00003623#define pwd_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003624 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003625#define pwd_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003626 "Print the full filename of the current working directory"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003627#define pwd_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003628 "$ pwd\n" \
3629 "/root\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003630
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00003631#define raidautorun_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003632 "DEVICE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003633#define raidautorun_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003634 "Tell the kernel to automatically search and start RAID arrays"
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00003635#define raidautorun_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003636 "$ raidautorun /dev/md0"
Denis Vlasenkoc108ed52006-10-20 19:39:48 +00003637
Eric Andersen7e9276b2001-02-22 01:15:47 +00003638#define rdate_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003639 "[-sp] HOST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003640#define rdate_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003641 "Get and possibly set the system date and time from a remote HOST\n" \
3642 "\nOptions:" \
3643 "\n -s Set the system date and time (default)" \
3644 "\n -p Print the date and time" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003645
Bernhard Reutner-Fischerc77e8432008-08-19 11:28:52 +00003646#define rdev_trivial_usage \
3647 ""
3648#define rdev_full_usage "\n\n" \
3649 "Print the device node associated with the filesystem mounted at '/'"
3650#define rdev_example_usage \
3651 "$ rdev\n" \
3652 "/dev/mtdblock9 /\n"
3653
Rob Landley0e4690d2006-08-20 22:12:18 +00003654#define readahead_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003655 "[FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003656#define readahead_full_usage "\n\n" \
Denys Vlasenko8d680b52009-10-06 21:23:02 +02003657 "Preload FILEs to RAM"
Rob Landley0e4690d2006-08-20 22:12:18 +00003658
Eric Andersen7e9276b2001-02-22 01:15:47 +00003659#define readlink_trivial_usage \
Denys Vlasenkoa99aa6e2009-06-12 13:16:21 +02003660 IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003661#define readlink_full_usage "\n\n" \
Denis Vlasenko081ef792007-03-17 16:38:21 +00003662 "Display the value of a symlink" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003663 IF_FEATURE_READLINK_FOLLOW( "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003664 "\nOptions:" \
Denys Vlasenkoa99aa6e2009-06-12 13:16:21 +02003665 "\n -f Canonicalize by following all symlinks" \
3666 "\n -n Don't add newline" \
3667 "\n -v Verbose" \
3668 ) \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003669
Paul Mundt8b2d02e2005-05-20 17:22:18 +00003670#define readprofile_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003671 "[OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003672#define readprofile_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003673 "Options:" \
3674 "\n -m mapfile (Default: /boot/System.map)" \
3675 "\n -p profile (Default: /proc/profile)" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003676 "\n -M NUM Set the profiling multiplier to NUM" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003677 "\n -i Print only info about the sampling step" \
3678 "\n -v Verbose" \
3679 "\n -a Print all symbols, even if count is 0" \
3680 "\n -b Print individual histogram-bin counts" \
3681 "\n -s Print individual counters within functions" \
3682 "\n -r Reset all the counters (root only)" \
3683 "\n -n Disable byte order auto-detection" \
Paul Mundt8b2d02e2005-05-20 17:22:18 +00003684
Glenn L McGrath62fae302002-12-10 00:14:33 +00003685#define realpath_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003686 "FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003687#define realpath_full_usage "\n\n" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003688 "Return the absolute pathnames of given FILE"
Tim Riker7b253f82003-12-28 05:02:40 +00003689
Eric Andersen7e9276b2001-02-22 01:15:47 +00003690#define reboot_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01003691 "[-d DELAY] [-n] [-f]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003692#define reboot_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003693 "Reboot the system\n" \
3694 "\nOptions:" \
3695 "\n -d Delay interval for rebooting" \
3696 "\n -n No call to sync()" \
3697 "\n -f Force reboot (don't go through init)" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00003698
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003699#define reformime_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003700 "[OPTIONS] [FILE]..."
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003701#define reformime_full_usage "\n\n" \
3702 "Parse MIME-encoded message\n" \
3703 "\nOptions:" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003704 "\n -x PREFIX Extract content of MIME sections to files" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01003705 "\n -X PROG ARGS Filter content of MIME sections through PROG" \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003706 "\n Must be the last option" \
3707 "\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01003708 "\nOther options are silently ignored" \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003709
Eric Andersen7e9276b2001-02-22 01:15:47 +00003710#define renice_trivial_usage \
Denis Vlasenkof430cdb2007-11-15 07:02:55 +00003711 "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003712#define renice_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003713 "Change priority of running processes\n" \
3714 "\nOptions:" \
3715 "\n -n Adjust current nice value (smaller is faster)" \
3716 "\n -p Process id(s) (default)" \
3717 "\n -g Process group id(s)" \
3718 "\n -u Process user name(s) and/or id(s)" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003719
Denys Vlasenko5e611152009-05-19 17:36:16 +02003720#define scriptreplay_trivial_usage \
3721 "timingfile [typescript [divisor]]"
3722#define scriptreplay_full_usage "\n\n" \
3723 "Play back typescripts, using timing information"
3724
Eric Andersen7e9276b2001-02-22 01:15:47 +00003725#define reset_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003726 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003727#define reset_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003728 "Reset the screen"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003729
Bernhard Reutner-Fischere63a0de2006-10-25 15:07:56 +00003730#define resize_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003731 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003732#define resize_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003733 "Resize the screen"
Bernhard Reutner-Fischere63a0de2006-10-25 15:07:56 +00003734
Denis Vlasenko397137b2007-07-23 14:03:30 +00003735#define restorecon_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003736 "[-iFnRv] [-e EXCLUDEDIR]... [-o FILE] [-f FILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003737#define restorecon_full_usage "\n\n" \
Denis Vlasenko397137b2007-07-23 14:03:30 +00003738 "Reset security contexts of files in pathname\n" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003739 "\n -i Ignore files that don't exist" \
3740 "\n -f FILE File with list of files to process" \
3741 "\n -e DIR Directory to exclude" \
3742 "\n -R,-r Recurse" \
3743 "\n -n Don't change any file labels" \
3744 "\n -o FILE Save list of files with incorrect context" \
3745 "\n -v Verbose" \
3746 "\n -vv Show changed labels" \
3747 "\n -F Force reset of context to match file_context" \
3748 "\n for customizable files, or the user section," \
3749 "\n if it has changed" \
Denis Vlasenko397137b2007-07-23 14:03:30 +00003750
Souf Oued43afd752010-05-02 18:45:02 +02003751#define rfkill_trivial_usage \
3752 "COMMAND [INDEX|TYPE]"
3753#define rfkill_full_usage "\n\n" \
3754 "Enable/disable wireless devices\n" \
3755 "\nCommands:" \
3756 "\n list [INDEX|TYPE] List current state" \
3757 "\n block INDEX|TYPE Disable device" \
3758 "\n unblock INDEX|TYPE Enable device" \
3759 "\n" \
3760 "\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \
3761 "\n wimax, wwan, gps, fm" \
3762
Eric Andersen7e9276b2001-02-22 01:15:47 +00003763#define rm_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003764 "[OPTIONS] FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003765#define rm_full_usage "\n\n" \
Denys Vlasenko8d680b52009-10-06 21:23:02 +02003766 "Remove (unlink) FILEs\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003767 "\nOptions:" \
3768 "\n -i Always prompt before removing" \
3769 "\n -f Never prompt" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01003770 "\n -R,-r Recurse" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003771
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003772#define rm_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003773 "$ rm -rf /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003774
Eric Andersen7e9276b2001-02-22 01:15:47 +00003775#define rmdir_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003776 "[OPTIONS] DIRECTORY..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003777#define rmdir_full_usage "\n\n" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01003778 "Remove DIRECTORY if it is empty\n" \
Bernhard Reutner-Fischer99ecc462008-08-21 20:52:55 +00003779 "\nOptions:" \
Denys Vlasenko33d7b722009-08-27 20:47:35 +02003780 IF_FEATURE_RMDIR_LONG_OPTIONS( \
Bernhard Reutner-Fischer99ecc462008-08-21 20:52:55 +00003781 "\n -p|--parents Include parents" \
Denys Vlasenko33d7b722009-08-27 20:47:35 +02003782 "\n --ignore-fail-on-non-empty" \
3783 ) \
3784 IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \
Bernhard Reutner-Fischer99ecc462008-08-21 20:52:55 +00003785 "\n -p Include parents" \
Denys Vlasenko33d7b722009-08-27 20:47:35 +02003786 )
Bernhard Reutner-Fischer99ecc462008-08-21 20:52:55 +00003787
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003788#define rmdir_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003789 "# rmdir /tmp/foo\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003790
Eric Andersen7e9276b2001-02-22 01:15:47 +00003791#define rmmod_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003792 "[OPTIONS] [MODULE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003793#define rmmod_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003794 "Unload the specified kernel modules from the kernel\n" \
3795 "\nOptions:" \
Bernhard Reutner-Fischer63758532008-08-21 20:18:55 +00003796 "\n -w Wait until the module is no longer used" \
3797 "\n -f Force unloading" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003798 "\n -a Remove all unused modules (recursively)" \
3799
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003800#define rmmod_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003801 "$ rmmod tulip\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003802
Eric Andersen7e9276b2001-02-22 01:15:47 +00003803#define route_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003804 "[{add|del|delete}]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003805#define route_full_usage "\n\n" \
Bernhard Reutner-Fischer63758532008-08-21 20:18:55 +00003806 "Edit kernel routing tables\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003807 "\nOptions:" \
Denis Vlasenko68e5e2b2008-03-25 03:17:04 +00003808 "\n -n Don't resolve names" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003809 "\n -e Display other/more information" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003810 "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003811
Glenn L McGrathb72a7352002-12-10 00:17:22 +00003812#define rpm_trivial_usage \
Denys Vlasenko5dfd9c42010-05-06 16:56:38 +02003813 "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003814#define rpm_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003815 "Manipulate RPM packages\n" \
Denys Vlasenko5dfd9c42010-05-06 16:56:38 +02003816 "\nCommands:" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003817 "\n -i Install package" \
Denys Vlasenko5dfd9c42010-05-06 16:56:38 +02003818 "\n -qp Query package" \
3819 "\nOptions:" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003820 "\n -i Show information" \
3821 "\n -l List contents" \
3822 "\n -d List documents" \
3823 "\n -c List config files" \
Glenn L McGrathb72a7352002-12-10 00:17:22 +00003824
Glenn L McGrathf8736d22001-06-26 01:19:34 +00003825#define rpm2cpio_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003826 "package.rpm"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003827#define rpm2cpio_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003828 "Output a cpio archive of the rpm file"
Glenn L McGrathf8736d22001-06-26 01:19:34 +00003829
Mike Frysinger6b160e42008-02-15 02:27:19 +00003830#define rtcwake_trivial_usage \
Denis Vlasenkoa6eb7f42009-03-29 16:53:25 +00003831 "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003832#define rtcwake_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003833 "Enter a system sleep state until specified wakeup time\n" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02003834 IF_LONG_OPTS( \
Denis Vlasenkoa6eb7f42009-03-29 16:53:25 +00003835 "\n -a,--auto Read clock mode from adjtime" \
3836 "\n -l,--local Clock is set to local time" \
3837 "\n -u,--utc Clock is set to UTC time" \
3838 "\n -d,--device=DEV Specify the RTC device" \
3839 "\n -m,--mode=MODE Set the sleep state (default: standby)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003840 "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
Denis Vlasenkoa6eb7f42009-03-29 16:53:25 +00003841 "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
Mike Frysinger6b160e42008-02-15 02:27:19 +00003842 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02003843 IF_NOT_LONG_OPTS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003844 "\n -a Read clock mode from adjtime" \
3845 "\n -l Clock is set to local time" \
3846 "\n -u Clock is set to UTC time" \
3847 "\n -d DEV Specify the RTC device" \
3848 "\n -m MODE Set the sleep state (default: standby)" \
3849 "\n -s SEC Set the timeout in SEC seconds from now" \
3850 "\n -t TIME Set the timeout to TIME seconds from epoch" \
Mike Frysinger6b160e42008-02-15 02:27:19 +00003851 )
3852
Denis Vlasenko49622d72007-03-10 16:58:49 +00003853#define runcon_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003854 "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG ARGS\n" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003855 "runcon CONTEXT PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003856#define runcon_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003857 "Run PROG in a different security context\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003858 "\n CONTEXT Complete security context\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003859 IF_FEATURE_RUNCON_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003860 "\n -c,--compute Compute process transition context before modifying" \
3861 "\n -t,--type=TYPE Type (for same role as parent)" \
3862 "\n -u,--user=USER User identity" \
3863 "\n -r,--role=ROLE Role" \
3864 "\n -l,--range=RNG Levelrange" \
Denis Vlasenko03630782007-10-18 11:11:12 +00003865 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003866 IF_NOT_FEATURE_RUNCON_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00003867 "\n -c Compute process transition context before modifying" \
3868 "\n -t TYPE Type (for same role as parent)" \
3869 "\n -u USER User identity" \
3870 "\n -r ROLE Role" \
3871 "\n -l RNG Levelrange" \
Denis Vlasenko03630782007-10-18 11:11:12 +00003872 )
Denis Vlasenko49622d72007-03-10 16:58:49 +00003873
Eric Andersen6cf47a72001-10-31 10:24:36 +00003874#define run_parts_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003875 "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003876#define run_parts_full_usage "\n\n" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01003877 "Run a bunch of scripts in DIRECTORY\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003878 "\nOptions:" \
3879 "\n -t Print what would be run, but don't actually run anything" \
3880 "\n -a ARG Pass ARG as argument for every program" \
3881 "\n -u MASK Set the umask to MASK before running every program" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00003882 IF_FEATURE_RUN_PARTS_FANCY( \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00003883 "\n -l Print names of all matching files even if they are not executable" \
3884 )
Bernhard Reutner-Fischerb7cffd42007-03-28 20:35:13 +00003885
3886#define run_parts_example_usage \
Denis Vlasenkof5635f42007-08-13 10:48:33 +00003887 "$ run-parts -a start /etc/init.d\n" \
3888 "$ run-parts -a stop=now /etc/init.d\n\n" \
3889 "Let's assume you have a script foo/dosomething:\n" \
3890 "#!/bin/sh\n" \
3891 "for i in $*; do eval $i; done; unset i\n" \
3892 "case \"$1\" in\n" \
3893 "start*) echo starting something;;\n" \
3894 "stop*) set -x; shutdown -h $stop;;\n" \
3895 "esac\n\n" \
3896 "Running this yields:\n" \
3897 "$run-parts -a stop=+4m foo/\n" \
3898 "+ shutdown -h +4m"
Eric Andersen6cf47a72001-10-31 10:24:36 +00003899
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00003900#define runlevel_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003901 "[FILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003902#define runlevel_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02003903 "Find the current and previous system runlevel\n" \
3904 "\n" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003905 "If no utmp FILE exists or if no runlevel record can be found,\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003906 "print \"unknown\""
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00003907#define runlevel_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003908 "$ runlevel /var/run/utmp\n" \
3909 "N 2"
Bernhard Reutner-Fischer62d7acc2005-10-28 20:37:03 +00003910
Denis Vlasenko8a00f442006-11-17 18:58:16 +00003911#define runsv_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003912 "DIR"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003913#define runsv_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003914 "Start and monitor a service and optionally an appendant log service"
Denis Vlasenko8a00f442006-11-17 18:58:16 +00003915
3916#define runsvdir_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01003917 "[-P] [-s SCRIPT] DIR"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003918#define runsvdir_full_usage "\n\n" \
Denis Vlasenkodc700692008-11-08 21:39:06 +00003919 "Start a runsv process for each subdirectory. If it exits, restart it.\n" \
3920 "\n -P Put each runsv in a new session" \
3921 "\n -s SCRIPT Run SCRIPT <signo> after signal is processed" \
Denis Vlasenko8a00f442006-11-17 18:58:16 +00003922
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00003923#define rx_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003924 "FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003925#define rx_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00003926 "Receive a file using the xmodem protocol"
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00003927#define rx_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003928 "$ rx /tmp/foo\n"
Glenn L McGrath8f3bc4c2003-12-20 07:30:35 +00003929
Denis Vlasenko5014dad2008-02-27 11:54:59 +00003930#define script_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003931 "[-afq" IF_SCRIPTREPLAY("t") "] [-c PROG] [OUTFILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003932#define script_full_usage "\n\n" \
Denis Vlasenko5014dad2008-02-27 11:54:59 +00003933 "Options:" \
3934 "\n -a Append output" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01003935 "\n -c PROG Run PROG, not shell" \
Denis Vlasenko5014dad2008-02-27 11:54:59 +00003936 "\n -f Flush output after each write" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003937 "\n -q Quiet" \
Denys Vlasenko5e611152009-05-19 17:36:16 +02003938 IF_SCRIPTREPLAY( \
3939 "\n -t Send timing to stderr" \
3940 )
Denis Vlasenko5014dad2008-02-27 11:54:59 +00003941
Eric Andersen7e9276b2001-02-22 01:15:47 +00003942#define sed_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003943 "[-efinr] SED_CMD [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003944#define sed_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003945 "Options:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003946 "\n -e CMD Add CMD to sed commands to be executed" \
3947 "\n -f FILE Add FILE contents to sed commands to be executed" \
Denys Vlasenkodac863a2009-10-27 09:11:17 +01003948 "\n -i Edit files in-place (else sends result to stdout)" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02003949 "\n -n Suppress automatic printing of pattern space" \
3950 "\n -r Use extended regex syntax" \
Denis Vlasenko397de612008-03-17 08:55:44 +00003951 "\n" \
Rob Landley7b284152009-10-26 16:04:07 -05003952 "\nIf no -e or -f, the first non-option argument is the sed command string." \
3953 "\nRemaining arguments are input files (stdin if none)."
Eric Andersenf802ff72004-04-12 15:12:06 +00003954
Eric Andersen0d3a02e2001-03-15 18:14:25 +00003955#define sed_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00003956 "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
3957 "bar\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00003958
Bernhard Reutner-Fischer62538802008-05-08 12:21:44 +00003959#define selinuxenabled_trivial_usage NOUSAGE_STR
3960#define selinuxenabled_full_usage ""
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00003961
Denis Vlasenko73032ca2008-01-28 22:47:03 +00003962#define sendmail_trivial_usage \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02003963 "[OPTIONS] [RECIPIENT_EMAIL]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003964#define sendmail_full_usage "\n\n" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02003965 "Read email from stdin and send it\n" \
Denis Vlasenko88b8f0a2009-03-31 23:41:53 +00003966 "\nStandard options:" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02003967 "\n -t Read additional recipients from message body" \
3968 "\n -f sender Sender (required)" \
3969 "\n -o options Various options. -oi implied, others are ignored" \
Vladimir Dronnikovb618dba2009-10-04 01:34:54 +02003970 "\n -i -oi synonym. implied and ignored" \
Denis Vlasenko88b8f0a2009-03-31 23:41:53 +00003971 "\n" \
3972 "\nBusybox specific options:" \
3973 "\n -w seconds Network timeout" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02003974 "\n -H 'PROG ARGS' Run connection helper" \
Denis Vlasenkoa6eb7f42009-03-29 16:53:25 +00003975 "\n Examples:" \
Denis Vlasenko7e0c2432009-03-02 16:12:00 +00003976 "\n -H 'exec openssl s_client -quiet -tls1 -starttls smtp" \
Denis Vlasenkoa6eb7f42009-03-29 16:53:25 +00003977 "\n -connect smtp.gmail.com:25' <email.txt" \
Denis Vlasenko88b8f0a2009-03-31 23:41:53 +00003978 "\n [4<username_and_passwd.txt | -au<username> -ap<password>]" \
Denis Vlasenkoa6eb7f42009-03-29 16:53:25 +00003979 "\n -H 'exec openssl s_client -quiet -tls1" \
3980 "\n -connect smtp.gmail.com:465' <email.txt" \
Denis Vlasenko88b8f0a2009-03-31 23:41:53 +00003981 "\n [4<username_and_passwd.txt | -au<username> -ap<password>]" \
Denis Vlasenkob9d572a2008-11-06 23:41:38 +00003982 "\n -S server[:port] Server" \
Denis Vlasenko88b8f0a2009-03-31 23:41:53 +00003983 "\n -au<username> Username for AUTH LOGIN" \
3984 "\n -ap<password> Password for AUTH LOGIN" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02003985 "\n -am<method> Authentication method. Ignored. LOGIN is implied" \
Denis Vlasenkobed22a02008-09-27 14:01:22 +00003986 "\n" \
Denis Vlasenko88b8f0a2009-03-31 23:41:53 +00003987 "\nOther options are silently ignored; -oi -t is implied" \
Denys Vlasenko666e1d32009-07-05 21:46:37 +02003988 IF_MAKEMIME( \
3989 "\nUse makemime applet to create message with attachments" \
3990 )
Denis Vlasenko73032ca2008-01-28 22:47:03 +00003991
Glenn L McGrath82364bb2004-01-27 09:22:20 +00003992#define seq_trivial_usage \
Denis Vlasenkocf3e05b2008-11-12 21:18:58 +00003993 "[-w] [-s SEP] [FIRST [INC]] LAST"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00003994#define seq_full_usage "\n\n" \
Denis Vlasenkocf3e05b2008-11-12 21:18:58 +00003995 "Print numbers from FIRST to LAST, in steps of INC.\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01003996 "FIRST, INC default to 1.\n" \
Denis Vlasenkocf3e05b2008-11-12 21:18:58 +00003997 "\nOptions:" \
3998 "\n -w Pad to last with leading zeros" \
3999 "\n -s SEP String separator" \
Glenn L McGrath82364bb2004-01-27 09:22:20 +00004000
Denis Vlasenko705eaf82007-11-22 01:10:41 +00004001#define sestatus_trivial_usage \
4002 "[-vb]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004003#define sestatus_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004004 " -v Verbose" \
4005 "\n -b Display current state of booleans" \
Denis Vlasenko705eaf82007-11-22 01:10:41 +00004006
Paul Foxfc2256a2005-08-01 18:12:30 +00004007#define setconsole_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004008 "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004009#define setconsole_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004010 "Redirect system console output to DEVICE (default: /dev/tty)\n" \
4011 "\nOptions:" \
4012 "\n -r Reset output to /dev/console" \
Paul Foxfc2256a2005-08-01 18:12:30 +00004013
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00004014#define setenforce_trivial_usage \
Denis Vlasenkob69e8722007-07-18 21:57:24 +00004015 "[Enforcing | Permissive | 1 | 0]"
Bernhard Reutner-Fischer62538802008-05-08 12:21:44 +00004016#define setenforce_full_usage ""
Denis Vlasenkod46d3c22007-02-06 19:28:50 +00004017
Denis Vlasenko397137b2007-07-23 14:03:30 +00004018#define setfiles_trivial_usage \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01004019 "[-dnpqsvW] [-e DIR]... [-o FILE] [-r alt_root_path]" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004020 IF_FEATURE_SETFILES_CHECK_OPTION( \
Denis Vlasenko397137b2007-07-23 14:03:30 +00004021 " [-c policyfile] spec_file" \
4022 ) \
4023 " pathname"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004024#define setfiles_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004025 "Reset file contexts under pathname according to spec_file\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004026 IF_FEATURE_SETFILES_CHECK_OPTION( \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01004027 "\n -c FILE Check the validity of the contexts against the specified binary policy" \
Denis Vlasenko397137b2007-07-23 14:03:30 +00004028 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00004029 "\n -d Show which specification matched each file" \
4030 "\n -l Log changes in file labels to syslog" \
4031 "\n -n Don't change any file labels" \
4032 "\n -q Suppress warnings" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01004033 "\n -r DIR Use an alternate root path" \
4034 "\n -e DIR Exclude DIR" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004035 "\n -F Force reset of context to match file_context for customizable files" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01004036 "\n -o FILE Save list of files with incorrect context" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004037 "\n -s Take a list of files from stdin (instead of command line)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004038 "\n -v Show changes in file labels, if type or role are changing" \
4039 "\n -vv Show changes in file labels, if type, role, or user are changing" \
4040 "\n -W Display warnings about entries that had no matching files" \
Denis Vlasenko397137b2007-07-23 14:03:30 +00004041
Denis Vlasenkoc8d02aa2008-08-17 14:12:26 +00004042#define setfont_trivial_usage \
Denis Vlasenko53f219e2008-09-16 19:35:42 +00004043 "FONT [-m MAPFILE] [-C TTY]"
Denis Vlasenkoc8d02aa2008-08-17 14:12:26 +00004044#define setfont_full_usage "\n\n" \
4045 "Load a console font\n" \
4046 "\nOptions:" \
Denis Vlasenko53f219e2008-09-16 19:35:42 +00004047 "\n -m MAPFILE Load console screen map" \
4048 "\n -C TTY Affect TTY instead of /dev/tty" \
4049
Denis Vlasenkoc8d02aa2008-08-17 14:12:26 +00004050#define setfont_example_usage \
4051 "$ setfont -m koi8-r /etc/i18n/fontname\n"
4052
Eric Andersen7e9276b2001-02-22 01:15:47 +00004053#define setkeycodes_trivial_usage \
Denis Vlasenkof430cdb2007-11-15 07:02:55 +00004054 "SCANCODE KEYCODE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004055#define setkeycodes_full_usage "\n\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004056 "Set entries into the kernel's scancode-to-keycode map,\n" \
4057 "allowing unusual keyboards to generate usable keycodes.\n\n" \
4058 "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004059 "and KEYCODE is given in decimal." \
Denis Vlasenko397de612008-03-17 08:55:44 +00004060
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004061#define setkeycodes_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004062 "$ setkeycodes e030 127\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004063
Rob Landley87848d92006-03-27 23:23:43 +00004064#define setlogcons_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004065 "N"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004066#define setlogcons_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004067 "Redirect the kernel output to console N (0 for current)"
Rob Landley87848d92006-03-27 23:23:43 +00004068
Denis Vlasenkobe039372007-10-14 04:48:44 +00004069#define setsebool_trivial_usage \
4070 "boolean value"
4071
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004072#define setsebool_full_usage "\n\n" \
Denis Vlasenkobe039372007-10-14 04:48:44 +00004073 "Change boolean setting"
4074
Paul Fox42403642005-08-01 22:52:09 +00004075#define setsid_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004076 "PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004077#define setsid_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004078 "Run PROG in a new session. PROG will have no controlling terminal\n" \
4079 "and will not be affected by keyboard signals (Ctrl-C etc).\n" \
4080 "See setsid(2) for details." \
Paul Fox42403642005-08-01 22:52:09 +00004081
Eric Andersen2e9c2572003-08-08 22:26:06 +00004082#define last_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004083 ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004084#define last_full_usage "\n\n" \
Denis Vlasenko869d3d32008-05-22 02:07:58 +00004085 "Show listing of the last users that logged into the system" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004086 IF_FEATURE_LAST_FANCY( "\n" \
Denis Vlasenko869d3d32008-05-22 02:07:58 +00004087 "\nOptions:" \
Denis Vlasenkob22a8052008-05-22 02:10:50 +00004088/* "\n -H Show header line" */ \
4089 "\n -W Display with no host column truncation" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004090 "\n -f FILE Read from FILE instead of /var/log/wtmp" \
Denis Vlasenko869d3d32008-05-22 02:07:58 +00004091 )
Eric Andersen2e9c2572003-08-08 22:26:06 +00004092
Denis Vlasenkod7cc2e62008-08-17 14:17:48 +00004093#define showkey_trivial_usage \
4094 "[-a | -k | -s]"
4095#define showkey_full_usage "\n\n" \
4096 "Show keys pressed\n" \
4097 "\nOptions:" \
4098 "\n -a Display decimal/octal/hex values of the keys" \
4099 "\n -k Display interpreted keycodes (default)" \
4100 "\n -s Display raw scan-codes" \
4101
Denis Vlasenko14923db2007-06-20 15:23:03 +00004102#define slattach_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004103 "[-cehmLF] [-s SPEED] [-p PROTOCOL] DEVICE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004104#define slattach_full_usage "\n\n" \
Denis Vlasenko14923db2007-06-20 15:23:03 +00004105 "Attach network interface(s) to serial line(s)\n" \
4106 "\nOptions:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004107 "\n -p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)" \
4108 "\n -s SPD Set line speed" \
Denis Vlasenko14923db2007-06-20 15:23:03 +00004109 "\n -e Exit after initializing device" \
4110 "\n -h Exit when the carrier is lost" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004111 "\n -c PROG Run PROG when the line is hung up" \
Denis Vlasenko14923db2007-06-20 15:23:03 +00004112 "\n -m Do NOT initialize the line in raw 8 bits mode" \
4113 "\n -L Enable 3-wire operation" \
4114 "\n -F Disable RTS/CTS flow control" \
Denis Vlasenko49a128a2007-07-17 21:42:59 +00004115
Eric Andersen7e9276b2001-02-22 01:15:47 +00004116#define sleep_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004117 IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004118#define sleep_full_usage "\n\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004119 IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \
4120 IF_FEATURE_FANCY_SLEEP( \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004121 "Pause for a time equal to the total of the args given, where each arg can\n" \
Denis Vlasenkod63c3a02006-12-25 15:10:32 +00004122 "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004123#define sleep_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004124 "$ sleep 2\n" \
4125 "[2 second delay results]\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004126 IF_FEATURE_FANCY_SLEEP( \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004127 "$ sleep 1d 3h 22m 8s\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004128 "[98528 second delay results]\n")
Eric Andersen7e9276b2001-02-22 01:15:47 +00004129
Eric Andersen7e9276b2001-02-22 01:15:47 +00004130#define sort_trivial_usage \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004131 "[-nru" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004132 IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004133 "] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004134#define sort_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004135 "Sort lines of text\n" \
4136 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004137 IF_FEATURE_SORT_BIG( \
Denis Vlasenko9d96af22008-02-13 15:35:52 +00004138 "\n -b Ignore leading blanks" \
4139 "\n -c Check whether input is sorted" \
4140 "\n -d Dictionary order (blank or alphanumeric only)" \
4141 "\n -f Ignore case" \
4142 "\n -g General numerical sort" \
4143 "\n -i Ignore unprintable characters" \
4144 "\n -k Sort key" \
4145 "\n -M Sort month" \
4146 ) \
4147 "\n -n Sort numbers" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004148 IF_FEATURE_SORT_BIG( \
Denis Vlasenko9d96af22008-02-13 15:35:52 +00004149 "\n -o Output to file" \
4150 "\n -k Sort by key" \
4151 "\n -t CHAR Key separator" \
4152 ) \
4153 "\n -r Reverse sort order" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004154 IF_FEATURE_SORT_BIG( \
Denis Vlasenko9d96af22008-02-13 15:35:52 +00004155 "\n -s Stable (don't sort ties alphabetically)" \
4156 ) \
4157 "\n -u Suppress duplicate lines" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004158 IF_FEATURE_SORT_BIG( \
Denis Vlasenko9d96af22008-02-13 15:35:52 +00004159 "\n -z Lines are terminated by NUL, not newline" \
4160 "\n -mST Ignored for GNU compatibility") \
4161
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004162#define sort_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004163 "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
4164 "a\n" \
4165 "b\n" \
4166 "c\n" \
4167 "d\n" \
4168 "e\n" \
4169 "f\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004170 IF_FEATURE_SORT_BIG( \
Rob Landleyc0dedd02005-01-24 07:00:02 +00004171 "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
4172 "d 2\n" \
4173 "b 2\n" \
4174 "c 3\n" \
4175 ) \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004176 ""
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004177
Bernhard Reutner-Fischer10f8f5f2007-03-25 21:50:18 +00004178#define split_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004179 "[OPTIONS] [INPUT [PREFIX]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004180#define split_full_usage "\n\n" \
Denis Vlasenkof5635f42007-08-13 10:48:33 +00004181 "Options:" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004182 "\n -b n[k|m] Split by bytes" \
4183 "\n -l n Split by lines" \
4184 "\n -a n Use n letters as suffix" \
4185
Bernhard Reutner-Fischer4e1361a2007-03-26 14:38:03 +00004186#define split_example_usage \
Denis Vlasenkof5635f42007-08-13 10:48:33 +00004187 "$ split TODO foo\n" \
4188 "$ cat TODO | split -a 2 -l 2 TODO_\n"
Bernhard Reutner-Fischer10f8f5f2007-03-25 21:50:18 +00004189
Eric Andersenc2af1ee2001-10-18 19:33:06 +00004190#define start_stop_daemon_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004191 "[OPTIONS] [-S|-K] ... [-- ARGS...]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004192#define start_stop_daemon_full_usage "\n\n" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004193 "Search for matching processes, and then\n" \
Denis Vlasenko7ce47e62008-08-03 19:23:30 +00004194 "-K: stop all matching processes.\n" \
4195 "-S: start a process unless a matching process is found.\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004196 IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004197 "\nProcess matching:" \
4198 "\n -u,--user USERNAME|UID Match only this user's processes" \
4199 "\n -n,--name NAME Match processes with NAME" \
4200 "\n in comm field in /proc/PID/stat" \
4201 "\n -x,--exec EXECUTABLE Match processes with this command" \
4202 "\n in /proc/PID/cmdline" \
4203 "\n -p,--pidfile FILE Match a process with PID from the file" \
4204 "\n All specified conditions must match" \
Denis Vlasenko7ce47e62008-08-03 19:23:30 +00004205 "\n-S only:" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004206 "\n -x,--exec EXECUTABLE Program to run" \
4207 "\n -a,--startas NAME Zeroth argument" \
4208 "\n -b,--background Background" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004209 IF_FEATURE_START_STOP_DAEMON_FANCY( \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004210 "\n -N,--nicelevel N Change nice level" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004211 ) \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004212 "\n -c,--chuid USER[:[GRP]] Change to user/group" \
4213 "\n -m,--make-pidfile Write PID to the pidfile specified by -p" \
Denis Vlasenko7ce47e62008-08-03 19:23:30 +00004214 "\n-K only:" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004215 "\n -s,--signal SIG Signal to send" \
4216 "\n -t,--test Match only, exit with 0 if a process is found" \
4217 "\nOther:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004218 IF_FEATURE_START_STOP_DAEMON_FANCY( \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004219 "\n -o,--oknodo Exit with status 0 if nothing is done" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004220 "\n -v,--verbose Verbose" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00004221 ) \
Bernhard Reutner-Fischer1a891332008-09-26 15:14:56 +00004222 "\n -q,--quiet Quiet" \
4223 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004224 IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004225 "\nProcess matching:" \
4226 "\n -u USERNAME|UID Match only this user's processes" \
4227 "\n -n NAME Match processes with NAME" \
4228 "\n in comm field in /proc/PID/stat" \
4229 "\n -x EXECUTABLE Match processes with this command" \
4230 "\n command in /proc/PID/cmdline" \
4231 "\n -p FILE Match a process with PID from the file" \
4232 "\n All specified conditions must match" \
Denis Vlasenko7ce47e62008-08-03 19:23:30 +00004233 "\n-S only:" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004234 "\n -x EXECUTABLE Program to run" \
4235 "\n -a NAME Zeroth argument" \
4236 "\n -b Background" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004237 IF_FEATURE_START_STOP_DAEMON_FANCY( \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004238 "\n -N N Change nice level" \
Denis Vlasenko73e5ed22007-10-18 10:52:36 +00004239 ) \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004240 "\n -c USER[:[GRP]] Change to user/group" \
4241 "\n -m Write PID to the pidfile specified by -p" \
Denis Vlasenko7ce47e62008-08-03 19:23:30 +00004242 "\n-K only:" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004243 "\n -s SIG Signal to send" \
4244 "\n -t Match only, exit with 0 if a process is found" \
4245 "\nOther:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004246 IF_FEATURE_START_STOP_DAEMON_FANCY( \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004247 "\n -o Exit with status 0 if nothing is done" \
Denis Vlasenkoe125a682008-05-18 21:17:52 +00004248 "\n -v Verbose" \
4249 ) \
Bernhard Reutner-Fischer1a891332008-09-26 15:14:56 +00004250 "\n -q Quiet" \
4251 ) \
Eric Andersenc2af1ee2001-10-18 19:33:06 +00004252
Mike Frysinger9b5f71e2005-04-23 06:26:38 +00004253#define stat_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004254 "[OPTIONS] FILE..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004255#define stat_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004256 "Display file (default) or filesystem status\n" \
4257 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004258 IF_FEATURE_STAT_FORMAT( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004259 "\n -c fmt Use the specified format" \
4260 ) \
4261 "\n -f Display filesystem status" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01004262 "\n -L Follow links" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004263 "\n -t Display info in terse form" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004264 IF_SELINUX( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004265 "\n -Z Print security context" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00004266 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004267 IF_FEATURE_STAT_FORMAT( \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004268 "\n\nValid format sequences for files:\n" \
4269 " %a Access rights in octal\n" \
4270 " %A Access rights in human readable form\n" \
4271 " %b Number of blocks allocated (see %B)\n" \
4272 " %B The size in bytes of each block reported by %b\n" \
4273 " %d Device number in decimal\n" \
4274 " %D Device number in hex\n" \
4275 " %f Raw mode in hex\n" \
4276 " %F File type\n" \
4277 " %g Group ID of owner\n" \
4278 " %G Group name of owner\n" \
4279 " %h Number of hard links\n" \
4280 " %i Inode number\n" \
4281 " %n File name\n" \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01004282 " %N File name, with -> TARGET if symlink\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004283 " %o I/O block size\n" \
4284 " %s Total size, in bytes\n" \
4285 " %t Major device type in hex\n" \
4286 " %T Minor device type in hex\n" \
4287 " %u User ID of owner\n" \
4288 " %U User name of owner\n" \
4289 " %x Time of last access\n" \
4290 " %X Time of last access as seconds since Epoch\n" \
4291 " %y Time of last modification\n" \
4292 " %Y Time of last modification as seconds since Epoch\n" \
4293 " %z Time of last change\n" \
4294 " %Z Time of last change as seconds since Epoch\n" \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004295 "\nValid format sequences for file systems:\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004296 " %a Free blocks available to non-superuser\n" \
4297 " %b Total data blocks in file system\n" \
4298 " %c Total file nodes in file system\n" \
4299 " %d Free file nodes in file system\n" \
4300 " %f Free blocks in file system\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004301 IF_SELINUX( \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004302 " %C Security context in selinux\n" \
Denis Vlasenko49622d72007-03-10 16:58:49 +00004303 ) \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004304 " %i File System ID in hex\n" \
4305 " %l Maximum length of filenames\n" \
4306 " %n File name\n" \
Bernhard Reutner-Fischer2e75dcc2007-04-05 10:31:47 +00004307 " %s Block size (for faster transfer)\n" \
Denis Vlasenko7cdc54f2006-12-17 17:27:56 +00004308 " %S Fundamental block size (for block counts)\n" \
4309 " %t Type in hex\n" \
4310 " %T Type in human readable form" \
Denis Vlasenko6ea75e22008-06-28 21:46:41 +00004311 ) \
Mike Frysinger9b5f71e2005-04-23 06:26:38 +00004312
Eric Andersenef5e8f82002-11-07 02:09:37 +00004313#define strings_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004314 "[-afo] [-n LEN] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004315#define strings_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004316 "Display printable strings in a binary file\n" \
4317 "\nOptions:" \
4318 "\n -a Scan whole file (default)" \
4319 "\n -f Precede strings with filenames" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004320 "\n -n LEN At least LEN characters form a string (default 4)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004321 "\n -o Precede strings with decimal offsets" \
Eric Andersenef5e8f82002-11-07 02:09:37 +00004322
Eric Andersen7e9276b2001-02-22 01:15:47 +00004323#define stty_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004324 "[-a|g] [-F DEVICE] [SETTING]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004325#define stty_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004326 "Without arguments, prints baud rate, line discipline,\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004327 "and deviations from stty sane\n" \
4328 "\nOptions:" \
4329 "\n -F DEVICE Open device instead of stdin" \
4330 "\n -a Print all current settings in human-readable form" \
4331 "\n -g Print in stty-readable form" \
4332 "\n [SETTING] See manpage" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004333
Robert Griebl1fca5582002-06-04 20:45:46 +00004334#define su_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01004335 "[OPTIONS] [-] [USERNAME]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004336#define su_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004337 "Change user id or become root\n" \
4338 "\nOptions:" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01004339 "\n -p,-m Preserve environment" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004340 "\n -c CMD Command to pass to 'sh -c'" \
4341 "\n -s SH Shell to use instead of default shell" \
Robert Griebl1fca5582002-06-04 20:45:46 +00004342
Eric Andersen27f64e12002-06-23 04:24:25 +00004343#define sulogin_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004344 "[-t N] [TTY]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004345#define sulogin_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004346 "Single user login\n" \
4347 "\nOptions:" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004348 "\n -t N Timeout" \
Eric Andersen27f64e12002-06-23 04:24:25 +00004349
Mike Frysinger95d3c452005-04-21 23:29:24 +00004350#define sum_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004351 "[-rs] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004352#define sum_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004353 "Checksum and count the blocks in a file\n" \
4354 "\nOptions:" \
4355 "\n -r Use BSD sum algorithm (1K blocks)" \
4356 "\n -s Use System V sum algorithm (512byte blocks)" \
Mike Frysinger95d3c452005-04-21 23:29:24 +00004357
Denis Vlasenko8a00f442006-11-17 18:58:16 +00004358#define sv_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004359 "[-v] [-w SEC] CMD SERVICE_DIR..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004360#define sv_full_usage "\n\n" \
Denis Vlasenkof223efb2007-08-03 10:58:12 +00004361 "Control services monitored by runsv supervisor.\n" \
4362 "Commands (only first character is enough):\n" \
4363 "\n" \
4364 "status: query service status\n" \
4365 "up: if service isn't running, start it. If service stops, restart it\n" \
4366 "once: like 'up', but if service stops, don't restart it\n" \
4367 "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
Denys Vlasenko07697852009-10-06 21:11:37 +02004368 " if it exists. After it stops, don't restart service\n" \
Denis Vlasenkof223efb2007-08-03 10:58:12 +00004369 "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
Denis Vlasenko6ea75e22008-06-28 21:46:41 +00004370 " runsv exits too\n" \
Denis Vlasenkof223efb2007-08-03 10:58:12 +00004371 "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004372 "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
Denis Vlasenko8a00f442006-11-17 18:58:16 +00004373
Denis Vlasenko83ea6432006-11-16 02:27:24 +00004374#define svlogd_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004375 "[-ttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004376#define svlogd_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004377 "Continuously read log data from stdin, optionally\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02004378 "filter log messages, and write the data to one or more automatically\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004379 "rotated logs" \
Denis Vlasenko83ea6432006-11-16 02:27:24 +00004380
Eric Andersen7e9276b2001-02-22 01:15:47 +00004381#define swapoff_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004382 "[-a] [DEVICE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004383#define swapoff_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004384 "Stop swapping on DEVICE\n" \
4385 "\nOptions:" \
4386 "\n -a Stop swapping on all swap devices" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004387
Eric Andersen7e9276b2001-02-22 01:15:47 +00004388#define swapon_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01004389 "[-a]" IF_FEATURE_SWAPON_PRI(" [-p PRI]") " [DEVICE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004390#define swapon_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004391 "Start swapping on DEVICE\n" \
4392 "\nOptions:" \
4393 "\n -a Start swapping on all swap devices" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004394 IF_FEATURE_SWAPON_PRI( \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01004395 "\n -p PRI Set swap device priority" \
Denis Vlasenkoee56e012008-05-18 23:05:34 +00004396 ) \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004397
Rob Landley0f34a822005-10-27 22:55:50 +00004398#define switch_root_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004399 "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004400#define switch_root_full_usage "\n\n" \
Denis Vlasenkof9d4fc32009-04-21 20:40:51 +00004401 "Free initramfs and switch to another root fs:\n" \
4402 "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n" \
4403 "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004404 "\nOptions:" \
Denis Vlasenkof9d4fc32009-04-21 20:40:51 +00004405 "\n -c DEV Reopen stdio to DEV after switch" \
Rob Landley0f34a822005-10-27 22:55:50 +00004406
Eric Andersen7e9276b2001-02-22 01:15:47 +00004407#define sync_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004408 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004409#define sync_full_usage "\n\n" \
Denys Vlasenko14f6f0a2009-06-18 08:20:02 +02004410 "Write all buffered blocks to disk"
4411
4412#define fsync_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004413 "[OPTIONS] FILE..."
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004414#define fsync_full_usage "\n\n" \
Denys Vlasenko14f6f0a2009-06-18 08:20:02 +02004415 "Write files' buffered blocks to disk\n" \
4416 "\nOptions:" \
4417 "\n -d Avoid syncing metadata"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004418
Eric Andersenb9050282003-12-24 06:02:11 +00004419#define sysctl_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004420 "[OPTIONS] [VALUE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004421#define sysctl_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004422 "Configure kernel parameters at runtime\n" \
4423 "\nOptions:" \
Denis Vlasenkof9d4fc32009-04-21 20:40:51 +00004424 "\n -n Don't print key names" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004425 "\n -e Don't warn about unknown keys" \
4426 "\n -w Change sysctl setting" \
4427 "\n -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)" \
4428 "\n -a Display all values" \
4429 "\n -A Display all values in table form" \
4430
Eric Andersen5d38f5b2005-09-12 21:42:48 +00004431#define sysctl_example_usage \
Denis Vlasenko64309f82007-11-29 06:40:28 +00004432 "sysctl [-n] [-e] variable...\n" \
4433 "sysctl [-n] [-e] -w variable=value...\n" \
4434 "sysctl [-n] [-e] -a\n" \
4435 "sysctl [-n] [-e] -p file (default /etc/sysctl.conf)\n" \
4436 "sysctl [-n] [-e] -A\n"
Eric Andersenb9050282003-12-24 06:02:11 +00004437
Eric Andersen7e9276b2001-02-22 01:15:47 +00004438#define syslogd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004439 "[OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004440#define syslogd_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004441 "System logging utility.\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004442 "This version of syslogd ignores /etc/syslog.conf\n" \
Denis Vlasenkobe048f22008-02-26 20:13:52 +00004443 "\nOptions:" \
4444 "\n -n Run in foreground" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004445 "\n -O FILE Log to given file (default:/var/log/messages)" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004446 "\n -l N Set local log level" \
Denis Vlasenkobe048f22008-02-26 20:13:52 +00004447 "\n -S Smaller logging output" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004448 IF_FEATURE_ROTATE_LOGFILE( \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004449 "\n -s SIZE Max size (KB) before rotate (default:200KB, 0=off)" \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01004450 "\n -b N N rotated logs to keep (default:1, max=99, 0=purge)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004451 IF_FEATURE_REMOTE_LOG( \
Denis Vlasenkobe048f22008-02-26 20:13:52 +00004452 "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \
4453 "\n -L Log locally and via network (default is network only if -R)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004454 IF_FEATURE_SYSLOGD_DUP( \
Denis Vlasenkobe048f22008-02-26 20:13:52 +00004455 "\n -D Drop duplicates") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004456 IF_FEATURE_IPC_SYSLOG( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004457 "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \
Denis Vlasenkoa9b60e92007-01-04 17:59:59 +00004458 /* NB: -Csize shouldn't have space (because size is optional) */
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004459/* "\n -m MIN Minutes between MARK lines (default:20, 0=off)" */
Denis Vlasenko397de612008-03-17 08:55:44 +00004460
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004461#define syslogd_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004462 "$ syslogd -R masterlog:514\n" \
4463 "$ syslogd -R 192.168.1.1:601\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004464
Denis Vlasenkobcd5fc12008-01-06 06:27:17 +00004465#define tac_trivial_usage \
4466 "[FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004467#define tac_full_usage "\n\n" \
Denys Vlasenko8d680b52009-10-06 21:23:02 +02004468 "Concatenate FILEs and print them in reverse"
Denis Vlasenkobcd5fc12008-01-06 06:27:17 +00004469
Eric Andersen7e9276b2001-02-22 01:15:47 +00004470#define tar_trivial_usage \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004471 "-[" IF_FEATURE_TAR_CREATE("c") "xt" IF_FEATURE_SEAMLESS_GZ("z") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004472 IF_FEATURE_SEAMLESS_BZ2("j") IF_FEATURE_SEAMLESS_LZMA("a") \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004473 IF_FEATURE_SEAMLESS_Z("Z") IF_FEATURE_TAR_NOPRESERVE_TIME("m") "vO] " \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004474 IF_FEATURE_TAR_FROM("[-X FILE] ") \
Denys Vlasenko8d680b52009-10-06 21:23:02 +02004475 "[-f TARFILE] [-C DIR] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004476#define tar_full_usage "\n\n" \
Denys Vlasenko8d680b52009-10-06 21:23:02 +02004477 IF_FEATURE_TAR_CREATE("Create, extract, ") \
4478 IF_NOT_FEATURE_TAR_CREATE("Extract ") \
4479 "or list files from a tar file\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004480 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004481 IF_FEATURE_TAR_CREATE( \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004482 "\n c Create" \
4483 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00004484 "\n x Extract" \
4485 "\n t List" \
4486 "\nArchive format selection:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004487 IF_FEATURE_SEAMLESS_GZ( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004488 "\n z Filter the archive through gzip" \
4489 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004490 IF_FEATURE_SEAMLESS_BZ2( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004491 "\n j Filter the archive through bzip2" \
4492 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004493 IF_FEATURE_SEAMLESS_LZMA( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004494 "\n a Filter the archive through lzma" \
4495 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004496 IF_FEATURE_SEAMLESS_Z( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004497 "\n Z Filter the archive through compress" \
4498 ) \
Mikhail Gusarov0d478332010-01-19 20:22:30 +06004499 IF_FEATURE_TAR_NOPRESERVE_TIME( \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004500 "\n m Do not restore mtime" \
Mikhail Gusarov0d478332010-01-19 20:22:30 +06004501 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00004502 "\nFile selection:" \
4503 "\n f Name of TARFILE or \"-\" for stdin" \
4504 "\n O Extract to stdout" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004505 IF_FEATURE_TAR_FROM( \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004506 IF_FEATURE_TAR_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004507 "\n exclude File to exclude" \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004508 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00004509 "\n X File with names to exclude" \
4510 ) \
Denys Vlasenko94ca6942010-01-20 02:51:09 +01004511 "\n C Change to DIR before operation" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004512 "\n v Verbose" \
4513
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004514#define tar_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004515 "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
4516 "$ tar -cf /tmp/tarball.tar /usr/local\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004517
Bernhard Reutner-Fischer32eddff2006-11-22 16:39:48 +00004518#define taskset_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004519 "[-p] [MASK] [PID | PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004520#define taskset_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004521 "Set or get CPU affinity\n" \
4522 "\nOptions:" \
4523 "\n -p Operate on an existing PID" \
4524
Bernhard Reutner-Fischer32eddff2006-11-22 16:39:48 +00004525#define taskset_example_usage \
Denis Vlasenko765996a2006-12-24 16:59:27 +00004526 "$ taskset 0x7 ./dgemm_test&\n" \
4527 "$ taskset -p 0x1 $!\n" \
4528 "pid 4790's current affinity mask: 7\n" \
4529 "pid 4790's new affinity mask: 1\n" \
4530 "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
4531 "pid 6671's current affinity mask: 1\n" \
4532 "pid 6671's new affinity mask: 1\n" \
4533 "$ taskset -p 1\n" \
4534 "pid 1's current affinity mask: 3\n"
Bernhard Reutner-Fischer32eddff2006-11-22 16:39:48 +00004535
Eric Andersen7e9276b2001-02-22 01:15:47 +00004536#define tee_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004537 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004538#define tee_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004539 "Copy stdin to each FILE, and also to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004540 "\nOptions:" \
Denys Vlasenko07697852009-10-06 21:11:37 +02004541 "\n -a Append to the given FILEs, don't overwrite" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004542 "\n -i Ignore interrupt signals (SIGINT)" \
4543
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004544#define tee_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004545 "$ echo \"Hello\" | tee /tmp/foo\n" \
4546 "$ cat /tmp/foo\n" \
4547 "Hello\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004548
Denis Vlasenkoe3241842007-08-13 10:36:25 +00004549#if ENABLE_FEATURE_TELNET_AUTOLOGIN
Eric Andersen539ffc92004-02-22 12:25:47 +00004550#define telnet_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004551 "[-a] [-l USER] HOST [PORT]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004552#define telnet_full_usage "\n\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00004553 "Connect to telnet server\n" \
4554 "\nOptions:" \
Denis Vlasenko1101d1c2008-07-21 09:22:28 +00004555 "\n -a Automatic login with $USER variable" \
4556 "\n -l USER Automatic login as USER" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004557
Eric Andersen539ffc92004-02-22 12:25:47 +00004558#else
Eric Andersen7e9276b2001-02-22 01:15:47 +00004559#define telnet_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004560 "HOST [PORT]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004561#define telnet_full_usage "\n\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00004562 "Connect to telnet server"
Eric Andersen539ffc92004-02-22 12:25:47 +00004563#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004564
Eric Andersen08a72202002-09-30 20:52:10 +00004565#define telnetd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004566 "[OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004567#define telnetd_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004568 "Handle incoming telnet connections" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004569 IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004570 "\nOptions:" \
4571 "\n -l LOGIN Exec LOGIN on connect" \
Denys Vlasenkoed1667e2009-09-04 02:21:13 +02004572 "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004573 "\n -K Close connection as soon as login exits" \
4574 "\n (normally wait until all programs close slave pty)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004575 IF_FEATURE_TELNETD_STANDALONE( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004576 "\n -p PORT Port to listen on" \
Denys Vlasenkoed1667e2009-09-04 02:21:13 +02004577 "\n -b ADDR[:PORT] Address to bind to" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004578 "\n -F Run in foreground" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004579 "\n -i Inetd mode" \
Denys Vlasenkoed1667e2009-09-04 02:21:13 +02004580 IF_FEATURE_TELNETD_INETD_WAIT( \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004581 "\n -w SEC Inetd 'wait' mode, linger time SEC" \
Denys Vlasenkoed1667e2009-09-04 02:21:13 +02004582 "\n -S Log to syslog (implied by -i or without -F and -w)" \
4583 ) \
Denis Vlasenko765996a2006-12-24 16:59:27 +00004584 )
Eric Andersen08a72202002-09-30 20:52:10 +00004585
Denis Vlasenko84c8daa2008-07-21 08:37:13 +00004586/* "test --help" does not print help (POSIX compat), only "[ --help" does.
Denys Vlasenko662078f2010-01-14 13:27:34 +01004587 * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION")
4588 * Unfortunately, it screws up generated BusyBox.html. TODO. */
Eric Andersen7e9276b2001-02-22 01:15:47 +00004589#define test_trivial_usage \
Denis Vlasenko84c8daa2008-07-21 08:37:13 +00004590 "EXPRESSION ]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004591#define test_full_usage "\n\n" \
Denis Vlasenko1101d1c2008-07-21 09:22:28 +00004592 "Check file types, compare values etc. Return a 0/1 exit code\n" \
4593 "depending on logical value of EXPRESSION"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004594#define test_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004595 "$ test 1 -eq 2\n" \
4596 "$ echo $?\n" \
4597 "1\n" \
4598 "$ test 1 -eq 1\n" \
4599 "$ echo $?\n" \
4600 "0\n" \
4601 "$ [ -d /etc ]\n" \
4602 "$ echo $?\n" \
4603 "0\n" \
4604 "$ [ -d /junk ]\n" \
4605 "$ echo $?\n" \
4606 "1\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00004607
Bernhard Reutner-Fischer0901c512008-09-04 13:22:58 +00004608#define tc_trivial_usage \
4609 /*"[OPTIONS] "*/"OBJECT CMD [dev STRING]"
4610#define tc_full_usage "\n\n" \
4611 "OBJECT: {qdisc|class|filter}\n" \
4612 "CMD: {add|del|change|replace|show}\n" \
4613 "\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004614 "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00004615 /* "[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
4616 " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
4617 " QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004618 "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \
Bernhard Reutner-Fischer0901c512008-09-04 13:22:58 +00004619 "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \
Denis Vlasenko71c16572009-04-26 01:08:51 +00004620 " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
Bernhard Reutner-Fischer0901c512008-09-04 13:22:58 +00004621 "class show [ dev STRING ] [ root | parent CLASSID ]\n" \
4622 "filter [ pref PRIO ] [ protocol PROTO ]\n" \
4623 /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
Denis Vlasenko71c16572009-04-26 01:08:51 +00004624 " [ root | classid CLASSID ] [ handle FILTERID ]\n" \
4625 " [ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n" \
Bernhard Reutner-Fischer0901c512008-09-04 13:22:58 +00004626 "filter show [ dev STRING ] [ root | parent CLASSID ]"
4627
Denis Vlasenko2856dab2007-04-01 01:18:20 +00004628#define tcpsvd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004629 "[-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG"
Denis Vlasenkoba2fb712007-04-01 09:39:03 +00004630/* with not-implemented options: */
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004631/* "[-hpEvv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] [-i DIR|-x CDB] [-t SEC] IP PORT PROG" */
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004632#define tcpsvd_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004633 "Create TCP socket, bind to IP:PORT and listen\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00004634 "for incoming connection. Run PROG for each connection.\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02004635 "\n IP IP to listen on. '0' = all" \
4636 "\n PORT Port to listen on" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004637 "\n PROG ARGS Program to run" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02004638 "\n -l NAME Local hostname (else looks up local hostname in DNS)" \
4639 "\n -u USER[:GRP] Change to user/group after bind" \
4640 "\n -c N Handle up to N connections simultaneously" \
4641 "\n -b N Allow a backlog of approximately N TCP SYNs" \
4642 "\n -C N[:MSG] Allow only up to N connections from the same IP" \
4643 "\n New connections from this IP address are closed" \
4644 "\n immediately. MSG is written to the peer before close" \
4645 "\n -h Look up peer's hostname" \
Denys Vlasenko07697852009-10-06 21:11:37 +02004646 "\n -E Don't set up environment variables" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02004647 "\n -v Verbose" \
Denis Vlasenko2856dab2007-04-01 01:18:20 +00004648
Denis Vlasenko60fadac2007-04-01 19:10:36 +00004649#define udpsvd_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004650 "[-hEv] [-c N] [-u USER] [-l NAME] IP PORT PROG"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004651#define udpsvd_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004652 "Create UDP socket, bind to IP:PORT and wait\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00004653 "for incoming packets. Run PROG for each packet,\n" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02004654 "redirecting all further packets with same peer ip:port to it.\n" \
4655 "\n IP IP to listen on. '0' = all" \
4656 "\n PORT Port to listen on" \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004657 "\n PROG ARGS Program to run" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02004658 "\n -l NAME Local hostname (else looks up local hostname in DNS)" \
4659 "\n -u USER[:GRP] Change to user/group after bind" \
4660 "\n -c N Handle up to N connections simultaneously" \
4661 "\n -h Look up peer's hostname" \
Denys Vlasenko07697852009-10-06 21:11:37 +02004662 "\n -E Don't set up environment variables" \
Denys Vlasenko26ff18b2009-10-02 11:37:17 +02004663 "\n -v Verbose" \
Denis Vlasenko60fadac2007-04-01 19:10:36 +00004664
Mark Whitley450736c2001-03-02 19:08:50 +00004665#define tftp_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02004666 "[OPTIONS] HOST [PORT]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004667#define tftp_full_usage "\n\n" \
Denis Vlasenkoaa9b1822008-03-17 09:10:39 +00004668 "Transfer a file from/to tftp server\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004669 "\nOptions:" \
4670 "\n -l FILE Local FILE" \
4671 "\n -r FILE Remote FILE" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004672 IF_FEATURE_TFTP_GET( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004673 "\n -g Get file" \
Mike Frysinger82e6c0b2005-04-23 06:35:06 +00004674 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004675 IF_FEATURE_TFTP_PUT( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004676 "\n -p Put file" \
Mark Whitley450736c2001-03-02 19:08:50 +00004677 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004678 IF_FEATURE_TFTP_BLOCKSIZE( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004679 "\n -b SIZE Transfer blocks of SIZE octets" \
Tim Riker7b253f82003-12-28 05:02:40 +00004680 )
Denis Vlasenkoaa9b1822008-03-17 09:10:39 +00004681
4682#define tftpd_trivial_usage \
Denis Vlasenko403a5a22008-03-19 13:07:00 +00004683 "[-cr] [-u USER] [DIR]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004684#define tftpd_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02004685 "Transfer a file on tftp client's request\n" \
Denis Vlasenko91f8f822008-10-30 23:42:37 +00004686 "\n" \
4687 "tftpd should be used as an inetd service.\n" \
4688 "tftpd's line for inetd.conf:\n" \
4689 " 69 dgram udp nowait root tftpd tftpd /files/to/serve\n" \
4690 "It also can be ran from udpsvd:\n" \
4691 " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" \
Denis Vlasenkod7e6af22008-03-18 01:13:11 +00004692 "\nOptions:" \
4693 "\n -r Prohibit upload" \
Denis Vlasenko403a5a22008-03-19 13:07:00 +00004694 "\n -c Allow file creation via upload" \
4695 "\n -u Access files as USER" \
Denis Vlasenkoaa9b1822008-03-17 09:10:39 +00004696
Eric Andersenc3657422001-11-30 07:54:32 +00004697#define time_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01004698 "[OPTIONS] PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004699#define time_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004700 "Run PROG, display resource usage when it exits\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004701 "\nOptions:" \
4702 "\n -v Verbose" \
Mark Whitley450736c2001-03-02 19:08:50 +00004703
Denis Vlasenkoa9acbe62008-11-24 13:25:20 +00004704#define timeout_trivial_usage \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004705 "[-t SECS] [-s SIG] PROG ARGS"
Denis Vlasenkoa9acbe62008-11-24 13:25:20 +00004706#define timeout_full_usage "\n\n" \
4707 "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \
Denis Vlasenko42404082008-11-24 13:42:24 +00004708 "Defaults: SECS: 10, SIG: TERM." \
Denis Vlasenkoa9acbe62008-11-24 13:25:20 +00004709
Eric Andersen420b2082002-09-17 22:14:58 +00004710#define top_trivial_usage \
Denys Vlasenko00528822009-09-11 23:26:42 +02004711 "[-b] [-nCOUNT] [-dSECONDS]" IF_FEATURE_TOPMEM(" [-m]")
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004712#define top_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004713 "Provide a view of process activity in real time.\n" \
Denis Vlasenkocdf62772008-03-17 08:42:43 +00004714 "Read the status of all processes from /proc each SECONDS\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004715 "and display a screenful of them." \
4716//TODO: add options and keyboard commands
Eric Andersen420b2082002-09-17 22:14:58 +00004717
Eric Andersen7e9276b2001-02-22 01:15:47 +00004718#define touch_trivial_usage \
Denys Vlasenko7aca89a2009-07-18 03:41:29 +02004719 "[-c] [-d DATE] FILE [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004720#define touch_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004721 "Update the last-modified date on the given FILE[s]\n" \
4722 "\nOptions:" \
Denys Vlasenko07697852009-10-06 21:11:37 +02004723 "\n -c Don't create files" \
Denys Vlasenko7aca89a2009-07-18 03:41:29 +02004724 "\n -d DT Date/time to use" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004725
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004726#define touch_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004727 "$ ls -l /tmp/foo\n" \
4728 "/bin/ls: /tmp/foo: No such file or directory\n" \
4729 "$ touch /tmp/foo\n" \
4730 "$ ls -l /tmp/foo\n" \
4731 "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00004732
4733#define tr_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004734 "[-cds] STRING1 [STRING2]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004735#define tr_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004736 "Translate, squeeze, or delete characters from stdin, writing to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004737 "\nOptions:" \
4738 "\n -c Take complement of STRING1" \
4739 "\n -d Delete input characters coded STRING1" \
4740 "\n -s Squeeze multiple output characters of STRING2 into one character" \
4741
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004742#define tr_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004743 "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
4744 "hello world\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00004745
Eric Andersen5c58d282001-07-10 16:29:00 +00004746#define traceroute_trivial_usage \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004747 "[-"IF_TRACEROUTE6("46")"FIldnrv] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \
4748 " [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE]\n" \
4749 " [-z PAUSE_MSEC] HOST [BYTES]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004750#define traceroute_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004751 "Trace the route to HOST\n" \
4752 "\nOptions:" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004753 IF_TRACEROUTE6( \
4754 "\n -4, -6 Force IP or IPv6 name resolution" \
4755 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00004756 "\n -F Set the don't fragment bit" \
4757 "\n -I Use ICMP ECHO instead of UDP datagrams" \
Denys Vlasenkob55d6522010-02-06 23:44:59 +01004758 "\n -l Display the TTL value of the returned packet" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004759 "\n -d Set SO_DEBUG options to socket" \
Leonid Lisovskiy4c065312009-11-23 06:20:09 +01004760 "\n -n Print numeric addresses" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004761 "\n -r Bypass routing tables, send directly to HOST" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004762 "\n -v Verbose" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004763 "\n -m Max time-to-live (max number of hops)" \
4764 "\n -p Base UDP port number used in probes" \
4765 "\n (default 33434)" \
Denys Vlasenkob55d6522010-02-06 23:44:59 +01004766 "\n -q Number of probes per TTL (default 3)" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004767 "\n -s IP address to use as the source address" \
4768 "\n -t Type-of-service in probe packets (default 0)" \
4769 "\n -w Time in seconds to wait for a response (default 3)" \
4770 "\n -g Loose source route gateway (8 max)" \
Eric Andersen5c58d282001-07-10 16:29:00 +00004771
Leonid Lisovskiy4c065312009-11-23 06:20:09 +01004772#define traceroute6_trivial_usage \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004773 "[-dnrv] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \
4774 " [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-i IFACE]\n" \
4775 " HOST [BYTES]"
Leonid Lisovskiy4c065312009-11-23 06:20:09 +01004776#define traceroute6_full_usage "\n\n" \
4777 "Trace the route to HOST\n" \
4778 "\nOptions:" \
4779 "\n -d Set SO_DEBUG options to socket" \
4780 "\n -n Print numeric addresses" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004781 "\n -r Bypass routing tables, send directly to HOST" \
Leonid Lisovskiy4c065312009-11-23 06:20:09 +01004782 "\n -v Verbose" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004783 "\n -m Max time-to-live (max number of hops)" \
4784 "\n -p Base UDP port number used in probes" \
4785 "\n (default is 33434)" \
Denys Vlasenkob55d6522010-02-06 23:44:59 +01004786 "\n -q Number of probes per TTL (default 3)" \
Denys Vlasenko74f8e782009-11-23 06:34:04 +01004787 "\n -s IP address to use as the source address" \
4788 "\n -t Type-of-service in probe packets (default 0)" \
4789 "\n -w Time in seconds to wait for a response (default 3)" \
Leonid Lisovskiy4c065312009-11-23 06:20:09 +01004790
Eric Andersen7e9276b2001-02-22 01:15:47 +00004791#define true_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004792 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004793#define true_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004794 "Return an exit code of TRUE (0)"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004795#define true_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004796 "$ true\n" \
4797 "$ echo $?\n" \
4798 "0\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004799
Eric Andersen7e9276b2001-02-22 01:15:47 +00004800#define tty_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004801 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004802#define tty_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004803 "Print file name of stdin's terminal" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004804 IF_INCLUDE_SUSv2( "\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004805 "\nOptions:" \
4806 "\n -s Print nothing, only return exit status" \
4807 )
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004808#define tty_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004809 "$ tty\n" \
4810 "/dev/tty2\n"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00004811
Denis Vlasenkoc01af952007-08-02 22:23:47 +00004812#define ttysize_trivial_usage \
4813 "[w] [h]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004814#define ttysize_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004815 "Print dimension(s) of stdin's terminal, on error return 80x25"
Denis Vlasenkoc01af952007-08-02 22:23:47 +00004816
Denis Vlasenko39b68132009-01-23 02:07:14 +00004817#define tunctl_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004818 "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
Denis Vlasenko39b68132009-01-23 02:07:14 +00004819#define tunctl_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02004820 "Create or delete tun interfaces\n" \
Denis Vlasenko39b68132009-01-23 02:07:14 +00004821 "\nOptions:" \
4822 "\n -f name tun device (/dev/net/tun)" \
4823 "\n -t name Create iface 'name'" \
4824 "\n -d name Delete iface 'name'" \
Denys Vlasenko3945bc12009-10-22 00:55:55 +02004825 IF_FEATURE_TUNCTL_UG( \
Denis Vlasenko39b68132009-01-23 02:07:14 +00004826 "\n -u owner Set iface owner" \
4827 "\n -g group Set iface group" \
4828 "\n -b Brief output" \
Denys Vlasenko3945bc12009-10-22 00:55:55 +02004829 )
Denis Vlasenko39b68132009-01-23 02:07:14 +00004830#define tunctl_example_usage \
4831 "# tunctl\n" \
4832 "# tunctl -d tun0\n"
4833
Mike Frysinger174808c2005-06-11 01:14:09 +00004834#define tune2fs_trivial_usage \
Denys Vlasenko3945bc12009-10-22 00:55:55 +02004835/* "[-c max-mounts-count] [-e errors-behavior] [-g group] " */ \
4836/* "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " */ \
4837/* "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " */ \
4838/* "[-r reserved-blocks-count] [-u user] [-C mount-count] " */ \
4839 "[-L LABEL] " \
4840/* "[-M last-mounted-dir] [-O [^]feature[,...]] " */ \
4841/* "[-T last-check-time] [-U UUID] " */ \
4842 "BLOCKDEV"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004843#define tune2fs_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00004844 "Adjust filesystem options on ext[23] filesystems"
Mike Frysinger174808c2005-06-11 01:14:09 +00004845
Glenn L McGrath8eb0dc12002-08-21 10:27:58 +00004846#define udhcpc_trivial_usage \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004847 "[-fbnqvoCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n" \
4848 " [-H HOSTNAME] [-c CID] [-V VENDOR] [-O DHCP_OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]")
4849#define udhcpc_full_usage "\n" \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02004850 IF_LONG_OPTS( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004851 "\n -i,--interface IFACE Interface to use (default eth0)" \
4852 "\n -p,--pidfile FILE Create pidfile" \
4853 "\n -r,--request IP IP address to request" \
4854 "\n -s,--script PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
4855 "\n -t,--retries N Send up to N discover packets" \
4856 "\n -T,--timeout N Pause between packets (default 3 seconds)" \
Denys Vlasenkoe6080a42010-04-14 14:04:26 -07004857 "\n -A,--tryagain N Wait N seconds after failure (default 20)" \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004858 "\n -f,--foreground Run in foreground" \
Denis Vlasenko21765fa2008-06-13 20:44:05 +00004859 USE_FOR_MMU( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004860 "\n -b,--background Background if lease is not obtained" \
Denis Vlasenko21765fa2008-06-13 20:44:05 +00004861 ) \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004862 "\n -S,--syslog Log to syslog too" \
4863 "\n -n,--now Exit if lease is not obtained" \
4864 "\n -q,--quit Exit after obtaining lease" \
4865 "\n -R,--release Release IP on exit" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004866 IF_FEATURE_UDHCP_PORT( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004867 "\n -P,--client-port N Use port N (default 68)" \
Denis Vlasenkod55fe3e2008-02-04 13:12:16 +00004868 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004869 IF_FEATURE_UDHCPC_ARPING( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004870 "\n -a,--arping Use arping to validate offered address" \
Denis Vlasenko223bc972007-11-22 00:58:49 +00004871 ) \
Denys Vlasenkoe6080a42010-04-14 14:04:26 -07004872 "\n -O,--request-option OPT Request DHCP option OPT (cumulative)" \
4873 "\n -o,--no-default-options Don't request any options (unless -O is given)" \
4874 "\n -x OPT:VAL Include option OPT in sent packets (cumulative)" \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004875 "\n -F,--fqdn NAME Ask server to update DNS mapping for NAME" \
4876 "\n -H,-h,--hostname NAME Send NAME as client hostname (default none)" \
4877 "\n -V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')" \
4878 "\n -c,--clientid CLIENTID Client identifier (default own MAC)" \
4879 "\n -C,--clientid-none Don't send client identifier" \
Denis Vlasenko03630782007-10-18 11:11:12 +00004880 ) \
Denys Vlasenkof3b92d32009-06-19 12:10:38 +02004881 IF_NOT_LONG_OPTS( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004882 "\n -i IFACE Interface to use (default eth0)" \
Denys Vlasenko79ae5342010-01-06 12:27:18 +01004883 "\n -p FILE Create pidfile" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004884 "\n -r IP IP address to request" \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004885 "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
4886 "\n -t N Send up to N discover packets" \
4887 "\n -T N Pause between packets (default 3 seconds)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004888 "\n -A N Wait N seconds (default 20) after failure" \
Denys Vlasenko7e6add12010-03-25 20:32:38 +01004889 "\n -x OPT:VAL Include option OPT in sent packets" \
Denis Vlasenko2e4c3c42008-04-02 13:04:19 +00004890 "\n -O OPT Request DHCP option OPT (cumulative)" \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004891 "\n -o Don't request any options (unless -O is given)" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004892 "\n -f Run in foreground" \
Denis Vlasenko21765fa2008-06-13 20:44:05 +00004893 USE_FOR_MMU( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004894 "\n -b Background if lease is not obtained" \
Denis Vlasenko21765fa2008-06-13 20:44:05 +00004895 ) \
Denis Vlasenko397de612008-03-17 08:55:44 +00004896 "\n -S Log to syslog too" \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004897 "\n -n Exit if lease is not obtained" \
4898 "\n -q Exit after obtaining lease" \
4899 "\n -R Release IP on exit" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004900 IF_FEATURE_UDHCP_PORT( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004901 "\n -P N Use port N (default 68)" \
Denis Vlasenkod55fe3e2008-02-04 13:12:16 +00004902 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004903 IF_FEATURE_UDHCPC_ARPING( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004904 "\n -a Use arping to validate offered address" \
Denis Vlasenko223bc972007-11-22 00:58:49 +00004905 ) \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004906 "\n -F NAME Ask server to update DNS mapping for NAME" \
4907 "\n -H,-h NAME Send NAME as client hostname (default none)" \
4908 "\n -V VENDOR Vendor identifier (default 'udhcp VERSION')" \
4909 "\n -c CLIENTID Client identifier (default own MAC)" \
4910 "\n -C Don't send client identifier" \
Denis Vlasenko03630782007-10-18 11:11:12 +00004911 )
Glenn L McGrath8eb0dc12002-08-21 10:27:58 +00004912
Russ Dill61fb4892002-10-14 21:41:28 +00004913#define udhcpd_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004914 "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
Russ Dill61fb4892002-10-14 21:41:28 +00004915
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004916#define udhcpd_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004917 "DHCP server\n" \
4918 "\n -f Run in foreground" \
4919 "\n -S Log to syslog too" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004920 IF_FEATURE_UDHCP_PORT( \
Denys Vlasenko87fa2162010-03-20 18:06:23 +01004921 "\n -P N Use port N (default 67)" \
Denis Vlasenkod55fe3e2008-02-04 13:12:16 +00004922 )
Russ Dill61fb4892002-10-14 21:41:28 +00004923
Eric Andersen7e9276b2001-02-22 01:15:47 +00004924#define umount_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01004925 "[OPTIONS] FILESYSTEM|DIRECTORY"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004926#define umount_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004927 "Unmount file systems\n" \
4928 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004929 IF_FEATURE_UMOUNT_ALL( \
4930 "\n -a Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
Denis Vlasenko397de612008-03-17 08:55:44 +00004931 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004932 IF_FEATURE_MTAB_SUPPORT( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004933 "\n -n Don't erase /etc/mtab entries" \
4934 ) \
4935 "\n -r Try to remount devices as read-only if mount is busy" \
4936 "\n -l Lazy umount (detach filesystem)" \
4937 "\n -f Force umount (i.e., unreachable NFS server)" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004938 IF_FEATURE_MOUNT_LOOP( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004939 "\n -d Free loop device if it has been used" \
4940 )
4941
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004942#define umount_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004943 "$ umount /dev/hdc1\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00004944
4945#define uname_trivial_usage \
Denis Vlasenko68af8e72007-11-22 21:41:14 +00004946 "[-amnrspv]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004947#define uname_full_usage "\n\n" \
Denys Vlasenko691161a2009-08-27 20:38:17 +02004948 "Print system information\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004949 "\nOptions:" \
4950 "\n -a Print all" \
4951 "\n -m The machine (hardware) type" \
4952 "\n -n Hostname" \
4953 "\n -r OS release" \
4954 "\n -s OS name (default)" \
4955 "\n -p Processor type" \
4956 "\n -v OS version" \
4957
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004958#define uname_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004959 "$ uname -a\n" \
4960 "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 +00004961
Glenn L McGrathbf1cc8b2002-11-01 23:38:54 +00004962#define uncompress_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004963 "[-cf] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004964#define uncompress_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004965 "Uncompress .Z file[s]\n" \
4966 "\nOptions:" \
4967 "\n -c Extract to stdout" \
4968 "\n -f Overwrite an existing file" \
Tim Riker7b253f82003-12-28 05:02:40 +00004969
Denis Vlasenko3952f202007-08-13 14:10:24 +00004970#define unexpand_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004971 "[-fa][-t N] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004972#define unexpand_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01004973 "Convert spaces to tabs, writing to stdout\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004974 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004975 IF_FEATURE_UNEXPAND_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004976 "\n -a,--all Convert all blanks" \
4977 "\n -f,--first-only Convert only leading blanks" \
4978 "\n -t,--tabs=N Tabstops every N chars" \
Denis Vlasenko99014e82007-10-20 14:54:58 +00004979 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00004980 IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( \
Denis Vlasenko397de612008-03-17 08:55:44 +00004981 "\n -a Convert all blanks" \
4982 "\n -f Convert only leading blanks" \
4983 "\n -t N Tabstops every N chars" \
Denis Vlasenko99014e82007-10-20 14:54:58 +00004984 )
Denis Vlasenko3952f202007-08-13 14:10:24 +00004985
Eric Andersen7e9276b2001-02-22 01:15:47 +00004986#define uniq_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01004987 "[-cdu][-f,s,w N] [INPUT [OUTPUT]]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00004988#define uniq_full_usage "\n\n" \
Denis Vlasenko96b99b82008-05-03 07:21:27 +00004989 "Discard duplicate lines\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004990 "\nOptions:" \
4991 "\n -c Prefix lines by the number of occurrences" \
4992 "\n -d Only print duplicate lines" \
4993 "\n -u Only print unique lines" \
Denis Vlasenko96b99b82008-05-03 07:21:27 +00004994 "\n -f N Skip first N fields" \
4995 "\n -s N Skip first N chars (after any skipped fields)" \
4996 "\n -w N Compare N characters in line" \
Denis Vlasenko397de612008-03-17 08:55:44 +00004997
Eric Andersen0d3a02e2001-03-15 18:14:25 +00004998#define uniq_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00004999 "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
5000 "a\n" \
5001 "b\n" \
5002 "c\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005003
Glenn L McGrath87ac7022002-01-02 13:52:26 +00005004#define unzip_trivial_usage \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01005005 "[-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005006#define unzip_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005007 "Extract files from ZIP archives\n" \
5008 "\nOptions:" \
5009 "\n -l List archive contents (with -q for short form)" \
5010 "\n -n Never overwrite existing files (default)" \
5011 "\n -o Overwrite files without prompting" \
5012 "\n -p Send output to stdout" \
5013 "\n -q Quiet" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01005014 "\n -x XLST Exclude these files" \
5015 "\n -d DIR Extract files into DIR" \
Glenn L McGrath87ac7022002-01-02 13:52:26 +00005016
Eric Andersen7e9276b2001-02-22 01:15:47 +00005017#define uptime_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005018 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005019#define uptime_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00005020 "Display the time since the last boot"
Denis Vlasenko397de612008-03-17 08:55:44 +00005021
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005022#define uptime_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005023 "$ uptime\n" \
5024 " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005025
5026#define usleep_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005027 "N"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005028#define usleep_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00005029 "Pause for N microseconds"
Denis Vlasenko397de612008-03-17 08:55:44 +00005030
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005031#define usleep_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005032 "$ usleep 1000000\n" \
5033 "[pauses for 1 second]\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005034
5035#define uudecode_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01005036 "[-o OUTFILE] [INFILE]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005037#define uudecode_full_usage "\n\n" \
Denis Vlasenko746204b2007-06-04 23:32:35 +00005038 "Uudecode a file\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005039 "Finds outfile name in uuencoded source unless -o is given"
5040
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005041#define uudecode_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005042 "$ uudecode -o busybox busybox.uu\n" \
5043 "$ ls -l busybox\n" \
5044 "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005045
5046#define uuencode_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01005047 "[-m] [INFILE] STORED_FILENAME"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005048#define uuencode_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005049 "Uuencode a file to stdout\n" \
5050 "\nOptions:" \
5051 "\n -m Use base64 encoding per RFC1521" \
5052
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005053#define uuencode_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005054 "$ uuencode busybox busybox\n" \
5055 "begin 755 busybox\n" \
5056 "<encoded file snipped>\n" \
5057 "$ uudecode busybox busybox > busybox.uu\n" \
5058 "$\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005059
Eric Andersen853c4942003-01-23 05:59:32 +00005060#define vconfig_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005061 "COMMAND [OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005062#define vconfig_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005063 "Create and remove virtual ethernet devices\n" \
5064 "\nOptions:" \
5065 "\n add [interface-name] [vlan_id]" \
5066 "\n rem [vlan-name]" \
5067 "\n set_flag [interface-name] [flag-num] [0 | 1]" \
5068 "\n set_egress_map [vlan-name] [skb_priority] [vlan_qos]" \
5069 "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
5070 "\n set_name_type [name-type]" \
Eric Andersen853c4942003-01-23 05:59:32 +00005071
Eric Andersen3f980402001-04-04 17:31:15 +00005072#define vi_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005073 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005074#define vi_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005075 "Edit FILE\n" \
5076 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005077 IF_FEATURE_VI_COLON( \
Denis Vlasenko397de612008-03-17 08:55:44 +00005078 "\n -c Initial command to run ($EXINIT also available)") \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005079 IF_FEATURE_VI_READONLY( \
Denys Vlasenkod084cb92010-01-15 22:30:30 +01005080 "\n -R Read-only") \
Denis Vlasenko397de612008-03-17 08:55:44 +00005081 "\n -H Short help regarding available features" \
Eric Andersen3f980402001-04-04 17:31:15 +00005082
Eric Andersen27f64e12002-06-23 04:24:25 +00005083#define vlock_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005084 "[OPTIONS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005085#define vlock_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005086 "Lock a virtual terminal. A password is required to unlock.\n" \
5087 "\nOptions:" \
Denis Vlasenkod1277c62008-03-17 09:37:24 +00005088 "\n -a Lock all VTs" \
Eric Andersen27f64e12002-06-23 04:24:25 +00005089
Matthew Stoltenberg4803db52009-08-13 00:59:32 +02005090#define volname_trivial_usage \
5091 "[DEVICE]"
5092#define volname_full_usage "\n\n" \
5093 "Show CD volume name of the DEVICE (default /dev/cdrom)"
5094
Bernhard Reutner-Fischere039e682009-10-26 23:29:03 +01005095#define wall_trivial_usage \
Denys Vlasenko14b0f4f2009-12-05 02:44:34 +01005096 "[FILE]"
Bernhard Reutner-Fischere039e682009-10-26 23:29:03 +01005097#define wall_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01005098 "Write content of FILE or stdin to all logged-in users"
Bernhard Reutner-Fischere039e682009-10-26 23:29:03 +01005099#define wall_sample_usage \
5100 "echo foo | wall\n" \
5101 "wall ./mymessage"
5102
Glenn L McGrath18b76e62002-09-16 09:10:04 +00005103#define watch_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01005104 "[-n SEC] [-t] PROG ARGS"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005105#define watch_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005106 "Run PROG periodically\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005107 "\nOptions:" \
5108 "\n -n Loop period in seconds (default 2)" \
5109 "\n -t Don't print header" \
5110
Glenn L McGrath18b76e62002-09-16 09:10:04 +00005111#define watch_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005112 "$ watch date\n" \
5113 "Mon Dec 17 10:31:40 GMT 2000\n" \
5114 "Mon Dec 17 10:31:42 GMT 2000\n" \
5115 "Mon Dec 17 10:31:44 GMT 2000"
Glenn L McGrath18b76e62002-09-16 09:10:04 +00005116
Eric Andersen7e9276b2001-02-22 01:15:47 +00005117#define watchdog_trivial_usage \
Denis Vlasenko8d89bed2008-09-07 23:22:08 +00005118 "[-t N[ms]] [-T N[ms]] [-F] DEV"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005119#define watchdog_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005120 "Periodically write to watchdog device DEV\n" \
5121 "\nOptions:" \
Denis Vlasenko8d89bed2008-09-07 23:22:08 +00005122 "\n -T N Reboot after N seconds if not reset (default 60)" \
5123 "\n -t N Reset every N seconds (default 30)" \
Denis Vlasenkocef23e02007-09-05 15:45:51 +00005124 "\n -F Run in foreground" \
Denis Vlasenko3638cc42007-09-05 12:13:51 +00005125 "\n" \
Denis Vlasenko8d89bed2008-09-07 23:22:08 +00005126 "\nUse 500ms to specify period in milliseconds" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00005127
5128#define wc_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005129 "[OPTIONS] [FILE]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005130#define wc_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01005131 "Print line, word, and byte counts for each FILE (or stdin),\n" \
5132 "and a total line if more than one FILE is specified\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005133 "\nOptions:" \
5134 "\n -c Print the byte counts" \
5135 "\n -l Print the newline counts" \
5136 "\n -L Print the length of the longest line" \
5137 "\n -w Print the word counts" \
5138
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005139#define wc_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005140 "$ wc /etc/passwd\n" \
5141 " 31 46 1365 /etc/passwd\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005142
5143#define wget_trivial_usage \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005144 IF_FEATURE_WGET_LONG_OPTIONS( \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01005145 "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n" \
Denis Vlasenko03630782007-10-18 11:11:12 +00005146 " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01005147 " [--no-check-certificate] [-U|--user-agent AGENT] URL" \
Denis Vlasenko03630782007-10-18 11:11:12 +00005148 ) \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005149 IF_NOT_FEATURE_WGET_LONG_OPTIONS( \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01005150 "[-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] URL" \
Denis Vlasenko03630782007-10-18 11:11:12 +00005151 )
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005152#define wget_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005153 "Retrieve files via HTTP or FTP\n" \
5154 "\nOptions:" \
5155 "\n -s Spider mode - only check file existence" \
5156 "\n -c Continue retrieval of aborted transfer" \
5157 "\n -q Quiet" \
5158 "\n -P Set directory prefix to DIR" \
Denys Vlasenko4816fe92010-03-28 00:30:35 +01005159 "\n -O FILE Save to FILE ('-' for stdout)" \
5160 "\n -U STR Use STR for User-Agent header" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005161 "\n -Y Use proxy ('on' or 'off')" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00005162
5163#define which_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005164 "[COMMAND]..."
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005165#define which_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00005166 "Locate a COMMAND"
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005167#define which_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005168 "$ which login\n" \
5169 "/bin/login\n"
Glenn L McGrath8f0722a2002-11-11 03:00:12 +00005170
Eric Andersen00a6a752002-04-26 23:53:10 +00005171#define who_trivial_usage \
Denis Vlasenko01cd9572007-11-16 05:24:43 +00005172 "[-a]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005173#define who_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005174 "Show who is logged on\n" \
5175 "\nOptions:" \
5176 "\n -a show all" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00005177
5178#define whoami_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005179 ""
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005180#define whoami_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00005181 "Print the user name associated with the current effective user id"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005182
5183#define xargs_trivial_usage \
Denys Vlasenko125c2d22010-02-13 02:59:30 +01005184 "[OPTIONS] [PROG ARGS]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005185#define xargs_full_usage "\n\n" \
Denys Vlasenkobb169f42010-02-14 05:43:22 +01005186 "Run PROG on every item given by stdin\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005187 "\nOptions:" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005188 IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
Denis Vlasenkoc45b5392008-08-03 19:20:25 +00005189 "\n -p Ask user whether to run each command") \
Denys Vlasenko07697852009-10-06 21:11:37 +02005190 "\n -r Don't run command if input is empty" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005191 IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
Denis Vlasenkoc45b5392008-08-03 19:20:25 +00005192 "\n -0 Input is separated by NUL characters") \
5193 "\n -t Print the command on stderr before execution" \
Denis Vlasenkoe82da4d2008-08-21 19:59:30 +00005194 "\n -e[STR] STR stops input processing" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005195 "\n -n N Pass no more than N args to PROG" \
Denis Vlasenkoc45b5392008-08-03 19:20:25 +00005196 "\n -s N Pass command line of no more than N bytes" \
Denis Vlasenko5e34ff22009-04-21 11:09:40 +00005197 IF_FEATURE_XARGS_SUPPORT_TERMOPT( \
Denis Vlasenkoc45b5392008-08-03 19:20:25 +00005198 "\n -x Exit if size is exceeded") \
Denis Vlasenko397de612008-03-17 08:55:44 +00005199
Eric Andersen0d3a02e2001-03-15 18:14:25 +00005200#define xargs_example_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005201 "$ ls | xargs gzip\n" \
5202 "$ find . -name '*.c' -print | xargs rm\n"
Eric Andersen7e9276b2001-02-22 01:15:47 +00005203
5204#define yes_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005205 "[OPTIONS] [STRING]"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005206#define yes_full_usage "\n\n" \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005207 "Repeatedly output a line with STRING, or 'y'"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00005208
Eric Andersen7e9276b2001-02-22 01:15:47 +00005209#define zcat_trivial_usage \
Denis Vlasenko1fffe382006-11-28 00:06:39 +00005210 "FILE"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005211#define zcat_full_usage "\n\n" \
Denis Vlasenko7a50a642006-12-24 17:40:16 +00005212 "Uncompress to stdout"
Eric Andersen178de172004-04-06 16:36:20 +00005213
Rob Landleyad8071f2005-04-30 03:49:37 +00005214#define zcip_trivial_usage \
Denys Vlasenkob0bee2b2009-06-20 03:59:02 +02005215 "[OPTIONS] IFACE SCRIPT"
Denis Vlasenko4f98e192008-04-13 22:12:19 +00005216#define zcip_full_usage "\n\n" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005217 "Manage a ZeroConf IPv4 link-local address\n" \
5218 "\nOptions:" \
5219 "\n -f Run in foreground" \
Denis Vlasenkocdd1f732008-10-10 11:28:39 +00005220 "\n -q Quit after obtaining address" \
Denis Vlasenko397de612008-03-17 08:55:44 +00005221 "\n -r 169.254.x.x Request this address first" \
5222 "\n -v Verbose" \
Denis Vlasenkocdd1f732008-10-10 11:28:39 +00005223 "\n" \
5224 "\nWith no -q, runs continuously monitoring for ARP conflicts," \
5225 "\nexits only on I/O errors (link down etc)" \
Rob Landleyad8071f2005-04-30 03:49:37 +00005226
Denis Vlasenkof81e8db2009-04-09 12:35:13 +00005227
5228#endif