[parted-devel] Patch to add new '--unit' option to parted

Mike Cooper mike.cooper at magnicomp.com
Sat Feb 18 22:07:59 UTC 2012


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.

Best regards,

mike
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20120218/73733cf8/attachment.ksh>


More information about the parted-devel mailing list