Francois Marier wrote:
> Pádraig Brady wrote:
> > p.s. There is no need to specify count if write to the whole device.
> > Also bs=1M might be faster.
> 
> That's good to know. So I guess I should have done this:
> 
>   dd if=/dev/zero of=/dev/sda bs=1M

Yes.  That would be just fine.  I never include the size of the device.

> What's the expected behavior if a dd command causes dd to attempt to write
> past the end of the drive (I'm thinking that maybe I got my math wrong)? It
> just stops with an error of some sort?

IIRC the error is ENOSPC -- No space left on device.  The dd program
won't be able to write past the end of the device.  The kernel will
police this.  The dd program will then report the error and stop.

Bob

Reply via email to