See inconsistency in disk usage value between df
& du
unix command output on mount-drive.
Here is sample result from df -k
command output on a mount point.
df -k /mount/point | awk '{print $3}'
Used
245661696
If we calculate K block to bytes then its : 245661696 * 1024 = 251557576704
Here is sample result from du
command output on a mount point main directory (mount point itself)
du -b --max-depth=0 /mount/point
375628722011
du
output : 375628722011 which is almost 124GB extra when compared with df
output!
Am I missing something. Some real time result from du will always be different?
-x
option ofdu
to see if it yields correct result, but I am afraid its not. I also looked atstat --file-system $HOME
yielding to 4096 , but wasn't clear how it computes up for my conversion. All I need is correct output bytes fromdu
so that I can convert to GB/TB. Any help to solve this mystry much appreciated.. – vinWin Sep 08 '22 at 14:52