Destructive Windows Script

Mike Meyer mwm at mired.org
Mon Jun 6 18:21:19 EDT 2005


rbt <rbt at athop1.ath.vt.edu> writes:

> Mike Meyer wrote:
>> "Terry Reedy" <tjreedy at udel.edu> writes:
>>
>>> On *nix, one could open '/dev/rawdisk' (actual name depends on the
>>> *nix build) and write a tracks worth of garbage for as many tracks
>>> as there are. I don't how to programmaticly get the track size and
>>> number (if there is a standard way at all).
>> Modern Unix systems assume drives don't care much about geometry,
>> what
>> with sector forwarding and variable track lengths and the like.
>> Just open the raw disk device (assuming your Unix has such), and
>> start
>> writing data to it. Keep going until the write fails at the end of the
>> media.
>>         <mike
>
> Wouldn't /dev/urandom or /dev/random on Linux systems work better?

Well, that would certainly make a good source for the data you write.

> It's the kernel's built in random number generator. It'd fill the
> drive with random bits of data. You could loop it too... in fact, I
> think many of the pre-packaged *wipe* programs are mini Linux distros
> that do just this.
>
> dd if=/dev/random of=/dev/your_hard_drive

That works. You may want to set a block size for performance reasons.

      <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list