[wellylug] File Sizes

David Antliff dave.antliff at paradise.net.nz
Wed Dec 29 18:36:40 NZDT 2004


On Wed, 29 Dec 2004, Donald Gordon wrote:
>> can't be a simple case of rounding, because 10.4 should be rounded down, not up
>
> And you're sure that the developer of du agrees with you?

Personally, if I'd written du, I would always round up, since it's better 
to overstate than understate file sizes in my opinion. Understating would 
lead to some serious head scratching (and exception handling) when the 
system tells you there's 1MB remaining but your 600kb file just won't fit. 
Apart from the fact that using du -h in a script is probably a bad idea 
anyway...

It's far easier for logic to deal with a system that always overstates. 
Sure, you might lose a bit of space, but it's only peanuts in the long 
run.

-- 
David.




More information about the wellylug mailing list