Filemanager shows different than "du"

outpernet

Verified User
Joined
May 26, 2003
Messages
251
Hi. In a user the FileManager script inside DA shows the space used by a folder in 61.5 MB, but if i go by SSH, and execute a "du -sh" command it shows 200 MB..

In windows (ntfs) the folder use 72 MB... It has small files.. but no so much.. can be that difference a cluster cause?
 
I have the same problem, seems the size showed on file manager is inaccurate.
 
Hello,

If possible, can you go into that directory and do the math to see what files are being added.. and if you can see which are not? Let me know what the name, ownership, and file permssion of the ones that are not are.

Note that du has a few different ways of showing space.. there is filesize and then there is space used, which are different due to how the disk blocksizes are setup. (a file might not fill up the entire block, so the rest of a block would be wasted). It would be a 70 vs 200 meg discrepancy though. (61 to 72 might be possible as normal if there are many files)

John
 
It has a lot of folders (and subfolders/subfolders/etc.. maybe that is the problem)

I didnt appreciate files or filder that are not added in the filemanaer.. also any mismatch in the space ocuped..

strange..

ex: a folder ../../.../../.svn/text-based/

Filemanager informs: 37 KB
Also the sum of all the files inside, from filemanager, totalize 37 KB.

By ssh. By Midnight commander, if i select all the files, totalice 37 KB, BUT, if I gone under, and execute "du -sh", it shows 200 KB.

Note that the quota user system thinks that 200KB is correct, for that motive the system not let to the user write any more data in is account...

A Linux problema? it not appear to be a DA related thing...
 
The problem I found is the size showed in file manager and disk space used summary in DA is different. du -h shows the same as space used summary in DA and size showed in file manager is less.
 
Use the --apparent-size option with "du" to get the the actual file sizes... as DA reports. I believe the directories themselves aren't counted by DA (changing for next release)... will add the size of the directory node itself (usually 4.0k).. which shouldn't change the report too much.

This is an example of what I mean:
Code:
[root@fc6 default]# ls -la
total 28
-rwxr-xr-x 1 admin admin   593 Mar 17  2004 index.html
-rwxr-xr-x 1 admin admin 13954 Sep 15 20:11 logo.jpg
[root@fc6 default]# du logo.jpg
20      logo.jpg
[root@fc6 default]# du --apparent-size logo.jpg
14      logo.jpg
[root@fc6 default]#
The actual space on disk used by the file is 20k, even though the file is only 14k. DA counts the total sizes of the files, which is always going to be less than the size on disk (size of the blocks used).

The more small files you have, generally the more these 2 numbers will be off as more space is wasted in the empty parts of the blocks that the files don't fill.

John
 
Back
Top