09.11.2016 16:59, Carlos E. R. пишет:
Hi, I want to find the disk IDs corresponding to a device.
Something similar to "lsblk -n --output UUID /dev/sdb" but for ID, and for the disk, not the partitions.
The way I know is this:
Telcontar:~ # l /dev/disk/by-id | grep -w sdb lrwxrwxrwx 1 root root 9 Nov 7 10:47 ata-ST2000DM001-1CH164_Z1F5J9FQ -> ../../sdb lrwxrwxrwx 1 root root 9 Nov 7 10:47 scsi-1ATA_ST2000DM001-1CH164_Z1F5J9FQ -> ../../sdb lrwxrwxrwx 1 root root 9 Nov 7 10:47 scsi-SATA_ST2000DM001-1CH1_Z1F5J9FQ -> ../../sdb lrwxrwxrwx 1 root root 9 Nov 7 10:47 scsi-SATA_ST2000DM001-1CH_Z1F5J9FQ -> ../../sdb lrwxrwxrwx 1 root root 9 Nov 7 10:47 wwn-0x5000c500792f9269 -> ../../sdb Telcontar:~ #
and then parse the output. I wonder about a command that directly gives the information. maybe blkid, but I don't see how.
udevadm info -q symlink -n sda