1832858 Members
3617 Online
110048 Solutions
New Discussion

dd command

 
SOLVED
Go to solution
Rambo_1
Regular Advisor

dd command

Hi all
If I use "dd" like this :
#dd if=/dev/null of=/dev/rdsk/c20d0 bs=2048

Are all of the data on /dev/rdsk/c2t0do be deleted ?

Thanks
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor
Solution

Re: dd command

Hi,

If you are looking for a faster methode look at mediainit command.

# mediainit -v /dev/rdsk/c?t?d?

HTH,
Robert-Jan

Sanjay_6
Honored Contributor

Re: dd command

Hi,

Since the "of" is /dev/rdsk/c2t0d0 all data on this disk will be lost. This is a destructive command.

man dd for more help.

Hope this helps.

regds
A. Clay Stephenson
Acclaimed Contributor

Re: dd command

The problem with usuing /dev/null for the input device is that it is a null device (ie no data will actually be read). If you want to actually fill the disk with zeros then you should use the /dev/zero device instead. You also want a larger bs so that this operation gets done in a timely fashion:

dd if=/dev/zero bs=256k of=/dev/rdsk/c2t0d0
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: dd command

The problem with using /dev/null for the input device is that it is a null device (ie no data will actually be read). If you want to actually fill the disk with zeros then you should use the /dev/zero device instead. You also want a larger bs so that this operation gets done in a timely fashion:

dd if=/dev/zero bs=256k of=/dev/rdsk/c2t0d0
If it ain't broke, I can fix that.
G. Vrijhoeven
Honored Contributor

Re: dd command

Hi Rambo,

I would use painless... :)

If you want to zero the disk, i would use /dev/zero ( # mknod /dev/zero c 3 4
)

With expensive tools you will be able to optain the data again. If you do this multiple times (7) you need real expensive tools to gain access to the data. A Hammer ( or painless) is the only way to be sure.

Regards,

Gideon