My task is simple:

I need to able to delete the whole root which i can do with rm-rf ./* but the problem here is HFS recovery can get back the data since it is not actually deleted from disk

if i use shred, how can i shred whole disk.

How can i combine this two commands and make it work? even is it possible? is there some chance still data can be recovered ?

Is there another way of filling the files with zeros or unwanted data (instead of shred) and then do a rm -rf ?

Any help is appreciated.


If you want to delete everything on the partition (as I assume from you saying "delete the whole root") you can run shred /dev/sdXY where sdXY is the device you want to wipe.

| improve this answer | |
  • Does it delete the whole root including system files ? do we need to to use any params like force or recursive ? – user_parser Mar 20 '15 at 1:08
  • @user_parser it erases everything at the hard disk level (basically you're writing garbage to the partition), so everything will be gone. No need for any parameters like force or recursive. – Renan Mar 20 '15 at 11:41

One approach would be to boot from some other media, such as CD or USB/SSD, so you don't have to deal with the operating system fighting against the rm.  Possibilities include any live CD that includes a shred capability, or Darik's Boot and Nuke (DBAN).

I have no association with DBAN.  I have colleagues who use it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.