Results 1 to 6 of 6
Hi,
i have an issue due to some high security requirements. what i want to do is to remove the files in trash folder permanently from the memory so that ...
- 03-19-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 2
secure delete of trash files
Hi,
i have an issue due to some high security requirements. what i want to do is to remove the files in trash folder permanently from the memory so that they cannot be recovered again.
i am aware of the "shred" command but i dont know if it can reach to files that are already in trash.
I have found a solution but it requires to fill the whole unused memory with a file that consist of some ramdom bits and than deletes it:
dd if=/dev/zero of=zero.small.file bs=1024 count=102400
shred -z zero.small.file
cat /dev/zero > zero.file
rm zero.small.file
shred -z zero.file
rm zero.file
my aim is to do a similar thing but only on the files that are deleted via righclicking and are seen on the trash bin.
any suggestions?
thx in advance.
- 03-19-2010 #2
Shred should work fine on your trash files.
But you should note that shred may not work in log structured or journaled filesystems where they are set to journal data. (Which is not usually the default, but still.)
shred invocation - GNU Coreutils
More info on how ext3 filesystems work and recovering data.
HOWTO undelete removed files and directories on an ext3 file system
You should also use encryption.
- 03-19-2010 #3Just Joined!
- Join Date
- Mar 2010
- Posts
- 2
I am a little bit suspicious if shred would do the job, cos' I do not know how actually the file system works.
How can I list and reach the files in Trash? That is something like to tell shred command to overwrite a file which is already deleted. Do have very little Linux knowledge so I do not know how to reach the files that are listed in Trash folder.
- 03-19-2010 #4
Each user has there own trash folder
/home/username/.local/share/trash
note there are then two sub-folders files and info that actually hold the data
- 03-19-2010 #5Linux Newbie
- Join Date
- Mar 2007
- Posts
- 139
The problem is that all files are on your hard disk, and in a binary form.
Meaning 0 (zero) and 1 (one).
And if you want the file deleted, you need to overwrite it with data 0 or 1.
There are several tools available to do this, and they are called file-wipe tools.
They are also available for linux.
But you could do it also by yourself.
Use a hex-editor, and you can look at every kind of file.
You can see the file as hexadecimal value (but also other).
Because using binary 0 and 1 would be unpractical.
You can fill the file with any value you want and save it, but with no back-up of course.
It is essentially the same thing file-wipe tools are doing.
In KDE you have KHexEdit, and if it isn't installed, it should be in kdeutils3-extra-3.5.5-34, if I remember well.
It is a very usefull tool for doing anything.
- 03-22-2010 #6
reed9
is correct shred works very good and you should use encryption
I use a reversed alpha numeric code with a rotating cypher for encryption (this equates to 36 to the 35th power number of possible combinations) (I could change encryption codes every day and never run out of combinations)


Reply With Quote