[X-Unix] re: quotas - My math stinks!
Doug McNutt
douglist at macnauchtan.com
Thu Jan 8 14:40:33 PST 2009
At 15:11 -0600 1/8/09, Charles Howse wrote:
>When I run: quota in terminal, it reports the user is using 1042048
>(1k blocks) which should be 1.042048 GB
>
>But...when I run: du -h on the users home folder, it reports 2.2GB in use.
It's not your math.
Metric prefixes in the private world of computer "science" are
frustratingly estranged from the definitions that were adopted in the
last quarter of the 19th century. All real sciences think the way you
do, in decimal blocks of three digits.
You have to guess what programmers mean. When memory is involved,
except in disk capacity, its pretty much always:
k means 2^10 = 1024
M means 2^20
G means 2^30
But if you want a million kB it's generally impossible to get it
right, meaning get it the way a particular programmer was taught.
It's like expecting a baker's dozen donuts.
http://en.wikipedia.org/wiki/Binary_prefix
http://www.physics.nist.gov/cuu/Units/prefixes.html
<http://www.physics.nist.gov/cuu/Units/binary.html> defines ki, Mi, and Gi
--
--> Marriage and kilo are troubled words. Turmoil results when
centuries-old usage is altered in specialized jargon <--.
More information about the X-Unix
mailing list