Ugly file name
    Chris Torek 
    chris at mimsy.UUCP
       
    Sun May 14 04:56:54 AEST 1989
    
    
  
In article <2214 at Portia.Stanford.EDU> joe at hanauma.stanford.edu (Joe Dellinger) writes:
>Even "rm -i *" used to be dangerous. There is the famous case where
>somebody accidentally created a file name "-f", and decided to remove
>it by doing "rm -i *". The csh dutifully expanded this to
>"rm -i -f [files...]", and at that time "-f" overrode "-i" in rm.
>Result: everything in the directory deleted EXCEPT the file "-f"!
Thus, to be safe against old versions of `rm', use
	rm -i ./*
or, in this case more simply,
	rm ./-f
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris
    
    
More information about the Comp.unix.xenix
mailing list