Can anybody explain the difference in the disk usage of a directory by du and the one calculated by adding up the size of every file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

    Can anybody explain the difference in the disk usage of a directory by
du and the one calculated by adding up the size of every file?

[root@dxr tmp]# echo "(0 `find /home/vj/ -name \* -printf "+%s "`) / 1024" |
bc
29091

[root@dxr tmp]# du -s /home/vj/
31883   /home/vj/

Thinking du might be using 1000 as 1Kb rather than 1024, following result is

[root@dxr tmp]# echo "(0 `find /home/vj/ -name \* -printf "+%s "`) / 1000" |
bc
29790

Regards from
VJ


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux