Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 May 2007 19:27:24 -0700
From:      George <d1945@sbcglobal.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: disaster recovery - did I do the right thing?
Message-ID:  <20070506022724.GA1408@home>
In-Reply-To: <463D2B0C.2030603@u.washington.edu>
References:  <200705051705.43504.ray@stilltech.net> <20070506005530.GA5251@glitch.rwxrwxrwx.net> <463D2B0C.2030603@u.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 05, 2007 at 06:10:36PM -0700, Garrett Cooper wrote:
> Martin Tournoij wrote:
> > On Sat 05 May 2007 17:05, Ray wrote:
> > > The mistake:
> > > /usr/local/# rm -f *
> > > note that root was running bash as a shell at the time, found 
> > > in /usr/local/bin or something.
> > > 
> > > What I did was to start over, reinstall from scratch.  my
> > > question, was there an easier way?
> > 
> > You can use pkg_info -ga to check for missing files in your
> > packages.
> 
> For (t)csh:
> alias rm "rm -i"
> 
> For (ba)sh:
> alias rm="rm -i"

Or for more fun and amusement:

touch -- /usr/local/-i

Unfortunately, the OP explicitly used the -f switch, so the alias
suggestions wouldn't have helped.  

Personally, I'd recommend learning from the mistake (we've all done at
least once) and being more judicious when entering commands,
particularly any 'force' switches, and making regular use of dump(8).
That would avoid circumvent the possibility of developing the unwelcome
habit of typing 'rm -f' to compensate for the increased level of
interaction if aliasing 'rm -i'.  Which may be why the OP got into
trouble.







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070506022724.GA1408>