Results 1 to 6 of 6
Hi all,
It is possible to make a system setting somewhere or install code so that when a file is deleted or moved, regardless of how, ie: using any means ...
- 12-19-2009 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 25
how to Securely delete files
Hi all,
It is possible to make a system setting somewhere or install code so that when a file is deleted or moved, regardless of how, ie: using any means a shell cmd or a desktop application, the file is securely deleted?
I typically use gnome desktop and when I delete a file I want to know for certain it has been deleted, erased, all data gone... etc.
While I am aware of shred, it's cmd line only and doesn't apply to my question.
I want to have any file that is being deleted or moved to wipe the source disk areas.
- 12-22-2009 #2
I would think that any window, gnome, kde, ect., would make a call to 'rm' when you are deleting a file. I'm not a programmer but why re-invent the wheel when it's already on the system? I'm sure if this is not correct someone will point that out.
That being said, if you like the way 'shred' does it's thing then why not substitute 'shred' for 'rm'? There are a couple of ways you could do this.
You could create an alias in /etc/backrc (best option)
You could replace 'rm' with 'shred' (take a lot of care here so that you can back out if you want to)
(when I say replace I'm talking moving rm to rm.org and the coping shred to rm)
- 12-22-2009 #3
I'll agree with Robert,using alias with shred is the best choice.
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 12-22-2009 #4
Sorry, but no.
Replacing rm with shred will only work for a few shell scripts.
And only if shred would have the same and all options of rm (haven't checked).
Everything else, like perl, python, C-programms, etc will NOT call rm to delete files,
but rather do a systemcall to the linux virtual file system.
rm also does this, btw.
That said, a "secure" delete would be a task for the underlying filesystem, ie: ext3, xfs, etc.
But I am not aware of such a mount option or feature.You must always face the curtain with a bow.
- 12-22-2009 #5
shred alias will be useful while invoking rm command from scripts or applications which depends on rm command instead of using unlink sys.call directly.
Irithori,what you have said is true,it mostly depends on application - How it handles the delete functionality - by invoking system call unlink directly or invoking rm command which will use unlink sys.call.
I may wrong ,but as far I know, ext3 don't have such secure delete functionality by default.That said, a "secure" delete would be a task for the underlying filesystem, ie: ext3, xfs, etc.
But I am not aware of such a mount option or feature.
You could try tools like Darik's Boot And Nuke | Hard Drive Disk Wipe and Data Clearing but they wipe out entire HD
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 12-22-2009 #6
Irithori, thnx for the information. As stated I'm not a programmer so this is something I didn't know. But for normal use replacing RM with SHRED will work.



