From: Karel Zak Date: Mon, 24 Jan 2022 14:38:43 +0000 (+0100) Subject: docs: add man-common/in-bytes.adoc X-Git-Tag: v2.38-rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c989ad4748bc863989f86d6a4a7cc582294a2b1;p=thirdparty%2Futil-linux.git docs: add man-common/in-bytes.adoc This commit unifies and improves --bytes option. Fixes: https://github.com/util-linux/util-linux/issues/1572 Signed-off-by: Karel Zak --- diff --git a/disk-utils/partx.8.adoc b/disk-utils/partx.8.adoc index 3991c2d38d..dc0335ed94 100644 --- a/disk-utils/partx.8.adoc +++ b/disk-utils/partx.8.adoc @@ -43,7 +43,7 @@ This will see sda3 as a whole-disk rather than as a partition. Add the specified partitions, or read the disk and add all partitions. *-b*, *--bytes*:: -Print the SIZE column in bytes rather than in human-readable format. +include::man-common/in-bytes.adoc[] *-d*, *--delete*:: Delete the specified partitions or all partitions. It is not error to remove non-existing partitions, so this option is possible to use together with large *--nr* ranges without care about the current partitions set on the device. diff --git a/man-common/Makemodule.am b/man-common/Makemodule.am index 01edd0f5f4..f2d93b076a 100644 --- a/man-common/Makemodule.am +++ b/man-common/Makemodule.am @@ -3,5 +3,6 @@ ADOCFILES_COMMON += \ man-common/footer.adoc \ man-common/footer-config.adoc \ man-common/footer-lib.adoc \ + man-common/in-bytes.adoc \ man-common/manpage-stub.adoc \ man-common/translation.adoc diff --git a/man-common/in-bytes.adoc b/man-common/in-bytes.adoc new file mode 100644 index 0000000000..3a69c6e403 --- /dev/null +++ b/man-common/in-bytes.adoc @@ -0,0 +1,7 @@ +Print the sizes in bytes rather than in a human-readable format. ++ +By default, the unit, sizes are expressed in, is byte, and unit prefixes are in +power of 2^10 (1024). Abbreviations of symbols are exhibited truncated in order +to reach a better readability, by exhibiting alone the first letter of them; +examples: "1 KiB" and "1 MiB" are respectively exhibited as "1 K" and "1 M", +then omitting on purpose the mention "iB", which is part of these abbreviations. diff --git a/misc-utils/fincore.1.adoc b/misc-utils/fincore.1.adoc index c65267917e..b67f171eab 100644 --- a/misc-utils/fincore.1.adoc +++ b/misc-utils/fincore.1.adoc @@ -32,7 +32,7 @@ The default output is subject to change. So whenever possible, you should avoid Do not print a header line in status output. *-b*, *--bytes*:: -Print the SIZE column in bytes rather than in a human-readable format. +include::man-common/in-bytes.adoc[] *-o*, *--output* _list_:: Define output columns. See the *--help* output to get a list of the currently supported columns. The default list of columns may be extended if _list_ is specified in the format _{plus}list_. diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc index a831a703a9..de5409eb79 100644 --- a/misc-utils/findmnt.8.adoc +++ b/misc-utils/findmnt.8.adoc @@ -38,7 +38,7 @@ Disable all built-in filters and print all filesystems. Use ascii characters for tree formatting. *-b*, *--bytes*:: -Print the SIZE, USED and AVAIL columns in bytes rather than in a human-readable format. +include::man-common/in-bytes.adoc[] *-C*, *--nocanonicalize*:: Do not canonicalize paths at all. This option affects the comparing of paths and the evaluation of tags (LABEL, UUID, etc.). diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc index e8c62bbde4..63e96e7b7b 100644 --- a/misc-utils/lsblk.8.adoc +++ b/misc-utils/lsblk.8.adoc @@ -35,7 +35,7 @@ Don't print empty devices. Disable all built-in filters and list all empty devices and RAM disk devices too. *-b*, *--bytes*:: -Print the SIZE column in bytes rather than in a human-readable format. +include::man-common/in-bytes.adoc[] *-D*, *--discard*:: Print information about the discarding capabilities (TRIM, UNMAP) for each device. diff --git a/misc-utils/lslocks.8.adoc b/misc-utils/lslocks.8.adoc index f34f1989b8..f46a56f626 100644 --- a/misc-utils/lslocks.8.adoc +++ b/misc-utils/lslocks.8.adoc @@ -34,7 +34,7 @@ Note that lslocks also lists OFD (Open File Description) locks, these locks are == OPTIONS *-b*, *--bytes*:: -Print the SIZE column in bytes rather than in a human-readable format. +include::man-common/in-bytes.adoc[] *-i*, *--noinaccessible*:: Ignore lock files which are inaccessible for the current user. diff --git a/sys-utils/ipcs.1.adoc b/sys-utils/ipcs.1.adoc index 367f2ec087..eb19a91ceb 100644 --- a/sys-utils/ipcs.1.adoc +++ b/sys-utils/ipcs.1.adoc @@ -71,7 +71,8 @@ Show status summary. These affect only the *-l* (*--limits*) option. *-b*, *--bytes*:: -Print sizes in bytes. +include::man-common/in-bytes.adoc[] + *--human*:: Print sizes in human-readable format. diff --git a/sys-utils/lscpu.1.adoc b/sys-utils/lscpu.1.adoc index c2c13d39a1..1ab78f3efd 100644 --- a/sys-utils/lscpu.1.adoc +++ b/sys-utils/lscpu.1.adoc @@ -34,7 +34,7 @@ The cache sizes are reported as summary from all CPUs. The versions before v2.34 Include lines for online and offline CPUs in the output (default for *-e*). This option may only be specified together with option *-e* or *-p*. *-B*, *--bytes*:: -Print the sizes in bytes rather than in a human-readable format. +include::man-common/in-bytes.adoc[] *-b*, *--online*:: Limit the output to online CPUs (default for *-p*). This option may only be specified together with option *-e* or *-p*. diff --git a/sys-utils/lsmem.1.adoc b/sys-utils/lsmem.1.adoc index 5a97f40124..5d224c77aa 100644 --- a/sys-utils/lsmem.1.adoc +++ b/sys-utils/lsmem.1.adoc @@ -34,7 +34,7 @@ Use the *--help* option to see the columns description. List each individual memory block, instead of combining memory blocks with similar attributes. *-b*, *--bytes*:: -Print the SIZE column in bytes rather than in a human-readable format. +include::man-common/in-bytes.adoc[] *-h*, *--help*:: Display help text and exit.