1834918 Members
2499 Online
110071 Solutions
New Discussion

Re: file' size

 
SOLVED
Go to solution
Carme Torca
Super Advisor

file' size

Hi,

I have one file in one server, that has something strange.
If I do ls -l file -> its has 4 Gbs.
If I do du -ks file -> its has 2 Gbs

Does anyone knows why is it??
Thanks!
Carmen.

#ls -lrta
total 573600
drwxr-x--x 5 oraeed dba 96 Mar 11 17:10 ..
drwxr-xr-x 2 oraeed dba 96 Mar 11 20:00 .
-rw-r----- 1 oraeed dba 4195360768 Aug 5 09:43 temp.data1
#du -ks *
286800 temp.data1
Users are not too bad ;-)
2 REPLIES 2
Steve Steel
Honored Contributor
Solution

Re: file' size

Hi

-k Gives the block count in 1024-byte blocks

These things are sparse files

1)Shows place reserved and the other place really used


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Kent Ostby
Honored Contributor

Re: file' size

to illustrate the sparse file effect, copy the file to a new name and check out the sizes there.

They should match as the cp should by default fill in the "sparse" areas.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"