Path: utzoo!attcan!utgpu!watmath!att!tut.cis.ohio-state.edu!ucbvax!ULKYVM.BITNET!RWMIRA01 From: RWMIRA01@ULKYVM.BITNET Newsgroups: comp.unix.microport Subject: BITNET mail follows Message-ID: <8907311942.AA19900@jade.berkeley.edu> Date: 31 Jul 89 18:19:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of Louisville Lines: 13 Does anyone know of a bug in du where it computes filesizes wrong? A machine t that I have access to is running 3.0e1 and when I do a du I get numbers that on some files are one block greater than that reported by stat() in st_size. Now, my personal calculations which appear to be correct are performed by taking the size returned from stat() and / 512. If the size % 512 is greater than 0 then add 1 to the blocks. The only thing we can figure is that du is using an allocation and not the file size. Please E-Mail responses as I do not subscribe to this group. Thanks in Advance Rob Miracle