1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2 .TH SHRED "1" "March 2007" "GNU coreutils 6.9" "User Commands"
4 shred \- overwrite a file to hide its contents, and optionally delete it
7 [\fIOPTIONS\fR] \fIFILE \fR[...]
9 .\" Add any additional description here
11 Overwrite the specified FILE(s) repeatedly, in order to make it harder
12 for even very expensive hardware probing to recover the data.
14 Mandatory arguments to long options are mandatory for short options too.
16 \fB\-f\fR, \fB\-\-force\fR
17 change permissions to allow writing if necessary
19 \fB\-n\fR, \fB\-\-iterations\fR=\fIN\fR
20 Overwrite N times instead of the default (25)
22 \fB\-\-random\-source\fR=\fIFILE\fR
23 get random bytes from FILE (default /dev/urandom)
25 \fB\-s\fR, \fB\-\-size\fR=\fIN\fR
26 shred this many bytes (suffixes like K, M, G accepted)
28 \fB\-u\fR, \fB\-\-remove\fR
29 truncate and remove file after overwriting
31 \fB\-v\fR, \fB\-\-verbose\fR
34 \fB\-x\fR, \fB\-\-exact\fR
35 do not round file sizes up to the next full block;
37 this is the default for non\-regular files
39 \fB\-z\fR, \fB\-\-zero\fR
40 add a final overwrite with zeros to hide shredding
43 display this help and exit
46 output version information and exit
48 If FILE is \-, shred standard output.
50 Delete FILE(s) if \fB\-\-remove\fR (\fB\-u\fR) is specified. The default is not to remove
51 the files because it is common to operate on device files like /dev/hda,
52 and those files usually should not be removed. When operating on regular
53 files, most people use the \fB\-\-remove\fR option.
55 CAUTION: Note that shred relies on a very important assumption:
56 that the file system overwrites data in place. This is the traditional
57 way to do things, but many modern file system designs do not satisfy this
58 assumption. The following are examples of file systems on which shred is
59 not effective, or is not guaranteed to be effective in all file system modes:
61 * log\-structured or journaled file systems, such as those supplied with
62 AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)
64 * file systems that write redundant data and carry on even if some writes
65 fail, such as RAID\-based file systems
67 * file systems that make snapshots, such as Network Appliance's NFS server
69 * file systems that cache in temporary locations, such as NFS
72 * compressed file systems
74 In the case of ext3 file systems, the above disclaimer applies
75 (and shred is thus of limited effectiveness) only in data=journal mode,
76 which journals file data in addition to just metadata. In both the
77 data=ordered (default) and data=writeback modes, shred works as usual.
78 Ext3 journaling modes can be changed by adding the data=something option
79 to the mount options for a particular file system in the /etc/fstab file,
80 as documented in the mount man page (man mount).
82 In addition, file system backups and remote mirrors may contain copies
83 of the file that cannot be removed, and that will allow a shredded file
84 to be recovered later.
86 Written by Colin Plumb.
88 Report bugs to <bug\-coreutils@gnu.org>.
90 Copyright \(co 2007 Free Software Foundation, Inc.
92 This is free software. You may redistribute copies of it under the terms of
93 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
94 There is NO WARRANTY, to the extent permitted by law.
96 The full documentation for
98 is maintained as a Texinfo manual. If the
102 programs are properly installed at your site, the command
106 should give you access to the complete manual.