Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2009 11:31:15 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Alexander Best <alexbestms@math.uni-muenster.de>
Cc:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, Julian Elischer <julian@elischer.org>, freebsd-hackers@freebsd.org
Subject:   Re: small usr.bin/find patch
Message-ID:  <4A420073.6060405@infracaninophile.co.uk>
In-Reply-To: <permail-20090624094151f0889e8400007f8d-a_best01@message-id.uni-muenster.de>
References:  <permail-20090624094151f0889e8400007f8d-a_best01@message-id.uni-muenster.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig2E256E8A5CC0367E058D39F3
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Alexander Best wrote:
> hmmm...but dd e.g. uses lowercase instead of upercase letters to indica=
te
> kilobyte, megabyte and so on. isn't there some unix/posix/whatever stan=
dard
> telling app developers what to use?

Sure. The standard for scale-prefixes is defined by the Systeme
Internationale as part of the definition of SI units:

  http://www.npl.co.uk/reference/measurement-units/si-prefixes/

Note that these are strictly powers-of-10^3 multipliers, and explicitly
not the computing style powers-of-2^10 commonly used for file sizes or
hard drive capacities, which should instead use the somewhat clunky Ki,
Mi, Gi etc. forms:

  http://physics.nist.gov/cuu/Units/binary.html

These binary prefixes are mandated by the IEC and approved by the IEEE
amongst others.

Not that many people use the binary prefixes appropriately, relying on
context to disambiguate 1 MB =3D 1024 KB =3D 1,048,576 Bytes etc.  Except=

that (confusingly) as a measure of network bandwidth 10 Mb/s always was
10,000,000 b/s and never 10,485,760 b/s; a fact that has caught me out
more than a few times.

Making find(1) / dd(1) / etc. operate pedantically correctly with these
scale-factor symbols would cause a certain degree of pain for little
practical gain.  Unless there was a broad consensus amongst all Unixoid
OS providers, I can't see that change ever happening.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       Flat 3
                                                      7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW, UK


--------------enig2E256E8A5CC0367E058D39F3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpCAHkACgkQ3jDkPpsZ+Vbk2QCfTy+bY7J+xLQqPLPuS13EyGqJ
U/0AnicsyrN5dYfq6XqtKJJWpYOJWmmt
=0BN+
-----END PGP SIGNATURE-----

--------------enig2E256E8A5CC0367E058D39F3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A420073.6060405>