summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-04-04 13:35:56 +0100
committerPádraig Brady <P@draigBrady.com>2014-04-05 01:56:07 +0100
commitb85eb8d6835e7665bf6151db070261b123c22f95 (patch)
tree1d0fc5d1ed45ab2f5bcc115c11e00258e5c20e1f /doc/coreutils.texi
parent217618e8bf10a09270291b9825f3181ed2f83dbf (diff)
downloadcoreutils-b85eb8d6835e7665bf6151db070261b123c22f95.tar.xz
shred: overwrite inode storage used by some file systems
* doc/coreutils.texi (shred invocation): Mention some reasons why clearing slack space might be useful. * src/shred.c (do_wipefd): Add initial writes for each pass for small regular files in case the storage for those is in the inode, and thus a larger write up to a block size would bypass that. Move the direct I/O control to... (dopass): ... here so we can avoid enabling it for these small initial writes. It's better to retry direct I/O for each pass anyway to handle the case where direct I/O is disabled for only the last portion of a file when the size is not a multiple of the block size. Note we don't avoid the sync for the initial write as it will be small but more importantly could be on a different part of the disk and so worth doing independently to ensure the write is not discarded. * tests/misc/shred-exact.sh: Check some more direct I/O cases. * NEWS: Mention the improvements. The inode storage issue was mentioned by Paul Eggert.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 75875d88c..6c49385e1 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -9634,8 +9634,9 @@ Display to standard error all status updates as sterilization proceeds.
@opindex -x
@opindex --exact
By default, @command{shred} rounds the size of a regular file up to the next
-multiple of the file system block size to fully erase the last block
-of the file.
+multiple of the file system block size to fully erase the slack space in
+the last block of the file. This space may contain portions of the current
+system memory on some systems for example.
Use @option{--exact} to suppress that behavior.
Thus, by default if you shred a 10-byte regular file on a system with 512-byte
blocks, the resulting file will be 512 bytes long. With this option,