What happens during an unlink(2)

Gregory Smith greg at utcsri.UUCP
Tue May 13 00:58:26 AEST 1986


In article <634 at ihdev.UUCP> pdg at ihdev.UUCP (55224-P. D. Guthrie) writes:
>In article <861 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
>>Hmmmm.  Maybe there should be an option to 'rm' to cause it to zero out
>>files before unlinking them?  (like rm -e [for erase], similar to VMS's
>>DELETE/ERASE)
>>
>The trouble with this is that is really would have to be an option to
>unlink(2), which would make a lot of current software obsolete.  The
>only other way would be to have rm directly write to disk,  but there is
>too much margin for error or mass destruction here.

How about having unlink(2) look in the environment, and if it sees 'UNLINK=
zerofiles', it zeroes the storage. Relatively few calls to unlink arise from
the user typing 'rm something', so the '-e' option would be somewhat
insufficient. This way, you could get all of them without the software
obsoletion problem.

-- 
"Canabee be said2b or not2b anin tire b, if half thabee isnotabee, due2
somain chunt injury?" - Eric's Dilemma
----------------------------------------------------------------------
Greg Smith     University of Toronto      UUCP: ..utzoo!utcsri!greg



More information about the Comp.sources.bugs mailing list