Protection from the dreaded "rm -fr /"

Mike Meyer mwm at mired.org
Sat Oct 2 16:00:27 PDT 2004


In <415E6C4A.1010804 at gamersimpact.com>, Ryan Sommers <ryans at gamersimpact.com> typed:
> Edwin Groothuis wrote:
> >On Sat, Oct 02, 2004 at 11:19:28AM +0300, Giorgos Keramidas wrote:
> >I'm not so much worried about 'rm -rf /', but I'm more worried about
> >"rm -rf *" in my home directory. It happened once because I was too
> >happy switching directories before realising what I was doing in
> >the wrong directory.
> If you use tcsh for your shell add:
> 
> set rmstar
> 
> to your .cshrc file. Then anytime you use '*' as an argument to rm it 
> will ask you if you are sure you want to do that.

zsh does this by default as well.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list