summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-12-31 11:43:09 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-12-31 11:49:55 -0800
commit8f9bf300174afa9b29027542ec59892f610c08e4 (patch)
tree349c787e6aec9ae9dc1447936897da5e44320683 /doc
parent26323928d9b045c29c02028bf30823ead0b0be75 (diff)
downloadcoreutils-8f9bf300174afa9b29027542ec59892f610c08e4.tar.xz
dd: summarize in --human-readable format too
Problem reported by Linda Walsh in: http://bugs.gnu.org/17505 * NEWS: Document this. * doc/coreutils.texi (dd invocation): Use a simpler script. Adjust output example to match new behavior. * src/dd.c (human_size): Remove. All uses changed to use human_readable and ... (human_opts): ... this new constant. (abbreviation_lacks_prefix): New function. (print_xfer_stats): Use it. Output both --si and --human-readable summaries, but only if they have prefixes. * tests/dd/reblock.sh, tests/dd/stats.sh: Test new behavior.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi22
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 64419c769..8eb2a3e1e 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8835,23 +8835,23 @@ trap '' USR1
# which can be triggered by reception of signals.
dd iflag=fullblock if=/dev/zero of=/dev/null count=5000000 bs=1000 & pid=$!
-# Output stats every half second
-until ! kill -s USR1 $pid 2>/dev/null; do sleep .5; done
+# Output stats every second.
+while kill -s USR1 $pid 2>/dev/null; do sleep 1; done
@end example
-The above script will output in the following format
+The above script will output in the following format:
@example
-859+0 records in
-859+0 records out
-4295000000 bytes (4.3 GB) copied, 0.539934 s, 8.0 GB/s
-1000+0 records in
-1000+0 records out
-5000000000 bytes (5.0 GB) copied, 0.630785 s, 7.9 GB/s
+3441325+0 records in
+3441325+0 records out
+3441325000 bytes (3.4 GB, 3.2 GiB) copied, 1.00036 s, 3.4 GB/s
+5000000+0 records in
+5000000+0 records out
+5000000000 bytes (5.0 GB, 4.7 GiB) copied, 1.44433 s, 3.5 GB/s
@end example
-Note also the @samp{status=progress} option which periodically updates
-the last line of the transfer statistics above.
+The @samp{status=progress} option periodically updates the last line
+of the transfer statistics above.
@vindex POSIXLY_CORRECT
On systems lacking the @samp{INFO} signal @command{dd} responds to the