Re: du returns a diff size to ls.




This might help:

http://www-1.ibm.com/support/docview.wss?rs=111&context=SWG10&q1=sparse+
files&uid=isg3T1000145&loc=en_US&cs=utf-8&lang=en

_____

From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Bruce Whittaker
Sent: Thursday, June 29, 2006 2:19 AM
To: aix-l@xxxxxxxxxxxxx
Subject: 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.
------------------------------------------------------------------------
----------------



Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.