Protection from "rm *"

Carl Johnson carlj at hpcvmcdj.cv.hp.com
Tue Oct 9 01:56:41 AEST 1990


In comp.unix.misc, davidsen at sixhub.UUCP (Wm E. Davidsen Jr) writes:


      This discussion went by once before... the "#" file trick with funny
    permissions doesn't work as well as creating a files called -i (touch
    ./-i). The reason is that even if you type "rm -f *", which bypasses the
    asking on the readonly file, the filename -i at the start will force
    interractive mode, you can look at the prompt and test your favorite
    expletive, then abort. If you ever really want to blow everything away
    you can "rm -f ./*".
    -- 
    bill davidsen - davidsen at sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
        sysop *IX BBS and Public Access UNIX
        moderator of comp.binaries.ibm.pc and 80386 mailing list
    "Stupidity, like virtue, is its own reward" -me

This doesn't work on all systems either (does anything?).  I just created
a directory then created a couple files plus a '-i' file.  When I did a 
'rm -f' there was no questions about deleting files, and an ls showed
only '-i' left.  An 'rm -f' also deletes any file named '#' even if it doesn't
have write permissions.  I am using HP/UX which is mostly Sytem 5 externally.

Carl Johnson     carlj at hpcvmcdj.cv.hp.com



More information about the Comp.unix.misc mailing list