5
Through terminal on Linux, what exactly would I type to find External HDDs and their remaining storage space?
5
Through terminal on Linux, what exactly would I type to find External HDDs and their remaining storage space?
8
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.
Windows OS > WinSCP > select everything > Properties. Sorry, but I have tried all variations of df after being told that my drive was full and found that every answer returned was completely and totally inaccurate, and that I actually have plenty of free space on both by main drive and the USB drive. – 9A4Sc6GW4LkvRD – 2019-07-05T16:59:48.950
3you can use df -h – Scandalist – 2014-01-06T02:58:13.607
Thanks you Scandalist, your help is appreciated greatly. – ion – 2014-01-06T02:59:42.933
@Scandalist - Why not make that an answer? – nerdwaller – 2014-01-06T03:23:55.660
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 – 2014-01-06T03:26:20.000