代码:
$ ls -l /dev/disk/by-id
lrwxrwxrwx 1 root root 9 Jan 11 13:55 ata-Hitachi_HTS545050A7E380_TA9511GZHMSDVP -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 11 13:55 ata-Hitachi_HTS545050A7E380_TA9511GZHMSDVP-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 11 13:55 ata-Hitachi_HTS545050A7E380_TA9511GZHMSDVP-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 11 13:55 ata-Hitachi_HTS545050A7E380_TA9511GZHMSDVP-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jan 11 13:55 ata-Hitachi_HTS545050A7E380_TA9511GZHMSDVP-part4 -> ../../sda4
lrwxrwxrwx 1 root root 9 Jan 11 13:55 usb-Generic_Mass-Storage-0:0 -> ../../sdd
lrwxrwxrwx 1 root root 10 Jan 11 13:55 usb-Generic_Mass-Storage-0:0-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Jan 11 13:55 usb-Generic_Mass-Storage-0:0-part2 -> ../../sdd2
lrwxrwxrwx 1 root root 9 Jan 11 13:55 usb-Multi_Flash_Reader_058F0O1111B1-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jan 11 13:55 usb-Multi_Flash_Reader_058F0O1111B1-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jan 11 13:55 usb-Multi_Flash_Reader_058F0O1111B1-0:0-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 9 Jan 11 13:55 usb-Teclast_CoolFlash_S__5211060000041139-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 11 13:55 usb-Teclast_CoolFlash_S__5211060000041139-0:0-part1 -> ../../sdb1
代码:
# parted -l
Model: ATA Hitachi HTS54505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 14.2GB 14.2GB primary xfs
4 14.2GB 26.9GB 12.8GB primary ext4 boot
2 26.9GB 50.0GB 23.1GB primary ntfs
3 50.0GB 499GB 449GB primary ext4
Model: Teclast CoolFlash(S) (scsi)
Disk /dev/sdb: 4027MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 4027MB 4025MB primary ntfs boot
Model: Multi Flash Reader (scsi)
Disk /dev/sdc: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 53.5MB 52.4MB primary fat16
2 53.5MB 3775MB 3721MB primary ext4
Model: Generic Mass-Storage (scsi)
Disk /dev/sdd: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 22.0MB 21.0MB primary fat16
2 22.0MB 32.2GB 32.2GB primary ext2
代码:
# fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa18470c7
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 27650047 27648000 13.2G 83 Linux
/dev/sda2 52600832 97656831 45056000 21.5G 7 HPFS/NTFS/exFAT
/dev/sda3 97656832 974725119 877068288 418.2G 83 Linux
/dev/sda4 * 27650048 52600831 24950784 11.9G 83 Linux
Partition table entries are not in disk order.
Disk /dev/sdb: 3.8 GiB, 4026531840 bytes, 7864320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x19522ce8
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 7864319 7862272 3.8G 7 HPFS/NTFS/exFAT
Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x165736f2
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 104447 102400 50M 83 Linux
/dev/sdc2 104448 7372799 7268352 3.5G 83 Linux
Disk /dev/sdd: 30 GiB, 32227983360 bytes, 62945280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0ccea0b3
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 43007 40960 20M 83 Linux
/dev/sdd2 43008 62945279 62902272 30G 83 Linux