From: Wodry Date: Sun, 22 Jul 2018 15:16:23 +0000 (-0700) Subject: doc: improve documentation of binary prefixes X-Git-Tag: v8.31~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46d6bd0c0a52929a606cf339e4cd933e3ce83e3a;p=thirdparty%2Fcoreutils.git doc: improve documentation of binary prefixes * doc/coreutils.texi (Common options): * src/dd.c, src/head.c, src/od.c, src/stdbuf.c, src/tail.c (usage): * src/system.h (emit_size_note): Mention binary prefixes (Bug#32242). Copyright-paperwork-exempt: Yes --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 10fd023d80..dc28996864 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -697,6 +697,8 @@ one of the following multiplicative suffixes: @samp{G} => 1024*1024*1024 (GibiBytes) @end example and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}. +Binary prefixes can be used, too: @samp{KiB}=@samp{K}, @samp{MiB}=@samp{M}, +and so on. @end macro @c FIXME: same as above, but no ``blocks'' line. @@ -712,6 +714,8 @@ one of the following multiplicative suffixes: @samp{G} => 1024*1024*1024 (GibiBytes) @end example and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}. +Binary prefixes can be used, too: @samp{KiB}=@samp{K}, @samp{MiB}=@samp{M}, +and so on. @end macro @cindex common options diff --git a/src/dd.c b/src/dd.c index 70bbbb19ef..6aeef520a4 100644 --- a/src/dd.c +++ b/src/dd.c @@ -592,8 +592,9 @@ Copy a file, converting and formatting according to the operands.\n\ fputs (_("\ \n\ N and BYTES may be followed by the following multiplicative suffixes:\n\ -c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M,\n\ -GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.\n\ +c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, xM=M,\n\ +GB=1000*1000*1000, G=1024*1024*1024, and so on for T, P, E, Z, Y.\n\ +Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\ \n\ Each CONV symbol may be:\n\ \n\ diff --git a/src/head.c b/src/head.c index e1611778fb..7e90b3c216 100644 --- a/src/head.c +++ b/src/head.c @@ -141,6 +141,7 @@ With more than one FILE, precede each with a header giving the file name.\n\ NUM may have a multiplier suffix:\n\ b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\ +Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\ "), stdout); emit_ancillary_info (PROGRAM_NAME); } diff --git a/src/od.c b/src/od.c index 1a4aedee7e..658f5c3f38 100644 --- a/src/od.c +++ b/src/od.c @@ -417,6 +417,7 @@ BYTES is hex with 0x or 0X prefix, and may have a multiplier suffix:\n\ MB 1000*1000\n\ M 1024*1024\n\ and so on for G, T, P, E, Z, Y.\n\ +Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\ "), stdout); emit_ancillary_info (PROGRAM_NAME); } diff --git a/src/stdbuf.c b/src/stdbuf.c index a212be3d02..efc4d38fda 100644 --- a/src/stdbuf.c +++ b/src/stdbuf.c @@ -111,6 +111,7 @@ If MODE is '0' the corresponding stream will be unbuffered.\n\ fputs (_("\n\ Otherwise MODE is a number which may be followed by one of the following:\n\ KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\ +Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\ In this case the corresponding stream will be fully buffered with the buffer\n\ size set to MODE bytes.\n\ "), stdout); diff --git a/src/system.h b/src/system.h index 4597d61aa7..f5231d5c4e 100644 --- a/src/system.h +++ b/src/system.h @@ -595,6 +595,7 @@ emit_size_note (void) fputs (_("\n\ The SIZE argument is an integer and optional unit (example: 10K is 10*1024).\n\ Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).\n\ +Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\ "), stdout); } diff --git a/src/tail.c b/src/tail.c index ac001d7c0a..7d361802c0 100644 --- a/src/tail.c +++ b/src/tail.c @@ -315,6 +315,7 @@ With more than one FILE, precede each with a header giving the file name.\n\ NUM may have a multiplier suffix:\n\ b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\ +Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\ \n\ "), stdout); fputs (_("\