0

I have been unable to get disk usage from df. Instead I am getting Free inodes regardless of asking for block sizes using -BM or other sizes.

My computer harddisk is /dev/sda which has 3 partitions with the following partitions and disk usage using lsblk:

[matta@matta]: ~>$ lsblk /dev/sda -o NAME,SIZE,TYPE,FSUSED,FSUSE%
NAME     SIZE TYPE FSUSED FSUSE%
sda    119.2G disk        
├─sda1   212M part 141.9M    71%
├─sda2   118G part  73.1G    63%
└─sda3     1G part 

If I type df:

[matta@matta]: ~>$ df /dev/sda
Filesystem     Type Inodes IUsed IFree IUse% Mounted on
/dev/sda2      ext4   7.4M  1.3M  6.2M   17% /
total          -      7.4M  1.3M  6.2M   17% -

or df -BM:

[matta@matta]: ~>$ df -BM /dev/sda2
Filesystem     Type  Inodes   IUsed   IFree IUse% Mounted on
/dev/sda2      ext4 7741440 1270517 6470923   17% /
total          -    7741440 1270517 6470923   17% -

I want the output to show free disk space, not free inodes.

2
  • Is df aliased to df -Ti --total? What's the output of type df? Commented May 5, 2020 at 3:29
  • it looks like you got it... df is aliased to "df -ahiT --total" Thanks Commented May 5, 2020 at 3:36

2 Answers 2

1
[matta@matta]: ~>$ type df
df is aliased to `df -ahiT --total'

to unalias it: unalias df

and now...

[matta@matta]: ~>$ df -BG /dev/sda2
Filesystem     1G-blocks  Used Available Use% Mounted on
/dev/sda2           116G   74G       37G  67% /
0

It looks like your df is alias-ed. You can avoid using the alias without unalias-ing it by using a \ before the command. So, try,

\df /dev/sda

Otherwise try:

unalias df
df /dev/sda

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.