summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-11-11 23:21:13 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-11-11 23:21:50 -0800
commit448718c123838891500afa7fbda06335e7258592 (patch)
tree8c0bb1d206db461f72cd4a192e0a439d980466c9 /doc/coreutils.texi
parent1d9fe527a0ff85ca757a74338c5f1b523473b377 (diff)
downloadcoreutils-448718c123838891500afa7fbda06335e7258592.tar.xz
ls: -k no longer affects -l's file sizes
This fixes an incompatibility with POSIX 2008 and with BSD. Problem reported by Abdallah Clark (Bug#9939) via Alan Curry (Bug#10016). * NEWS: Document this. * doc/coreutils.texi (General output formatting): Document the new -k behavior, and --kibibytes. * src/ls.c (file_human_output_opts): New static var. (long_options, usage): Add --kibibytes. (decode_switches, gobble_file, print_long_format): Implement the new -k behavior. * tests/ls/block-size: New file. * tests/Makefile.am (TESTS): Add it.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi15
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 2c33fe8b5..453144046 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7127,10 +7127,19 @@ Append @samp{*} for executable regular files, otherwise behave as for
@end table
@item -k
+@itemx --kibibytes
@opindex -k
-Print file sizes in 1024-byte blocks, overriding the default block
-size (@pxref{Block size}).
-This option is equivalent to @option{--block-size=1K}.
+@opindex --kibibytes
+Set the default block size to its normal value of 1024 bytes,
+overriding any contrary specification in environment variables
+(@pxref{Block size}). This option is in turn overridden by the
+@option{--block-size}, @option{-h} or @option{--human-readable}, and
+@option{--si} options.
+
+The @option{-k} or @option{--kibibytes} option affects the
+per-directory block count written by the @option{-l} and similar
+options, and the size written by the @option{-s} or @option{--size}
+option. It does not affect the file size written by @option{-l}.
@item -m
@itemx --format=commas