doc: show how to shred more efficiently
authorJim Meyering <meyering@redhat.com>
Mon, 17 Jan 2011 10:32:35 +0000 (11:32 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 17 Jan 2011 18:16:43 +0000 (19:16 +0100)
* doc/coreutils.texi (shred invocation): Give an example showing how
to invoke shred in single-pass mode, and warn that -n0 --zero may
be inadequate.

doc/coreutils.texi

index 9c3e2ed..8a1b3b6 100644 (file)
@@ -8892,6 +8892,20 @@ your hard disk, you could give a command like this:
 shred --verbose /dev/sda5
 @end example
 
+On modern disks, a single pass should be adequate,
+and it will take one third the time of the default three-pass approach.
+
+@example
+# 1 pass, write pseudo-random data; 3x faster than the default
+shred --verbose -n1 /dev/sda5
+@end example
+
+To be on the safe side, use at least one pass that overwrites using
+pseudo-random data.  I.e., don't be tempted to use @samp{-n0 --zero},
+in case some disk controller optimizes the process of writing blocks
+of all zeros, and thereby does not clear all bytes in a block.
+Some SSDs may do just that.
+
 A @var{file} of @samp{-} denotes standard output.
 The intended use of this is to shred a removed temporary file.
 For example: