File shredder/Erase

I have managed to convine my company to allow me to use Linux (Ubuntu) as an operating system on my works laptop as I showed them Truecrypt working on XP and Ubuntu. They have now asked me what file shredding utility I’m using and I’m stumped. I have searched and can’t find one. It would really need to be a standalone program or (my preference ) a right click ‘Jobby’.

Any suggestions

My company are very strict on file security due to theft of information.

Netbook/Laptop Ubuntu 10.04 and 10.10.


The shred command (part of core-utils which is installed by default) should do what you want… with some caveats -

Journalled file systems like ext3 and ext4 (default for Ubuntu 10.xx) must NOT have data=journal mode set in /etc/fstab

By default journalling is set to data=ordered

shred will ONLY work securely if journalling is set to data=ordered (default) or data=writeback

But I suppose you could use a non-journalled file system such as ext2 if you want to be sure.

For more info on the shred command:

man shred

Or even better.

Install the secure-delete and nautilus-scripts-manager packages:

sudo apt-get install secure-delete nautilus-scripts-manager

then copy the script here:

to a text file… call it Secure Delete (or whatever you want)… make it executable… and put it in your ~/.gnome2/nautilus-scripts directory.

(HINT - after installing nautilus-scripts-manager, you can easily get to the nautilus-scripts directory by right-clicking then selecting Scripts>Open Scripts Folder)

it will then be available as a right-click option… right-click on the file or directory you want to securely delete, and select Scripts>Secure Delete.

MORE INFO - and an explanation of shred and secure-delete, including why secure-delete is better can be found here:

In particular see the Put Shred on Steroids section.

shred = 25 passes, random data and zeros
secure-delete (srm) = 38 passes, random data and zeros, and cryptographic techniques developed by Peter Gutmann (who describes himself as “a professional paranoid”). The Gutmann method is an algorithm for securely deleting files and hard drives

Or for truly stand alone “entire drive secure erase” options… there is always the DBAN (Darik’s Boot and Nuke) LiveCD/LiveUSB:

nwipe (standalone app)

some Wikipedia info:

or other LiveCD’s such as Parted Magic etc.

Or for a GUI based shredder for Linux AND Windows… you could take a look at Bleachbit.

bleachbit is available in the Ubuntu repos:

sudo apt-get install bleachbit

you’ll then find it in the menu - Applications>System Tools>Bleachbit

To use… Open Bleachbit, click the menu item - File>Shred Files, then browse to the file or directory you wish to delete.

See here:
for their take on secure file deletion.


I can’t find ~/.gnome2/nautilus-scripts.

Can you help?

If you’ve already installed nautilus-scripts-manager and restarted nautilus (reboot), you can easily get to the ~/.gnome2/nautilus-scripts folder by right-clicking somewhere, then selecting Scripts>Open Scripts Folder

Ignore the above, according to here:
the right-click>Scripts>Open Scripts Folder context menu item doesn’t appear UNTIL you have a script in the ~/.gnome2/nautilus-scripts folder.

Or go to your home folder, then hit Ctrl+H to view hidden files and folders.

Any file or folder that starts with a (.) is hidden, so you’ll have to either enable View>Show Hidden Files or hit Ctrl+H to see the .gnome2 folder.

You may need to restart nautilus after installing nautilus-scripts-manager, by either a reboot, or:

sudo killall nautilus

nautilus should restart itself… if not:


Or, if you’ve already created the Secure Delete text file and copied the script contents to it…
Place the Secure Delete file in your Home folder, then…

Make it executable with:

chmod +x ~/"Secure Delete"

and Move it to the ~/.gnome2/nautilus-scripts folder with:

mv ~/"Secure Delete" ~/.gnome2/nautilus-scripts/"Secure Delete"

Now check your Right-Click>Scripts context menu has an entry for Secure Delete.

Something to bear in mind… due to the limited write cycle capacity of USB memory sticks and SSD’s, the protracted use of “Secure Delete” (on them) may shorten the drives life… remember every time you “Secure Delete” something, that’s the equivalent of 38 write cycles (to one particular part of the drive)… though wear levelling may mitigate this to a certain extent.

Sorry Mark.

I’m struggling with this one. I have done everything yo advised but I do not get a ‘right click’ scripts entry.

Sorted. Using bleachbit as its easier to show IT it’s working. I call it IT the fact is there isn’t anyone who has a clue. ;D

Recently all our workstations and laptops were infected with a particularly nasty virus…exept mine…of course I am running Linux. :slight_smile:

Can you send the output from:

ls -l ~/.gnome2/nautilus-scripts