Can't I get a /dev/one?

Daniel Lawson daniel at wand.net.nz
Wed Jul 14 04:39:20 UTC 2004


>That won't work for my application.
>
>I'm trying to fill a hard drive with all ones.  I know how to fill it
>with all zeros:
>
>dd if=/dev/zero of=/dev/hdb bs=1024 count=58615704
>
>I don't know how to fill it with all ones.
>
>I'm working within pretty low functionality on this system (RHL 9
>installation CD rescue mode)
>  
>

Out of curiosity, why are you trying to fill it with ones?

If you are doing a secure erase or a bad sectors test, there are already 
programs to do this. They'll write 0s, then 1s, then alternate 0 and 1, 
and 1 and 0. look for badblocks on your rescue disk, or look on 
freshmeat for a secure erase.

Failing this, it's fairly trivial to write a program to do this for you. 
Contact me offlist if you aren't good with programming.


-- 
Daniel Lawson
WAND Group, Computer Science Department
University of Waikato
email: daniel at wand.net.nz 	phone: +64 7 838 4466  ext 6254





More information about the users mailing list