在Linux下可以使用blkid命令對查詢設備上所採用文件系統類型進行查詢。blkid主要用來對系統的塊設備(包括交換分區)所使用的文件系統類型、LABEL、UUID等信息進行查詢。要使用這個命令必須安裝e2fsprogs軟件包。
選項參數
-c 指定cache文件(default: /etc/blkid.tab, /dev/null = none)
-d don't encode non-printing characters
-h 顯示幫助信息
-g garbage collect the blkid cache
-o 指定輸出格式
-k list all known filesystems/RAIDs and exit
-s 顯示指定信息,默認顯示所有信息
-t find device with a specific token (NAME=value pair)
-l look up only first device with token specified by -t
-L convert LABEL to device name
-U convert UUID to device name
-v 顯示版本信息
-w write cache to different file (/dev/null = no write)specify device(s) to probe (default: all devices) Low-level probing options:
-p low-level superblocks probing (bypass cache)
-i gather information about I/O limits
-S overwrite device size
-O probe at the given offset
-u filter by "usage" (e.g. -u filesystem,raid)
-n filter by filesystem type (e.g. -n vfat,ext3)
實例
blkid #列出當前系統中所有已掛載文件系統的設備,類型,UUID
blkid -s UUID /dev/sda1#指定顯示某個設備的UUID
blkid -s LABEL
blkid -s TYPE#所有已掛載文件系統的設備,類型
blkid -o device#所有已掛載文件系統的設備
blkid -o list#所有已掛載文件系統的列表