Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know we can wipe a hard disk using random data or zeros, but is it possible to wipe using a fixed string ?

e.g. is this correct?

dd if="string" of=/my/harddisk ...

Also, does the options below say to copy only the 400th sector?

bs=512 count=1 skip=399
share|improve this question

migrated from stackoverflow.com Mar 26 '11 at 0:53

This question came from our site for professional and enthusiast programmers.

    
@SiegeX: Greg's right. You can attack this with /bin/sh or whatever, but it is a hard problem (because of the interactions of multiple levels of hardware and software caching between dd and the disk) and one that has already been solved by experts. –  dmckee Mar 26 '11 at 0:52

1 Answer 1

dd if=<(yes "string") of=/my/harddisk

Also, does the options below say to copy only the 400th sector?

No, it says to skip over 399 BLOCKS and write 512 bytes worth of data from that point.

share|improve this answer
    
hi, so how do I get only the 400th sector? I though 512 bytes is 1 sector and I have count=1 ? thanks –  Anonymous Mar 24 '11 at 1:57
    
Nice use of 'yes' –  Suroot Mar 24 '11 at 1:59
    
@user bytes/sector is not a constant. On Linux you can get this information via fdisk -b, it may be 512 but it doesn't have to be. –  SiegeX Mar 24 '11 at 2:10
    
@Siegex, thanks. Assuming its 512bytes/sector which is already specified using bs=512, how should i get only the 400th sector? I thought by skipping 399 blocks, and setting count=1, I should get the 400th sector. thanks –  Anonymous Mar 24 '11 at 2:13
    
@user You would set bs equal to the sector size. If your sector size is 512 bytes, then blocks and sectors would be identical with bs=512. See THIS LINK for a bit more detail, especially the History section –  SiegeX Mar 24 '11 at 2:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.