I am new to Linux. Can any one give me a suggestion on how to format hard disk. That is I need to clean the data, data should not be recoverable again. It should be permanently deleted.
3 Answers
dd if=/dev/zero of=/dev/<target device>
this will write an endless stream of zeros to your device.This will make the recovery impossible. It's somewhat slow though.
You can also try dcfldd, but you have to install it first, and than run:
dcfldd if=/dev/zero of=/dev/<target device>
Some people claim it's faster than dd.
A Note: I am talking about low-level-format here, please be sure it's exactly what you need in your case.
- 529
Two options come to mind.
If its a partition, use the shred command shred -n 2 -z /dev/sdxX should do the trick for a partition. -n 2 will do 2 overwrites with random data, and -z will finish it off by overwriting it with zeros. Slightly overkill, and will also works with files
If its a drive run dban - this should result in the contents of the entire drive being irrecoverably overwritten using a algorithm of your choice.
That said, even zeroing out SHOULD prevent recovery on modern hard drives, but both of these are simple, direct ways of getting data erased.
- 133,878
If you delete the data, and then write new data to the same place in hard disc the previous is impossible to recover. That's because only the beginning of file is deleted. I think it works for all OS and computers.
- 101
- 2