5 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Command line tool...
FromSent OnAttachments
Kia T. VangJun 22, 2005 3:47 pm 
Ben KennedyJun 22, 2005 4:02 pm 
Juri HaberlandJun 23, 2005 8:10 am 
Ben KennedyJun 23, 2005 8:28 am 
Juri HaberlandJun 23, 2005 8:55 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Command line tool to calculate Maildir size?Actions...
From:Juri Haberland (ju@koschikode.com)
Date:Jun 23, 2005 8:55:20 am
List:net.sourceforge.lists.courier-users

Ben Kennedy wrote:

Juri Haberland wrote at 5:09 pm (+0200) on 23 6 2005:

Because -b includes --apparent-size. Try again with -B1 instead of -b.

You're right, -B1 gives a count which is visually more consistent with the "human-readable" total:

basil ben # du -sB1 ~zygoat/Maildir 289280 /home/zygoat/Maildir basil ben # du -sb ~zygoat/Maildir 103316 /home/zygoat/Maildir basil ben # du -sh ~zygoat/Maildir 283K /home/zygoat/Maildir

However, neither -B1 nor --apparent-size are mentioned in my man page at all. I had no idea such options existed. Weird.

Moreover, what is the correct count? 289280 bytes? What is the 103316 value in the above, then?

As far as I understand the man page, --aparent-size returns the size of the file(s), whereas without --aparent-size the size allocated on disk is returned. See the following example:

[juri@kaplah juri]$ echo "foo" > bar [juri@kaplah juri]$ du -sh bar 4.0K bar [juri@kaplah juri]$ du -sB1 bar 4096 bar [juri@kaplah juri]$ du -sb bar 4 bar [juri@kaplah juri]$

Cheers, Juri