Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to erase hard disks?

Status
Not open for further replies.

mohanraj

IS-IT--Management
May 18, 2001
6
GB
Hi All

I need to erase some hard disks which contain confidential data in Solaris as well as in Linux..

Is there any scripts or programs which does this?...

Awaiting your reply

Mohan
 
There is no need to reformat the disks.
You can create a new file system (newfs) which will overwrite what was there-

newfs /dev/rdsk/c0t0d0s0

Steve

 
Hi Mohan,

Try this :

Login as root

cd /

for i in <dir-name> <dir-name> <dir-name>
do
echo &quot;Deleting $i ... &quot;
echo &quot;This may take some time...&quot;
rm -r $i
done


I know u wud have done it by now ...
This <dir-name> cud be the mount points for your disks.

Enjoy...!

DJC
 
Hi All

Thanks for the reply. but this was not what I wanted
Sorry that I was not very specific in my question.

The fact is that format, newfs, and rm will not erase all the data blocks. anybody who is interested in the data can still retrieve it using some tools.

what I wanted to do was to rewrite all the datablocks with some random numbers or zeros.

finally I found a way out using the following command

dd if=/dev/zero of=/dev/rdsk/c0t1d0

this rewrites all the blocks with zeros..I tested it with a third party tool to view sectors(Expert Eraser-a dos program)after connecting the same disk to a PC.

Thanks&regards
Mohan
 
Hi Mohan,

Its not that the question was put wrongly but
the fact was ignored by us all that you needed
Data Block void of all the previous data. Right !!
Yes dd will do the trick LOL.

Thanks for the tip.

s-)
DJC
 
As a rule of thumb 7 overwrites was considered safe in one of my old workplaces. But for we who are merely paranoid 3 should be plenty. Ian

&quot;IF&quot; is not a word it's a way of life
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top