Wipe the HDD with "dd" command

Hello,
If a partition wiped with a “dd” command like below then can it recoverable?

# dd if=/dev/zero of=/dev/sdaX

Thanks.

Not easily. The more passes you make of “0” the less likely it’ll be recoverable. Adding some randomness also significantly helps. For example, do a pass or two of 0s then do a pass or two using /dev/urandom as your input file.

1 Like

@DarkEyes is right.

Also same thing is with shred tool, the more zeros you give harder is to recover.

Yes. I much prefer to use shred over dd. If you alias shred to “shred -uv” it tells you everything it does.

If I did “dd” command several times?
Is it true that the governments agencies using special tools for recover all data after the Wiping?

Doing it multiple times would be the same as just having the tool do multiple passes with one command. Governments using special tools to recover after wiping? Possible. Even those have their limitations though. But the nature of how wiping works makes it extremely difficult (maybe impossible) to recover data if you are thorough enough. If you use shred or dd and have them do enough overwrites of the data, you’re ok. But don’t take my word for it. Research the case in the U.S. of Hillary Clinton’s deleted emails.

1 Like

Thanks for this thread.

1 Like

What do you mean with the “0”? I never heard of this “dd” does it come with Linux? Care to expand on it?

Thanks.

EDIT:

Oh, you mean using the input file “ZERO” and outputting it many times over. What would the command be to do that then?