Protection from "rm *"

Chris Preston cbp at icc.com
Sun Sep 30 16:50:05 AEST 1990


In article <853 at agcsun.UUCP> jackm at agcsun.UUCP () writes:
>I happened on an interesting way to protect against those accidental "rm *"'s
>
>To expand on this a bit, you could
>
>	alias mkdir '/bin/mkdir \!^; touch \!^/#; chmod 0 \!^/#'
>
>So - anyone seen this before? See any drawbacks?
>
>-- 
>"How am I typing?  Call 1-303-279-1300"     Jack C. Morrison
>Ampex Video Systems    581 Conference Place, Golden CO 80401

How about

touch -- -NO-WAY!
giving the result:

rm: illegal option -- N
rm: illegal option -- O
rm: illegal option -- -
rm: illegal option -- W
rm: illegal option -- A
rm: illegal option -- Y
rm: illegal option -- !
usage: rm [-fir] file ...


cbp
---
Exclaimer:  How about those Reds!  Miracles abound.  And they program too!



More information about the Comp.unix.misc mailing list