Protection from the dreaded "rm -fr /"

Thomas David Rivers rivers at
Sat Oct 2 18:54:09 PDT 2004


  If I'm remembering correctly - the historical way to
 do this is to alias the "rm" command to something that
 else that checks the arguments and complains appropriately
 (and then executes /bin/rm.)   Typically with just a shell
 alias.  That keeps you from accidently doing something. 

  Just thinking that putting extra "smarts" into a utility
 isn't the typical "UNIXy" way to do this.  Let each tool
 do the one thing it does really well.. 'rm' removes; let
 it remove.

  I think, in the old "UNIX Review" magazine (what - almost
 15+ years ago now?)  There was a couple of examples of this.

	- Dave Rivers -

rivers at                        Work: (919) 676-0847
Get your mainframe programming tools at

More information about the freebsd-hackers mailing list