Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Through terminal on Linux, what exactly would I type to find External HDDs and their remaining storage space?

share|improve this question
3  
you can use df -h –  Scandalist Jan 6 at 2:58
    
Thanks you Scandalist, your help is appreciated greatly. –  ion Jan 6 at 2:59
    
@Scandalist - Why not make that an answer? –  nerdwaller Jan 6 at 3:23
    
Sorry for the downvote, however the site's defined reason for the button is: "This question does not show any research effort; it is unclear or not useful (click again to undo)" (emphasis added). –  nerdwaller Jan 6 at 3:26
add comment

1 Answer

Linux doesn't differentiate between external and internal drives in any obvious way* – so you'll need to get a bit sneaky to get what you want.

Let's start with the most common scenario – you're running a desktop Linux install, and the drive was mounted for you by some helper program – in which case your drive might have a mount point that looks like /media/username/disklabel/.

If you mounted it manually, you'd know the location – and generally this would be under /media/ or, if you're doing it old-school, /mnt/.

So, if you start with:

df -h

… which would give you Disk Free, Human readable, and filtered the output to any entry whose Mounted on column pointed at an obvious location for external drives, like /media/, you have a good chance of finding the amount of disk free for just your external drives.

* On some older kernels, with the older ATA driver, PATA hard drives were denoted by /dev/hdX and most other drives were treated as SCSI drives with a /dev/sdX designation. On a system with no SCSI or SATA drives, there was a good chance external USB drives would be under /dev/sdX. Modern kernels however treat everything as a SCSI drive.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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