Linux sfdisk command
The Linux sfdisk command is a hard disk partitioning tool program.
sfdisk is a hard disk partitioning tool program that can display partition settings and check whether partitions are normal.
Syntax
sfdisk [-?Tvx][-d <硬盘>][-g <硬盘>][-l <硬盘>][-s <分区>][-V <硬盘>]
Parameters:
- -? or --help Display help.
- -d<disk> Display the settings of hard disk partitions.
- -g<disk> or --show-geometry<disk> Display the CHS parameters of the hard disk.
- -l<disk> Display the related settings of the hard disk partitions.
- -s<partition> Display the size of the partition, in blocks.
- -T or --list-types Display all file system IDs that sfdisk can recognize.
- -v or --version Display version information.
- -V<disk> or --verify<disk> Check whether hard disk partitions are normal.
- -x or --show-extend Display logical partitions in the extended partition.
Examples
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 foundOther Extensions
Linux Command Encyclopedia