Shred unused space

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Shred unused space

Post by ayu »

This is a neat little trick that I am testing at the moment to shred unused space on Linux.
The intention of it is to make sure that files you have deleted stay deleted, at least when it comes to software methods of recovering them. Now, I'm not sure what effect a journaled file system will have here, but if the changes have been committed to the system, then it shouldn't be a problem.


just create a file named for example "wipe.sh"

and insert these lines

Code: Select all

echo "Wiping"
dd if=/dev/urandom of=file.tmp
rm file.tmp
echo "Done"
The script will use dd to write random data to a file until the partition is full, it will then stop and remove the file. Recovering data from a disk that has been overwritten once is hard enough so there is no real use in overwriting it more. And if FBI wants your data then the only real way to keep it safe is to blow if up.
"The best place to hide a tree, is in a forest"

User avatar
IceDane
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 197
Joined: 12 Aug 2009, 16:00
14

Post by IceDane »

A more efficient solution to solve the same security problem would be total disk encryption, but I guess this works as well, although you'd probably want to do a few runs to be sure.

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

IceDane wrote:A more efficient solution to solve the same security problem would be total disk encryption, but I guess this works as well, although you'd probably want to do a few runs to be sure.
Yeah I'm using encryption on most of my discs, but on those that I don't then this works as a backup plan ^^

For those who want to read more about this, then this is a good read on Wikipedia

Code: Select all

http://en.wikipedia.org/wiki/Data_remanence#Overwriting
"The best place to hide a tree, is in a forest"

Post Reply