Operating System - HP-UX
1849597 Members
7098 Online
104044 Solutions
New Discussion

du -sk reports wrong sizes for CIFS shares

 
Mihails Nikitins
Super Advisor

du -sk reports wrong sizes for CIFS shares

Hi,

I found that du -sk reports wrong file and directory sizes for CIFS shares.

Real size = Claimed size * ~8

ls works correctly. Example:

# du -sk cc32d476.exe
2836 cc32d476.exe
# ls -l cc32d476.exe
-rwxrwxrwx 1 root sys 23227581 Feb 7 2002 cc32d476.exe


Do you know why it happens?
I use CIFS/9000 Client (B8724AA A.01.06) connecting to a dumb network attached storage.

Points and thanks in advance!

BR,
Mihails




KISS - Keep It Simple Stupid
2 REPLIES 2
Robert-Jan Goossens
Honored Contributor

Re: du -sk reports wrong sizes for CIFS shares

Hi,

man du
-k Gives the block count in 1024-byte blocks.

Not the real size as ls -l will give you, this is normal behaviour.


Robert-Jan.

Mihails Nikitins
Super Advisor

Re: du -sk reports wrong sizes for CIFS shares

I know the difference between ls and du.

Look at the values!

23,227,581 bytes ~ 23 Mbytes
2836 Kbytes ~ 2,8 Mbytes

23 / 2,8 = ~ 8


BR,
Mihails
KISS - Keep It Simple Stupid