]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
docs: add man-common/in-bytes.adoc
authorKarel Zak <kzak@redhat.com>
Mon, 24 Jan 2022 14:38:43 +0000 (15:38 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 24 Jan 2022 14:38:43 +0000 (15:38 +0100)
This commit unifies and improves --bytes option.

Fixes: https://github.com/util-linux/util-linux/issues/1572
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/partx.8.adoc
man-common/Makemodule.am
man-common/in-bytes.adoc [new file with mode: 0644]
misc-utils/fincore.1.adoc
misc-utils/findmnt.8.adoc
misc-utils/lsblk.8.adoc
misc-utils/lslocks.8.adoc
sys-utils/ipcs.1.adoc
sys-utils/lscpu.1.adoc
sys-utils/lsmem.1.adoc

index 3991c2d38d05b5656ba4c22afc26e84768a48825..dc0335ed945c38b10a07c9666f9adf249af0b4ca 100644 (file)
@@ -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.
index 01edd0f5f450f7a91e3e069e8056a332ce9bb39a..f2d93b076a96ed21af04afc2f73d019cc58e7bfc 100644 (file)
@@ -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 (file)
index 0000000..3a69c6e
--- /dev/null
@@ -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.
index c65267917e1d7959c943a0197ab7db073ff1f1f5..b67f171eab3a780a80fbcd88e36e086066f09a73 100644 (file)
@@ -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_.
index a831a703a93a80398e20a04554520f23fc40726f..de5409eb79d46e7d608b29da60fae66e567f4d55 100644 (file)
@@ -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.).
index e8c62bbde4869c7ec8d019c86fd8c8664d77559a..63e96e7b7b4ecfe7a040846211be8b43f5a41c54 100644 (file)
@@ -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.
index f34f1989b8f83ec8f39f2c3082049aa2220ca42d..f46a56f6269b25a4419f1356f62b5689aadbb9ee 100644 (file)
@@ -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.
index 367f2ec087e21d49e18d2d9a4817aa826fe892a9..eb19a91ceb3015506e3fe1cbb2a5cabc69af8801 100644 (file)
@@ -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.
index c2c13d39a1781befaaff10cfc555834af46c4724..1ab78f3efd532c5d0008efc2fee61c095dc744c7 100644 (file)
@@ -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*.
index 5a97f40124329f6e3ffed5b39a35a7c474c5f3fe..5d224c77aaf5e9a182d825df319bcaf8b5b68168 100644 (file)
@@ -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.