LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find the true amount of usable free hard drive space? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-the-true-amount-of-usable-free-hard-drive-space-4175662821/)

grumpyskeptic 10-19-2019 08:50 AM

How to find the true amount of usable free hard drive space?
 
I am using Linux Mint 17.3 Rosa Cinnamon.

I would like to know the actual amount of usable space I have left on my hard disk, that I can use store files.

The file manager Nemo says I have 5.4gb.

Disk Usage Analyser says I have 30.3gb.

Something called "Disks" says I have exactly 30gb.

Question please:
What is the reliable console command that I can use to find the amount of usable hard drive space I have left?

I think my HD is nearly full, so only Nemo is likely to be correct. Before I removed some large files, I kept getting low disk space warnings.

Thanks.

pan64 10-19-2019 09:24 AM

did you try the command df already?

UpYours 10-19-2019 10:43 AM

if not installed install gparted it is accurate. gnome disk which is probably what you mean by disk counts EVERYTHING, including the space use to create the file system. so it is inaccurate.

fatmac 10-19-2019 01:05 PM

Command line.
Code:

df -h
will give you a fairly accurate reading of your disk usage.

Firerat 10-19-2019 03:09 PM

it also depends on the filesystem and the user

for example, by default ext4 reserves 5% space for root, so a root account will see more free space than a "normal" account

These days that 5% is a considerable chunk of space

The fact is, when people refer to one thing not accurately reporting the free space they are just getting confused

UpYours 10-19-2019 03:50 PM

Quote:

Originally Posted by Firerat (Post 6048632)
it also depends on the filesystem and the user

for example, by default ext4 reserves 5% space for root, so a root account will see more free space than a "normal" account

These days that 5% is a considerable chunk of space

The fact is, when people refer to one thing not accurately reporting the free space they are just getting confused



i've done the numbers to many times to count(pun intended)and ext4 JUST like ntfs takes 7% for the file system.

Firerat 10-19-2019 04:05 PM

Quote:

Originally Posted by UpYours (Post 6048650)
i've done the numbers to many times to count(pun intended)and ext4 JUST like ntfs takes 7% for the file system.

ext4 by default reserves 5%

man mkfs.ext4
Code:

      -m reserved-blocks-percentage
              Specify  the  percentage of the filesystem blocks reserved for the super-user.  This avoids fragmentation, and allows root-owned
              daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to  the
              filesystem.  The default percentage is 5%.


your numbers mean nothing to me

scasey 10-19-2019 04:06 PM

Quote:

Originally Posted by fatmac (Post 6048608)
Command line.
Code:

df -h
will give you a fairly accurate reading of your disk usage.

+1 for df.

One does need to know which files are where, of course. On this desktop, for example:
Code:

# df -Th
Filesystem    Type      Size  Used Avail Use% Mounted on
/dev/sdf3      ext4      50G  7.8G  39G  17% /
/dev/sdf2      ext4      394G  82G  293G  22% /home
/dev/sdf1      ext4      922M  330M  530M  39% /boot

I use this to receive daily backups from my production server using rsnapshot. rsnapshot, by default, puts the backup files in /var. A full set of daily, weekly, and monthly snapshots is 79G, so I had to configure to put them in /home, because there's not enough space in /var for them.

So, besides knowing how much free space is in each partition, one also needs to understand what each partition contains.

UpYours 10-19-2019 05:01 PM

Quote:

Originally Posted by Firerat (Post 6048653)
ext4 by default reserves 5%

man mkfs.ext4
Code:

      -m reserved-blocks-percentage
              Specify  the  percentage of the filesystem blocks reserved for the super-user.  This avoids fragmentation, and allows root-owned
              daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to  the
              filesystem.  The default percentage is 5%.


your numbers mean nothing to me

you mean NOTHING to me. i know my numbers are correct.

scasey 10-19-2019 05:11 PM

Quote:

Originally Posted by Firerat (Post 6048632)
it also depends on the filesystem and the user

for example, by default ext4 reserves 5% space for root, so a root account will see more free space than a "normal" account

These days that 5% is a considerable chunk of space

The fact is, when people refer to one thing not accurately reporting the free space they are just getting confused

Quote:

Originally Posted by UpYours (Post 6048650)
i've done the numbers to many times to count(pun intended)and ext4 JUST like ntfs takes 7% for the file system.

Quote:

Originally Posted by Firerat (Post 6048653)
[snip]
your numbers mean nothing to me

Quote:

Originally Posted by UpYours (Post 6048672)
you mean NOTHING to me. i know my numbers are correct.

This dialog has nothing to do with the question asked and is confusing to the thread. Reported.

Firerat 10-19-2019 05:18 PM

Quote:

Originally Posted by scasey (Post 6048678)
This dialog has nothing to do with the question asked and is confusing to the thread. Reported.

the 5% reserved may go some way to explain the difference reported by nemo and
Disk Usage Analyser.

it has everything to do with the OP

it is similar to this thread
https://www.linuxquestions.org/quest...ve-4175659919/

scasey 10-19-2019 06:18 PM

Quote:

Originally Posted by Firerat (Post 6048680)
the 5% reserved may go some way to explain the difference reported by nemo and
Disk Usage Analyser.

That may be true, but that's not the question that was asked:
Quote:

Question please:
What is the reliable console command that I can use to find the amount of usable hard drive space I have left?
...not "why are these different things reporting differently?"

As I and others have already responded, that "reliable console command" is df.

Firerat 10-19-2019 06:30 PM

Quote:

Originally Posted by grumpyskeptic (Post 6048533)
I am using Linux Mint 17.3 Rosa Cinnamon.

I would like to know the actual amount of usable space I have left on my hard disk, that I can use store files.

The file manager Nemo says I have 5.4gb.

Disk Usage Analyser says I have 30.3gb.

Something called "Disks" says I have exactly 30gb.

Question please:
What is the reliable console command that I can use to find the amount of usable hard drive space I have left?

I think my HD is nearly full, so only Nemo is likely to be correct. Before I removed some large files, I kept getting low disk space warnings.

Thanks.


both nemo and Disk Usage Analyser are correct

https://www.linuxquestions.org/quest...ve-4175659919/


I assume the fs is ext4 and has the default 5% reserved for root

you can release some of that reserved space so nemo will "see" more free space

using [code]tune2fs -m1 /dev/sda6[code]
that will change the reserved blocks to 1% for /dev/sda6
/dev/sda6 is just an example, you need to use the correct block device

descendant_command 10-19-2019 06:31 PM

Quote:

Originally Posted by UpYours (Post 6048672)
i know my numbers are correct.

We don't - show your working.

Firerat 10-19-2019 06:38 PM

Quote:

Originally Posted by descendant_command (Post 6048699)
We don't - show your working.

it is clearly a troll account, no need to further engage with it


All times are GMT -5. The time now is 01:25 PM.