How to shred files from Gnome/Nautilus

Avi's picture

With your favourite text editor,
create a file ~/.gnome2/nautilus-scripts/shred
with the following contents:

#!/bin/bash

# "Shredder" secure file delete for Nautilus
# Distributed under the terms of GNU GPL version 2 or later
#
# Dependency : zenity
#
# Please note that `shred' relies on a very important assumption:
# that the filesystem overwrites data in place. This is the traditional
# way to do things, but many modern filesystem designs do not satisfy
# this assumption.
#
# Exceptions exist, and are noted in shred's info manual.
# Type 'info shred' from a prompt to see the list.

SHRED_PATH=/usr/bin # Path to shred binary.

if dialog=`zenity --question --text "Are you sure you want to shred $1?"`
then
$SHRED_PATH/shred -zu "$1"
fi

Then, make it executable with:
chmod 755 ~/.gnome2/nautilus-scripts/shred

Now, if you right-click on a file, there will be a "shred" option under Scripts.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.