site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On the point of comparing file size to allocated size I did a quick and dirty perl script to stat files and find out what allocated size was for various file sizes. Got a big surprise when this reported more than a fraction of a block of waste for larger files. And the the minimum allocation seems to be 8 blocks even for the 1 byte file. Does darwin set the stat struct variable st_blocks somehow different than the man page describes as /* blockes allocated for file */ ?? Surely something is fishy here? foreach my $filename (@ARGV) { chomp($filename); my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filename); my $allocsize = $blksize * $blocks; printf("blksize:%d blocks:%d usage:%d\n", $blksize, $blocks, $allocsize); printf("%-14s size:%d alloc:%d waste:%d\n", $filename, $size, $allocsize, $allocsize - $size); } -- Jerry Pendergraft jerry.pendergraft@endocardial.com Endocardial Solutions voice: 651-523-6935 1350 Energy Lane, Suite 110 fax: 651-644-7897 St Paul, MN 55108-5254 mobile: 651-491-0163 On Wed, 12 Jan 2005, Jonas Maebe wrote:
On 12 jan 2005, at 22:49, Eric Ocean wrote:
The number of files is 860,137. I haven't run fsck yet; I guess I'll do that now.
fsck does the same as Disk Utility.
What does
sudo du -ks /*
say?
Jonas
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/jerry%40endocardial.com
This email sent to jerry@endocardial.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jerry Pendergraft