Revision of Wipe Out Files and Partitions from Sun, 08/10/2014 - 23:10

The revisions let you track differences between multiple versions of a post.

Why do wipe out files?

(needs writing)

note: be careful not to break the I/O limits of your device when wiping out, it can damaged your hard drive and make it just a trash item.

Tools

There are several tools to achieve this.

On Command Line:

  • shred
  • srm
  • dd

On GUI:

Wiping out files and partitions

Wiping out files thru command line

To wipe out a file you can use the following command:

$ shred -f -nM -v -z -u file
Where: -f forces to overwrite, -nM overwrites it M times, -v shows you what's going on, -z fills with zeros, -u removes the file after overwriting it, file is the name of the file.

To wipe out a partition you can use the following command:

$ shred -f -nM -v -z /dev/sdX
Where: -f forces to overwrite, -nM overwrites it M times, -v shows you what's going on, -z fills with zeros, X the letter of the drive.

If the above does not work, try with sudo.

note: shred may not do a really secure deletion of files on journaled file systems as ext4. This does not apply to the wiping out of entire partitions as it will be secure on any file system.

Wiping out all partitions and partition table inside a device

To wipe out an entire storage device, you may try this command:

# dd if=/dev/zero of=/dev/sdb 
It should take a while but this command will fill the device with zeros.

Wiping out files thru GUI

(needs writing)

Revisions

02/07/2014 - 21:47
antiesnob
08/10/2014 - 23:10
a_slacker_here
09/17/2016 - 16:39
SuperTramp83
09/17/2016 - 17:00
Mangy Dog
04/18/2024 - 15:12
knife