SHRED's testing my head

Link to this post 20 Mar 10

As a first time user of SHRED I wanted to be sure that things would work EXACTLY as expected.
Just as well too!
So, I made a small partition of 8MB, zeroed it out, formated it to ext2, & stored a load of text files in it.
Then:- I used dd to copy an image of the partition to a file (a), SHREDed one of the text files in the partition [using the zero-out-after and the leave-the-name-in-the-directory options] and then made another image-copy of the partion (b).
Clicking on the filename in the file manager the file opened as a 'nil' document [so far so good].
Using KHexedit I then looked in both (a) and for (b) for the file; it was in both!
So I did 'sync' in a shell root terminal, made another image-copy of the partition and looked again, - still there! =(:-o
So then from the file manager, I opened the the 'SHREDed' file modified it, saved it, made another image-copy of the partition and looked again for the original file, - still there! =(:-O
(I am still on kernel 2.6.19 so maybe the above is no longer an issue)

Uhmm, - can anybody tell me please - what's going on here? - 'coz I haven't a clue!

Link to this post 20 Mar 10

Look at "man shred", there a a whole lot of situations where shred is not effective. Part of output here:

CAUTION: Note that shred relies on a very important assumption: that
the file system overwrites data in place. This is the traditional way
to do things, but many modern file system designs do not satisfy this
assumption. The following are examples of file systems on which shred
is not effective, or is not guaranteed to be effective in all file sys-
tem modes:

* log-structured or journaled file systems, such as those supplied with
AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

* file systems that write redundant data and carry on even if some
writes fail, such as RAID-based file systems

* file systems that make snapshots, such as Network Appliance’s NFS

* file systems that cache in temporary locations, such as NFS version 3

* compressed file systems

There's more, this is just a part of the output. Maybe one of these situations covers your set up.

Link to this post 20 Mar 10

He seemed to compensate for that by using ext2, using 'man shred' is the best idea I can see though.

Link to this post 21 Mar 10

I'll certainly carefully read the manpages.
There's no RAID, no drive cards - it's just an ordinary system.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board