Andrew Tobey Asked: 2014-08-15 10:00:38 +0800 CST2014-08-15 10:00:38 +0800 CST 2014-08-15 10:00:38 +0800 CST using fdisk: show size in a unit such as MB or GB 772 doing a fdisk -l is a quite convenient command, but how to make fidsk print the partition size in a unit such as MB or GB? fdisk 2 Answers Voted Sven 2014-08-15T10:15:46+08:002014-08-15T10:15:46+08:00 You can't. Use something else like parted -l instead. See man parted for more information. Jeremy Davis 2015-11-20T20:58:13+08:002015-11-20T20:58:13+08:00 I'm not sure about other OS; but in Debian Jessie it displays in MB & GB by default. E.g.: # fdisk -l /dev/sda Disk /dev/sda: 1 TiB, 1120239009792 bytes, 2187966816 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: gpt Disk identifier: 1D01BF33-C584-4C49-A05F-341CFB8E2D24 Device Start End Sectors Size Type /dev/sda1 34 2047 2014 1007K BIOS boot /dev/sda2 2048 262143 260096 127M EFI System /dev/sda3 262144 234441614 234179471 111.7G Linux LVM /dev/sda4 234442752 2187966782 1953524031 931.5G Linux filesystem Note the 5th column "Size"; K = KiB; M = MiB & G = GiB
You can't. Use something else like
parted -l
instead.See
man parted
for more information.I'm not sure about other OS; but in Debian Jessie it displays in MB & GB by default.
E.g.:
Note the 5th column "Size"; K = KiB; M = MiB & G = GiB