• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file size and creation date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file size and creation date


  • Subject: Re: file size and creation date
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 12 Mar 2002 16:04:57 -0800

On Tuesday, March 12, 2002, at 12:58 PM, Doug McNutt wrote:

At 22:46 +1300 3/12/02, Andy Wylie wrote:
repeat until |size| < 1024
set {|size| ,cnt} to {|size| / 1024, cnt + 1}
end repeat

Is that right?

When the MacOS reports a file size in (kilo)bytes or (mega)bytes is it using 1024 and 1024^2 for the abbreviations "K" and "M"? The metric standard as promulgated by www.nist.gov says "k" means 1000(10) and "M" means 1,000,000(10). Little "m" means 0.001(10).

When the Finder reports file sizes in KB or MB, it's using the computer-y definitions of K and M, that is, 2^10 and 2^20. (And of course G means 2^30.) Yes, this contradicts the NIST and the IEC, and yes, I know about kebibytes, mebibytes, and gibibytes, but I have yet to meet anyone who doesn't roll their eyes at their mention, let alone actually use them. I blame the disk manufacturers for the whole mess. It's not really fair, but it makes me feel better.

In some computer circles capital "K" seems to mean 1024(10) rather than its NIST meaning of degrees Kelvin (a unit of absolute temperature). Little "k", the NIST standard, never means that.

Yes, well, that's just perverse, but it's also common practice. Personally, I suspect it has to do with computers lacking lower-case letters in the past.

Capital M when it refers to disk size is pretty much always 1,000,000(10) because that makes the number look bigger in the eyes of an advertising agency in the employ of disk manufacturers. Surely a GB is always 10^9 bytes for that reason.

Only when you're reading the spec sheet from the manufacturer. The Finder reports the capacity in terms of the 2-power prefixes -- mebibytes or gibibytes to the fussy.

For official documentation on the matter and some historical perspective, see <http://physics.nist.gov/cuu/Units/binary.html>. They don't seem to have anything to say on the "B" vs. "b" thing, but their table uses "B" to mean byte and "bit" to mean bit.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: file size and creation date (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: script object properties: seeking confirmation
  • Next by Date: two great little scripts.....
  • Previous by thread: Re: file size and creation date
  • Next by thread: Re: file size and creation date
  • Index(es):
    • Date
    • Thread