I want to check if a hard disk drive has been successfully zeroed. I read this, which instructs to run:
$ sudo od /dev/disk2 | head
which for his HDD returns:
0000000 000000 000000 000000 000000 000000 000000 000000 000000
*
234250000
I've read here that
head
returns the first ten lines of each file name that is provided
to it.
Am I right in assuming that without
| head
,od
will print the entire HDD contents to terminal?When I tried this, I got the same output: 1 seven-digit
0
s and 8 six-digit0
s and 1*
, except that after the*
I get7216060060000
. Is everything up to and including the*
the ten "lines" (though this isn't a file and there shouldn't be any lines)?Why is only the first number seven digits?
What does the
*
mean? Does it mean that everything else can be anything (not necessarily zeroes), are all zeroes (i.e. my whole HDD is all zeroes), or are all the same preceding pattern repeating (i.e. 1 seven-digit0
s and 8 six-digit0
s)?The
od
manpage states theod
command will: "Write an unambiguous representation, octal bytes by default, of FILE to standard output." What is an "octal byte"? This suggests it is nonstandard terminology but might be 6 bits.My HDD is 500 GB with 512-byte sectors. Does this
7216060060000
equal that capacity?
7216060060000 octal bytes * (6 bits? / 1 octal byte?) * (1 byte/8 bits) * (1 GB/1e9 bytes)
= 5412.045045 GB
which isn't my HDD capacity. Did something go wrong?
Was my HDD successfully zeroed?