blkid & lsblk Flashcards
blkid
The blkid program is the command-line interface to working with the libblkid(3) library
blkid -i /dev/sda1
This command displays the I/O limits for sda1
i, –infor, Gather info about I/O limits.
blkid -p /dev/sda
This command displays additional information straight from the superblock.
-p, –probe, Low-level superblock probing(cache bypass)
blkid -l -t LABEL=/home
This command looks up the parameters for a specific search criteria.
- l, –list-one, Look up only first device with token specified by -t.
- t, –match-token <token>, Fond device with a specific token (NAME=value pair)</token>
blkid -t TYPE=ext2
This command will display all of the disks with a TYPE of ext2.
NAME=value:
TYPE=
LABEL=
UUID=
blkid -L /home
or
blkid -U 6e0acfe3-81ed-4f9f-8ab5-0d65ba1f0ef2
These commands are used to search for Labels and UUIDs.
- L, –label label, Look up the device that uses this fs label.
- U, –uuid uuid, Look up the device that uses this fs uuid.
blkid -o full
The -o flag is to set the output format, this command is the same as using blkid with no arguments.
blkid -o:
full, value, list, device, udev, export