Mike Cooper wrote: > The "parted -m <dev> print" output is quite useful but it lacks the > ability to specify an option to control the units which are displayed. > The attached source diff for parted 3.0 adds a new command line option > --unit compact|sector|byte|cylinder|chs' which provides the desired > behavior. > > A typical usage might be: > > parted -m --unit sector /dev/sda print > > to get output like: > > /dev/sda:1465149168s:scsi:512:512:msdos:ATA ST3750640AS; > 1:2048s:29296639s:29294592s:fat32::boot; > 2:29298686s:1465147391s:1435848706s:::; > 5:29298688s:87889919s:58591232s:ext4::; > 6:87891968s:146483199s:58591232s:ext4::; > 7:146485248s:179685375s:33200128s:linux-swap(v1)::; > 8:179687424s:1465147391s:1285459968s:ext4::; > > I hope the development team will adopt this for future releases.
Thanks, but you can get that effect already, using the "unit ..." command (here, abbreviated to "u"): $ parted -m -s /dev/sdb u gi p : BYT; /dev/sdb:1863GiB:scsi:512:512:gpt:ATA SAMSUNG HD204UI; 2:0.00GiB:0.50GiB:0.50GiB:ext4:_/boot:; 3:0.50GiB:863GiB:863GiB:ext4:_/u:; 4:863GiB:1863GiB:1000GiB:ext4:_/v:;