From owner-freebsd-questions@FreeBSD.ORG Sun May 6 02:54:05 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD08916A401 for ; Sun, 6 May 2007 02:54:05 +0000 (UTC) (envelope-from d1945@sbcglobal.net) Received: from smtp102.sbc.mail.mud.yahoo.com (smtp102.sbc.mail.mud.yahoo.com [68.142.198.201]) by mx1.freebsd.org (Postfix) with SMTP id 9381913C45A for ; Sun, 6 May 2007 02:54:05 +0000 (UTC) (envelope-from d1945@sbcglobal.net) Received: (qmail 27451 invoked from network); 6 May 2007 02:27:25 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:Mime-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=jdPNs4xJoQT/Cxe5KclEDxXK9yD+XyB1SjhP+9XkDSJXmc41+h+UdpfdoDSj83XY5LFcj9g9BgnvNbu2QsLcwCwa01E+lUh1Csn6r2vGV4Q4Z1v95TqwI8prSaEPH/DnPKnZye0nveQ7OWFTLU7GSaIB2Y3Rsf5gr5/WDJfvUGc= ; Received: from unknown (HELO home) (d1945@sbcglobal.net@69.104.191.121 with login) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 6 May 2007 02:27:25 -0000 X-YMail-OSG: osu_Y2MVM1kM4I7A5j6mlLaGLEFPyMAe31Xf7evhSLbDj6BPnlvJslQqRdY0kpFSg8Kwaf1Alw-- Received: by home (sSMTP sendmail emulation); Sat, 5 May 2007 19:27:24 -0700 Date: Sat, 5 May 2007 19:27:24 -0700 From: George To: freebsd-questions@freebsd.org Message-ID: <20070506022724.GA1408@home> Mail-Followup-To: freebsd-questions@freebsd.org References: <200705051705.43504.ray@stilltech.net> <20070506005530.GA5251@glitch.rwxrwxrwx.net> <463D2B0C.2030603@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <463D2B0C.2030603@u.washington.edu> User-Agent: Mutt/1.4.2.1i Subject: Re: disaster recovery - did I do the right thing? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2007 02:54:05 -0000 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.