4

Are there any commands that reports free (or used) space left on unmounted partitions? The partitions will have either NTFS, FAT or Ext2|3|4 filesystems... A bonus would be a program that also reported partitions without filesystems and unpartitioned free-space.

I'm not after anything complex like gparted, just something giving a quick list of space used/left (like df). Preferably text-based (no GUI or complex CLI, just a list).

The reason I ask, is that I have several (many!) external hard-drives, and would like to quickly find out which have space left, without jumping through too many hoops (like actually mounting and unmounting them).

I remember encountering such a program as an utility on the installations disk for some OS (not sure if it was a Linux-distro or not), but can't remember which or what the utility was called.

4

This should work on unmounted discs:

tune2fs -l /dev/sda1

or

parted /dev/sda print al

The latter requires you to install parted ;)

The reason I ask, is that I have several (many!) external hard-drives, and would like to quickly find out which have space left, without jumping through too many hoops (like actually mounting and unmounting them).

As soon as you plug them in they will get mounted(?)

Next to that: how are you suppose to know what device the external disc is on without mounting them?

  • I think I know how to prevent them from being auto-mounted. – Baard Kopperud Apr 6 '13 at 19:56
  • Is there any utility like tune2fs or dumpe2fs which shows usage information, but based on GBs or TBs, not blocks and inodes like these two? – emi Feb 23 '16 at 23:08
  • tune2fs only works for ext2/3/4, and parted doesn't show the available free space within partitions/volumes. – jiggunjer Feb 9 '17 at 12:10

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.