blob: 8ba86d5696cc2bf183cd1c62ecfef809da1867c5 [file] [log] [blame]
Eric Andersen7e9276b2001-02-22 01:15:47 +00001#define ar_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00002 "-[ovR]{ptx} archive filenames"
Eric Andersen7e9276b2001-02-22 01:15:47 +00003#define ar_full_usage \
4 "Extract or list files from an ar archive.\n\n" \
5 "Options:\n" \
6 "\t-o\t\tpreserve original dates\n" \
7 "\t-p\t\textract to stdout\n" \
8 "\t-t\t\tlist\n" \
9 "\t-x\t\textract\n" \
10 "\t-v\t\tverbosely list files processed\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000011 "\t-R\t\trecursive action"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000012
Eric Andersen7e9276b2001-02-22 01:15:47 +000013#define basename_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000014 "FILE [SUFFIX]"
Eric Andersen7e9276b2001-02-22 01:15:47 +000015#define basename_full_usage \
16 "Strips directory path and suffixes from FILE.\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000017 "If specified, also removes any trailing SUFFIX."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000018
Eric Andersen7e9276b2001-02-22 01:15:47 +000019#define cat_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000020 "[FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +000021#define cat_full_usage \
22 "Concatenates FILE(s) and prints them to stdout."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000023
Eric Andersen7e9276b2001-02-22 01:15:47 +000024#define chgrp_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000025 "[OPTION]... GROUP FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +000026#define chgrp_full_usage \
27 "Change the group membership of each FILE to GROUP.\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +000028 "\nOptions:\n" \
29 "\t-R\tChanges files and directories recursively."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000030
Eric Andersen7e9276b2001-02-22 01:15:47 +000031#define chmod_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000032 "[-R] MODE[,MODE]... FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +000033#define chmod_full_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +000034 "Each MODE is one or more of the letters ugoa, one of the\n" \
35 "symbols +-= and one or more of the letters rwxst.\n\n" \
36 "Options:\n" \
37 "\t-R\tChanges files and directories recursively."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000038
Eric Andersen7e9276b2001-02-22 01:15:47 +000039#define chown_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000040 "[OPTION]... OWNER[<.|:>[GROUP] FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +000041#define chown_full_usage \
42 "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +000043 "\nOptions:\n" \
44 "\t-R\tChanges files and directories recursively."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000045
Eric Andersen7e9276b2001-02-22 01:15:47 +000046#define chroot_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000047 "NEWROOT [COMMAND...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +000048#define chroot_full_usage \
49 "Run COMMAND with root directory set to NEWROOT."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000050
Eric Andersen7e9276b2001-02-22 01:15:47 +000051#define chvt_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000052 "N"
Eric Andersen7e9276b2001-02-22 01:15:47 +000053#define chvt_full_usage \
54 "Changes the foreground virtual terminal to /dev/ttyN"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000055
Eric Andersen7e9276b2001-02-22 01:15:47 +000056#define clear_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000057 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +000058#define clear_full_usage \
59 "Clear screen."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000060
Eric Andersen7e9276b2001-02-22 01:15:47 +000061#define cmp_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000062 "FILE1 [FILE2]"
Eric Andersen7e9276b2001-02-22 01:15:47 +000063#define cmp_full_usage \
64 "Compare files."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000065
Eric Andersen7e9276b2001-02-22 01:15:47 +000066#define cp_trivial_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +000067 "[OPTION]... SOURCE DEST"
Eric Andersen7e9276b2001-02-22 01:15:47 +000068#define cp_full_usage \
69 "Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" \
70 "\n" \
71 "\t-a\tSame as -dpR\n" \
72 "\t-d\tPreserves links\n" \
73 "\t-p\tPreserves file attributes if possible\n" \
74 "\t-f\tforce (implied; ignored) - always set\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000075 "\t-R\tCopies directories recursively"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000076
Eric Andersen7e9276b2001-02-22 01:15:47 +000077#define cut_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000078 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +000079#define cut_full_usage \
80 "Prints selected fields from each input FILE to standard output.\n\n" \
81 "Options:\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +000082 "\t-b LIST\t\tOutput only bytes from LIST\n" \
83 "\t-c LIST\t\tOutput only characters from LIST\n" \
84 "\t-d CHAR\t\tUse CHAR instead of tab as the field delimiter\n" \
85 "\t-s\t\tOutput only the lines containing delimiter\n" \
86 "\t-f N\t\tPrint only these fields\n" \
87 "\t-n\t\tIgnored"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000088
Eric Andersen7e9276b2001-02-22 01:15:47 +000089#define date_trivial_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +000090 "[OPTION]... [+FORMAT]"
Eric Andersen7e9276b2001-02-22 01:15:47 +000091#define date_full_usage \
92 "Displays the current time in the given FORMAT, or sets the system date.\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +000093 "\nOptions:\n" \
Eric Andersen41492d62001-02-23 00:05:56 +000094 "\t-R\t\tOutputs RFC-822 compliant date string\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +000095 "\t-d STRING\tdisplay time described by STRING, not `now'\n" \
96 "\t-s\t\tSets time described by STRING\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000097 "\t-u\t\tPrints or sets Coordinated Universal Time"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +000098
Eric Andersen7e9276b2001-02-22 01:15:47 +000099#define dc_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000100 "expression ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000101#define dc_full_usage \
102 "This is a Tiny RPN calculator that understands the\n" \
103 "following operations: +, -, /, *, and, or, not, eor.\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000104 "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000105
Eric Andersen7e9276b2001-02-22 01:15:47 +0000106#define dd_trivial_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000107 "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +0000108 "\t [seek=N] [conv=notrunc|sync]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000109#define dd_full_usage \
110 "Copy a file, converting and formatting according to options\n\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +0000111 "\tif=FILE\t\tread from FILE instead of stdin\n" \
112 "\tof=FILE\t\twrite to FILE instead of stdout\n" \
113 "\tbs=N\t\tread and write N bytes at a time\n" \
114 "\tcount=N\t\tcopy only N input blocks\n" \
115 "\tskip=N\t\tskip N input blocks\n" \
116 "\tseek=N\t\tskip N output blocks\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000117 "\tconv=notrunc\tdon't truncate output file\n" \
118 "\tconv=sync\tpad blocks with zeros\n" \
119 "\n" \
120 "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000121 "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000122
Eric Andersen7e9276b2001-02-22 01:15:47 +0000123#define deallocvt_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000124 "N"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000125#define deallocvt_full_usage \
126 "Deallocate unused virtual terminal /dev/ttyN"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000127
Eric Andersen7e9276b2001-02-22 01:15:47 +0000128
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000129#ifdef BB_FEATURE_HUMAN_READABLE
Eric Andersened0d9582001-02-23 13:23:03 +0000130 #define USAGE_HUMAN_READABLE(a) a
131 #define USAGE_NOT_HUMAN_READABLE(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000132#else
Eric Andersened0d9582001-02-23 13:23:03 +0000133 #define USAGE_HUMAN_READABLE(a)
134 #define USAGE_NOT_HUMAN_READABLE(a) a
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000135#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000136#define df_trivial_usage \
Eric Andersened0d9582001-02-23 13:23:03 +0000137 "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [filesystem ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000138#define df_full_usage \
139 "Print the filesystem space used and space available.\n\n" \
140 "Options:\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000141 USAGE_HUMAN_READABLE( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000142 "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
143 "\t-m\tprint sizes in megabytes\n" \
Eric Andersened0d9582001-02-23 13:23:03 +0000144 "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000145 "\n\t-k\tprint sizes in kilobytes(compatability)")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000146
Eric Andersen7e9276b2001-02-22 01:15:47 +0000147#define dirname_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000148 "[FILENAME ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000149#define dirname_full_usage \
150 "Strips non-directory suffix from FILENAME"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000151
Eric Andersen7e9276b2001-02-22 01:15:47 +0000152#define dmesg_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000153 "[-c] [-n LEVEL] [-s SIZE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000154#define dmesg_full_usage \
155 "Prints or controls the kernel ring buffer\n\n" \
156 "Options:\n" \
157 "\t-c\t\tClears the ring buffer's contents after printing\n" \
158 "\t-n LEVEL\tSets console logging level\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000159 "\t-s SIZE\t\tUse a buffer of size SIZE"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000160
Eric Andersen7e9276b2001-02-22 01:15:47 +0000161#define dos2unix_trivial_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000162 "[option] [file]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000163#define dos2unix_full_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000164 "Converts a text file to/from dos format to unix format.\n\n" \
165 "Options:\n" \
166 "\t-u\toutput will be in UNIX format\n" \
167 "\t-d\toutput will be in DOS format\n\n" \
168 "- when no option is given then input format will be automaticaly detected\n" \
169 " and converted to the oposite format on output\n" \
170 "- when no file is given, then stdin is used as input and stdout as output"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000171
Eric Andersen7e9276b2001-02-22 01:15:47 +0000172#define dpkg_trivial_usage \
173 "[-i|-r|--unpack|--configure] my.deb"
174#define dpkg_full_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000175 "WORK IN PROGRESS, only usefull for debian-installer"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000176
Eric Andersen7e9276b2001-02-22 01:15:47 +0000177#define dpkg_deb_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000178 "[-cexX] file directory"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000179#define dpkg_deb_full_usage \
180 "Perform actions on debian packages (.debs)\n\n" \
181 "Options:\n" \
182 "\t-c\tList contents of filesystem tree (verbose)\n" \
183 "\t-l\tList contents of filesystem tree (.list format)\n" \
184 "\t-e\tExtract control files to directory\n" \
185 "\t-x\tExctract packages filesystem tree to directory\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000186 "\t-X\tVerbose extract"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000187
Eric Andersen7e9276b2001-02-22 01:15:47 +0000188#define du_trivial_usage \
Eric Andersened0d9582001-02-23 13:23:03 +0000189 "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000190#define du_full_usage \
191 "Summarizes disk space used for each FILE and/or directory.\n" \
192 "Disk space is printed in units of 1024 bytes.\n\n" \
193 "Options:\n" \
194 "\t-l\tcount sizes many times if hard linked\n" \
195 "\t-s\tdisplay only a total for each argument" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000196 USAGE_HUMAN_READABLE( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000197 "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
198 "\t-m\tprint sizes in megabytes\n" \
Eric Andersened0d9582001-02-23 13:23:03 +0000199 "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000200 "\n\t-k\tprint sizes in kilobytes(compatability)")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000201
Eric Andersen7e9276b2001-02-22 01:15:47 +0000202#define dumpkmap_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000203 "> keymap"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000204#define dumpkmap_full_usage \
205 "Prints out a binary keyboard translation table to standard output."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000206
Eric Andersen7e9276b2001-02-22 01:15:47 +0000207#define dutmp_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000208 "[FILE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000209#define dutmp_full_usage \
210 "Dump utmp file format (pipe delimited) from FILE\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000211 "or stdin to stdout. (i.e. 'dutmp /var/run/utmp')"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000212
Eric Andersen7e9276b2001-02-22 01:15:47 +0000213#define echo_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000214 "[-neE] [ARG ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000215#define echo_full_usage \
216 "Prints the specified ARGs to stdout\n\n" \
217 "Options:\n" \
218 "\t-n\tsuppress trailing newline\n" \
219 "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000220 "\t-E\tdisable interpretation of backslash-escaped characters"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000221
Eric Andersen7e9276b2001-02-22 01:15:47 +0000222#define expr_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000223 "EXPRESSION"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000224#define expr_full_usage \
225 "Prints the value of EXPRESSION to standard output.\n\n" \
226 "EXPRESSION may be:\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +0000227 "\tARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
228 "\tARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
229 "\tARG1 < ARG2 ARG1 is less than ARG2\n" \
230 "\tARG1 <= ARG2 ARG1 is less than or equal to ARG2\n" \
231 "\tARG1 = ARG2 ARG1 is equal to ARG2\n" \
232 "\tARG1 != ARG2 ARG1 is unequal to ARG2\n" \
233 "\tARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n" \
234 "\tARG1 > ARG2 ARG1 is greater than ARG2\n" \
235 "\tARG1 + ARG2 arithmetic sum of ARG1 and ARG2\n" \
236 "\tARG1 - ARG2 arithmetic difference of ARG1 and ARG2\n" \
237 "\tARG1 * ARG2 arithmetic product of ARG1 and ARG2\n" \
238 "\tARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2\n" \
239 "\tARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2\n" \
Eric Andersen3757f982001-02-23 17:47:51 +0000240 "\tSTRING : REGEXP anchored pattern match of REGEXP in STRING\n" \
241 "\tmatch STRING REGEXP same as STRING : REGEXP\n" \
242 "\tsubstr STRING POS LENGTH substring of STRING, POS counted from 1\n" \
243 "\tindex STRING CHARS index in STRING where any CHARS is found,\n" \
244 "\t or 0\n" \
245 "\tlength STRING length of STRING\n" \
246 "\tquote TOKEN interpret TOKEN as a string, even if\n" \
247 "\t it is a keyword like `match' or an\n" \
248 "\t operator like `/'\n" \
249 "\t( EXPRESSION ) value of EXPRESSION\n\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000250 "Beware that many operators need to be escaped or quoted for shells.\n" \
251 "Comparisons are arithmetic if both ARGs are numbers, else\n" \
252 "lexicographical. Pattern matches return the string matched between \n" \
253 "\\( and \\) or null; if \\( and \\) are not used, they return the number \n" \
254 "of characters matched or 0."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000255
Eric Andersen7e9276b2001-02-22 01:15:47 +0000256#define false_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000257 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000258#define false_full_usage \
259 "Return an exit code of FALSE (1)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000260
Eric Andersen7e9276b2001-02-22 01:15:47 +0000261#define fdflush_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000262 "DEVICE"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000263#define fdflush_full_usage \
264 "Forces floppy disk drive to detect disk change"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000265
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000266#ifdef BB_FEATURE_FIND_TYPE
Eric Andersen7e9276b2001-02-22 01:15:47 +0000267 #define USAGE_FIND_TYPE(a) a
268#else
269 #define USAGE_FIND_TYPE(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000270#endif
271#ifdef BB_FEATURE_FIND_PERM
Eric Andersen7e9276b2001-02-22 01:15:47 +0000272 #define USAGE_FIND_PERM(a) a
273#else
274 #define USAGE_FIND_PERM(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000275#endif
276#ifdef BB_FEATURE_FIND_MTIME
Eric Andersen7e9276b2001-02-22 01:15:47 +0000277 #define USAGE_FIND_MTIME(a) a
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000278#else
Eric Andersen7e9276b2001-02-22 01:15:47 +0000279 #define USAGE_FIND_MTIME(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000280#endif
281
Eric Andersen7e9276b2001-02-22 01:15:47 +0000282#define find_trivial_usage \
283 "[PATH...] [EXPRESSION]"
284#define find_full_usage \
285 "Search for files in a directory hierarchy. The default PATH is\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +0000286 "the current directory; default EXPRESSION is '-print'\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000287 "\nEXPRESSION may consist of:\n" \
288 "\t-follow\t\tDereference symbolic links.\n" \
289 "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000290 USAGE_FIND_TYPE( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000291 "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
292) USAGE_FIND_PERM( \
293 "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \
294) USAGE_FIND_MTIME( \
295 "\n\t-mtime TIME\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000296
Eric Andersen7e9276b2001-02-22 01:15:47 +0000297#define free_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000298 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000299#define free_full_usage \
300 "Displays the amount of free and used system memory"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000301
Eric Andersen7e9276b2001-02-22 01:15:47 +0000302#define freeramdisk_trivial_usage \
303 "DEVICE"
304#define freeramdisk_full_usage \
305 "Frees all memory used by the specified ramdisk."
306
307#define fsck_minix_trivial_usage \
308 "[-larvsmf] /dev/name"
309#define fsck_minix_full_usage \
310 "Performs a consistency check for MINIX filesystems.\n\n" \
311 "Options:\n" \
312 "\t-l\tLists all filenames\n" \
313 "\t-r\tPerform interactive repairs\n" \
314 "\t-a\tPerform automatic repairs\n" \
315 "\t-v\tverbose\n" \
316 "\t-s\tOutputs super-block information\n" \
317 "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n" \
318 "\t-f\tForce file system check."
319
320#define getopt_trivial_usage \
321 "[OPTIONS]..."
322#define getopt_full_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +0000323 "Parse command options\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000324 "\t-a, --alternative Allow long options starting with single -\n" \
325 "\t-l, --longoptions=longopts Long options to be recognized\n" \
326 "\t-n, --name=progname The name under which errors are reported\n" \
327 "\t-o, --options=optstring Short options to be recognized\n" \
328 "\t-q, --quiet Disable error reporting by getopt(3)\n" \
329 "\t-Q, --quiet-output No normal output\n" \
330 "\t-s, --shell=shell Set shell quoting conventions\n" \
331 "\t-T, --test Test for getopt(1) version\n" \
332 "\t-u, --unqote Do not quote the output"
333
334#define grep_trivial_usage \
335 "[-ihHnqvs] pattern [files...]"
336#define grep_full_usage \
337 "Search for PATTERN in each FILE or standard input.\n\n" \
338 "Options:\n" \
339 "\t-H\tprefix output lines with filename where match was found\n" \
340 "\t-h\tsuppress the prefixing filename on output\n" \
341 "\t-i\tignore case distinctions\n" \
342 "\t-n\tprint line number with output lines\n" \
343 "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n" \
344 "\t-v\tselect non-matching lines\n" \
345 "\t-s\tsuppress file open/read error messages"
346
347#define gunzip_trivial_usage \
348 "[OPTION]... FILE"
349#define gunzip_full_usage \
350 "Uncompress FILE (or standard input if FILE is '-').\n\n" \
351 "Options:\n" \
352 "\t-c\tWrite output to standard output\n" \
353 "\t-t\tTest compressed file integrity"
354
355#define gzip_trivial_usage \
356 "[OPTION]... FILE"
357#define gzip_full_usage \
358 "Compress FILE with maximum compression.\n" \
359 "When FILE is '-', reads standard input. Implies -c.\n\n" \
360 "Options:\n" \
361 "\t-c\tWrite output to standard output instead of FILE.gz\n" \
362 "\t-d\tdecompress"
363
364#define halt_trivial_usage \
365 ""
366#define halt_full_usage \
367 "Halt the system."
368
369#define head_trivial_usage \
370 "[OPTION] [FILE]..."
371#define head_full_usage \
372 "Print first 10 lines of each FILE to standard output.\n" \
373 "With more than one FILE, precede each with a header giving the\n" \
374 "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000375 "Options:\n" \
376 "\t-n NUM\t\tPrint first NUM lines instead of first 10"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000377
378#define hostid_trivial_usage \
379 ""
380#define hostid_full_usage \
381 "Print out a unique 32-bit identifier for the machine."
382
383#define hostname_trivial_usage \
384 "[OPTION] {hostname | -F file}"
385#define hostname_full_usage \
386 "Get or set the hostname or DNS domain name. If a hostname is given\n" \
387 "(or a file with the -F parameter), the host name will be set.\n\n" \
388 "Options:\n" \
389 "\t-s\t\tShort\n" \
390 "\t-i\t\tAddresses for the hostname\n" \
391 "\t-d\t\tDNS domain name\n" \
392 "\t-F, --file FILE\tUse the contents of FILE to specify the hostname"
393
394#define id_trivial_usage \
395 "[OPTIONS]... [USERNAME]"
396#define id_full_usage \
397 "Print information for USERNAME or the current user\n\n" \
398 "Options:\n" \
399 "\t-g\tprints only the group ID\n" \
400 "\t-u\tprints only the user ID\n" \
401 "\t-n\tprint a name instead of a number (with for -ug)\n" \
402 "\t-r\tprints the real user ID instead of the effective ID (with -ug)"
403
Manuel Novoa III 22b889a2001-03-12 09:58:51 +0000404#ifdef BB_FEATURE_IFCONFIG_SLIP
Eric Andersen7e9276b2001-02-22 01:15:47 +0000405 #define USAGE_SIOCSKEEPALIVE(a) a
406#else
407 #define USAGE_SIOCSKEEPALIVE(a)
408#endif
Manuel Novoa III 22b889a2001-03-12 09:58:51 +0000409#ifdef BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
410 #define USAGE_IFCONFIG_MII(a) a
411#else
412 #define USAGE_IFCONFIG_MII(a)
413#endif
414#ifdef BB_FEATURE_IFCONFIG_HW
415 #define USAGE_IFCONFIG_HW(a) a
416#else
417 #define USAGE_IFCONFIG_HW(a)
418#endif
419#ifdef BB_FEATURE_IFCONFIG_STATUS
420 #define USAGE_IFCONFIG_OPT_A(a) a
421#else
422 #define USAGE_IFCONFIG_OPT_A(a)
423#endif
424
Eric Andersen7e9276b2001-02-22 01:15:47 +0000425#define ifconfig_trivial_usage \
Manuel Novoa III 22b889a2001-03-12 09:58:51 +0000426 USAGE_IFCONFIG_OPT_A("[-a]") " <interface> [<address>]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000427#define ifconfig_full_usage \
428 "configure a network interface\n\n" \
429 "Options:\n" \
430 "\t[[-]broadcast [<address>]] [[-]pointopoint [<address>]]\n" \
Manuel Novoa III 22b889a2001-03-12 09:58:51 +0000431 "\t[netmask <address>] [dstaddr <address>]\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000432 USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
Manuel Novoa III 22b889a2001-03-12 09:58:51 +0000433 "\t" USAGE_IFCONFIG_HW("[hw ether <address>] ") \
434 "[metric <NN>] [mtu <NN>]\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000435 "\t[[-]trailers] [[-]arp] [[-]allmulti]\n" \
Manuel Novoa III 22b889a2001-03-12 09:58:51 +0000436 "\t[multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic]\n" \
437 USAGE_IFCONFIG_MII("\t[mem_start <NN>] [io_addr <NN>] [irq <NN>]\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000438 "\t[up|down] ..."
439
440#define init_trivial_usage \
441 ""
442#define init_full_usage \
443 "Init is the parent of all processes.\n\n" \
444 "This version of init is designed to be run only by the kernel."
445
446#define insmod_trivial_usage \
447 "[OPTION]... MODULE [symbol=value]..."
448#define insmod_full_usage \
449 "Loads the specified kernel modules into the kernel.\n\n" \
450 "Options:\n" \
451 "\t-f\tForce module to load into the wrong kernel version.\n" \
452 "\t-k\tMake module autoclean-able.\n" \
453 "\t-v\tverbose output\n" \
454 "\t-L\tLock to prevent simultaneous loads of a module\n" \
455 "\t-x\tdo not export externs"
456
457#define kill_trivial_usage \
458 "[-signal] process-id [process-id ...]"
459#define kill_full_usage \
460 "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\
David Kimdon56082dc2001-02-23 06:03:22 +0000461 "Options:\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000462 "\t-l\tList all signal names and numbers."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000463
464#define killall_trivial_usage \
465 "[-signal] process-name [process-name ...]"
466#define killall_full_usage \
467 "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000468 "Options:\n" \
469 "\t-l\tList all signal names and numbers."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000470
471#define length_trivial_usage \
472 "STRING"
473#define length_full_usage \
474 "Prints out the length of the specified STRING."
475
476#define ln_trivial_usage \
477 "[OPTION] TARGET... LINK_NAME|DIRECTORY"
478#define ln_full_usage \
479 "Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n"\
480 "\nYou may use '--' to indicate that all following arguments are non-options.\n\n" \
481 "Options:\n" \
482 "\t-s\tmake symbolic links instead of hard links\n" \
483 "\t-f\tremove existing destination files\n" \
484 "\t-n\tno dereference symlinks - treat like normal file"
485
486#define loadacm_trivial_usage \
487 "< mapfile"
488#define loadacm_full_usage \
489 "Loads an acm from standard input."
490
491#define loadfont_trivial_usage \
492 "< font"
493#define loadfont_full_usage \
494 "Loads a console font from standard input."
495
496#define loadkmap_trivial_usage \
497 "< keymap"
498#define loadkmap_full_usage \
499 "Loads a binary keyboard translation table from standard input."
500
501#define logger_trivial_usage \
502 "[OPTION]... [MESSAGE]"
503#define logger_full_usage \
504 "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n\n" \
505 "Options:\n" \
506 "\t-s\tLog to stderr as well as the system log.\n" \
507 "\t-t\tLog using the specified tag (defaults to user name).\n" \
508 "\t-p\tEnter the message with the specified priority.\n" \
509 "\t\tThis may be numerical or a ``facility.level'' pair."
510
511#define logname_trivial_usage \
512 ""
513#define logname_full_usage \
514 "Print the name of the current user."
515
516#ifdef BB_FEATURE_LS_TIMESTAMPS
517 #define USAGE_LS_TIMESTAMPS(a) a
518#else
519 #define USAGE_LS_TIMESTAMPS(a)
520#endif
521#ifdef BB_FEATURE_LS_FILETYPES
522 #define USAGE_LS_FILETYPES(a) a
523#else
524 #define USAGE_LS_FILETYPES(a)
525#endif
526#ifdef BB_FEATURE_LS_FOLLOWLINKS
527 #define USAGE_LS_FOLLOWLINKS(a) a
528#else
529 #define USAGE_LS_FOLLOWLINKS(a)
530#endif
531#ifdef BB_FEATURE_LS_RECURSIVE
532 #define USAGE_LS_RECURSIVE(a) a
533#else
534 #define USAGE_LS_RECURSIVE(a)
535#endif
536#ifdef BB_FEATURE_LS_SORTFILES
537 #define USAGE_LS_SORTFILES(a) a
538#else
539 #define USAGE_LS_SORTFILES(a)
540#endif
541#ifdef BB_FEATURE_AUTOWIDTH
542 #define USAGE_AUTOWIDTH(a) a
543#else
544 #define USAGE_AUTOWIDTH(a)
545#endif
546#define ls_trivial_usage \
Eric Andersened0d9582001-02-23 13:23:03 +0000547 "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k] [filenames...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000548#define ls_full_usage \
549 "List directory contents\n\n" \
550 "Options:\n" \
551 "\t-1\tlist files in a single column\n" \
552 "\t-A\tdo not list implied . and ..\n" \
553 "\t-a\tdo not hide entries starting with .\n" \
554 "\t-C\tlist entries by columns\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000555 USAGE_LS_TIMESTAMPS("\t-c\twith -l: show ctime\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000556 "\t-d\tlist directory entries instead of contents\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000557 USAGE_LS_TIMESTAMPS("\t-e\tlist both full date and full time\n") \
558 USAGE_LS_FILETYPES("\t-F\tappend indicator (one of */=@|) to entries\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000559 "\t-i\tlist the i-node for each file\n" \
560 "\t-l\tuse a long listing format\n" \
561 "\t-n\tlist numeric UIDs and GIDs instead of names\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000562 USAGE_LS_FILETYPES("\t-p\tappend indicator (one of /=@|) to entries\n") \
563 USAGE_LS_FOLLOWLINKS("\t-L\tlist entries pointed to by symbolic links\n") \
564 USAGE_LS_RECURSIVE("\t-R\tlist subdirectories recursively\n") \
565 USAGE_LS_SORTFILES("\t-r\tsort the listing in reverse order\n") \
566 USAGE_LS_SORTFILES("\t-S\tsort the listing by file size\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000567 "\t-s\tlist the size of each file, in blocks\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000568 USAGE_AUTOWIDTH("\t-T NUM\tassume Tabstop every NUM columns\n") \
569 USAGE_LS_TIMESTAMPS("\t-t\twith -l: show modification time\n") \
570 USAGE_LS_TIMESTAMPS("\t-u\twith -l: show access time\n") \
571 USAGE_LS_SORTFILES("\t-v\tsort the listing by version\n") \
572 USAGE_AUTOWIDTH("\t-w NUM\tassume the terminal is NUM columns wide\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000573 "\t-x\tlist entries by lines instead of by columns\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000574 USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
575 USAGE_HUMAN_READABLE( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000576 "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
Eric Andersened0d9582001-02-23 13:23:03 +0000577 "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000578 "\t-k\tprint sizes in kilobytes(compatability)")
Eric Andersen7e9276b2001-02-22 01:15:47 +0000579
580#define lsmod_trivial_usage \
581 ""
582#define lsmod_full_usage \
583 "List the currently loaded kernel modules."
584
585#define makedevs_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000586 "NAME TYPE MAJOR MINOR FIRST LAST [s]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000587#define makedevs_full_usage \
588 "Creates a range of block or character special files\n\n" \
589 "TYPEs include:\n" \
590 "\tb:\tMake a block (buffered) device.\n" \
591 "\tc or u:\tMake a character (un-buffered) device.\n" \
592 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n" \
593 "FIRST specifies the number appended to NAME to create the first device.\n" \
594 "LAST specifies the number of the last item that should be created.\n" \
595 "If 's' is the last argument, the base device is created as well.\n\n" \
596 "For example:\n" \
597 "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000598 "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000599
Eric Andersen7e9276b2001-02-22 01:15:47 +0000600#define md5sum_trivial_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000601 "[OPTION] [FILE]...\n" \
602 "or: md5sum [OPTION] -c [FILE]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000603#define md5sum_full_usage \
604 "Print or check MD5 checksums.\n\n" \
605 "Options:\n" \
606 "With no FILE, or when FILE is -, read standard input.\n\n" \
607 "\t-b\tread files in binary mode\n" \
608 "\t-c\tcheck MD5 sums against given list\n" \
609 "\t-t\tread files in text mode (default)\n" \
610 "\t-g\tread a string\n" \
611 "\nThe following two options are useful only when verifying checksums:\n" \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +0000612 "\t-s\tdon't output anything, status code shows success\n" \
613 "\t-w\twarn about improperly formated MD5 checksum lines"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000614
Eric Andersen7e9276b2001-02-22 01:15:47 +0000615#define mkdir_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000616 "[OPTION] DIRECTORY..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000617#define mkdir_full_usage \
618 "Create the DIRECTORY(ies), if they do not already exist\n\n" \
619 "Options:\n" \
620 "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000621 "\t-p\tno error if existing, make parent directories as needed"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000622
Eric Andersen7e9276b2001-02-22 01:15:47 +0000623#define mkfifo_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000624 "[OPTIONS] name"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000625#define mkfifo_full_usage \
626 "Creates a named pipe (identical to 'mknod name p')\n\n" \
627 "Options:\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000628 "\t-m\tcreate the pipe using the specified mode (default a=rw)"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000629
Eric Andersen7e9276b2001-02-22 01:15:47 +0000630#define mkfs_minix_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000631 "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000632#define mkfs_minix_full_usage \
633 "Make a MINIX filesystem.\n\n" \
634 "Options:\n" \
635 "\t-c\t\tCheck the device for bad blocks\n" \
636 "\t-n [14|30]\tSpecify the maximum length of filenames\n" \
637 "\t-i INODES\tSpecify the number of inodes for the filesystem\n" \
638 "\t-l FILENAME\tRead the bad blocks list from FILENAME\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000639 "\t-v\t\tMake a Minix version 2 filesystem"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000640
Eric Andersen7e9276b2001-02-22 01:15:47 +0000641#define mknod_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000642 "[OPTIONS] NAME TYPE MAJOR MINOR"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000643#define mknod_full_usage \
644 "Create a special file (block, character, or pipe).\n\n" \
645 "Options:\n" \
646 "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n" \
647 "TYPEs include:\n" \
648 "\tb:\tMake a block (buffered) device.\n" \
649 "\tc or u:\tMake a character (un-buffered) device.\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000650 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000651
Eric Andersen7e9276b2001-02-22 01:15:47 +0000652#define mkswap_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000653 "[-c] [-v0|-v1] device [block-count]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000654#define mkswap_full_usage \
655 "Prepare a disk partition to be used as a swap partition.\n\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000656 "Options:\n" \
657 "\t-c\t\tCheck for read-ability.\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000658 "\t-v0\t\tMake version 0 swap [max 128 Megs].\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +0000659 "\t-v1\t\tMake version 1 swap [big!] (default for kernels >\n\t\t\t2.1.117).\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000660 "\tblock-count\tNumber of block to use (default is entire partition)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000661
Eric Andersen7e9276b2001-02-22 01:15:47 +0000662#define mktemp_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000663 "[-q] TEMPLATE"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000664#define mktemp_full_usage \
665 "Creates a temporary file with its name based on TEMPLATE.\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000666 "TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000667
Eric Andersen7e9276b2001-02-22 01:15:47 +0000668#define more_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000669 "[FILE ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000670#define more_full_usage \
671 "More is a filter for viewing FILE one screenful at a time."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000672
Eric Andersen7e9276b2001-02-22 01:15:47 +0000673#ifdef BB_FEATURE_MOUNT_LOOP
674 #define USAGE_MOUNT_LOOP(a) a
675#else
676 #define USAGE_MOUNT_LOOP(a)
677#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000678#ifdef BB_MTAB
Eric Andersen7e9276b2001-02-22 01:15:47 +0000679 #define USAGE_MTAB(a) a
680#else
681 #define USAGE_MTAB(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000682#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000683#define mount_trivial_usage \
684 "[flags] device directory [-o options,more-options]"
685#define mount_full_usage \
686 "Mount a filesystem\n\n" \
687 "Flags:\n" \
688 "\t-a:\t\tMount all filesystems in fstab.\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000689 USAGE_MTAB( \
Eric Andersena0cfe942001-02-23 10:07:09 +0000690 "\t-f:\t\t\"Fake\" Add entry to mount table but don't mount it.\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000691 "\t-n:\t\tDon't write a mount table entry.\n" \
692 ) \
693 "\t-o option:\tOne of many filesystem options, listed below.\n" \
694 "\t-r:\t\tMount the filesystem read-only.\n" \
695 "\t-t fs-type:\tSpecify the filesystem type.\n" \
696 "\t-w:\t\tMount for reading and writing (default).\n" \
697 "\n" \
698 "Options for use with the \"-o\" flag:\n" \
699 "\tasync/sync:\tWrites are asynchronous / synchronous.\n" \
700 "\tatime/noatime:\tEnable / disable updates to inode access times.\n" \
701 "\tdev/nodev:\tAllow use of special device files / disallow them.\n" \
702 "\texec/noexec:\tAllow use of executable files / disallow them.\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000703 USAGE_MOUNT_LOOP( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000704 "\tloop:\t\tMounts a file via loop device.\n" \
705 ) \
706 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +0000707 "\tremount:\tRe-mount a mounted filesystem, changing its flags.\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000708 "\tro/rw:\t\tMount for read-only / read-write.\n" \
709 "\nThere are EVEN MORE flags that are specific to each filesystem.\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000710 "You'll have to see the written documentation for those."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000711
Eric Andersen7e9276b2001-02-22 01:15:47 +0000712#define mt_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000713 "[-f device] opcode value"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000714#define mt_full_usage \
715 "Control magnetic tape drive operation\n" \
716 "\nAvailable Opcodes:\n\n" \
717 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
718 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
719 "ras3 reset retension rew rewoffline seek setblk setdensity\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000720 "setpart tell unload unlock weof wset"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000721
Eric Andersen7e9276b2001-02-22 01:15:47 +0000722#define mv_trivial_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000723 "SOURCE DEST\n" \
724 "or: mv SOURCE... DIRECTORY"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000725#define mv_full_usage \
726 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000727
Eric Andersen7e9276b2001-02-22 01:15:47 +0000728#define nc_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000729 "[IP] [port]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000730#define nc_full_usage \
731 "Netcat opens a pipe to IP:port"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000732
Eric Andersen7e9276b2001-02-22 01:15:47 +0000733#define nslookup_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000734 "[HOST]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000735#define nslookup_full_usage \
736 "Queries the nameserver for the IP address of the given HOST"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000737
Eric Andersen7e9276b2001-02-22 01:15:47 +0000738#ifdef BB_FEATURE_SIMPLE_PING
739#define ping_trivial_usage "host"
740#define ping_full_usage "Send ICMP ECHO_REQUEST packets to network hosts"
741#else
742#define ping_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000743 "[OPTION]... host"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000744#define ping_full_usage \
745 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" \
746 "Options:\n" \
747 "\t-c COUNT\tSend only COUNT pings.\n" \
748 "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56).\n" \
749 "\t-q\t\tQuiet mode, only displays output at start\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000750 "\t\t\tand when finished."
751#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000752
Eric Andersen7e9276b2001-02-22 01:15:47 +0000753#define pivot_root_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000754 "new_root put_old"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000755#define pivot_root_full_usage \
756 "Move the current root file system to put_old and make new_root\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000757 "the new root file system."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000758
Eric Andersen7e9276b2001-02-22 01:15:47 +0000759#define poweroff_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000760 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000761#define poweroff_full_usage \
762 "Halt the system and request that the kernel shut off the power."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000763
Eric Andersen7e9276b2001-02-22 01:15:47 +0000764#define printf_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000765 "FORMAT [ARGUMENT...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000766#define printf_full_usage \
767 "Formats and prints ARGUMENT(s) according to FORMAT,\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000768 "Where FORMAT controls the output exactly as in C printf."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000769
Eric Andersen7e9276b2001-02-22 01:15:47 +0000770#define ps_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000771 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000772#define ps_full_usage \
773 "Report process status\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000774 "\nThis version of ps accepts no options."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000775
Eric Andersen7e9276b2001-02-22 01:15:47 +0000776#define pwd_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000777 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000778#define pwd_full_usage \
779 "Print the full filename of the current working directory."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000780
Eric Andersen7e9276b2001-02-22 01:15:47 +0000781#define rdate_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000782 "[OPTION] HOST"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000783#define rdate_full_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +0000784 "Get and possibly set the system date and time from a remote HOST.\n\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000785 "Options:\n" \
786 "\t-s\tSet the system date and time (default).\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000787 "\t-p\tPrint the date and time."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000788
Eric Andersen7e9276b2001-02-22 01:15:47 +0000789#define readlink_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000790 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000791#define readlink_full_usage \
792 "Read a symbolic link."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000793
Eric Andersen7e9276b2001-02-22 01:15:47 +0000794#define reboot_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000795 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000796#define reboot_full_usage \
797 "Reboot the system."
798
799#define renice_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000800 "priority pid [pid ...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000801#define renice_full_usage \
802 "Changes priority of running processes. Allowed priorities range\n" \
803 "from 20 (the process runs only when nothing else is running) to 0\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000804 "(default priority) to -20 (almost nothing else ever gets to run)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000805
Eric Andersen7e9276b2001-02-22 01:15:47 +0000806#define reset_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000807 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000808#define reset_full_usage \
809 "Resets the screen."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000810
Eric Andersen7e9276b2001-02-22 01:15:47 +0000811#define rm_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000812 "[OPTION]... FILE..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000813#define rm_full_usage \
814 "Remove (unlink) the FILE(s). You may use '--' to\n" \
815 "indicate that all following arguments are non-options.\n\n" \
816 "Options:\n" \
817 "\t-f\t\tremove existing destinations, never prompt\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000818 "\t-r or -R\tremove the contents of directories recursively"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000819
Eric Andersen7e9276b2001-02-22 01:15:47 +0000820#define rmdir_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000821 "[OPTION]... DIRECTORY..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000822#define rmdir_full_usage \
823 "Remove the DIRECTORY(ies), if they are empty."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000824
Eric Andersen7e9276b2001-02-22 01:15:47 +0000825#define rmmod_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000826 "[OPTION]... [MODULE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000827#define rmmod_full_usage \
828 "Unloads the specified kernel modules from the kernel.\n\n" \
829 "Options:\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000830 "\t-a\tTry to remove all unused kernel modules."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000831
Eric Andersen7e9276b2001-02-22 01:15:47 +0000832#define route_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000833 "[{add|del|flush}]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000834#define route_full_usage \
835 "Edit the kernel's routing tables"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000836
Eric Andersen7e9276b2001-02-22 01:15:47 +0000837#define rpmunpack_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000838 "< package.rpm | gunzip | cpio -idmuv"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000839#define rpmunpack_full_usage \
840 "Extracts an rpm archive."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000841
Eric Andersen7e9276b2001-02-22 01:15:47 +0000842#define sed_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000843 "[-Vhnef] pattern [files...]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000844#define sed_full_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +0000845 "Options:\n" \
846 "\t-n\t\tsuppress automatic printing of pattern space\n" \
847 "\t-e script\tadd the script to the commands to be executed\n" \
848 "\t-f scriptfile\tadd the contents of script-file to the commands to be executed\n" \
849 "\t-h\t\tdisplay this help message\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000850 "\n" \
851 "If no -e or -f is given, the first non-option argument is taken as the\n" \
852 "sed script to interpret. All remaining arguments are names of input\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000853 "files; if no input files are specified, then the standard input is read."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000854
Eric Andersen7e9276b2001-02-22 01:15:47 +0000855#define setkeycodes_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000856 "SCANCODE KEYCODE ..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000857#define setkeycodes_full_usage \
858 "Set entries into the kernel's scancode-to-keycode map,\n" \
859 "allowing unusual keyboards to generate usable keycodes.\n\n" \
860 "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000861 "and KEYCODE is given in decimal"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000862
Eric Andersen7e9276b2001-02-22 01:15:47 +0000863#define sh_trivial_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000864 "[FILE]...\n" \
865 "or: sh -c command [args]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000866#define sh_full_usage \
867 "lash: The BusyBox command interpreter (shell)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000868
Eric Andersen7e9276b2001-02-22 01:15:47 +0000869#define sleep_trivial_usage \
870 "N"
871#define sleep_full_usage \
872 "Pause for N seconds."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000873
Eric Andersen7e9276b2001-02-22 01:15:47 +0000874
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000875#ifdef BB_FEATURE_SORT_REVERSE
Eric Andersen7e9276b2001-02-22 01:15:47 +0000876 #define USAGE_SORT_REVERSE(a) a
877#else
878 #define USAGE_SORT_REVERSE(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000879#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000880#define sort_trivial_usage \
881 "[-n]" USAGE_SORT_REVERSE(" [-r]") " [FILE]..."
882#define sort_full_usage \
883 "Sorts lines of text in the specified files"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000884
Eric Andersen7e9276b2001-02-22 01:15:47 +0000885#define stty_trivial_usage \
886 "[-a|g] [-F device] [SETTING]..."
887#define stty_full_usage \
888 "Without arguments, prints baud rate, line discipline," \
889 "\nand deviations from stty sane." \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +0000890 "\n\nOptions:" \
891 "\n\t-F device\topen device instead of stdin" \
892 "\n\t-a\t\tprint all current settings in human-readable form" \
893 "\n\t-g\t\tprint in stty-readable form" \
894 "\n\t[SETTING]\tsee documentation"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000895
Eric Andersen7e9276b2001-02-22 01:15:47 +0000896#define swapoff_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000897 "[OPTION] [device]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000898#define swapoff_full_usage \
899 "Stop swapping virtual memory pages on the given device.\n\n" \
900 "Options:\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000901 "\t-a\tStop swapping on all swap devices"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000902
Eric Andersen7e9276b2001-02-22 01:15:47 +0000903#define swapon_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000904 "[OPTION] [device]"
Eric Andersen7e9276b2001-02-22 01:15:47 +0000905#define swapon_full_usage \
906 "Start swapping virtual memory pages on the given device.\n\n" \
907 "Options:\n" \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000908 "\t-a\tStart swapping on all swap devices"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000909
Eric Andersen7e9276b2001-02-22 01:15:47 +0000910#define sync_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000911 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +0000912#define sync_full_usage \
913 "Write all buffered filesystem blocks to disk."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000914
Eric Andersen7e9276b2001-02-22 01:15:47 +0000915
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000916#ifdef BB_FEATURE_KLOGD
Eric Andersen7e9276b2001-02-22 01:15:47 +0000917 #define USAGE_KLOGD(a) a
918#else
919 #define USAGE_KLOGD(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000920#endif
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000921#ifdef BB_FEATURE_REMOTE_LOG
Eric Andersen7e9276b2001-02-22 01:15:47 +0000922 #define USAGE_REMOTE_LOG(a) a
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000923#else
Eric Andersen7e9276b2001-02-22 01:15:47 +0000924 #define USAGE_REMOTE_LOG(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000925#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000926#define syslogd_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000927 "[OPTION]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000928#define syslogd_full_usage \
929 "Linux system and kernel (provides klogd) logging utility.\n" \
930 "Note that this version of syslogd/klogd ignores /etc/syslog.conf.\n\n" \
931 "Options:\n" \
932 "\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n" \
933 "\t-n\t\tRun as a foreground process\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000934 USAGE_KLOGD("\t-K\t\tDo not start up the klogd process\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000935 "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000936 USAGE_REMOTE_LOG( \
Eric Andersendc121902001-02-24 18:52:36 +0000937 "\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \
938 "\t-L\t\tLog locally and via network logging (default is network only)")
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000939
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000940
Eric Andersen7e9276b2001-02-22 01:15:47 +0000941#ifdef BB_FEATURE_SIMPLE_TAIL
942 #define USAGE_UNSIMPLE_TAIL(a)
943#else
944 #define USAGE_UNSIMPLE_TAIL(a) a
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000945#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000946#define tail_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000947 "[OPTION]... [FILE]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +0000948#define tail_full_usage \
949 "Print last 10 lines of each FILE to standard output.\n" \
950 "With more than one FILE, precede each with a header giving the\n" \
951 "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
952 "Options:\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000953 USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000954 "\t-n N[kbm]\tprint last N lines instead of last 10\n" \
955 "\t-f\t\toutput data as the file grows" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000956 USAGE_UNSIMPLE_TAIL( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000957 "\n\t-q\t\tnever output headers giving file names\n" \
958 "\t-s SEC\t\twait SEC seconds between reads with -f\n" \
959 "\t-v\t\talways output headers giving file names\n\n" \
960 "If the first character of N (bytes or lines) is a `+', output begins with \n" \
961 "the Nth item from the start of each file, otherwise, print the last N items\n" \
962 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." \
963 )
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000964
Eric Andersen7e9276b2001-02-22 01:15:47 +0000965#ifdef BB_FEATURE_TAR_CREATE
966 #define USAGE_TAR_CREATE(a) a
967#else
968 #define USAGE_TAR_CREATE(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000969#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000970#ifdef BB_FEATURE_TAR_EXCLUDE
971 #define USAGE_TAR_EXCLUDE(a) a
972#else
973 #define USAGE_TAR_EXCLUDE(a)
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000974#endif
Eric Andersen7e9276b2001-02-22 01:15:47 +0000975#define tar_trivial_usage \
976 "-[" USAGE_TAR_CREATE("c") "xtvO] " \
977 USAGE_TAR_EXCLUDE("[--exclude File] [-X File]") \
978 "[-f tarFile] [FILE(s)] ..."
979#define tar_full_usage \
980 "Create, extract, or list files from a tar file.\n\n" \
981 "Main operation mode:\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000982 USAGE_TAR_CREATE("\tc\t\tcreate\n") \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000983 "\tx\t\textract\n" \
984 "\tt\t\tlist\n" \
985 "\nFile selection:\n" \
986 "\tf\t\tname of tarfile or \"-\" for stdin\n" \
987 "\tO\t\textract to stdout\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000988 USAGE_TAR_EXCLUDE( \
Eric Andersen7e9276b2001-02-22 01:15:47 +0000989 "\texclude\t\tfile to exclude\n" \
990 "\tX\t\tfile with names to exclude\n" \
991 ) \
992 "\nInformative output:\n" \
993 "\tv\t\tverbosely list files processed"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +0000994
Eric Andersen7e9276b2001-02-22 01:15:47 +0000995#define tee_trivial_usage \
996 "[OPTION]... [FILE]..."
997#define tee_full_usage \
998 "Copy standard input to each FILE, and also to standard output.\n\n" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +0000999 "Options:\n" \
1000 "\t-a\tappend to the given FILEs, do not overwrite"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001001
Eric Andersen7e9276b2001-02-22 01:15:47 +00001002#define telnet_trivial_usage \
1003 "host [port]"
1004#define telnet_full_usage \
1005 "Telnet is used to establish interactive communication with another\n"\
1006 "computer over a network using the TELNET protocol."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001007
Eric Andersen7e9276b2001-02-22 01:15:47 +00001008#define test_trivial_usage \
1009 "EXPRESSION\n or [ EXPRESSION ]"
1010#define test_full_usage \
1011 "Checks file types and compares values returning an exit\n" \
1012 "code determined by the value of EXPRESSION."
1013
Mark Whitley450736c2001-03-02 19:08:50 +00001014#ifdef BB_FEATURE_TFTP_GET
1015 #define USAGE_TFTP_GET(a) a
1016#else
1017 #define USAGE_TFTP_GET(a)
1018#endif
1019#ifdef BB_FEATURE_TFTP_PUT
1020 #define USAGE_TFTP_PUT(a) a
1021#else
1022 #define USAGE_TFTP_PUT(a)
1023#endif
1024
1025#define tftp_trivial_usage \
1026 "command SOURCE DEST"
1027#define tftp_full_usage \
1028 "Transfers a file from/to a tftp server using \"octet\" mode.\n\n" \
1029 "Commands:\n" \
1030 USAGE_TFTP_GET( \
1031 "\tget\tGet file from server SOURCE and store to local DEST.\n" \
1032 ) \
1033 USAGE_TFTP_PUT( \
1034 "\tput\tPut local file SOURCE to server DEST.\n" \
1035 ) \
1036 "\nWhen nameing a server, use the syntax \"server:file\"."
1037
Eric Andersen7e9276b2001-02-22 01:15:47 +00001038#define touch_trivial_usage \
1039 "[-c] file [file ...]"
1040#define touch_full_usage \
1041 "Update the last-modified date on the given file[s].\n\n" \
1042 "Options:\n" \
1043 "\t-c\tDo not create any files"
1044
1045#define tr_trivial_usage \
1046 "[-cds] STRING1 [STRING2]"
1047#define tr_full_usage \
1048 "Translate, squeeze, and/or delete characters from\n" \
1049 "standard input, writing to standard output.\n\n" \
1050 "Options:\n" \
1051 "\t-c\ttake complement of STRING1\n" \
1052 "\t-d\tdelete input characters coded STRING1\n" \
1053 "\t-s\tsqueeze multiple output characters of STRING2 into one character"
1054
1055#define true_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001056 ""
Eric Andersen7e9276b2001-02-22 01:15:47 +00001057#define true_full_usage \
1058 "Return an exit code of TRUE (0)."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001059
Eric Andersen7e9276b2001-02-22 01:15:47 +00001060#define tty_trivial_usage \
1061 ""
1062#define tty_full_usage \
1063 "Print the file name of the terminal connected to standard input.\n\n"\
1064 "Options:\n" \
1065 "\t-s\tprint nothing, only return an exit status"
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001066
Eric Andersen7e9276b2001-02-22 01:15:47 +00001067#ifdef BB_FEATURE_MOUNT_FORCE
1068 #define USAGE_MOUNT_FORCE(a) a
1069#else
1070 #define USAGE_MOUNT_FORCE(a)
1071#endif
1072#define umount_trivial_usage \
1073 "[flags] filesystem|directory"
1074#define umount_full_usage \
1075 "Unmount file systems\n" \
1076 "\nFlags:\n" "\t-a:\tUnmount all file systems" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +00001077 USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
Eric Andersen7e9276b2001-02-22 01:15:47 +00001078 "\n\t-r:\tTry to remount devices as read-only if mount is busy" \
Eric Andersen4b2e69a2001-02-22 23:32:59 +00001079 USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
1080 USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)")
Eric Andersen7e9276b2001-02-22 01:15:47 +00001081
1082#define uname_trivial_usage \
1083 "[OPTION]..."
1084#define uname_full_usage \
1085 "Print certain system information. With no OPTION, same as -s.\n\n" \
1086 "Options:\n" \
1087 "\t-a\tprint all information\n" \
1088 "\t-m\tthe machine (hardware) type\n" \
1089 "\t-n\tprint the machine's network node hostname\n" \
1090 "\t-r\tprint the operating system release\n" \
1091 "\t-s\tprint the operating system name\n" \
1092 "\t-p\tprint the host processor type\n" \
1093 "\t-v\tprint the operating system version"
1094
1095#define uniq_trivial_usage \
1096 "[OPTION]... [INPUT [OUTPUT]]"
1097#define uniq_full_usage \
1098 "Discard all but one of successive identical lines from INPUT\n" \
Eric Andersena0cfe942001-02-23 10:07:09 +00001099 "(or standard input), writing to OUTPUT (or standard output).\n\n" \
Eric Andersen7e9276b2001-02-22 01:15:47 +00001100 "Options:\n" \
1101 "\t-c\tprefix lines by the number of occurrences\n" \
1102 "\t-d\tonly print duplicate lines\n" \
1103 "\t-u\tonly print unique lines"
1104
1105#define unix2dos_trivial_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +00001106 "[option] [file]"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001107#define unix2dos_full_usage \
Eric Andersen4b2e69a2001-02-22 23:32:59 +00001108 "See 'dos2unix --help' for help!"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001109
1110#define update_trivial_usage \
1111 "[options]"
1112#define update_full_usage \
1113 "Periodically flushes filesystem buffers.\n\n" \
1114 "Options:\n" \
1115 "\t-S\tforce use of sync(2) instead of flushing\n" \
1116 "\t-s SECS\tcall sync this often (default 30)\n" \
1117 "\t-f SECS\tflush some buffers this often (default 5)"
1118
1119#define uptime_trivial_usage \
1120 ""
1121#define uptime_full_usage \
1122 "Display the time since the last boot."
1123
1124#define usleep_trivial_usage \
1125 "N"
1126#define usleep_full_usage \
1127 "Pause for N microseconds."
1128
1129#define uudecode_trivial_usage \
1130 "[FILE]..."
1131#define uudecode_full_usage \
1132 "Uudecode a file that is uuencoded.\n\n" \
1133 "Options:\n" \
1134 "\t-o FILE\tdirect output to FILE" \
1135
1136#define uuencode_trivial_usage \
1137 "[OPTION] [INFILE] REMOTEFILE"
1138#define uuencode_full_usage \
1139 "Uuencode a file.\n\n" \
1140 "Options:\n" \
1141 "\t-m\tuse base64 encoding as of RFC1521"
1142
1143#define watchdog_trivial_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +00001144 "DEV"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001145#define watchdog_full_usage \
Eric Andersen7a9cc2d2001-02-23 16:58:44 +00001146 "Periodically write to watchdog device DEV"
Eric Andersen7e9276b2001-02-22 01:15:47 +00001147
1148#define wc_trivial_usage \
1149 "[OPTION]... [FILE]..."
1150#define wc_full_usage \
1151 "Print line, word, and byte counts for each FILE, and a total line if\n" \
1152 "more than one FILE is specified. With no FILE, read standard input.\n\n" \
1153 "Options:\n" \
1154 "\t-c\tprint the byte counts\n" \
1155 "\t-l\tprint the newline counts\n" \
1156 "\t-L\tprint the length of the longest line\n" \
1157 "\t-w\tprint the word counts"
1158
1159#define wget_trivial_usage \
1160 "[-c] [-O file] url"
1161#define wget_full_usage \
1162 "wget retrieves files via HTTP\n\n" \
1163 "Options:\n" \
1164 "\t-c\tcontinue retrieval of aborted transfers\n" \
1165 "\t-O\tsave to filename ('-' for stdout)"
1166
1167#define which_trivial_usage \
1168 "[COMMAND ...]"
1169#define which_full_usage \
1170 "Locates a COMMAND."
1171
1172#define whoami_trivial_usage \
1173 ""
1174#define whoami_full_usage \
1175 "Prints the user name associated with the current effective user id."
1176
1177#define xargs_trivial_usage \
1178 "[COMMAND] [ARGS...]"
1179#define xargs_full_usage \
1180 "Executes COMMAND on every item given by standard input."
1181
1182#define yes_trivial_usage \
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001183 "[OPTION]... [STRING]..."
Eric Andersen7e9276b2001-02-22 01:15:47 +00001184#define yes_full_usage \
1185 "Repeatedly outputs a line with all specified STRING(s), or `y'."
Eric Andersen3ec8ffb2001-02-14 21:46:30 +00001186
Eric Andersen7e9276b2001-02-22 01:15:47 +00001187#define zcat_trivial_usage \
1188 "FILE"
1189#define zcat_full_usage \
1190 "Uncompress to stdout."