4
1
So, say you've completed a full pass of:
dd if=/dev/zero of=/dev/sdX bs=1M
Then, you'd like to make sure the destination has been really zeroed out (ignoring the confirmation messages from dd
and not just polling the start or the end of the device). Assuming that you'd have to read through the whole disk – I'd use this:
dd if=/dev/sdX bs=1M | grep -P '[^\x00]'
However, as this works with piping the stdout, eventually this falls out with an error saying that the operation ran out of memory. So, it's of no use.
Of course, creating a whole image of the entire disk and saving it is not an option. But, perhaps, doing that while somehow being able to skip 0x00 on the fly – that'd be one of the solutions..
Ideas?
Great suggestion, I will try that out (hopefully without out of memory errors as of this time), thank you! – XXL – 2012-01-07T18:23:24.947