Ben Pfaff wrote:
Russ Allbery <rra@debian.org> writes:Ben Finney <ben+debian@benfinney.id.au> writes:Does du guarantee to do one of those?If you're going that far, please perform one of the following: s/rounded/fractions rounded up/ s/rounded/fractions rounded down/ s/rounded/fractions rounded to the nearest whole number/ to disambiguate the calculation.The specification at http://www.opengroup.org/onlinepubs/009695399/utilities/du.html says: By default, file sizes shall be written in 512-byte units, rounded up to the next 512-byte unit.
But this is an other case, and pretty historical. du indicate the disk usage in block. A file of one byte uses one entire block (but on few filesystems), thus to calculating the quota of a user, one needs the block count and not the sum of the file sizes. Anyway I agree that rounded up is safer. But I still not sure that it is correct. I would change: "It gives the total amount of disk space required to install the named package." to "It gives an indicative amount of disk space required to install the named package." because the field cannot give the real required disk space: - (we really round up the size of every file?) - On linux kernel the block size could be up to 4096 bytes (and it is filesystem dependent, thus unknown on packing time) - we install also directories (the disk space depends heavily on filesystems). thus I would prefer a *indicative amount* and maybe in a foot note the reason because we cannot put the real disk space. As alternative we indicate only the sum of file sizes, removing the "disk space required". ciao cate