0

gparted is said to be the GUI frontend of parted.

Why can't parted show used and available sizes for each partition, as gparted does?

If parted can, how can I make it show that information?

If not, how does gparted make it?

$ sudo parted -l
[sudo] password for t: 
Model: ATA ST1000LM014-1EJ1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  2097kB  1049kB                        bios_grub
 2      2097kB  16.0GB  16.0GB  linux-swap(v1)
 4      116GB   716GB   600GB   ext4
 3      716GB   1000GB  284GB   ext4

enter image description here

3

On the command line, the used and unused space on each filesystem can be listed using the command df, assuming that the filesystems are mounted.

If you wanted to be pedantic, you could say more accurately that "gparted is a graphical frontend for parted and any combination of btrfs-progs/btrfs-tools, e2fsprogs, f2fs-tools, dosfstools/mtools, hfsutils, hfsprogs , jfsutils, util-linux, lvm2, nilfs-utils, ntfs-3g/ntfsprogs, reiser4progs, reiserfsprogs/reiserfs-utils, xfsprogs and/or xfsdump"... but I think that would be too cumbersome for general use. I believe that the tools and/or libraries in those packages could include the functionality to find out the used/unused capacity on each supported filesystem, if that functionality isn't integrated into the main gparted binary.

So, yes, gparted is a frontend for parted... but not just a simple frontend: since the GUI allows for more easier presentation of complex concepts, it uses that capability to provide more advanced functionality. In doing so, it acts as a frontend for way more tools than just parted alone.

  • Thanks. It is not I want to be pedantic. When A is said to be GUI frontend of B, it usually implies B has more feature than A, or is more powerful, So I think it is best to use the CLI program than the GUI one. – Tim Feb 21 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.