From owner-freebsd-questions@FreeBSD.ORG Thu Jul 23 02:15:12 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 E1A5D1065670 for ; Thu, 23 Jul 2009 02:15:12 +0000 (UTC) (envelope-from jimmiejaz@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id B65258FC38 for ; Thu, 23 Jul 2009 02:15:11 +0000 (UTC) (envelope-from jimmiejaz@gmail.com) Received: by wa-out-1112.google.com with SMTP id m38so120451waf.27 for ; Wed, 22 Jul 2009 19:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=xF1e2GCN0nUlunwLvNalwbbvscZ/jj4TLt/xCdGQNjo=; b=oko3hanmPLtRa132wMnDLxMUqTXjzpruDl4e0LPepSCNKZ9XS5yMhdwic8EM5G1ZAG AVzFAuclJx5R2hltNyZS6cgtlfmIq8xz7t6UCoEKHsbaXogY9lFGGelBcGDxfYbTAkaj HmHYxDuE1rbdHtZYos9MYXoNDu/r0lrAbQpsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=GCvhRh9oUFfYX//Q/duMd/bYZcNqUHYLwZKOXdt4SFq1dUVXTfTVnWJQ05Lzj8A9VJ YFMBObGb1Ml2Fi6k0f7nmCghAd3w51m2xgA/6PTSaes7Nma7nlEVwQZaUA7uPFssHPPJ MQUI/egHH1Ym1azUEdpctiktGvXA19C3UVgMM= Received: by 10.115.33.10 with SMTP id l10mr1562089waj.103.1248315311318; Wed, 22 Jul 2009 19:15:11 -0700 (PDT) Received: from jimmiejaz.org (bas1-toronto44-1177949408.dsl.bell.ca [70.54.20.224]) by mx.google.com with ESMTPS id v9sm2312368wah.36.2009.07.22.19.15.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Jul 2009 19:15:10 -0700 (PDT) Message-ID: <4A67C7AC.2020905@gmail.com> Date: Wed, 22 Jul 2009 22:15:08 -0400 From: Jimmie James User-Agent: Thunderbird 2.0.0.17pre (X11/20090722) MIME-Version: 1.0 To: Rolf G Nielsen References: <4A67AC39.2060805@gmail.com> <4A67C507.6090701@lazlarlyricon.com> In-Reply-To: <4A67C507.6090701@lazlarlyricon.com> Content-Type: text/plain; charset=ISO-8859-1; 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 Reply-To: jimmiejaz@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 02:15:20 -0000 Rolf G Nielsen wrote: > 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. > I messed up the JPEG update somehow, many ports were failing to build. Ran libchk and found some unused/need libraries, and directories, so I was going to rm them. Typed in rm -rf, flipped to another terminal to gather my list, then thought it would be better if I was actually in /usr/local/lib so typed in cd /usr/local/lib without realizing I was in the terminal with rm -rf ready to go... I noticed as soon as I hit [enter] and was able to ^c it a few seconds later, but the damage was done. Lack of coffee/beer and administration is a Bad Thing (tm). Pure stupidity trying to rush to get the day started. Lesson learned. -- Over the years I've come to regard you as people I've met. I may be schizophrenic, but at least I have each other, and when I am alone I am together.