1SHRED(1) User Commands SHRED(1)
2
3
4
6 shred - overwrite a file to hide its contents, and optionally delete it
7
9 shred [OPTION]... FILE...
10
12 Overwrite the specified FILE(s) repeatedly, in order to make it harder
13 for even very expensive hardware probing to recover the data.
14
15 Mandatory arguments to long options are mandatory for short options
16 too.
17
18 -f, --force
19 change permissions to allow writing if necessary
20
21 -n, --iterations=N
22 overwrite N times instead of the default (3)
23
24 --random-source=FILE
25 get random bytes from FILE
26
27 -s, --size=N
28 shred this many bytes (suffixes like K, M, G accepted)
29
30 -u, --remove
31 truncate and remove file after overwriting
32
33 -v, --verbose
34 show progress
35
36 -x, --exact
37 do not round file sizes up to the next full block;
38
39 this is the default for non-regular files
40
41 -z, --zero
42 add a final overwrite with zeros to hide shredding
43
44 --help display this help and exit
45
46 --version
47 output version information and exit
48
49 If FILE is -, shred standard output.
50
51 Delete FILE(s) if --remove (-u) is specified. The default is not to
52 remove the files because it is common to operate on device files like
53 /dev/hda, and those files usually should not be removed. When operat‐
54 ing on regular files, most people use the --remove option.
55
56 CAUTION: Note that shred relies on a very important assumption: that
57 the file system overwrites data in place. This is the traditional way
58 to do things, but many modern file system designs do not satisfy this
59 assumption. The following are examples of file systems on which shred
60 is not effective, or is not guaranteed to be effective in all file sys‐
61 tem modes:
62
63 * log-structured or journaled file systems, such as those supplied with
64 AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)
65
66 * file systems that write redundant data and carry on even if some
67 writes fail, such as RAID-based file systems
68
69 * file systems that make snapshots, such as Network Appliance's NFS
70 server
71
72 * file systems that cache in temporary locations, such as NFS version 3
73 clients
74
75 * compressed file systems
76
77 In the case of ext3 file systems, the above disclaimer applies (and
78 shred is thus of limited effectiveness) only in data=journal mode,
79 which journals file data in addition to just metadata. In both the
80 data=ordered (default) and data=writeback modes, shred works as usual.
81 Ext3 journaling modes can be changed by adding the data=something
82 option to the mount options for a particular file system in the
83 /etc/fstab file, as documented in the mount man page (man mount).
84
85 In addition, file system backups and remote mirrors may contain copies
86 of the file that cannot be removed, and that will allow a shredded file
87 to be recovered later.
88
90 Written by Colin Plumb.
91
93 Report shred bugs to bug-coreutils@gnu.org
94 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
95 General help using GNU software: <http://www.gnu.org/gethelp/>
96 Report shred translation bugs to <http://translationproject.org/team/>
97
99 Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
100 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
101 This is free software: you are free to change and redistribute it.
102 There is NO WARRANTY, to the extent permitted by law.
103
105 The full documentation for shred is maintained as a Texinfo manual. If
106 the info and shred programs are properly installed at your site, the
107 command
108
109 info coreutils 'shred invocation'
110
111 should give you access to the complete manual.
112
113
114
115GNU coreutils 8.5 November 2010 SHRED(1)