Re: partition recovery question resolution

From: Andreas Dilger
Date: Sun Sep 07 2003 - 04:07:34 EST


On Sep 06, 2003 23:43 -0600, Aaron Dewell wrote:
> Doing a dd back to the disk with a short file shouldn't
> affect anything past the end of the file, right? Therefore, there would have
> had to have been some kind of condition whereby the file got truncated while a
> dd was going on, and for some reason, it started writing zeros instead of
> stopping.

That's a common pitfall of dd. It will truncate regular output files unless
you use "conv=notrunc". If you are writing to a block device it obviously
can't truncate the device so you don't notice it unless you are trying to
dd over an existing file.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/