Thursday, January 17, 2008

Securely Wipe/Erase Files in Ubuntu via Right Click menu in Nautilus

Adding wipe to your Nautilus context menu is useful in making it so that you can securely delete any number of files and/or folders at one time simply by selecting them, right clicking, and clicking wipe. Before you can add wipe to the context menu you must have nautilus-actions and wipe installed. To install them on a Debian based system, at the terminal, simply type:


sudo apt-get install wipe
sudo apt-get install nautilus-actions


When you install nautilus-actions a GUI based tool will be installed to allow you configure context menu additions. Access it by, at the terminal, typing:
nautilus-actions-config

Adding the wipe command to the context menu is now very straight forward. The following instructions were written for nautilus-actions 1.4.1:

1. Click the +Add button.
2. For the label enter: Wipe.
3. For the tooltip enter: Use the wipe utility to securely delete the file(s)/folder(s).
4. For the path enter: wipe
5. For the parameters enter: -rf %M
6. Go to the Conditions tab and select the radio button labeled "Both" for when the command should appear and check "Appears if select has multiple files or folders"
7. I left everything else at their defaults. If you don't want to do any further customization just hit OK and close the configuration tool.

8. You can select an icon, I prefer the gtk-dialog-warning icon.
The parameters to wipe, -rf %M, causes files and folders to be deleted without prompting. Due to the -r command, if there are files or subfolders in a selected folder they will also be wiped. If you would like for files to be wiped even when write permission is not set change the parameters to: -rcf %M.

The final step is to reset nautilus. At the terminal type:

nautilus -q
nautilus


You will now have a command for wipe in your Nautilus context menu that allows you to securely delete any number of files and/or folders in two clicks.

4 comments:

  1. Awesome, great tip -- thanks. Not sure if I care so much about Wipe as much as I do having learned how to make custom actions in Nautilus.

    ReplyDelete
  2. how can you set it to ask for confirmation? wiping is a pretty permanent thing, i wouldn't want to accidentally do it when i want to add something to an archive

    ReplyDelete
  3. Sorry but this tip is next to useless.

    Please read the man page before posting tips like this.

    From man wipe

    "Wiping over NFS or over a journalling filesystem (ReiserFS etc.) will most probably not work."

    This includes ext3.

    In fact I don't think you can even chose to format something as non-journalling fs during the standard ubuntu install.

    ReplyDelete
  4. I can confirm this does appear to work. I'm going to try a forensic examination of my hard drive to be sure.

    ReplyDelete