What happens during an unlink(2)
The Mad Hacker
jdptxt at adiron.UUCP
Tue May 20 05:00:44 AEST 1986
Several problems occur if one wants to zero out the file blocks upon
unlinking them. What if the file that I try to remove has more than one
link to it? Should unlink be successful but the zero-ing not be done or
should the zero-ing be done regardless or should unlink fail altogether?
Also, it is possible to rm a file that you have no access to and even one
that you don't own. An attempt to write zeros to such a file should fail
but it is not a problem to rm it even if it is the last link to the file.
(We have a project here which heavily depends on the idea that an rm on a
file does not change the contents of the disk blocks that contained those
files because someone else may actually own the file or have a use for the
link to the file.)
If you want an rm to zero the file blocks and then unlink the file, then
go ahead and write one but please don't ask that everyone install it
jdp
More information about the Comp.sources.bugs
mailing list