What exactly happens when an application deletes a file?
Is there any way to control this behavior? Basically I want to shred
instead of rm
in all cases, but of course applications do not make calls to rm
, I am guessing they interact directly with the kernel?? Would I have to modify the kernel to implement this feature?
unlink
system call (man 2 unlink
). When you try to intercept that one, you need to watch out for specials (link count, file is still in use) before starting to wipe it.