Linux sfdisk command
The Linux sfdisk command is a hard disk partitioning utility.
sfdisk is a hard disk partitioning utility that can display partition configuration information and check whether partitions are normal.
Syntax
sfdisk [-?Tvx][-d <硬盘>][-g <硬盘>][-l <硬盘>][-s <分区>][-V <硬盘>]
Parameters:
- -? or --help Display help.
- -d
Display hard disk partition settings. - -g
or --show-geometry Display the CHS parameters of the hard disk. - -l
Display related settings of hard disk partitions. - -s
Display the size of partitions, in blocks. - -T or --list-types Display all filesystem IDs that sfdisk can recognize.
- -v or --version Display version information.
- -V
or --verify Check whether hard disk partitions are normal. - -x or --show-extend Display logical partitions in the extended partition.
Example
Display partition information:
# sfdisk -l
Disk /dev/sda: 1305 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 12 13- 104391 83 Linux
/dev/sda2 13 1304 1292 10377990 8e Linux LVM
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Disk /dev/sdb: 652 cylinders, 255 heads, 63 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdb: unrecognized partition
No partitions found
Linux Command Reference