#define NOUSAGE_STR "\b"
+#define acpid_trivial_usage \
+ "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE...]"
+
+#define acpid_full_usage "\n\n" \
+ "Listen to ACPI events and spawn specific helpers on event arrival\n" \
+ "\nOptions:" \
+ "\n -d Do not daemonize and log to stderr" \
+ "\n -c DIR Config directory [/etc/acpi]" \
+ "\n -e FILE /proc event file [/proc/acpi/event]" \
+ "\n -l FILE Log file [/var/log/acpid]" \
+ USE_FEATURE_ACPID_COMPAT( \
+ "\n\nAccept and ignore compatibility options -g -m -s -S -v" \
+ )
+
+#define acpid_example_usage \
+ "# acpid -l /var/log/my-acpi-log\n" \
+ "# acpid -d /dev/input/event*\n"
#define addgroup_trivial_usage \
"[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
#define addgroup_full_usage "\n\n" \
- "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add an user to a group") "\n" \
+ "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
"\nOptions:" \
"\n -g GID Group id" \
#define adduser_trivial_usage \
"[OPTIONS] user_name"
#define adduser_full_usage "\n\n" \
- "Add an user\n" \
+ "Add a user\n" \
"\nOptions:" \
"\n -h DIR Home directory" \
"\n -g GECOS GECOS field" \
"\n -v Verbose" \
#define arp_trivial_usage \
- "\n" \
- "[-vn] [-H type] [-i if] -a [hostname]\n" \
- "[-v] [-i if] -d hostname [pub]\n" \
- "[-v] [-H type] [-i if] -s hostname hw_addr [temp]\n" \
- "[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
- "[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
+ "\n[-vn] [-H type] [-i if] -a [hostname]" \
+ "\n[-v] [-i if] -d hostname [pub]" \
+ "\n[-v] [-H type] [-i if] -s hostname hw_addr [temp]" \
+ "\n[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub" \
+ "\n[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub"
#define arp_full_usage "\n\n" \
"Manipulate ARP cache\n" \
"\nOptions:" \
"-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
#define chpst_trivial_usage \
- "[-vP012] [-u user[:group]] [-U user[:group]] [-e dir] " \
- "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \
- "[-p processes] [-f bytes] [-c bytes] prog args"
+ "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \
+ " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \
+ " [-p N] [-f BYTES] [-c BYTES] PROG ARGS"
#define chpst_full_usage "\n\n" \
- "Change the process state and run specified program\n" \
+ "Change the process state and run PROG\n" \
"\nOptions:" \
"\n -u USER[:GRP] Set uid and gid" \
"\n -U USER[:GRP] Set $UID and $GID in environment" \
"\n -e DIR Set environment variables as specified by files" \
"\n in DIR: file=1st_line_of_file" \
"\n -/ DIR Chroot to DIR" \
- "\n -n INC Add INC to nice value" \
- "\n -m BYTES Limit data segment, stack segment, locked physical pages," \
- "\n and total of all segment per process to BYTES each" \
+ "\n -n NICE Add NICE to nice value" \
+ "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES" \
"\n -d BYTES Limit data segment" \
- "\n -o N Limit the number of open file descriptors per process to N" \
- "\n -p N Limit number of processes per uid to N" \
- "\n -f BYTES Limit output file size to BYTES" \
- "\n -c BYTES Limit core file size to BYTES" \
+ "\n -o N Limit number of open files per process" \
+ "\n -p N Limit number of processes per uid" \
+ "\n -f BYTES Limit output file sizes" \
+ "\n -c BYTES Limit core file size" \
"\n -v Verbose" \
- "\n -P Run prog in a new process group" \
+ "\n -P Create new process group" \
"\n -0 Close standard input" \
"\n -1 Close standard output" \
"\n -2 Close standard error" \
"account prog args"
#define setuidgid_full_usage "\n\n" \
"Set uid and gid to account's uid and gid, removing all supplementary\n" \
- "groups, then run prog"
+ "groups and run PROG"
#define envuidgid_trivial_usage \
"account prog args"
#define envuidgid_full_usage "\n\n" \
- "Set $UID to account's uid and $GID to account's gid, then run prog"
+ "Set $UID to account's uid and $GID to account's gid and run PROG"
#define envdir_trivial_usage \
"dir prog args"
#define envdir_full_usage "\n\n" \
"Set various environment variables as specified by files\n" \
- "in the directory dir, then run prog"
+ "in the directory dir and run PROG"
#define softlimit_trivial_usage \
- "[-a allbytes] [-c corebytes] [-d databytes] [-f filebytes] " \
- "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \
- "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args"
+ "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" \
+ " [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" \
+ " PROG ARGS"
#define softlimit_full_usage "\n\n" \
- "Set soft resource limits, then run prog\n" \
- "\nOptions:" \
- "\n -m n Same as -d n -s n -l n -a n" \
- "\n -d n Limit the data segment per process to n bytes" \
- "\n -s n Limit the stack segment per process to n bytes" \
- "\n -l n Limit the locked physical pages per process to n bytes" \
- "\n -a n Limit the total of all segments per process to n bytes" \
- "\n -o n Limit the number of open file descriptors per process to n" \
- "\n -p n Limit the number of processes per uid to n" \
+ "Set soft resource limits, then run PROG\n" \
+ "\nOptions:" \
+ "\n -a BYTES Limit total size of all segments" \
+ "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES" \
+ "\n -d BYTES Limit data segment" \
+ "\n -s BYTES Limit stack segment" \
+ "\n -l BYTES Limit locked memory size" \
+ "\n -o N Limit number of open files per process" \
+ "\n -p N Limit number of processes per uid" \
"\nOptions controlling file sizes:" \
- "\n -f n Limit output file sizes to n bytes" \
- "\n -c n Limit core file sizes to n bytes" \
+ "\n -f BYTES Limit output file sizes" \
+ "\n -c BYTES Limit core file size" \
"\nEfficiency opts:" \
- "\n -r n Limit the resident set size to n bytes. This limit is not" \
- "\n enforced unless physical memory is full" \
- "\n -t n Limit the CPU time to n seconds. This limit is not enforced" \
- "\n except that the process receives a SIGXCPU signal after n seconds" \
- "\n" \
- "\nSome options may have no effect on some operating systems" \
- "\nn may be =, indicating that soft limit should be set equal to hard limit" \
+ "\n -r BYTES Limit resident set size" \
+ "\n -t N Limit CPU time, process receives" \
+ "\n a SIGXCPU after N seconds" \
#define chroot_trivial_usage \
"NEWROOT [COMMAND...]"
"\n F Input from file" \
#define crond_trivial_usage \
- "-fbS -l N " USE_DEBUG_CROND_OPTION("-d N ") "-L LOGFILE -c DIR"
+ "-fbS -l N " USE_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
#define crond_full_usage "\n\n" \
" -f Foreground" \
"\n -b Background (default)" \
"\n -S Log to syslog (default)" \
"\n -l Set log level. 0 is the most verbose, default 8" \
- USE_DEBUG_CROND_OPTION( \
+ USE_FEATURE_CROND_D( \
"\n -d Set log level, log to stderr" \
) \
"\n -L Log to file" \
"\n FILE Replace crontab by FILE ('-': stdin)" \
#define cryptpw_trivial_usage \
- "[-a des|md5] [string]"
+ "[OPTIONS] [PASSWORD] [SALT]"
+/* We do support -s, we just don't mention it */
#define cryptpw_full_usage "\n\n" \
- "Output crypted string.\n" \
- "If string isn't supplied on cmdline, read it from stdin.\n" \
+ "Crypt the PASSWORD using crypt(3)\n" \
"\nOptions:" \
- "\n -a Algorithm to use (default: md5)" \
+ USE_GETOPT_LONG( \
+ "\n -P,--password-fd=NUM Read password from fd NUM" \
+/* "\n -s,--stdin Use stdin; like -P0" */ \
+ "\n -m,--method=TYPE Encryption method TYPE" \
+ "\n -S,--salt=SALT" \
+ ) \
+ SKIP_GETOPT_LONG( \
+ "\n -P NUM Read password from fd NUM" \
+/* "\n -s Use stdin; like -P0" */ \
+ "\n -m TYPE Encryption method TYPE" \
+ "\n -S SALT" \
+ ) \
+
+/* mkpasswd is an alias to cryptpw */
+
+#define mkpasswd_trivial_usage \
+ "[OPTIONS] [PASSWORD] [SALT]"
+/* We do support -s, we just don't mention it */
+#define mkpasswd_full_usage "\n\n" \
+ "Crypt the PASSWORD using crypt(3)\n" \
+ "\nOptions:" \
+ USE_GETOPT_LONG( \
+ "\n -P,--password-fd=NUM Read password from fd NUM" \
+/* "\n -s,--stdin Use stdin; like -P0" */ \
+ "\n -m,--method=TYPE Encryption method TYPE" \
+ "\n -S,--salt=SALT" \
+ ) \
+ SKIP_GETOPT_LONG( \
+ "\n -P NUM Read password from fd NUM" \
+/* "\n -s Use stdin; like -P0" */ \
+ "\n -m TYPE Encryption method TYPE" \
+ "\n -S SALT" \
+ ) \
#define cttyhack_trivial_usage NOUSAGE_STR
#define cttyhack_full_usage ""
#define deluser_trivial_usage \
"USER"
#define deluser_full_usage "\n\n" \
- "Delete user USER from the system"
+ "Delete USER from the system"
-#define depmod_trivial_usage \
- ""
-#define depmod_full_usage \
- "\n" \
- "\n"
+#define depmod_trivial_usage NOUSAGE_STR
+#define depmod_full_usage ""
+
+#define devmem_trivial_usage \
+ "ADDRESS [WIDTH [VALUE]]"
+
+#define devmem_full_usage "\n\n" \
+ "Read/write from physical address\n" \
+ "\n ADDRESS Address to act upon" \
+ "\n WIDTH Width (8/16/...)" \
+ "\n VALUE Data to be written" \
#define devfsd_trivial_usage \
"mntpnt [-v]" USE_DEVFSD_FG_NP("[-fg][-np]")
"\n do not poll for events" \
)
-/* -k is accepted but ignored for !HUMAN_READABLE,
- * but we won't mention this (unimportant) */
-#if ENABLE_FEATURE_HUMAN_READABLE || ENABLE_FEATURE_DF_INODE
-#define DF_HAS_OPTIONS(x) x
-#else
-#define DF_HAS_OPTIONS(x)
-#endif
#define df_trivial_usage \
- DF_HAS_OPTIONS("[-") \
- USE_FEATURE_HUMAN_READABLE("hmk") USE_FEATURE_DF_INODE("i") \
- DF_HAS_OPTIONS("] ") "[FILESYSTEM...]"
+ "[-Pk" \
+ USE_FEATURE_HUMAN_READABLE("mh") \
+ USE_FEATURE_DF_FANCY("ai] [-B SIZE") \
+ "] [FILESYSTEM...]"
#define df_full_usage "\n\n" \
"Print filesystem usage statistics\n" \
- DF_HAS_OPTIONS("\nOptions:") \
+ "\nOptions:" \
+ "\n -P POSIX output format" \
+ "\n -k 1024-byte blocks (default)" \
USE_FEATURE_HUMAN_READABLE( \
+ "\n -m 1M-byte blocks" \
"\n -h Human readable (e.g. 1K 243M 2G)" \
- "\n -m 1024*1024 blocks" \
- "\n -k 1024 blocks" \
) \
- USE_FEATURE_DF_INODE( \
+ USE_FEATURE_DF_FANCY( \
+ "\n -a Show all filesystems" \
"\n -i Inodes" \
- )
+ "\n -B SIZE Blocksize" \
+ ) \
+
#define df_example_usage \
"$ df\n" \
- "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
+ "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
"/dev/sda3 8690864 8553540 137324 98% /\n" \
"/dev/sda1 64216 36364 27852 57% /boot\n" \
"$ df /dev/sda3\n" \
- "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
- "/dev/sda3 8690864 8553540 137324 98% /\n"
+ "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
+ "/dev/sda3 8690864 8553540 137324 98% /\n" \
+ "$ POSIXLY_CORRECT=sure df /dev/sda3\n" \
+ "Filesystem 512B-blocks Used Available Use% Mounted on\n" \
+ "/dev/sda3 17381728 17107080 274648 98% /\n" \
+ "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" \
+ "Filesystem 512-blocks Used Available Capacity Mounted on\n" \
+ "/dev/sda3 17381728 17107080 274648 98% /\n"
#define dhcprelay_trivial_usage \
"[client1,client2,...] [server_device]"
"\n -H HEADS\n" \
"\n -S SECTORS" \
-#define fetchmail_trivial_usage \
- "[-w timeout] [-U user] -P password [-X] [-t] [-z] server[:port] maildir [prog]"
-#define fetchmail_full_usage "\n\n" \
- "Fetch content of remote mailbox to local Maildir.\n" \
- "\nOptions:" \
- "\n -w timeout Set timeout on network operations" \
- "\n -U username Authenticate with specified username/password" \
- "\n -P password" \
- "\n -X Use openssl connection helper for secured servers" \
- "\n -t Get only headers" \
- "\n -z Delete messages on server" \
- "\n prog Run prog <message_file> on message delivery" \
+#define blkid_trivial_usage \
+ ""
+#define blkid_full_usage "\n\n" \
+ "Print UUIDs of all filesystems."
#define findfs_trivial_usage \
"LABEL=label or UUID=uuid"
"$ find / -name passwd\n" \
"/etc/passwd\n"
+#define flash_eraseall_trivial_usage \
+ "[-jq] MTD_DEVICE"
+#define flash_eraseall_full_usage "\n\n" \
+ "Erase an MTD device\n" \
+ "\nOptions:" \
+ "\n -j format the device for jffs2" \
+ "\n -q don't display progress messages"
+
#define fold_trivial_usage \
"[-bs] [-w WIDTH] [FILE]"
#define fold_full_usage "\n\n" \
"\n -r Perform interactive repairs" \
"\n -a Perform automatic repairs" \
"\n -v Verbose" \
- "\n -s Output super-block information" \
+ "\n -s Output superblock information" \
"\n -m Show \"mode not cleared\" warnings" \
"\n -f Force file system check" \
+#define ftpd_trivial_usage \
+ "[-wvS] [DIR]"
+#define ftpd_full_usage "\n\n" \
+ "FTP server\n" \
+ "\n" \
+ "ftpd should be used as an inetd service.\n" \
+ "ftpd's line for inetd.conf:\n" \
+ " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" \
+ "It also can be ran from tcpsvd:\n" \
+ " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" \
+ "\nOptions:" \
+ "\n -w Allow upload" \
+ "\n -v Log to stderr" \
+ "\n -S Log to syslog" \
+ "\n DIR Change root to this directory" \
+
#define ftpget_trivial_usage \
"[options] remote-host local-file remote-file"
#define ftpget_full_usage "\n\n" \
"Retrieve a remote file via FTP\n" \
"\nOptions:" \
- USE_GETOPT_LONG( \
+ USE_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -c,--continue Continue previous transfer" \
"\n -v,--verbose Verbose" \
"\n -u,--username Username" \
"\n -p,--password Password" \
"\n -P,--port Port number" \
) \
- SKIP_GETOPT_LONG( \
+ SKIP_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -c Continue previous transfer" \
"\n -v Verbose" \
"\n -u Username" \
#define ftpput_full_usage "\n\n" \
"Store a local file on a remote machine via FTP\n" \
"\nOptions:" \
- USE_GETOPT_LONG( \
+ USE_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -v,--verbose Verbose" \
"\n -u,--username Username" \
"\n -p,--password Password" \
"\n -P,--port Port number" \
) \
- SKIP_GETOPT_LONG( \
+ SKIP_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -v Verbose" \
"\n -u Username" \
"\n -p Password" \
"-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
#define halt_trivial_usage \
- "[-d delay] [-n] [-f]"
+ "[-d delay] [-n] [-f]" USE_FEATURE_WTMP(" [-w]")
#define halt_full_usage "\n\n" \
"Halt the system\n" \
"\nOptions:" \
"\n -d STRING URL decode STRING" \
#define hwclock_trivial_usage \
- USE_GETOPT_LONG( \
+ USE_FEATURE_HWCLOCK_LONG_OPTIONS( \
"[-r|--show] [-s|--hctosys] [-w|--systohc]" \
" [-l|--localtime] [-u|--utc]" \
" [-f FILE]" \
) \
- SKIP_GETOPT_LONG( \
+ SKIP_FEATURE_HWCLOCK_LONG_OPTIONS( \
"[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
)
#define hwclock_full_usage "\n\n" \
USE_SELINUX( \
"\n -Z Print the security context" \
) \
- "\n -g Print group ID" \
"\n -u Print user ID" \
+ "\n -g Print group ID" \
+ "\n -G Print supplementary group IDs" \
"\n -n Print name instead of a number" \
"\n -r Print real user ID instead of effective ID" \
" ::shutdown:/sbin/swapoff -a\n"
#define inotifyd_trivial_usage \
- "/user/space/agent dir/or/file/being/watched[:mask] ..."
+ "PROG FILE1[:MASK] ..."
#define inotifyd_full_usage "\n\n" \
- "Spawn userspace agent on filesystem changes." \
- "\nWhen a filesystem event matching the mask occurs" \
- "\non specified file/directory an userspace agent is spawned" \
- "\nwith the parameters:" \
- "\n1. actual event(s)" \
- "\n2. file/directory name" \
- "\n3. name of subfile (if any), in case of watching a directory" \
- "\n" \
+ "Run PROG on filesystem changes." \
+ "\nWhen a filesystem event matching MASK occurs on FILEn," \
+ "\nPROG <actual_event(s)> <FILEn> [<subfile_name>] is run." \
+ "\nEvents:" \
"\n a File is accessed" \
"\n c File is modified" \
"\n e Metadata changed" \
"\n w Writtable file is closed" \
"\n 0 Unwrittable file is closed" \
"\n r File is opened" \
- "\n m File is moved from X" \
- "\n y File is moved to Y" \
+ "\n D File is deleted" \
+ "\n M File is moved" \
+ "\n u Backing fs is unmounted" \
+ "\n o Event queue overflowed" \
+ "\n x File can't be watched anymore" \
+ "\nIf watching a directory:" \
+ "\n m Subfile is moved into dir" \
+ "\n y Subfile is moved out of dir" \
"\n n Subfile is created" \
"\n d Subfile is deleted" \
- "\n D Self is deleted" \
- "\n M Self is moved" \
+ "\n" \
+ "\ninotifyd waits for PROG to exit." \
+ "\nWhen x event happens for all FILEs, inotifyd exits" \
+/* 2.6 style insmod has no options and required filename
+ * (not module name - .ko can't be omitted) */
#define insmod_trivial_usage \
- USE_FEATURE_2_4_MODULES("[OPTION]... ") "MODULE [symbol=value]..."
+ USE_FEATURE_2_4_MODULES("[OPTION]... MODULE ") \
+ SKIP_FEATURE_2_4_MODULES("FILE ") \
+ "[symbol=value]..."
#define insmod_full_usage "\n\n" \
"Load the specified kernel modules into the kernel" \
USE_FEATURE_2_4_MODULES( "\n" \
"\n -x Do not export externs" \
)
+/* -v, -b, -c are ignored */
#define install_trivial_usage \
- "[-cgmops] [sources] dest|directory"
+ "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory"
#define install_full_usage "\n\n" \
"Copy files and set attributes\n" \
"\nOptions:" \
- "\n -c Copy the file, default" \
+ "\n -c Just copy (default)" \
"\n -d Create directories" \
- "\n -g Set group ownership" \
- "\n -m Set permissions" \
- "\n -o Set ownership" \
+ "\n -D Create leading target directories" \
+ "\n -s Strip symbol table" \
"\n -p Preserve date" \
- "\n -s Strip symbol tables" \
+ "\n -o USER Set ownership" \
+ "\n -g GRP Set group ownership" \
+ "\n -m MODE Set permissions" \
USE_SELINUX( \
- "\n -Z Set security context of copy" \
+ "\n -Z Set security context" \
)
+#define ionice_trivial_usage \
+ "[-c 1-3] [-n 0-7] [-p PID] [PROG]"
+#define ionice_full_usage "\n\n" \
+ "Change I/O scheduling class and priority\n" \
+ "\nOptions:" \
+ "\n -c Class. 1:realtime 2:best-effort 3:idle" \
+ "\n -n Priority" \
+
/* would need to make the " | " optional depending on more than one selected: */
#define ip_trivial_usage \
"[OPTIONS] {" \
" [oif STRING] [tos TOS]\n" \
"iproute { add | del | change | append | replace | monitor } ROUTE\n" \
" SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
- " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]" \
+ " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]\n" \
+ " [metric METRIC]" \
#define iprule_trivial_usage \
"{[list | add | del] RULE}"
" [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
#define kbd_mode_trivial_usage \
- "[-a|k|s|u]"
+ "[-a|k|s|u] [-C TTY]"
#define kbd_mode_full_usage "\n\n" \
"Report or set the keyboard mode\n" \
"\nOptions set mode:" \
"\n -k Medium-raw (keyboard)" \
"\n -s Raw (scancode)" \
"\n -u Unicode (utf-8)" \
+ "\n -C TTY Affect TTY instead of /dev/tty" \
#define kill_trivial_usage \
- "[-l] [-signal] process-id..."
+ "[-l] [-SIG] PID..."
#define kill_full_usage "\n\n" \
- "Send a signal (default is TERM) to the specified process(es)\n" \
+ "Send a signal (default is TERM) to given PIDs\n" \
"\nOptions:" \
"\n -l List all signal names and numbers" \
+/* "\n -s SIG Yet another way of specifying SIG" */ \
#define kill_example_usage \
"$ ps | grep apache\n" \
"$ kill 252\n"
#define killall_trivial_usage \
- "[-l] [-q] [-signal] process-name..."
+ "[-l] [-q] [-SIG] process-name..."
#define killall_full_usage "\n\n" \
- "Send a signal (default is TERM) to the specified process(es)\n" \
+ "Send a signal (default is TERM) to given processes\n" \
"\nOptions:" \
"\n -l List all signal names and numbers" \
+/* "\n -s SIG Yet another way of specifying SIG" */ \
"\n -q Do not complain if no processes were killed" \
#define killall_example_usage \
"$ killall apache\n"
#define killall5_trivial_usage \
- "[-l] [-signal]"
+ "[-l] [-SIG] [-o PID]..."
#define killall5_full_usage "\n\n" \
"Send a signal (default is TERM) to all processes outside current session\n" \
"\nOptions:" \
"\n -l List all signal names and numbers" \
+ "\n -o PID Do not signal this PID" \
+/* "\n -s SIG Yet another way of specifying SIG" */ \
#define klogd_trivial_usage \
- "[-c n] [-n]"
+ "[-c N] [-n]"
#define klogd_full_usage "\n\n" \
"Kernel logger\n" \
"\nOptions:" \
- "\n -c n Set the default log level of console messages to n" \
+ "\n -c N Only messages with level < N are printed to console" \
"\n -n Run in foreground" \
#define length_trivial_usage \
"5\n"
#define less_trivial_usage \
- "[-EMNmh~?] [FILE...]"
+ "[-EMNmh~I?] [FILE...]"
#define less_full_usage "\n\n" \
"View a file or list of files. The position within files can be\n" \
"changed, and files can be manipulated in various ways.\n" \
"\n -M,-m Display a status line containing the line numbers" \
"\n and percentage through the file" \
"\n -N Prefix line numbers to each line" \
+ "\n -I Ignore case in all searches" \
"\n -~ Suppress ~s displayed past the end of the file" \
#define linux32_trivial_usage NOUSAGE_STR
"lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
#define load_policy_trivial_usage NOUSAGE_STR
-
#define load_policy_full_usage ""
#define loadfont_trivial_usage \
"< font"
#define loadfont_full_usage "\n\n" \
- "Load a console font from standard input"
+ "Load a console font from standard input" \
+/* "\n -C TTY Affect TTY instead of /dev/tty" */ \
+
#define loadfont_example_usage \
"$ loadfont < /etc/i18n/fontname\n"
#define loadkmap_trivial_usage \
"< keymap"
#define loadkmap_full_usage "\n\n" \
- "Load a binary keyboard translation table from standard input"
+ "Load a binary keyboard translation table from standard input\n" \
+/* "\n -C TTY Affect TTY instead of /dev/tty" */ \
+
#define loadkmap_example_usage \
"$ loadkmap < /etc/i18n/lang-keymap\n"
#define lpd_trivial_usage \
"SPOOLDIR [HELPER [ARGS...]]"
#define lpd_full_usage "\n\n" \
- "Example:" \
- "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print"
+ "SPOOLDIR must contain (symlinks to) device nodes or directories" \
+ "\nwith names matching print queue names. In the first case, jobs are" \
+ "\nsent directly to the device. Otherwise each job is stored in queue" \
+ "\ndirectory and HELPER program is called. Name of file to print" \
+ "\nis passed in $DATAFILE variable." \
+ "\nExample:" \
+ "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \
#define lpq_trivial_usage \
"[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]"
#define ls_full_usage "\n\n" \
"List directory contents\n" \
"\nOptions:" \
- "\n -1 List files in a single column" \
- "\n -A Do not list implied . and .." \
- "\n -a Do not hide entries starting with ." \
- "\n -C List entries by columns" \
+ "\n -1 List in a single column" \
+ "\n -A Don't list . and .." \
+ "\n -a Don't hide entries starting with ." \
+ "\n -C List by columns" \
USE_FEATURE_LS_TIMESTAMPS( \
- "\n -c With -l: show ctime") \
+ "\n -c With -l: sort by ctime") \
USE_FEATURE_LS_COLOR( \
"\n --color[={always,never,auto}] Control coloring") \
"\n -d List directory entries instead of contents" \
USE_FEATURE_LS_TIMESTAMPS( \
- "\n -e List both full date and full time") \
+ "\n -e List full date and time") \
USE_FEATURE_LS_FILETYPES( \
"\n -F Append indicator (one of */=@|) to entries") \
- "\n -i List the i-node for each file" \
- "\n -l Use a long listing format" \
+ "\n -i List inode numbers" \
+ "\n -l Long listing format" \
"\n -n List numeric UIDs and GIDs instead of names" \
USE_FEATURE_LS_FILETYPES( \
"\n -p Append indicator (one of /=@|) to entries") \
USE_FEATURE_LS_RECURSIVE( \
"\n -R List subdirectories recursively") \
USE_FEATURE_LS_SORTFILES( \
- "\n -r Sort the listing in reverse order") \
+ "\n -r Sort in reverse order") \
USE_FEATURE_LS_SORTFILES( \
- "\n -S Sort the listing by file size") \
+ "\n -S Sort by file size") \
"\n -s List the size of each file, in blocks" \
USE_FEATURE_AUTOWIDTH( \
- "\n -T NUM Assume Tabstop every NUM columns") \
+ "\n -T NUM Assume tabstop every NUM columns") \
USE_FEATURE_LS_TIMESTAMPS( \
- "\n -t With -l: show modification time") \
+ "\n -t With -l: sort by modification time") \
USE_FEATURE_LS_TIMESTAMPS( \
- "\n -u With -l: show access time") \
+ "\n -u With -l: sort by access time") \
USE_FEATURE_LS_SORTFILES( \
- "\n -v Sort the listing by version") \
+ "\n -v Sort by version") \
USE_FEATURE_AUTOWIDTH( \
"\n -w NUM Assume the terminal is NUM columns wide") \
- "\n -x List entries by lines instead of by columns" \
+ "\n -x List by lines" \
USE_FEATURE_LS_SORTFILES( \
- "\n -X Sort the listing by extension") \
+ "\n -X Sort by extension") \
USE_FEATURE_HUMAN_READABLE( \
- "\n -h Print sizes in human readable format (e.g., 1K 243M 2G)") \
+ "\n -h List sizes in human readable format (1K 243M 2G)") \
USE_SELINUX( \
- "\n -k Print security context") \
+ "\n -k List security context") \
USE_SELINUX( \
- "\n -K Print security context in long format") \
+ "\n -K List security context in long format") \
USE_SELINUX( \
- "\n -Z Print security context and permission") \
+ "\n -Z List security context and permission") \
#define lsattr_trivial_usage \
"[-Radlv] [files...]"
"\n -R Recursively list subdirectories" \
"\n -a Do not hide entries starting with ." \
"\n -d List directory entries instead of contents" \
- "\n -l Print long flag names" \
+ "\n -l List long flag names" \
"\n -v List the file's version/generation number" \
#define lsmod_trivial_usage \
#define makedevs_trivial_usage \
"NAME TYPE MAJOR MINOR FIRST LAST [s]"
#define makedevs_full_usage "\n\n" \
- "Create a range of block or character special files\n\n" \
- "TYPEs include:\n" \
- " b Make a block device\n" \
- " c or u Make a character device\n" \
- " p Make a named pipe. MAJOR and MINOR are ignored\n" \
- "\n" \
- "FIRST specifies the number appended to NAME to create the first device.\n" \
- "LAST specifies the number of the last item that should be created\n" \
- "If 's' is the last argument, the base device is created as well.\n\n" \
- "For example:\n" \
- " makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \
- " makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
+ "Create a range of block or character special files" \
+ "\n" \
+ "\nTYPE is:" \
+ "\n b Block device" \
+ "\n c Character device" \
+ "\n f FIFO, MAJOR and MINOR are ignored" \
+ "\n" \
+ "\nFIRST..LAST specify numbers appended to NAME." \
+ "\nIf 's' is the last argument, the base device is created as well." \
+ "\n" \
+ "\nExamples:" \
+ "\n makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63" \
+ "\n makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
#define makedevs_example_usage \
"# makedevs /dev/ttyS c 4 66 2 63\n" \
"[creates ttyS2-ttyS63]\n" \
"Device table entries take the form of:\n" \
"<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
"Where name is the file name, type can be one of:\n" \
- " f A regular file\n" \
+ " f Regular file\n" \
" d Directory\n" \
- " c Character special device file\n" \
- " b Block special device file\n" \
+ " c Character device\n" \
+ " b Block device\n" \
" p Fifo (named pipe)\n" \
"uid is the user id for the target file, gid is the group id for the\n" \
"target file. The rest of the entries (major, minor, etc) apply to\n" \
"/dev/hda[0-15]\n"
#endif
+#define makemime_trivial_usage \
+ "[OPTION]... [FILE]..."
+#define makemime_full_usage "\n\n" \
+ "Create MIME-encoded message\n" \
+ "\nOptions:" \
+ "\n -C Charset" \
+ "\n -e Transfer encoding. Ignored. base64 is assumed" \
+ "\n" \
+ "\nOther options are silently ignored." \
+
#define man_trivial_usage \
"[OPTION]... [MANPAGE]..."
#define man_full_usage "\n\n" \
"Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
"\nOptions:" \
- "\n -c Check MD5 sums against given list" \
+ "\n -c Check sums against given list" \
"\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted MD5 checksum lines") \
+ "\n -w Warn about improperly formatted checksum lines" \
+ )
#define md5sum_example_usage \
"$ md5sum < busybox\n" \
"busybox: OK\n" \
"^D\n"
+#define sha1sum_trivial_usage \
+ "[OPTION] [FILEs...]" \
+ USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
+#define sha1sum_full_usage "\n\n" \
+ "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
+ USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "\nOptions:" \
+ "\n -c Check sums against given list" \
+ "\n -s Don't output anything, status code shows success" \
+ "\n -w Warn about improperly formatted checksum lines" \
+ )
+
+#define sha256sum_trivial_usage \
+ "[OPTION] [FILEs...]" \
+ USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTION] -c [FILE]")
+#define sha256sum_full_usage "\n\n" \
+ "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
+ USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "\nOptions:" \
+ "\n -c Check sums against given list" \
+ "\n -s Don't output anything, status code shows success" \
+ "\n -w Warn about improperly formatted checksum lines" \
+ )
+
+#define sha512sum_trivial_usage \
+ "[OPTION] [FILEs...]" \
+ USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTION] -c [FILE]")
+#define sha512sum_full_usage "\n\n" \
+ "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
+ USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "\nOptions:" \
+ "\n -c Check sums against given list" \
+ "\n -s Don't output anything, status code shows success" \
+ "\n -w Warn about improperly formatted checksum lines" \
+ )
+
#define mdev_trivial_usage \
"[-s]"
#define mdev_full_usage "\n\n" \
#endif
#define mktemp_trivial_usage \
- "[-dt] [-p DIR] TEMPLATE"
+ "[-dt] [-p DIR] [TEMPLATE]"
#define mktemp_full_usage "\n\n" \
- "Create a temporary file with its name based on TEMPLATE.\n" \
- "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX).\n" \
+ "Create a temporary file with name based on TEMPLATE and print its name.\n" \
+ "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" \
"\nOptions:" \
"\n -d Make a directory instead of a file" \
/* "\n -q Fail silently if an error occurs" - we ignore it */ \
"\n -t Generate a path rooted in temporary directory" \
"\n -p DIR Use DIR as a temporary directory (implies -t)" \
"\n" \
- "\n" \
- "For -t or -p, directory is chosen as follows:\n" \
- "$TMPDIR if set, else -p DIR, else /tmp" \
+ "\nFor -t or -p, directory is chosen as follows:" \
+ "\n$TMPDIR if set, else -p DIR, else /tmp" \
#define mktemp_example_usage \
"$ mktemp /tmp/temp.XXXXXX\n" \
"[-knqrsv] MODULE [symbol=value...]"
#define modprobe_full_usage "\n\n" \
"Options:" \
+ USE_FEATURE_2_4_MODULES( \
"\n -k Make module autoclean-able" \
+ ) \
"\n -n Dry run" \
"\n -q Quiet" \
"\n -r Remove module (stacks) or do autoclean" \
"\n -s Report via syslog instead of stderr" \
"\n -v Verbose" \
+ USE_FEATURE_MODPROBE_BLACKLIST( \
+ "\n -b Apply blacklist to module names too" \
+ )
#define modprobe_notes_usage \
"modprobe can (un)load a stack of modules, passing each module options (when\n" \
"loading). modprobe uses a configuration file to determine what option(s) to\n" \
"pass each module it loads.\n" \
"\n" \
-"The configuration file is searched (in order) amongst:\n" \
+"The configuration file is searched (in this order):\n" \
"\n" \
" /etc/modprobe.conf (2.6 only)\n" \
" /etc/modules.conf\n" \
" [a]sync Writes are asynchronous / synchronous\n" \
" [no]atime Disable / enable updates to inode access times\n" \
" [no]diratime Disable / enable atime updates to directories\n" \
+ " [no]relatime Disable / enable atime updates relative to modification time\n" \
" [no]dev Allow use of special device files / disallow them\n" \
" [no]exec Allow use of executable files / disallow them\n" \
" [no]suid Allow set-user-id-root programs / disallow them\n" \
"Returns 0 for success, number of failed mounts for -a, or errno for one mount."
#define mountpoint_trivial_usage \
- "[-q] <[-d] DIR | -x DEVICE>"
+ "[-q] <[-dn] DIR | -x DEVICE>"
#define mountpoint_full_usage "\n\n" \
- "mountpoint checks if the directory is a mountpoint\n" \
+ "Check if the directory is a mountpoint\n" \
"\nOptions:" \
"\n -q Quiet" \
"\n -d Print major/minor device number of the filesystem" \
+ "\n -n Print device name of the filesystem" \
"\n -x Print major/minor device number of the blockdevice" \
#define mountpoint_example_usage \
#endif
#define netstat_trivial_usage \
- "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]"
+ "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")USE_FEATURE_NETSTAT_PRG("p")"]"
#define netstat_full_usage "\n\n" \
"Display networking information\n" \
"\nOptions:" \
"\n -r Display routing table" \
USE_FEATURE_NETSTAT_WIDE( \
"\n -W Display with no column truncation" \
+ ) \
+ USE_FEATURE_NETSTAT_PRG( \
+ "\n -p Display PID/Program name for sockets" \
)
#define nice_trivial_usage \
#define openvt_example_usage \
"openvt 2 /bin/ash\n"
+#define parse_trivial_usage \
+ "[-n maxtokens] [-m mintokens] [-d delims] [-f flags] file ..."
+#define parse_full_usage "\n\n" \
+ "[-n maxtokens] [-m mintokens] [-d delims] [-f flags] file ..."
+
#define passwd_trivial_usage \
"[OPTION] [name]"
#define passwd_full_usage "\n\n" \
"\n -u Unlock (re-enable) account" \
#define chpasswd_trivial_usage \
- USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]")
+ USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]")
#define chpasswd_full_usage "\n\n" \
- "Read user:password information from stdin\n" \
+ "Read user:password information from stdin " \
"and update /etc/passwd accordingly.\n" \
"\nOptions:" \
USE_GETOPT_LONG( \
- "\n -e,--encrypt Supplied passwords are in encrypted form" \
+ "\n -e,--encrypted Supplied passwords are in encrypted form" \
"\n -m,--md5 Use MD5 encryption instead of DES" \
) \
SKIP_GETOPT_LONG( \
"\n -v Negate the matching" \
"\n -x Match whole name (not substring)" \
+#define popmaildir_trivial_usage \
+ "[OPTIONS] Maildir [connection-helper ...]"
+#define popmaildir_full_usage "\n\n" \
+ "Fetch content of remote mailbox to local maildir\n" \
+ "\nOptions:" \
+ "\n -b Binary mode. Ignored" \
+ "\n -d Debug. Ignored" \
+ "\n -m Show used memory. Ignored" \
+ "\n -V Show version. Ignored" \
+ "\n -c Use tcpclient. Ignored" \
+ "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" \
+ "\n -s Skip authorization" \
+ "\n -T Get messages with TOP instead with RETR" \
+ "\n -k Keep retrieved messages on the server" \
+ "\n -t timeout Set network timeout" \
+ USE_FEATURE_POPMAILDIR_DELIVERY( \
+ "\n -F \"program arg1 arg2 ...\" Filter by program. May be multiple" \
+ "\n -M \"program arg1 arg2 ...\" Deliver by program" \
+ ) \
+ "\n -R size Remove old messages on the server >= size (in bytes). Ignored" \
+ "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" \
+ "\n -L size Do not retrieve new messages >= size (in bytes). Ignored" \
+ "\n -H lines Type specified number of lines of a message. Ignored"
+#define popmaildir_example_usage \
+ "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
+ "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
+
#define poweroff_trivial_usage \
"[-d delay] [-n] [-f]"
#define poweroff_full_usage "\n\n" \
" 742 andersen andersen S [bash]\n" \
" 743 andersen andersen S -bash\n" \
" 745 root root S [getty]\n" \
- " 2990 andersen andersen R ps\n"
+ " 2990 andersen andersen R ps\n" \
#define pscan_trivial_usage \
"[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
"\n -s Set the system date and time (default)" \
"\n -p Print the date and time" \
+#define rdev_trivial_usage \
+ ""
+#define rdev_full_usage "\n\n" \
+ "Print the device node associated with the filesystem mounted at '/'"
+#define rdev_example_usage \
+ "$ rdev\n" \
+ "/dev/mtdblock9 /\n"
+
#define readahead_trivial_usage \
"[FILE]..."
#define readahead_full_usage "\n\n" \
"\n -n No call to sync()" \
"\n -f Force reboot (don't go through init)" \
+#define reformime_trivial_usage \
+ "[OPTION]... [FILE]..."
+#define reformime_full_usage "\n\n" \
+ "Parse MIME-encoded message\n" \
+ "\nOptions:" \
+ "\n -x prefix Extract content of MIME sections to files" \
+ "\n -X prog [args] Filter content of MIME sections through prog." \
+ "\n Must be the last option" \
+ "\n" \
+ "\nOther options are silently ignored." \
+
#define renice_trivial_usage \
"{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
#define renice_full_usage "\n\n" \
#define rmdir_trivial_usage \
"[OPTION]... DIRECTORY..."
#define rmdir_full_usage "\n\n" \
- "Remove the DIRECTORY, if it is empty"
+ "Remove the DIRECTORY, if it is empty.\n" \
+ "\nOptions:" \
+ USE_FEATURE_RMDIR_LONG_OPTIONS( \
+ "\n -p|--parents Include parents" \
+ "\n -ignore-fail-on-non-empty" \
+ ) \
+ SKIP_FEATURE_RMDIR_LONG_OPTIONS( \
+ "\n -p Include parents" \
+ )
+
#define rmdir_example_usage \
"# rmdir /tmp/foo\n"
#define rmmod_full_usage "\n\n" \
"Unload the specified kernel modules from the kernel\n" \
"\nOptions:" \
+ "\n -w Wait until the module is no longer used" \
+ "\n -f Force unloading" \
"\n -a Remove all unused modules (recursively)" \
#define rmmod_example_usage \
#define route_trivial_usage \
"[{add|del|delete}]"
#define route_full_usage "\n\n" \
- "Edit the kernel's routing tables\n" \
+ "Edit kernel routing tables\n" \
"\nOptions:" \
"\n -n Don't resolve names" \
"\n -e Display other/more information" \
"\n -l,--local Clock is set to local time" \
"\n -u,--utc Clock is set to UTC time" \
"\n -d,--device=DEV Specify the RTC device" \
- "\n -m,--mode=MODE Set the sleep state (default: suspend)" \
+ "\n -m,--mode=MODE Set the sleep state (default: standby)" \
"\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
"\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
) \
#define runcon_full_usage "\n\n" \
"Run a program in a different security context\n" \
"\n CONTEXT Complete security context\n" \
- USE_GETOPT_LONG( \
+ USE_FEATURE_RUNCON_LONG_OPTIONS( \
"\n -c,--compute Compute process transition context before modifying" \
"\n -t,--type=TYPE Type (for same role as parent)" \
"\n -u,--user=USER User identity" \
"\n -r,--role=ROLE Role" \
"\n -l,--range=RNG Levelrange" \
) \
- SKIP_GETOPT_LONG( \
+ SKIP_FEATURE_RUNCON_LONG_OPTIONS( \
"\n -c Compute process transition context before modifying" \
"\n -t TYPE Type (for same role as parent)" \
"\n -u USER User identity" \
"Start and monitor a service and optionally an appendant log service"
#define runsvdir_trivial_usage \
- "[-P] dir"
+ "[-P] [-s SCRIPT] dir"
#define runsvdir_full_usage "\n\n" \
- "Start a runsv process for each subdirectory"
+ "Start a runsv process for each subdirectory. If it exits, restart it.\n" \
+ "\n -P Put each runsv in a new session" \
+ "\n -s SCRIPT Run SCRIPT <signo> after signal is processed" \
#define rx_trivial_usage \
"FILE"
#define selinuxenabled_full_usage ""
#define sendmail_trivial_usage \
- "[-w timeout] [-U user] [-P password] [-X]\n" \
- "-t to [-t to]... [-n] [-s subject] [-c charset] server[:port] from [body] [attachment ...]"
+ "[OPTIONS] [rcpt]..."
#define sendmail_full_usage "\n\n" \
- "Send an email.\n" \
- "\nOptions:" \
- "\n -w timeout Set timeout on network operations" \
- "\n -U username Authenticate with specified username/password" \
- "\n -P password" \
- "\n -t address Recipient(s). May be repeated" \
- "\n -X Use openssl connection helper for secured servers" \
- "\n -n Request delivery notification to sender" \
+ "Send an email\n" \
+ "\nOptions:" \
+ "\n -w timeout Network timeout" \
+ "\n -N type Request delivery notification. Type is ignored" \
+ "\n -f sender Sender" \
+ "\n -F fullname Sender full name. Overrides $NAME" \
+ USE_FEATURE_SENDMAIL_MAILX( \
"\n -s subject Subject" \
- "\n -c charset Assumed charset for body and subject [utf-8]" \
+ "\n -j charset Assume charset for body and subject (" CONFIG_FEATURE_MIME_CHARSET ")" \
+ "\n -a file File to attach. May be repeated" \
+ "\n -H 'prog args' Run connection helper. E.g. openssl for encryption:" \
+ "\n -H 'exec openssl s_client -quiet -tls1 -starttls smtp" \
+ "\n -connect smtp.gmail.com:25' <email.txt" \
+ "\n [4<username_and_passwd.txt]" \
+ "\n -S server[:port] Server" \
+ ) \
+ USE_FEATURE_SENDMAIL_MAILXX( \
+ "\n -c rcpt Cc: recipient. May be repeated" \
+ "\n -e rcpt Errors-To: recipient" \
+ ) \
+ "\n -t Read recipients and subject from body" \
+ "\n" \
+ "\nOther options are silently ignored; -oi is implied" \
#define seq_trivial_usage \
- "[first [increment]] last"
+ "[-w] [-s SEP] [FIRST [INC]] LAST"
#define seq_full_usage "\n\n" \
- "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \
- "FIRST, INCREMENT default to 1" \
- "\n\nArguments:\n" \
- " LAST\n" \
- " FIRST LAST\n" \
- " FIRST INCREMENT LAST"
+ "Print numbers from FIRST to LAST, in steps of INC.\n" \
+ "FIRST, INC default to 1\n" \
+ "\nOptions:" \
+ "\n -w Pad to last with leading zeros" \
+ "\n -s SEP String separator" \
#define sestatus_trivial_usage \
"[-vb]"
"\n -vv Show changes in file labels, if type, role, or user are changing" \
"\n -W Display warnings about entries that had no matching files" \
+#define setfont_trivial_usage \
+ "FONT [-m MAPFILE] [-C TTY]"
+#define setfont_full_usage "\n\n" \
+ "Load a console font\n" \
+ "\nOptions:" \
+ "\n -m MAPFILE Load console screen map" \
+ "\n -C TTY Affect TTY instead of /dev/tty" \
+
+#define setfont_example_usage \
+ "$ setfont -m koi8-r /etc/i18n/fontname\n"
+
#define setkeycodes_trivial_usage \
"SCANCODE KEYCODE..."
#define setkeycodes_full_usage "\n\n" \
"\n -f file Read from file instead of /var/log/wtmp" \
)
-#define sha1sum_trivial_usage \
- "[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
-#define sha1sum_full_usage "\n\n" \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+#define showkey_trivial_usage \
+ "[-a | -k | -s]"
+#define showkey_full_usage "\n\n" \
+ "Show keys pressed\n" \
"\nOptions:" \
- "\n -c Check SHA1 sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted SHA1 checksum lines" \
- )
+ "\n -a Display decimal/octal/hex values of the keys" \
+ "\n -k Display interpreted keycodes (default)" \
+ "\n -s Display raw scan-codes" \
#define slattach_trivial_usage \
"[-cehmLF] [-s speed] [-p protocol] DEVICEs"
"$ cat TODO | split -a 2 -l 2 TODO_\n"
#define start_stop_daemon_trivial_usage \
- "[OPTIONS] [" \
- USE_GETOPT_LONG("--start|--stop") SKIP_GETOPT_LONG("-S|-K") \
- "] ... [-- arguments...]"
+ "[OPTIONS] [-S|-K] ... [-- arguments...]"
#define start_stop_daemon_full_usage "\n\n" \
"Search for matching processes, and then\n" \
- "-S: stop all matching processes.\n" \
- "-K: start a process unless a matching process is found.\n" \
- USE_GETOPT_LONG( \
+ "-K: stop all matching processes.\n" \
+ "-S: start a process unless a matching process is found.\n" \
+ USE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
"\nProcess matching:" \
"\n -u,--user USERNAME|UID Match only this user's processes" \
"\n -n,--name NAME Match processes with NAME" \
"\n in /proc/PID/cmdline" \
"\n -p,--pidfile FILE Match a process with PID from the file" \
"\n All specified conditions must match" \
- "\n-K only:" \
+ "\n-S only:" \
"\n -x,--exec EXECUTABLE Program to run" \
"\n -a,--startas NAME Zeroth argument" \
"\n -b,--background Background" \
) \
"\n -c,--chuid USER[:[GRP]] Change to user/group" \
"\n -m,--make-pidfile Write PID to the pidfile specified by -p" \
- "\n-S only:" \
+ "\n-K only:" \
"\n -s,--signal SIG Signal to send" \
"\n -t,--test Match only, exit with 0 if a process is found" \
"\nOther:" \
USE_FEATURE_START_STOP_DAEMON_FANCY( \
"\n -o,--oknodo Exit with status 0 if nothing is done" \
- "\n -q,--quiet Quiet" \
- ) \
"\n -v,--verbose Verbose" \
) \
- SKIP_GETOPT_LONG( \
+ "\n -q,--quiet Quiet" \
+ ) \
+ SKIP_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
"\nProcess matching:" \
"\n -u USERNAME|UID Match only this user's processes" \
"\n -n NAME Match processes with NAME" \
"\n command in /proc/PID/cmdline" \
"\n -p FILE Match a process with PID from the file" \
"\n All specified conditions must match" \
- "\n-K only:" \
+ "\n-S only:" \
"\n -x EXECUTABLE Program to run" \
"\n -a NAME Zeroth argument" \
"\n -b Background" \
) \
"\n -c USER[:[GRP]] Change to user/group" \
"\n -m Write PID to the pidfile specified by -p" \
- "\n-S only:" \
+ "\n-K only:" \
"\n -s SIG Signal to send" \
"\n -t Match only, exit with 0 if a process is found" \
"\nOther:" \
USE_FEATURE_START_STOP_DAEMON_FANCY( \
"\n -o Exit with status 0 if nothing is done" \
- "\n -q Quiet" \
- ) \
"\n -v Verbose" \
) \
+ "\n -q Quiet" \
+ ) \
#define stat_trivial_usage \
"[OPTION] FILE..."
" %S Fundamental block size (for block counts)\n" \
" %t Type in hex\n" \
" %T Type in human readable form" \
- )
+ ) \
#define strings_trivial_usage \
"[-afo] [-n length] [file...]"
"up: if service isn't running, start it. If service stops, restart it\n" \
"once: like 'up', but if service stops, don't restart it\n" \
"down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
- " if it exists. After it stops, do not restart service\n" \
+ " if it exists. After it stops, do not restart service\n" \
"exit: send TERM and CONT signals to service and log service. If they exit,\n" \
- " runsv exits too\n" \
+ " runsv exits too\n" \
"pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
"STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
"\n -q Never output headers giving file names" \
"\n -s SEC Wait SEC seconds between reads with -f" \
"\n -v Always output headers giving file names" \
- "\n\n" \
- "If the first character of N (bytes or lines) is a '+', output begins with\n" \
- "the Nth item from the start of each file, otherwise, print the last N items\n" \
- "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) \
+ "\n" \
+ "\nIf the first character of N (bytes or lines) is a '+', output begins with" \
+ "\nthe Nth item from the start of each file, otherwise, print the last N items" \
+ "\nin the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) \
#define tail_example_usage \
"$ tail -n 1 /etc/resolv.conf\n" \
"nameserver 10.0.0.1\n"
#define tar_trivial_usage \
- "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_TAR_GZIP("z") \
- USE_FEATURE_TAR_BZIP2("j") USE_FEATURE_TAR_LZMA("a") \
- USE_FEATURE_TAR_COMPRESS("Z") "xtvO] " \
+ "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_SEAMLESS_GZ("z") \
+ USE_FEATURE_SEAMLESS_BZ2("j") USE_FEATURE_SEAMLESS_LZMA("a") \
+ USE_FEATURE_SEAMLESS_Z("Z") "xtvO] " \
USE_FEATURE_TAR_FROM("[-X FILE] ") \
"[-f TARFILE] [-C DIR] [FILE(s)]..."
#define tar_full_usage "\n\n" \
"\n x Extract" \
"\n t List" \
"\nArchive format selection:" \
- USE_FEATURE_TAR_GZIP( \
+ USE_FEATURE_SEAMLESS_GZ( \
"\n z Filter the archive through gzip" \
) \
- USE_FEATURE_TAR_BZIP2( \
+ USE_FEATURE_SEAMLESS_BZ2( \
"\n j Filter the archive through bzip2" \
) \
- USE_FEATURE_TAR_LZMA( \
+ USE_FEATURE_SEAMLESS_LZMA( \
"\n a Filter the archive through lzma" \
) \
- USE_FEATURE_TAR_COMPRESS( \
+ USE_FEATURE_SEAMLESS_Z( \
"\n Z Filter the archive through compress" \
) \
"\nFile selection:" \
#define telnet_full_usage "\n\n" \
"Connect to telnet server\n" \
"\nOptions:" \
- "\n -a Attempt an automatic login with USER variable" \
- "\n -l USER Attempt an automatic login with USER argument" \
+ "\n -a Automatic login with $USER variable" \
+ "\n -l USER Automatic login as USER" \
#else
#define telnet_trivial_usage \
"\n -i Run as inetd subservice" \
)
+/* "test --help" does not print help (POSIX compat), only "[ --help" does.
+ * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION") */
#define test_trivial_usage \
- "EXPRESSION\n" \
- " or [ EXPRESSION ]"
+ "EXPRESSION ]"
#define test_full_usage "\n\n" \
- "Check file types and compares values returning an exit code\n" \
- "determined by the value of EXPRESSION"
+ "Check file types, compare values etc. Return a 0/1 exit code\n" \
+ "depending on logical value of EXPRESSION"
#define test_example_usage \
"$ test 1 -eq 2\n" \
"$ echo $?\n" \
"$ echo $?\n" \
"1\n"
+#define tc_trivial_usage \
+ /*"[OPTIONS] "*/"OBJECT CMD [dev STRING]"
+#define tc_full_usage "\n\n" \
+ "OBJECT: {qdisc|class|filter}\n" \
+ "CMD: {add|del|change|replace|show}\n" \
+ "\n" \
+ "qdisc [ handle QHANDLE ] [ root |"USE_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \
+ /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
+ "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
+ "\tQDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \
+ "qdisc show [ dev STRING ]"USE_FEATURE_TC_INGRESS(" [ingress]")"\n" \
+ "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \
+ "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
+ "class show [ dev STRING ] [ root | parent CLASSID ]\n" \
+ "filter [ pref PRIO ] [ protocol PROTO ]\n" \
+ /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
+ "\t[ root | classid CLASSID ] [ handle FILTERID ]\n" \
+ "\t[ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n" \
+ "filter show [ dev STRING ] [ root | parent CLASSID ]"
+
#define tcpsvd_trivial_usage \
"[-hEv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] ip port prog..."
/* with not-implemented options: */
"[-cr] [-u USER] [DIR]"
#define tftpd_full_usage "\n\n" \
"Transfer a file on tftp client's request.\n" \
+ "\n" \
+ "tftpd should be used as an inetd service.\n" \
+ "tftpd's line for inetd.conf:\n" \
+ " 69 dgram udp nowait root tftpd tftpd /files/to/serve\n" \
+ "It also can be ran from udpsvd:\n" \
+ " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" \
"\nOptions:" \
"\n -r Prohibit upload" \
"\n -c Allow file creation via upload" \
"\nOptions:" \
"\n -v Verbose" \
+#define timeout_trivial_usage \
+ "[-t SECS] [-s SIG] PROG [ARGS]"
+#define timeout_full_usage "\n\n" \
+ "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \
+ "Defaults: SECS: 10, SIG: TERM." \
+
#define top_trivial_usage \
- "[-b] [-n COUNT] [-d SECONDS]"
+ "[-b] [-nCOUNT] [-dSECONDS]"
#define top_full_usage "\n\n" \
"Provide a view of process activity in real time.\n" \
"Read the status of all processes from /proc each SECONDS\n" \
#define ttysize_full_usage "\n\n" \
"Print dimension(s) of standard input's terminal, on error return 80x25"
+#define tunctl_trivial_usage \
+ "[-f device] ([-t name] | -d name)" USE_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
+#define tunctl_full_usage "\n\n" \
+ "Create or delete tun interfaces" \
+ "\nOptions:" \
+ "\n -f name tun device (/dev/net/tun)" \
+ "\n -t name Create iface 'name'" \
+ "\n -d name Delete iface 'name'" \
+USE_FEATURE_TUNCTL_UG( \
+ "\n -u owner Set iface owner" \
+ "\n -g group Set iface group" \
+ "\n -b Brief output" \
+)
+#define tunctl_example_usage \
+ "# tunctl\n" \
+ "# tunctl -d tun0\n"
+
#define tune2fs_trivial_usage \
"[-c max-mounts-count] [-e errors-behavior] [-g group] " \
"[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
"\n -C,--clientid-none Suppress default client identifier" \
"\n -p,--pidfile=file Create pidfile" \
"\n -r,--request=IP IP address to request" \
- "\n -s,--script=file Run file at DHCP events (default "CONFIG_DHCPC_DEFAULT_SCRIPT")" \
+ "\n -s,--script=file Run file at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
"\n -t,--retries=N Send up to N request packets" \
"\n -T,--timeout=N Try to get a lease for N seconds (default 3)" \
"\n -A,--tryagain=N Wait N seconds (default 20) after failure" \
"\n -O,--request-option=OPT Request DHCP option OPT (cumulative)" \
"\n -o,--no-default-options Do not request any options (unless -O is also given)" \
"\n -f,--foreground Run in foreground" \
+ USE_FOR_MMU( \
"\n -b,--background Background if lease is not immediately obtained" \
+ ) \
"\n -S,--syslog Log to syslog too" \
"\n -n,--now Exit with failure if lease is not immediately obtained" \
"\n -q,--quit Quit after obtaining lease" \
"\n -C Suppress default client identifier" \
"\n -p file Create pidfile" \
"\n -r IP IP address to request" \
- "\n -s file Run file at DHCP events (default "CONFIG_DHCPC_DEFAULT_SCRIPT")" \
+ "\n -s file Run file at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" \
"\n -t N Send up to N request packets" \
"\n -T N Try to get a lease for N seconds (default 3)" \
"\n -A N Wait N seconds (default 20) after failure" \
"\n -O OPT Request DHCP option OPT (cumulative)" \
"\n -o Do not request any options (unless -O is also given)" \
"\n -f Run in foreground" \
+ USE_FOR_MMU( \
"\n -b Background if lease is not immediately obtained" \
+ ) \
"\n -S Log to syslog too" \
"\n -n Exit with failure if lease is not immediately obtained" \
"\n -q Quit after obtaining lease" \
"Mon Dec 17 10:31:44 GMT 2000"
#define watchdog_trivial_usage \
- "[-t N[ms]] [-F] DEV"
+ "[-t N[ms]] [-T N[ms]] [-F] DEV"
#define watchdog_full_usage "\n\n" \
"Periodically write to watchdog device DEV\n" \
"\nOptions:" \
- "\n -t N Timer period (default 30)" \
+ "\n -T N Reboot after N seconds if not reset (default 60)" \
+ "\n -t N Reset every N seconds (default 30)" \
"\n -F Run in foreground" \
"\n" \
- "\nUse -t 500ms to specify period in milliseconds" \
+ "\nUse 500ms to specify period in milliseconds" \
#define wc_trivial_usage \
"[OPTION]... [FILE]..."
" 31 46 1365 /etc/passwd\n"
#define wget_trivial_usage \
- USE_GETOPT_LONG( \
+ USE_FEATURE_WGET_LONG_OPTIONS( \
"[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \
" [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
" [-U|--user-agent agent] url" \
) \
- SKIP_GETOPT_LONG( \
+ SKIP_FEATURE_WGET_LONG_OPTIONS( \
"[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \
)
#define wget_full_usage "\n\n" \
"Execute COMMAND on every item given by standard input\n" \
"\nOptions:" \
USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
- "\n -p Prompt the user about whether to run each command") \
- "\n -r Do not run command for empty read lines" \
- USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
- "\n -x Exit if the size is exceeded") \
+ "\n -p Ask user whether to run each command") \
+ "\n -r Do not run command if input is empty" \
USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
- "\n -0 Input filenames are terminated by a null character") \
- "\n -t Print the command line on stderr before executing it" \
+ "\n -0 Input is separated by NUL characters") \
+ "\n -t Print the command on stderr before execution" \
+ "\n -e[STR] STR stops input processing" \
+ "\n -n N Pass no more than N args to COMMAND" \
+ "\n -s N Pass command line of no more than N bytes" \
+ USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
+ "\n -x Exit if size is exceeded") \
#define xargs_example_usage \
"$ ls | xargs gzip\n" \
"Manage a ZeroConf IPv4 link-local address\n" \
"\nOptions:" \
"\n -f Run in foreground" \
- "\n -q Quit after address (no daemon)" \
+ "\n -q Quit after obtaining address" \
"\n -r 169.254.x.x Request this address first" \
"\n -v Verbose" \
+ "\n" \
+ "\nWith no -q, runs continuously monitoring for ARP conflicts," \
+ "\nexits only on I/O errors (link down etc)" \
#endif /* __BB_USAGE_H__ */