Hello, I use debian sarge for alpha processor. My installation contains coreutils 5.2.1 and I note that du utility doesn't count correctly disk usage for directory over 4GB.
For example I have a directory sarge-20041016 that contains a DVD iso image. The output of "ll" is the following and it reports fine filesize. alpha:/mnt/sdd2# ll sarge-20041016 total 4544832 -rw-r--r-- 1 tullio tullio 4653907968 Oct 16 05:10 sarge-alpha-1.iso If I type du, I see the following output alpha:/mnt/sdd2# du -s * 350528 sarge-20041016 <--- du displays only ~ 350MB alpha:/mnt/sdd2# So I searched in coreutils source file where du calculates used space and I have tried this simple solution: --- coreutils-5.2.1/src/du.c.orig 2005-03-22 23:22:58.740931368 +0100 +++ coreutils-5.2.1/src/du.c 2005-03-23 12:56:36.854330472 +0100 @@ -382,7 +382,7 @@ { size = (apparent_size ? sb->st_size - : ST_NBLOCKS (*sb) * ST_NBLOCKSIZE); + : (uintmax_t)ST_NBLOCKS (*sb) * ST_NBLOCKSIZE); } if (first_call) I think the real problem is * operation that exceed some 32 bit wide type. On my alpha system sizeof returns: sizeof(int)=4 byte sizeof(long)=8 byte sizeof(long long)=8 byte sizeof(uintmax_t)=8 byte Thanks, tullio ____________________________________________________________ 6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero! Scaricalo su INTERNET GRATIS 6X http://www.libero.it _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils