1srm(1) srm(1)
2
3
4
6 srm - securely remove files or directories
7
9 srm [OPTION]... FILE...
10
12 srm removes each specified file by overwriting, renaming, and truncat‐
13 ing it before unlinking. This prevents other people from undeleting or
14 recovering any information about the file from the command line. By
15 default srm uses the simple mode to overwrite the file's contents. You
16 can choose a different overwrite mode with --dod, --doe, --openbsd,
17 --rcmp, --gutmann. If you specify more than one mode option, the last
18 option is used.
19
20 You can use srm to overwrite block devices. The device node is not
21 removed after overwriting. This feature is available on Linux. Files
22 with multiple hard links will be unlinked but not overwritten.
23
24 srm, like every program that uses the getopt function to parse its
25 arguments, lets you use the -- option to indicate that all following
26 arguments are non-options. To remove a file called `-f' in the current
27 directory, you could type either
28 rm -- -f
29 or
30 rm ./-f
31
33 -d, --directory
34 ignored (for compatibility with rm(1))
35
36 -f, --force
37 ignore nonexistent files, never prompt
38
39 -i, --interactive
40 prompt before any removal
41
42 -r, -R, --recursive
43 remove the contents of directories recursively
44
45 -x, --one-file-system
46 when removing a hierarchy recursively, skip any directory that
47 is on a file system different from that of the corresponding
48 command line argument. (Not supported on Windows)
49
50 -s, --simple
51 Overwrite the file with a single pass of 0x00 bytes. This is
52 the default mode.
53
54 -P, --openbsd
55 OpenBSD compatible rm. Files are overwritten three times, first
56 with the byte 0xFF, then 0x00, and then 0xFF again, before they
57 are deleted.
58
59 -D, --dod
60 US Dod compliant 7-pass overwrite.
61
62 -E, --doe
63 US DoE compliant 3-pass overwrite. Twice with a random pattern,
64 finally with the bytes "DoE". See
65 http://cio.energy.gov/CS-11_Clearing_and_Media_Sanitiza‐
66 tion_Guidance.pdf for details.
67
68 -G, --gutmann
69 Use the 35-pass Gutmann method. See
70 http://en.wikipedia.org/wiki/Gutmann_method for details.
71
72 -C, --rcmp
73 Royal Canadian Mounted Police compliant 3-pass overwrite. First
74 pass writes 0x00 bytes. Second pass writes 0xFF bytes. Third
75 pass writes "RCMP". See https://www.cse-
76 cst.gc.ca/en/node/270/html/10572 for details.
77
78 -v, --verbose
79 explain what is being done. Specify this option multiple times
80 to increase verbosity.
81
82 -h, --help
83 display this help and exit.
84
85 -V, --version
86 output version information and exit.
87
89 SIGINFO, SIGUSR2
90 show current write position and filename handled.
91
93 srm can write to block devices on Linux. You can use srm to securely
94 delete an entire hard disk, however you should only do this for classic
95 magnetic drives. The modern solid state disks (SSD) have a faster and
96 better way to erase all contents, Secure Erase. For a Linux operating
97 system see https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase
98
100 srm can not remove write protected files owned by another user, regard‐
101 less of the permissions on the directory containing the file.
102
103 Development and discussion of srm is carried out at https://source‐
104 forge.net/projects/srm/ which is also accessible via http://srm.source‐
105 forge.net/. See http://en.wikipedia.org/wiki/Data_remanence for a gen‐
106 eral discussion about overwriting data.
107
109 rm(1) http://www.gnu.org/software/coreutils/manual/core‐
110 utils.html#rm-invocation
111
112 shred(1)
113 http://www.gnu.org/software/coreutils/manual/core‐
114 utils.html#shred-invocation
115
116 wipe(1)
117 http://lambda-diode.com/software/wipe
118
119 secure-delete
120 http://packages.debian.org/lenny/secure-delete
121
122 scrub(1)
123 http://code.google.com/p/diskscrub/
124
125
126
127Matt Gauthier, Dirk Jagdmann 1.2.15 srm(1)