du returns a diff size to ls.




Hi all,

a quick question...using AIX 5.2 ML7

I have a sybase device file (a sparse database file) and if I use ls -l it
returns the correct size of the file.
If I use a du -sk on the file, it returns a much smaller size (the actual
size used?)

ie,

bruce@cass4$ ls -l
-rw-r--r-- 1 syadmin sybase 62914560 Jun 27 16:38 master.dat

bruce@cass4$ du -sk *
9184 master.dat (Size is 9Meg here...)

Now... I gzipped the file, transferred it using rcp to another machine and
unzipped it. du now returns a value that matches the size found using ls.

bruce@cass5$ ls -l
-rw-r--r-- 1 syadmin sybase 62914560 Jun 27 16:38 master.dat

bruce@cass5$ du -sk *
61440 master.dat t (Now 60 Meg...as per the ls -l)


I find this a little confusing and I'm wondering if anyone can explain
what I'm seeing?

Bruce Whittaker,
CASS Support,


----------------------------------------------------------------------------------------
This e-mail may contain confidential or privileged information. If you have received it in error, please notify the sender immediately via return e-mail and then delete the original e-mail. EnergyAustralia has collected your business contact details for dealing with you in your business capacity. More information about how we handle your personal information, including your right of access is contained at http://www.energy.com.au.
----------------------------------------------------------------------------------------