在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#所有已挂载文件系统的列表