<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Securely_delete_files_with_shred</id>
	<title>Securely delete files with shred - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Securely_delete_files_with_shred"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Securely_delete_files_with_shred&amp;action=history"/>
	<updated>2026-05-18T23:15:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Securely_delete_files_with_shred&amp;diff=4059&amp;oldid=prev</id>
		<title>PeterHarding at 21:03, 30 October 2013</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Securely_delete_files_with_shred&amp;diff=4059&amp;oldid=prev"/>
		<updated>2013-10-30T21:03:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:03, 31 October 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l112&quot;&gt;Line 112:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 112:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Technet]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Technet]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Whitepages&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Whitepapers&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Securely_delete_files_with_shred&amp;diff=1938&amp;oldid=prev</id>
		<title>PeterHarding: New page: &lt;i&gt;by Vincent Danen, TechRepublic&lt;/i&gt;   There are two utilities on a typical Linux box that can be used to delete files. Most users are familiar with the rm command. Most of the time, this...</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Securely_delete_files_with_shred&amp;diff=1938&amp;oldid=prev"/>
		<updated>2008-04-25T05:05:00Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;i&amp;gt;by Vincent Danen, TechRepublic&amp;lt;/i&amp;gt;   There are two utilities on a typical Linux box that can be used to delete files. Most users are familiar with the rm command. Most of the time, this...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;i&amp;gt;by Vincent Danen, TechRepublic&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two utilities on a typical Linux box that can be used to delete&lt;br /&gt;
files. Most users are familiar with the rm command. Most of the time, this&lt;br /&gt;
command is sufficient for routine deletion, but for files that contain&lt;br /&gt;
sensitive data, you might need to scrub them so that they cannot be&lt;br /&gt;
recovered later with other data retrieval tools.&lt;br /&gt;
&lt;br /&gt;
To delete files with sensitive content, rm is not sufficient. Instead,&lt;br /&gt;
consider using the shred command, which not only deletes a file, but&lt;br /&gt;
deletes it in such a way that it cannot be recovered. Shred overwrites the&lt;br /&gt;
file multiple times with garbage prior to deleting it, ensuring that if&lt;br /&gt;
anything does get retrieved, it isn&amp;#039;t your top-secret data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For instance:&lt;br /&gt;
&lt;br /&gt;
$ echo &amp;quot;this is private data&amp;quot; &amp;gt;private.txt&lt;br /&gt;
&lt;br /&gt;
$ cat private.txt&lt;br /&gt;
&lt;br /&gt;
this is private data&lt;br /&gt;
&lt;br /&gt;
$ ls -l private.txt&lt;br /&gt;
&lt;br /&gt;
-rw-r -- r-- 1 vdanen vdanen 21 Mar 4 09:36 private.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To illustrate how shred works, call it without any command-line options so&lt;br /&gt;
that the garbage in the file can be viewed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ shred private.txt&lt;br /&gt;
&lt;br /&gt;
$ cat private.txt&lt;br /&gt;
&lt;br /&gt;
?9?-?w?K?=???l;b8SÃ†â€°?b???????@,?18!??DM??P?&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
$ ls -l private.txt&lt;br /&gt;
&lt;br /&gt;
-rw-r -- r-- 1 vdanen vdanen 4096 Mar 4 09:36 private.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest of the output is removed as it is binary gibberish. You can also&lt;br /&gt;
see the file size has changed.&lt;br /&gt;
&lt;br /&gt;
To delete the file after overwriting it with garbage, use the -u option.&lt;br /&gt;
To see what shred is actually doing, give it the verbose -v option:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ shred -u -v private.txt&lt;br /&gt;
&lt;br /&gt;
shred: private.txt: pass 1/25 (random)...&lt;br /&gt;
shred: private.txt: pass 2/25 (cccccc)...&lt;br /&gt;
shred: private.txt: pass 3/25 (111111)...&lt;br /&gt;
shred: private.txt: pass 4/25 (000000)...&lt;br /&gt;
shred: private.txt: pass 5/25 (999999)...&lt;br /&gt;
shred: private.txt: pass 6/25 (aaaaaa)...&lt;br /&gt;
shred: private.txt: pass 7/25 (924924)...&lt;br /&gt;
shred: private.txt: pass 8/25 (b6db6d)...&lt;br /&gt;
shred: private.txt: pass 9/25 (6db6db)...&lt;br /&gt;
shred: private.txt: pass 10/25 (888888)...&lt;br /&gt;
shred: private.txt: pass 11/25 (492492)...&lt;br /&gt;
shred: private.txt: pass 12/25 (db6db6)...&lt;br /&gt;
shred: private.txt: pass 13/25 (random)...&lt;br /&gt;
shred: private.txt: pass 14/25 (ffffff)...&lt;br /&gt;
shred: private.txt: pass 15/25 (bbbbbb)...&lt;br /&gt;
shred: private.txt: pass 16/25 (777777)...&lt;br /&gt;
shred: private.txt: pass 17/25 (444444)...&lt;br /&gt;
shred: private.txt: pass 18/25 (dddddd)...&lt;br /&gt;
shred: private.txt: pass 19/25 (333333)...&lt;br /&gt;
shred: private.txt: pass 20/25 (555555)...&lt;br /&gt;
shred: private.txt: pass 21/25 (222222)...&lt;br /&gt;
shred: private.txt: pass 22/25 (eeeeee)...&lt;br /&gt;
shred: private.txt: pass 23/25 (666666)...&lt;br /&gt;
shred: private.txt: pass 24/25 (249249)...&lt;br /&gt;
shred: private.txt: pass 25/25 (random)...&lt;br /&gt;
shred: private.txt: removing&lt;br /&gt;
shred: private.txt: renamed to 00000000000&lt;br /&gt;
shred: 00000000000: renamed to 0000000000&lt;br /&gt;
shred: 0000000000: renamed to 000000000&lt;br /&gt;
shred: 000000000: renamed to 00000000&lt;br /&gt;
shred: 00000000: renamed to 0000000&lt;br /&gt;
shred: 0000000: renamed to 000000&lt;br /&gt;
shred: 000000: renamed to 00000&lt;br /&gt;
shred: 00000: renamed to 0000&lt;br /&gt;
shred: 0000: renamed to 000&lt;br /&gt;
shred: 000: renamed to 00&lt;br /&gt;
shred: 00: renamed to 0&lt;br /&gt;
shred: private.txt: removed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, shred overwrites the file 25 times with garbage. After&lt;br /&gt;
this, it renames the file 11 times before deleting it.&lt;br /&gt;
&lt;br /&gt;
Shred can also be used to overwrite entire disks instead of just files. If&lt;br /&gt;
you wished to overwrite the contents of an entire hard drive, a process&lt;br /&gt;
which would definitely take a fair amount of time, use:&lt;br /&gt;
&lt;br /&gt;
# shred -u -n 30 /dev/hda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will overwrite the data on the drive with garbage using 30 passes.&lt;br /&gt;
The drive will need to be re-formatted after this as even the filesystem&lt;br /&gt;
structure will be destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technet]]&lt;br /&gt;
[[Category:Whitepages]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>