Viewing Linux partitions with fdisk and partprobe

While reading up on the Linux parted utility, I came across partprobe. Partprobe can be used to display the number of partitions on a device, and is useful for quickly viewing the layout of a given device:

$ /sbin/partprobe -s /dev/hda
/dev/hda: msdos partitions 1 2

If your looking for details on the layout of a device, I reckon fdisk is a better bet:

$ /sbin/fdisk -l /dev/hda

Disk /dev/hda: 8590 MB, 8590417920 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 978 7855753+ 83 Linux
/dev/hda2 979 1043 522112+ 82 Linux swap

I really dig the fdisk “-l” option!

This article was posted by Matty on 2006-12-26 21:15:00 -0400 -0400