BLKID(8) BLKID(8)
名前
blkid - ブロックデバイスの属性を見つけて表示するコマンドラインユーティ
リティ
書式
blkid [ -hlv ] [ [ -c cachefile ] -w writecachefile ] [ -o format ] [
-s tag ] [ -t NAME=value ] [ device ... ]
説明
blkid プログラムは libuuid(3) とともに動作するコマンドラインインタフェ
ースである。このプログラムは、コンテンツメタデータ (たとえば LABEL や
UUID フィールド) からブロックデバイスが保持するコンテンツタイプ (たとえ
ばファイルシステムやスワップ) と属性 (トークン、NAME=value ペア) を決定
する。
blkid には主に 2 種類の操作形式がある。特定の NAME=value ペアを持つデバ
イスを検索することと、複数のデバイスの NAME=value ペアを表示すること が
できる。
オプション
-c デフォルトのキャッシュファイル /etc/blkid.tab ではなく cachefile
を読み込む。何もキャッシュしていない状態で開始したい場合 (すなわ
ち、以前はスキャンを行ったが今回は利用する必要のないデバイスを表
示しない場合) は、 /dev/null を指定すること。
-h 使用法のメッセージを表示して終了する。
-l -t オプションを使って指定された検索パラメータにマッチするデバ イ
スをルックアップする。このとき検索パラメータにマッチするデバイス
は 1 つのみであると仮定する。ディスクの数が多いシステムでは、 絶
対に必要でない限りデバイスを再検証する必要がないため、より効率的
である。このオプションが指定されてない場合、 blkid は検索パラ メ
ータにマッチする全てのデバイスの表示を許す効率の悪い手法を使う。
このオプションは LABEL=data_vol または UUID=e280469a-d06f-4c0b-
b068-44f3b576029e のようなタグ検索で使うのが最も良い。 TYPE=ext3
のような検索パラメータを使って、 blkid に全ての ext3 ファイル シ
ステムを表示させたい場合は、このオプションを使うべきではない。
-o 指 定 された書式で blkid の出力を表示する。 format 引き数には、
full (デフォルト)・ value (blkid で表示される任意のタグの値の み
を表示する)・ device (デバイス名のみを表示する) が指定できる。
-s tag にマッチするそれぞれの (指定された) デバイスについてのタグの
みを表示する。複数の tag を指定することもできる。 tag が指定され
ない場合、全ての (指定された) デバイスの全てのトークンが表示され
る。トークンを表示せずキャッシュを更新したいだけの場合は、その他
のオプションを付けずに -s none を使用すること。
-t 値が value の NAME という名前のトークンを持つブロックデバイスを
検索し、見つかった全てのデバイスを表示する。 NAME の一般的な値と
し ては、 TYPE, LABEL, UUID がある。コマンドラインでデバイスが何
も指定されていない場合は、全てのブロックデバイスを検索する。それ
以外の場合は、ユーザが指定したデバイスのみを検索する。
-v バージョン番号を表示して終了する。
-w
BLKID(8) MAINTENANCE COMMANDS BLKID(8) NAME blkid - command-line utility to locate/print block device attributes SYNOPSIS blkid -L label | -U uuid blkid [-ghlv] [-c file] [-w file] [-o format] [-s tag] [-t NAME=value] device [device ...] blkid -p [-O offset] [-S size] [-o format] [-s tag] [-u list] device [device ...] blkid -i [-o format] [-s tag] device [device ...] DESCRIPTION The blkid program is the command-line interface to working with lib- blkid(3) library. It can determine the type of content (e.g. filesys- tem, swap) a block device holds, and also attributes (tokens, NAME=value pairs) from the content metadata (e.g. LABEL or UUID fields). Note that blkid reads information directly from devices and for non- root users it returns cached unverified information. It is better to use lsblk --fs to get a user-friendly overview of filesystems and devices. lsblk(8) is also easy to use in scripts. blkid is mostly designed for system services and to test libblkid functionality. blkid does not read information about removable devices by default. blkid has two main forms of operation: either searching for a device with a specific NAME=value pair, or displaying NAME=value pairs for one or more devices. OPTIONS -c cachefile Read from cachefile instead of reading from the default cache file /etc/blkid/blkid.tab. If you want to start with a clean cache (i.e. don’t report devices previously scanned but not nec- essarily available at this time), specify /dev/null. -g Perform a garbage collection pass on the blkid cache to remove devices which no longer exist. -h Display a usage message and exit. -i Display I/O Limits (aka I/O topology) information. The ’export’ output format is automatically enabled. This option could be used together with -p option. -l Look up one device that matches the search parameter specified using the -t option. If there are multiple devices that match the specified search parameter, then the device with the highest priority is returned, and/or the first device found at a given priority. Device types in order of decreasing priority are Device Mapper, EVMS, LVM, MD, and finally regular block devices. If this option is not specified, blkid will print all of the devices that match the search parameter. -L label Look up one device that uses the label (same as: -l -o device -t LABEL=
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa