How to shred a folder?

  1. Install the package secure-delete.
  2. Use the command srm -r pathname to remove your folder and files.

The default settings are for 38 (!!!) passes of overwrites which is extreme overkill imho (see more info about this here).

For my usage, I only want a single pass of random data so I use srm -rfll pathname.

If you want to create a right-click option in the GUI for files and folders, use gnome-actions to call a script like this:

#!/bin/bash
if dialog=`zenity --window-icon=warning --question --title="Secure Delete" --no-wrap --text="Are you sure you want to securely delete:\n\n     $1\n\nand any other files and folders selected? File data will be overwritten and cannot be recovered."` 
then /usr/bin/srm -fllrv "$@"| zenity --progress --pulsate --text="File deletion in progress..." --title="Secure Delete" --auto-close
fi 

If you want more paranoid settings be sure to modify the above script.


For files not directories, here's a more simple way instead of -exec shred -u {} \; type of way:

cd to your directory.

then

find . -type f -print0 | xargs -0 shred -fuzv -n 48

this does 48 passes recursively to the current directory you cd'ed into.

Hope this helps some.