Hi,

a thread on freebsd-stable@ [1] 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
difficult.

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
change itself.

Thoughts?

[1] http://lists.freebsd.org/pipermail/f...er/045698.html

--
/"\ Best regards, | mlaier@freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/lis...reebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"