du -A / -B options [Re: zfs quota question]
a thread on freebsd-stable@  about problems with du(1) and compressed zfs
filesystems got me looking for a possible solution. Attached is a diff for
du(1) that adds two new options:
-A to display the apparent size of the file instead of the used blocks.
-B bsize to specify a custom blocksize. In particular one <512byte
The GNU du(1) has --apparent-size for -A, but we don't like long options.
That's not to say that it couldn't be added for script compat. -B is probably
not that interesting, but it can be helpful and came for free.
Any objections against the general concept? It's rather complicated to get
the apparent size of a directory hierarchy without scripting. I often wonder
if some hierarchy will fit on a CD/DVD and compressed zfs makes this really
As for the code, I know that there are a couple of style(9) errors in there -
mostly because the lines already exceeded 80 chars before my changes and I
plan to clean that up before I commit - should there be enough support for the
/"\ Best regards, | [email]email@example.com[/email]
\ / Max Laier | ICQ #67774661
X [url]http://pf4freebsd.love2party.net/[/url] | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
[email]firstname.lastname@example.org[/email] mailing list
To unsubscribe, send any mail to "email@example.com"