After working with a confidential file (e.g. PDF a bank statement), you typed:
(or the famous Shift-Delete action in a GUI-based file browser such as
You realize "Ooops, I should have used the
You run your file recovery tool and you are "lucky enough" to recover the block at which your secret file resides as well as its size. Moreover, your deleted file seems intact (i.e. non-overwritten by other data).
Now, is there a safe and secure way of deleting such an unlinked file from your file system, i.e.:
- you don't mess up other files, preferably not even the journal
- recovery tool can no longer find the file (i.e. it's overwritten by garbage data)
I am specifically interested in the ext4 file system, but a more general approach is even more welcome.
Note: I guess a robust solution would require an assumption of how big the deleted file is, so you can assume it's up to a few MBs.