From owner-freebsd-stable@FreeBSD.ORG Wed Sep 15 15:20:43 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BDA5106567A for ; Wed, 15 Sep 2010 15:20:43 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 539E38FC17 for ; Wed, 15 Sep 2010 15:20:43 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ovtmr-0004my-TS for freebsd-stable@freebsd.org; Wed, 15 Sep 2010 17:20:41 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Sep 2010 17:20:41 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Sep 2010 17:20:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Ivan Voras Date: Wed, 15 Sep 2010 17:20:30 +0200 Lines: 31 Message-ID: References: <20100915153638.19173erppua441d2@webmail.uni-tuebingen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: <20100915153638.19173erppua441d2@webmail.uni-tuebingen.de> X-Enigmail-Version: 1.0.1 Subject: Re: very stupid mistake: a part of /usr is deleted X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:20:43 -0000 On 09/15/10 15:36, Zara Kanaeva wrote: > Hi all, > > vor 2 hours i made a very stupid mistake: i have deleted (as root > naturally) a part of /usr-directory. I have definitely deleted .snap and > presumably 100-150 files in /usr/bin. > uname -a -> > FreeBSD (XXXXXX).uni-tuebingen.de 8.0-RELEASE FreeBSD 8.0-RELEASE #0: > Sat Nov 21 15:02:08 UTC 2009 > root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 That is actually an easy situation to recover, you can do it in at least these ways: 1) if you build/upgrade from source, you can either reinstall if you have working /usr/obj or try and rebuild them if you have working /usr/src 2) if you have another machine with the same FreeBSD version and architecture, simply copy the missing files (with tar, scp, ftp, fetch/wget, etc...) 3) if you have networking and at least working fetch / ftp / wget, cat and tar, you can fetch the files at ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.0-RELEASE/base/ and use install.sh to reinstall the base binaries Remember that those files are not magical, you can restore them any way you are able. You can even boot the live CD (from ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/8.0/), mount the appropriate file system and copy the files from the CD.