From owner-freebsd-questions@FreeBSD.ORG Fri Jul 22 20:12:44 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C62C16A41F for ; Fri, 22 Jul 2005 20:12:44 +0000 (GMT) (envelope-from ges+lists@wingfoot.org) Received: from wingfoot.org (caduceus.wingfoot.org [64.32.179.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DB4343D49 for ; Fri, 22 Jul 2005 20:12:44 +0000 (GMT) (envelope-from ges+lists@wingfoot.org) Received: from localhost (localhost [127.0.0.1]) by wingfoot.org (Postfix) with ESMTP id 353DD1F440A; Fri, 22 Jul 2005 16:12:43 -0400 (EDT) Received: from wingfoot.org ([127.0.0.1]) by localhost (wingfoot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25970-08; Fri, 22 Jul 2005 16:12:41 -0400 (EDT) Received: from [192.168.0.2] (ool-44c47f78.dyn.optonline.net [68.196.127.120]) by wingfoot.org (Postfix) with ESMTP id 905AC1F4404; Fri, 22 Jul 2005 16:12:41 -0400 (EDT) Message-ID: <42E1533F.9090202@wingfoot.org> Date: Fri, 22 Jul 2005 16:12:47 -0400 From: Glenn Sieb Organization: Wingfoot Organization User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Thunderbird/1.0.2 Mnenhy/0.6.0.104 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20050721070434.254A11D930@imss.sgp.fujixerox.com> <7cbadc8705072102132d8fe2bd@mail.gmail.com> In-Reply-To: <7cbadc8705072102132d8fe2bd@mail.gmail.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at wingfoot.org Cc: Qiang.Xu@fujixerox.com Subject: Re: undelete in FreeBSD? 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: Fri, 22 Jul 2005 20:12:44 -0000 Nelis Lamprecht said the following on 7/21/2005 5:13 AM: >On 7/21/05, Xu Qiang wrote: > > >>Hi, all: >> >>I mis-deleted /usr/local/bin directory in my FreeBSD. How can I restore it? >> >> >> > >There isn't a way to restore unless you have a backup. However, most >of the binary files in /usr/local/bin are from packages/ports you have >installed on your system. So you may be able to get away with using >portupgrade(/usr/ports/sysutils/portupgrade) to re-install those >packages and therefore "restoring" some if not all of /usr/local/bin. >Do a portupgrade -f -a which forces portupgrade to re-install all >packages/ports you have currently installed. > > > Nelis, First I think he might have to go re-install portupgrade. Xu--as root, perform the following steps: cd /tmp tar cvf etc.tar /usr/local/etc/ cd /usr/ports/sysutils/portupgrade make install && make clean portupgrade -farRx bsdpan- This will force reinstallation of all your ports. This will take *forever*. And, just in case, we've tarred up your /usr/local/etc directory so you have a backup in /tmp! Good luck!! Best, --Glenn -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." ~Benjamin Franklin, Historical Review of Pennsylvania, 1759