blkid: add new options to blkid.8 and help output
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
5297467316
commit
02a8a21a26
|
@ -56,20 +56,23 @@ static void usage(int error)
|
||||||
"Usage:\n"
|
"Usage:\n"
|
||||||
" %1$s [-c <file>] [-ghlLv] [-o format] [-s <tag>] \n"
|
" %1$s [-c <file>] [-ghlLv] [-o format] [-s <tag>] \n"
|
||||||
" [-t <token>] [-w <file>] [dev ...]\n\n"
|
" [-t <token>] [-w <file>] [dev ...]\n\n"
|
||||||
" %1$s -p [-O <offset>] [-S <size>] <dev> [dev ...]\n\n"
|
" %1$s -p [-O <offset>] [-S <size>] [-o format] <dev> [dev ...]\n\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -c <file> cache file (default: /etc/blkid.tab, /dev/null = none)\n"
|
" -c <file> cache file (default: /etc/blkid.tab, /dev/null = none)\n"
|
||||||
" -h print this usage message and exit\n"
|
" -h print this usage message and exit\n"
|
||||||
" -g garbage collect the blkid cache\n"
|
" -g garbage collect the blkid cache\n"
|
||||||
" -o <format> output format; can be one of:\n"
|
" -o <format> output format; can be one of:\n"
|
||||||
" value, device, list, udev or full; (default: full)\n"
|
" value, device, list, udev or full; (default: full)\n"
|
||||||
" -p switch to low-probe mode (bypass cache)\n"
|
|
||||||
" -s <tag> show specified tag(s) (default show all tags)\n"
|
" -s <tag> show specified tag(s) (default show all tags)\n"
|
||||||
" -t <token> find device with a specific token (NAME=value pair)\n"
|
" -t <token> find device with a specific token (NAME=value pair)\n"
|
||||||
" -l lookup the the first device with arguments specified by -t\n"
|
" -l lookup the the first device with arguments specified by -t\n"
|
||||||
" -v print version and exit\n"
|
" -v print version and exit\n"
|
||||||
" -w <file> write cache to different file (/dev/null = no write)\n"
|
" -w <file> write cache to different file (/dev/null = no write)\n"
|
||||||
" <dev> specify device(s) to probe (default: all devices)\n\n",
|
" <dev> specify device(s) to probe (default: all devices)\n\n"
|
||||||
|
"Low-level probing options:\n"
|
||||||
|
" -p switch to low-level mode (bypass cache)\n"
|
||||||
|
" -S <bytes> overwrite device size\n"
|
||||||
|
" -O <bytes> probe at the given offset\n\n"
|
||||||
progname);
|
progname);
|
||||||
|
|
||||||
exit(error);
|
exit(error);
|
||||||
|
|
|
@ -10,32 +10,33 @@
|
||||||
blkid \- command\-line utility to locate/print block device attributes
|
blkid \- command\-line utility to locate/print block device attributes
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B blkid
|
.B blkid
|
||||||
[
|
.RB [ \-ghlLv ]
|
||||||
.B \-ghlLv
|
.RB [ \-c
|
||||||
]
|
.IR file ]
|
||||||
[
|
.RB [ \-w
|
||||||
[
|
.IR file ]
|
||||||
.B \-c
|
.RB [ \-o
|
||||||
.I cachefile
|
.IR format ]
|
||||||
]
|
.in +6
|
||||||
.B \-w
|
.RB [ \-s
|
||||||
.I writecachefile
|
.IR tag ]
|
||||||
]
|
.RB [ \-t
|
||||||
[
|
.IR NAME=value ]
|
||||||
.B \-o
|
.I device
|
||||||
.I format
|
[\fIdevice\fR ...]
|
||||||
]
|
.in -6
|
||||||
[
|
|
||||||
.B \-s
|
.B blkid
|
||||||
.I tag
|
.RB -p
|
||||||
]
|
.RB [ \-O
|
||||||
[
|
.IR offset ]
|
||||||
.B \-t
|
.RB [ \-S
|
||||||
.IR NAME = value
|
.IR size ]
|
||||||
]
|
.RB [ \-o
|
||||||
[
|
.IR format ]
|
||||||
.I device ...
|
.I device
|
||||||
]
|
[\fIdevice\fR ...]
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
.B blkid
|
.B blkid
|
||||||
|
@ -79,25 +80,39 @@ block devices. If this option is not specified,
|
||||||
.B blkid
|
.B blkid
|
||||||
will print all of the devices that match the search parameter.
|
will print all of the devices that match the search parameter.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-L
|
||||||
|
Print the devices in a user-friendly list format. This is the
|
||||||
|
equivalent of using the option \fB-o list\fR.
|
||||||
|
.TP
|
||||||
.BI \-o " format"
|
.BI \-o " format"
|
||||||
Display
|
Display
|
||||||
.BR blkid 's
|
.BR blkid 's
|
||||||
output using the specified format. The
|
output using the specified format. The
|
||||||
.I format
|
.I format
|
||||||
parameter may be
|
parameter may be:
|
||||||
.I full
|
.RS
|
||||||
(the default),
|
|
||||||
.I value
|
|
||||||
(only print the value of the tags),
|
|
||||||
.I list
|
|
||||||
(print the devices in a user-friendly format),
|
|
||||||
or
|
|
||||||
.I device
|
|
||||||
(only print the device name).
|
|
||||||
.TP
|
.TP
|
||||||
.B \-L
|
.B full
|
||||||
Print the devices in a user-friendly list format. This is the
|
print all tags (the default)
|
||||||
equivalent of using the option \fB-o list\fR.
|
.TP
|
||||||
|
.B value
|
||||||
|
print the value of the tags
|
||||||
|
.TP
|
||||||
|
.B list
|
||||||
|
print the devices in a user-friendly format
|
||||||
|
.TP
|
||||||
|
.B device
|
||||||
|
print the device name only
|
||||||
|
.TP
|
||||||
|
.B udev
|
||||||
|
vol_id compatible mode; usable in udev rules
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
.BI \-O " bytes"
|
||||||
|
Probe at the given offset (only useful with \fB-p\fR).
|
||||||
|
.TP
|
||||||
|
.BI \-p
|
||||||
|
Switch to low-level probing mode (bypass cache)"
|
||||||
.TP
|
.TP
|
||||||
.BI \-s " tag"
|
.BI \-s " tag"
|
||||||
For each (specified) device, show only the tags that match
|
For each (specified) device, show only the tags that match
|
||||||
|
@ -110,6 +125,9 @@ In order to just refresh the cache without showing any tokens, use
|
||||||
.B "-s none"
|
.B "-s none"
|
||||||
with no other options.
|
with no other options.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-S " bytes"
|
||||||
|
Ooverwrite device/file size (only useful with \fB-p\fR).
|
||||||
|
.TP
|
||||||
.BI \-t " NAME" = "value"
|
.BI \-t " NAME" = "value"
|
||||||
Search for block devices with tokens named
|
Search for block devices with tokens named
|
||||||
.I NAME
|
.I NAME
|
||||||
|
@ -155,10 +173,10 @@ devices, 0 is returned. If the specified token was not found, or no
|
||||||
For usage or other errors, an exit code of 4 is returned.
|
For usage or other errors, an exit code of 4 is returned.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.B blkid
|
.B blkid
|
||||||
was written by Andreas Dilger for libblkid.
|
was written by Andreas Dilger for libblkid and improved by Theodore Ts'o
|
||||||
|
and Karel Zak.
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
.B blkid
|
The blkid command is part of the util-linux-ng package and is available from
|
||||||
is part the e2fsprogs package since version 1.26 and is available from
|
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
|
||||||
http://e2fsprogs.sourceforge.net.
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR libblkid (3)
|
.BR libblkid (3)
|
||||||
|
|
Loading…
Reference in New Issue