From owner-freebsd-questions@FreeBSD.ORG Thu Jul 23 02:24:52 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A3A61065677 for ; Thu, 23 Jul 2009 02:24:52 +0000 (UTC) (envelope-from listreader@lazlarlyricon.com) Received: from proxy3.bredband.net (proxy3.bredband.net [195.54.101.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1348FC18 for ; Thu, 23 Jul 2009 02:24:52 +0000 (UTC) (envelope-from listreader@lazlarlyricon.com) Received: from iph2.telenor.se (195.54.127.133) by proxy3.bredband.net (7.3.140.3) id 49F597CD01C676B7 for freebsd-questions@freebsd.org; Thu, 23 Jul 2009 04:03:53 +0200 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AveCACpiZ0pV44BwPGdsb2JhbACBUYgvj2gBAQEBN7g0hA0F X-IronPort-AV: E=Sophos;i="4.43,250,1246831200"; d="scan'208";a="29638383" Received: from c-7080e355.09-42-6e6b7010.cust.bredbandsbolaget.se (HELO lazlar.kicks-ass.net) ([85.227.128.112]) by iph2.telenor.se with ESMTP; 23 Jul 2009 04:03:52 +0200 Message-ID: <4A67C507.6090701@lazlarlyricon.com> Date: Thu, 23 Jul 2009 04:03:51 +0200 From: Rolf G Nielsen User-Agent: Thunderbird 2.0.0.22 (X11/20090718) MIME-Version: 1.0 To: jimmiejaz@gmail.com References: <4A67AC39.2060805@gmail.com> In-Reply-To: <4A67AC39.2060805@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: rm -rf and fat fingers 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: Thu, 23 Jul 2009 02:24:52 -0000 Jimmie James wrote: > So here I was, half asleep, removing some old directories as root, and > here's what I did...sitting in /home/jimmie after su > > jimmie@jimmiejaz <101> [0] /home/jimmie#rm -rf cd /usr/local/lib (note > the space, the PWD is home/jimmie/) > > Now, a lot of libs went missing from /usr/local/lib. With libchk, last > locatedb I've been able to reinstall most of the libs. > My ~/ *seems* unaffected, but I'm worried about that, I don't notice > anything missing, but I could be wrong. > > What I'm thinking is the rm -rf found no 'cd' and moved to wipe out > /usr/local/lib Would this be a correct assumption? > > And yes, I sat in the stupid corner with the dunce hat on. > > Hi Jimmie, Out of curiousity, what were you trying to do when you issued that command? And this reminds me of an equally stupid thing I did a few years ago. I had a directories named share on three different partitions. These were for files that I and my then current gf shared. At one point I wanted to clean them all out, and issued this command: find -s / -type d -name share -exec rm -Rd {}/* \; -exec rm -Rd {}/.* \; Fortunately I had backups. And after that I renamed those share directories to something else. And yes, I too sat in the stupid corner. -- Rolf Nielsen