This adds a concise description of a tool to its usage text.
A first form of this patch was proposed by Steven Honeyman
(see http://www.spinics.net/lists/util-linux-ng/msg09994.html).
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s <disk device> <partition number> <start> <length>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Tell the kernel about the existence of a specified partition.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
static void __attribute__ ((__noreturn__)) usage(FILE *out)
{
fputs(USAGE_HEADER, out);
-
fprintf(out,
_(" %1$s [options] <disk>\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display or manipulate a disk partition table.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -L --color[=<when>] colorize output (auto, always or never)\n"), out);
fputs(_(" -z --zero start with zeroed partition table\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s <disk device> <partition number>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Tell the kernel to forget about a specified partition.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
fprintf(out, _(" %s [options] <device>\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Do a low-level formatting of a floppy disk.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -f, --from <N> start at the track N (default 0)\n"), out);
fputs(_(" -t, --to <N> stop at the track N\n"), out);
" %1$s [options] -l [<disk>] list partition table(s)\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display or manipulate a disk partition table.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -b, --sector-size <size> physical and logical sector size\n"), out);
fputs(_(" -c, --compatibility[=<mode>] mode is 'dos' or 'nondos' (default)\n"), out);
fprintf(out, _(" %s [options] -- [fs-options] [<filesystem> ...]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Check and repair a Linux filesystem.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -A check all filesystems\n"), out);
fputs(_(" -C [<fd>] display progress bar; file descriptor is for GUIs\n"), out);
fputs(USAGE_HEADER, stream);
fprintf(stream,
_(" %s [options] <file>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, stream);
+ fputs(_("Check and repair a compressed ROM filesystem.\n"), stream);
+
fputs(USAGE_OPTIONS, stream);
fputs(_(" -a for compatibility only, ignored\n"), stream);
fputs(_(" -v, --verbose be more verbose\n"), stream);
fputs(USAGE_HEADER, stderr);
fprintf(stderr,
_(" %s [options] <device>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, stderr);
+ fputs(_("Check the consistency of a Minix filesystem.\n"), stderr);
+
fputs(USAGE_OPTIONS, stderr);
fputs(_(" -l list all filenames\n"), stderr);
fputs(_(" -a automatic repair\n"), stderr);
fprintf(out,
_(" %s [options] <iso9660_image_file>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show the length of an ISO-9660 filesystem.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -d, --divisor=<number> divide the amount of bytes by <number>\n"), out);
fputs(_(" -x, --sectors show sector count and size\n"), out);
fprintf(out,
_("Usage: %s [options] device [block-count]\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Make an SCO bfs filesystem.\n"), out);
+
fprintf(out, _("\nOptions:\n"
" -N, --inodes=NUM specify desired number of inodes\n"
" -V, --vname=NAME specify volume name\n"
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] [-t <type>] [fs-options] <device> [<size>]\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Make a Linux filesystem.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fprintf(out, _(" -t, --type=<type> filesystem type; when unspecified, ext2 is used\n"));
fprintf(out, _(" fs-options parameters for the real filesystem builder\n"));
" %s [options] device [size]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Set up a Linux swap area.\n"), out);
+
fprintf(out, _(
"\nOptions:\n"
" -c, --check check bad blocks before creating the swap area\n"
_(" %s [-a|-d|-s|-u] [--nr <n:m> | <partition>] <disk>\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Tell the kernel about the presence and numbering of partitions.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --add add specified partitions or all of them\n"), out);
fputs(_(" -d, --delete delete specified partitions or all of them\n"), out);
" %1$s -q %2$srawN\n"
" %1$s -qa\n"), program_invocation_short_name,
_PATH_RAWDEVDIR);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Bind a raw character device to a block device.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -q, --query set query mode\n"), out);
fputs(_(" -a, --all query all raw devices\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s <disk device> <partition number> <length>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Tell the kernel about the new size of a partition.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
_(" %1$s [options] <dev> [[-N] <part>]\n"
" %1$s [options] <command>\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display or manipulate a disk partition table.\n"), out);
+
fputs(_("\nCommands:\n"), out);
fputs(_(" -a, --activate <dev> [<part> ...] list or set bootable MBR partitions\n"), out);
fputs(_(" -d, --dump <dev> dump partition table (usable for later input)\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <device>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display or change the label or UUID of a swap area.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -L, --label <label> specify a new label\n"
" -U, --uuid <uuid> specify a new uuid\n"), out);
{
fputs(USAGE_HEADER, fp);
fprintf(fp, _(" %s [options] [<username>]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, fp);
+ fputs(_("Change your finger information.\n"), fp);
+
fputs(USAGE_OPTIONS, fp);
fputs(_(" -f, --full-name <full-name> real name\n"), fp);
fputs(_(" -o, --office <office> office number\n"), fp);
{
fputs(USAGE_HEADER, fp);
fprintf(fp, _(" %s [options] [<username>]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, fp);
+ fputs(_("Change your login shell.\n"), fp);
+
fputs(USAGE_OPTIONS, fp);
fputs(_(" -s, --shell <shell> specify login shell\n"), fp);
fputs(_(" -l, --list-shells print list of shells and exit\n"), fp);
fprintf(out, _(
" %s [options] [<username>...] [<tty>...]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show a listing of last logged in users.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -<number> how many lines to show\n"), out);
fputs(_(" -a, --hostlast display hostnames in the last column\n"), out);
case '?':
default:
fprintf(stderr, _("Usage: login [-p] [-h <host>] [-H] [[-f] <username>]\n"));
+ fputs(USAGE_SEPARATOR, stderr);
+ fputs(_("Begin a session on the system.\n"), stderr);
exit(EXIT_FAILURE);
}
argc -= optind;
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display information about known users in the system.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --acc-expiration display info about passwords expiration\n"), out);
fputs(_(" -c, --colon-separate display data in a format similar to /etc/passwd\n"), out);
{
fprintf(out, USAGE_HEADER);
fprintf(out, _(" %s <group>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Log in to a new group.\n"), out);
+
fprintf(out, USAGE_OPTIONS);
fprintf(out, USAGE_HELP);
fprintf(out, USAGE_VERSION);
static void __attribute__((__noreturn__)) usage(FILE *out)
{
fputs(USAGE_HEADER, out);
-
fprintf(out,
_(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Politely refuse a login.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
fprintf(out, _(
" %s [options] [tty device]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Single-user login.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -p, --login-shell start a login shell\n"
" -t, --timeout <seconds> max time to wait for a password (default: no limit)\n"
fprintf(out,
_(" %s [options] [filename]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Dump UTMP and WTMP files in raw format.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -f, --follow output appended data as the file grows\n"), out);
fputs(_(" -r, --reverse write back dumped data into utmp file\n"), out);
{
fputs(USAGE_HEADER, out);
fprintf(out, " %s\n", program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Edit the password or group file.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] {LABEL,UUID,PARTUUID,PARTLABEL}=<value>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Find a filesystem by label or UUID.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
" %1$s [options] [--source <device>] [--target <mountpoint>]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Find a (mounted) filesystem.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -s, --fstab search in static table of filesystems\n"), out);
fputs(_(" -m, --mtab search in table of mounted filesystems\n"), out);
" %1$s [options] -o|--options <optstring> [options] [--] <parameters>\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, stderr);
+ fputs(_("Parse command options.\n"), stderr);
+
fputs(USAGE_OPTIONS, stderr);
fputs(_(" -a, --alternative allow long options starting with single -\n"), stderr);
fputs(_(" -l, --longoptions <longopts> the long options to be recognized\n"), stderr);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <pid>|<name>...\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Forcibly terminate a process.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all do not restrict the name-to-pid conversion to processes\n"
" with the same uid as the present process\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] [<message>]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Enter messages into the system log.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -i, --id[=<id>] log <id> (default is PID)\n"), out);
fputs(_(" -f, --file <file> log the contents of this file\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] string [file]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display lines beginning with a specified string.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --alternative use alternative dictionary\n"
" -d, --alphanum compare only alphanumeric characters\n"
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] [<device> ...]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("List information about block devices.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all print all devices\n"), out);
fputs(_(" -b, --bytes print SIZE in bytes rather than in human readable format\n"), out);
fprintf(out,
_(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("List local system locks.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -p, --pid <pid> process id\n"
" -o, --output <list> define which output columns to use\n"
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Generate magic cookies for xauth.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -f, --file <file> use file as a cookie seed\n"), out);
fputs(_(" -m, --max-size <num> limit how much is read from seed files\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] <pathname>...\n"), p);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Follow a pathname until a terminal point is found.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -h, --help displays this help text\n"
" -V, --version output version information and exit\n"
fprintf(out,
_(" %s [options] <expression> <replacement> <file>...\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Rename files.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -v, --verbose explain what is being done\n"), out);
fputs(_(" -s, --symlink act on the target of symlinks\n"), out);
fprintf(out,
_(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("A daemon for generating UUIDs.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -p, --pid <path> path to pid file\n"
" -s, --socket <path> path to socket\n"
fprintf(out,
_(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Create a new UUID value.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -r, --random generate random-based uuid\n"
" -t, --time generate time-based uuid\n"
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <file>\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Locate the binary, source, and manual-page files for a command.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -b search only for binaries\n"), out);
fputs(_(" -B <dirs> define binaries lookup path\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] <device>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Wipe signatures from a device.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all wipe all magic strings (BE CAREFUL!)\n"
" -b, --backup create a signature backup in $HOME\n"
{
FILE *out = rc == EXIT_SUCCESS ? stdout : stderr;
+ fputs(_("Show or change the real-time scheduling attributes of a process.\n"), out);
fprintf(out, _(
- "\nchrt - manipulate real-time attributes of a process\n"
"\nSet policy:\n"
" chrt [options] [<policy>] <priority> [-p <pid> | <command> [<arg>...]]\n"
"\nGet policy:\n"
" %1$s [options] -u <uid>...\n"
" %1$s [options] <command>\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show or change the I/O-scheduling class and priority of a process.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -c, --class <class> name or number of scheduling class,\n"
" 0: none, 1: realtime, 2: best-effort, 3: idle\n"), out);
_("Usage: %s [options] [mask | cpu-list] [pid|cmd [args...]]\n\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show or change the CPU affinity of a process.\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+
fprintf(out, _(
"Options:\n"
" -a, --all-tasks operate on all the tasks (threads) for a given pid\n"
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] <device>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Discard the content of sectors on a device.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -o, --offset <num> offset in bytes to discard from\n"
" -l, --length <num> length of bytes to discard from the offset\n"
"\nUsage:\n"
" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Configure CPUs in a multi-processor system.\n"), out);
+
puts(_( "\nOptions:\n"
" -h, --help print this help\n"
" -e, --enable <cpu-list> enable cpus\n"
{
fprintf(out, USAGE_HEADER);
fprintf(out, _(" %s hard|soft\n"), program_invocation_short_name);
+
+ fprintf(out, USAGE_SEPARATOR);
+ fprintf(out, "Set the function of the Ctrl-Alt-Del combination.\n");
+
fprintf(out, USAGE_OPTIONS);
fprintf(out, USAGE_HELP);
fprintf(out, USAGE_VERSION);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display or control the kernel ring buffer.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -C, --clear clear the kernel ring buffer\n"), out);
fputs(_(" -c, --read-clear read and clear all messages\n"), out);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fputs(USAGE_HEADER, out);
-
fprintf(out,
_(" %s [options] [<device>|<mountpoint>]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Eject removable media.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --auto <on|off> turn auto-eject feature on or off\n"
" -c, --changerslot <slot> switch discs on a CD-ROM changer\n"
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] <filename>\n"), program_invocation_short_name);
- fputs(USAGE_OPTIONS, out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Preallocate space to, or deallocate space from a file.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -c, --collapse-range remove a range from the file\n"), out);
fputs(_(" -d, --dig-holes detect zeroes and replace with holes\n"), out);
fputs(_(" -l, --length <num> length for range operations, in bytes\n"), out);
" %1$s [options] <file>|<directory> -c <command>\n"
" %1$s [options] <file descriptor number>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, stderr);
+ fputs(_("Manage file locks from shell scripts.\n"), stderr);
+
fputs(USAGE_OPTIONS, stderr);
fputs(_( " -s, --shared get a shared lock\n"), stderr);
fputs(_( " -x, --exclusive get an exclusive lock (default)\n"), stderr);
fprintf(out, USAGE_HEADER);
fprintf(out,
_(" %s [options] <mountpoint>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Suspend access to a filesystem (ext3/4, ReiserFS, JFS, XFS).\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -f, --freeze freeze the filesystem\n"), out);
fputs(_(" -u, --unfreeze unfreeze the filesystem\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] <mount point>\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Discard unused blocks on a mounted filesystem.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all trim all mounted filesystems that are supported\n"), out);
fputs(_(" -o, --offset <num> the offset in bytes to start discarding from\n"), out);
fputs(USAGE_HEADER, usageto);
fputs(_(" hwclock [function] [option...]\n"), usageto);
+ fputs(USAGE_SEPARATOR, usageto);
+ fputs(_("Query or set the hardware clock.\n"), usageto);
+
fputs(_("\nFunctions:\n"), usageto);
fputs(_(" -h, --help show this help text and exit\n"
" -r, --show read hardware clock and print result\n"
{
fprintf(out, USAGE_HEADER);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
- fprintf(out, USAGE_OPTIONS);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Create various IPC resources.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -M, --shmem <size> create shared memory segment of size <size>\n"), out);
fputs(_(" -S, --semaphore <nsems> create semaphore array with <nsems> elements\n"), out);
fputs(_(" -Q, --queue create message queue\n"), out);
fprintf(out, USAGE_HEADER);
fprintf(out, " %s [options]\n", program_invocation_short_name);
fprintf(out, " %s shm|msg|sem <id>...\n", program_invocation_short_name);
- fprintf(out, USAGE_OPTIONS);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Remove certain IPC resources.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -m, --shmem-id <id> remove shared memory segment by id\n"), out);
fputs(_(" -M, --shmem-key <key> remove shared memory segment by key\n"), out);
fputs(_(" -q, --queue-id <id> remove message queue by id\n"), out);
fprintf(out, USAGE_HEADER);
fprintf(out, " %s [resource ...] [output-format]\n", program_invocation_short_name);
fprintf(out, " %s [resource] -i <id>\n", program_invocation_short_name);
- fprintf(out, USAGE_OPTIONS);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show information on IPC facilities.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -i, --id <id> print details on resource identified by <id>\n"), out);
fprintf(out, USAGE_HELP);
fprintf(out, USAGE_VERSION);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <ldisc> <device>\n"), program_invocation_short_name);
- fputs(USAGE_OPTIONS, out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Attach a line discipline to a serial line.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -d, --debug print verbose messages to stderr\n"), out);
fputs(_(" -s, --speed <value> set serial line speed\n"), out);
fputs(_(" -c, --intro-command <string> intro sent before ldattach\n"), out);
" %1$s [options] -f | <loopdev> <file>\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Set up and control loop devices.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all list all used devices\n"), out);
fputs(_(" -d, --detach <loopdev>... detach one or more devices\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display information about the CPU architecture.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all print both online and offline CPUs (default for -e)\n"), out);
fputs(_(" -b, --online print online CPUs only (default for -p)\n"), out);
" %1$s <operation> <mountpoint> [<target>]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Mount a filesystem.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fprintf(out, _(
" -a, --all mount all filesystems mentioned in fstab\n"
_(" %1$s [-qd] /path/to/directory\n"
" %1$s -x /dev/device\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Check whether a directory or file is a mountpoint.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -q, --quiet quiet mode - don't print anything\n"
" -d, --fs-devno print maj:min device number of the filesystem\n"
fprintf(out, _(" %s [options] <program> [<argument>...]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Run a program with namespaces of other processes.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -t, --target <pid> target process to get namespaces from\n"), out);
fputs(_(" -m, --mount[=<file>] enter mount namespace\n"), out);
fprintf(out, USAGE_HEADER);
fprintf(out, _(" %s [options] new_root put_old\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Change the root filesystem.\n"), out);
+
fprintf(out, USAGE_OPTIONS);
fprintf(out, USAGE_HELP);
fprintf(out, USAGE_VERSION);
fprintf(out,
_(" %s [options] COMMAND\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show or change the resource limits of a process.\n"), out);
+
fputs(_("\nGeneral Options:\n"), out);
fputs(_(" -p, --pid <pid> process id\n"
" -o, --output <list> define which output columns to use\n"
{
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
- fputs(USAGE_OPTIONS, out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display kernel profiling information.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fprintf(out,
_(" -m, --mapfile <mapfile> (defaults: \"%s\" and\n"), defaultmap);
fprintf(out,
" %1$s [-n] <priority> -g|--pgrp <pgid>...\n"
" %1$s [-n] <priority> -u|--user <user>...\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Alter the priority of running processes.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -n, --priority <num> specify the nice increment value\n"), out);
fputs(_(" -p, --pid <id> interpret argument as process ID (default)\n"), out);
fprintf(out,
_(" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Enter a system sleep state until a specified wakeup time.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --auto reads the clock mode from adjust file (default)\n"), out);
fprintf(out,
printf(_(" %s%s [options] [program [program arguments]]\n"),
program_invocation_short_name,
!strcmp(program_invocation_short_name, "setarch") ? " <arch>" : "");
+
+ fputs(USAGE_SEPARATOR, stdout);
+ fputs(_("Change the reported architecture and set personality flags.\n"), stdout);
+
fputs(USAGE_OPTIONS, stdout);
fputs(_(" -v, --verbose says what options are being switched on\n"), stdout);
fputs(_(" -R, --addr-no-randomize disables randomization of the virtual address space\n"), stdout);
fprintf(out, _(" %s [options] <program> [<argument>...]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Run a program with different privilege settings.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -d, --dump show current state (and do not exec anything)\n"), out);
fputs(_(" --nnp, --no-new-privs disallow granting new privileges\n"), out);
" %s [options] <program> [arguments ...]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Run a program in a new session.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -c, --ctty set the controlling terminal to the current one\n"), out);
fputs(_(" -w, --wait wait program to exit, and use the same return\n"), out);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fputs(USAGE_HEADER, out);
-
fprintf(out, _(" %s [options] [<spec>]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Disable devices and files for paging and swapping.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all disable all swaps from /proc/swaps\n"
" -v, --verbose verbose mode\n"), out);
{
size_t i;
fputs(USAGE_HEADER, out);
-
fprintf(out, _(" %s [options] [<spec>]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Enable devices and files for paging and swapping.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all enable all swaps from /etc/fstab\n"), out);
fputs(_(" -d, --discard[=<policy>] enable swap discards, if supported by device\n"), out);
fputs(USAGE_HEADER, output);
fprintf(output, _(" %s [options] <newrootdir> <init> <args to init>\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, output);
+ fputs(_("Switch to another filesystem as the root of the mount tree.\n"), output);
+
fputs(USAGE_OPTIONS, output);
fputs(USAGE_HELP, output);
fputs(USAGE_VERSION, output);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <device>\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Set various parameters for the line printer.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -i, --irq <num> specify parallel port irq\n"), out);
fputs(_(" -t, --time <ms> driver wait time in milliseconds\n"), out);
" %1$s [options] <source> | <directory>\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Unmount filesystems.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all unmount all filesystems\n"), out);
fputs(_(" -A, --all-targets unmount all mountpoints for the given device in the\n"
fprintf(out, _(" %s [options] <program> [<argument>...]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Run a program with some namespaces unshared from the parent.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -m, --mount unshare mounts namespace\n"), out);
fputs(_(" -u, --uts unshare UTS namespace (hostname etc)\n"), out);
fprintf(out,
_(" %s [options] [<device> ...]\n"), program_invocation_short_name);
- fputs(USAGE_OPTIONS, out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show the status of the hardware watchdog.\n"), out);
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -f, --flags <list> print selected flags only\n"
" -F, --noflags don't print information about flags\n"
" -I, --noident don't print watchdog identity information\n"
" %1$s [options] -f | <device> -s <size>\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Set up and control zram devices.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --algorithm lzo|lz4 compression algorithm to use\n"), out);
fputs(_(" -b, --bytes print sizes in bytes rather than in human readable format\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %1$s [options] <line> [<baud_rate>,...] [<termtype>]\n"
" %1$s [options] <baud_rate>,... <line> [<termtype>]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Open a terminal and set its mode.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -8, --8bits assume 8-bit tty\n"), out);
fputs(_(" -a, --autologin <user> login the specified user automatically\n"), out);
* which means they can be translated. */
fprintf(out,
_(" %s [options] [y | n]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Control write access of other users to your terminal.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -v, --verbose explain what is being done\n"), out);
fputs(USAGE_HELP, out);
fprintf(out,
_(" %s [options] [file]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Make a typescript of a terminal session.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --append append the output\n"
" -c, --command <command> run command rather than interactive shell\n"
_(" %s [-t] timingfile [typescript] [divisor]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Play back terminal typescripts, using timing information.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -t, --timing <file> script timing output file\n"
" -s, --typescript <file> script terminal session output file\n"
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Set the attributes of a terminal.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" --term <terminal_name> override TERM environment variable\n"), out);
fputs(_(" --reset reset terminal to power-on state\n"), out);
fputs(USAGE_HEADER, out);
fprintf(out,
_(" %s [options] [<file> | <message>]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Write a message to all users.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -n, --nobanner do not print banner, works only for root\n"), out);
fputs(_(" -t, --timeout <timeout> write timeout in seconds\n"), out);
_(" %s [options] <user> [<ttyname>]\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Send a message to another user.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
"\nUsage:\n"
" %s [options]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Filter out reverse line feeds.\n"), out);
+
fprintf(out, _(
"\nOptions:\n"
" -b, --no-backspaces do not output backspaces\n"
_("\nUsage:\n"
" %s [options] [file ...]\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Filter nroff output for CRT previewing.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fprintf(out,
_(" -, --no-underlining suppress all underlining\n"
" -2, --half-lines print all half-lines\n"
fprintf(out, _("\nUsage:\n"
" %s [startcol [endcol]]\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Filter out the specified columns.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] [<file>...]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Columnate lists.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -c, --columns <width> width of output in number of characters\n"), out);
fputs(_(" -t, --table create a table\n"), out);
{
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <file>...\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Display file contents in hexadecimal, decimal, octal, or ascii.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -b, --one-byte-octal one-byte octal display\n"), out);
fputs(_(" -c, --one-byte-char one-byte character display\n"), out);
{
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Read one line.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
{
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] <file>...\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("A file perusal filter for CRT viewing.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -d display help instead of ringing bell\n"), out);
fputs(_(" -f count logical rather than screen lines\n"), out);
fprintf(out,
_(" %s [options] [+line] [+/pattern/] [files]\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Browse pagewise through text files.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -number lines per page\n"), out);
fputs(_(" -c clear screen before displaying\n"), out);
{
fprintf(out, _("Usage: %s [options] [file ...]\n"),
program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Reverse lines characterwise.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
" %s [option] file\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Follow the growth of a log file.\n"), out);
+
fprintf(out, _(
"\nOptions:\n"
" -n, --lines NUMBER output the last NUMBER lines\n"
{
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] [<file> ...]\n"), program_invocation_short_name);
- fputs(USAGE_OPTIONS, out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Do underlining.\n"), out);
+
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -t, -T, --terminal TERMINAL override the TERM environment variable\n"), out);
fputs(_(" -i, --indicated underlining is indicated via a separate line\n"), out);
fputs(USAGE_SEPARATOR, out);