How to fill a hard disk with zeros
InfrastructureThis short how to shows you how you are able to fill a hard disk with zeros, such that the data can't be restored anymore. For this we use the good old dd command (https://en.wikipedia.org/wiki/Dd_(Unix)).
Ok let's start by mounting the hard disk you want to erase. Then execute the following command to see which file system you want to erase:
Ok after you have the desired file system (something like /dev/sdb) you need to execute the following command to fill the hard disk with zeros:
This will take a while and because you don't get any output on how long it will take you can use the pv command (http://linux.die.net/man/1/pv).
This tool will show a progress of the data going through the pipes you define. To use it we need to first install it:
And now execute the following command to have a dd command with a progress bar:
Replace the placeholder with the size of your hard disk in GB such that pv can calculate the remaining time for the process.
Ok that was the short how to about zeroeing out a hard disk.
Happy erasing! ...
/ 0/