Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Possible Duplicate:
How can I reliably erase all information on a hard drive?

If I wipe free space with zeros instead of random data to finish fast will that write old file to be unrecoverable, will use this command on ubuntu on ntfs and ext4 volumes.

cat /dev/zero > Wiped

Will that be secure or I must Use /dev/urandom

share|improve this question

marked as duplicate by Rory Alsop Nov 19 '12 at 17:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
On classical hard-disks this might work with some file systems, on SSDs it probably won't. –  CodesInChaos Nov 17 '12 at 11:18
    
If you have a SSD doing this command WILL decrease its lifespan. There are SSD tools that will perform a similar function and do it the correct way. As for filling in freespace with only 0's, no thats not enough, since your filling in 0's with 0's. –  Ramhound Nov 19 '12 at 19:36

2 Answers 2

You can also use shred (Most Linux distribution come with shred already installed.)

$ shred -f -u -v -z filename

Explanations :

-f change permissions to allow writing if necessary
-u truncate and remove file after overwriting
-v be verbose (detailed) and show progress
-z add a final overwrite with zeros to hide shredding
share|improve this answer

The only way to really guarantee that data cannot be recovered is (a) use full-disk encryption, so all sensitive data is already encrypted before it hits the media, and then (b) destroy the encryption key when you no longer want the data on that media.

spinning disks

Yes, a single zero-fill, on a spinning disk, is adequate.

Civilian data recovery companies cannot recover data off spinning disks after a single zero-fill. There is no evidence that anyone else can, either. In spite of the popular urban legends you might have heard. a b c d e

solid-state media

A zero-fill is probably inadequate on solid-state media, but using random-data-fill or multiple passes or both, aren't any better.

Solid-state "disks" typically have extra space used for wear-leveling that cannot be read or written to with normal tools. Sensitive data that ends up in this extra space is not guaranteed to be erased, no matter what data patterns you write and no matter how many passes you make.

See Is it enough to only wipe a flash drive once? .

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.