From owner-freebsd-current@FreeBSD.ORG Wed Apr 21 21:42:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E153116A4CE; Wed, 21 Apr 2004 21:42:20 -0700 (PDT) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92C2D43D39; Wed, 21 Apr 2004 21:42:20 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (24-161-166-146.san.rr.com [24.161.166.146]) by smtp-relay.omnis.com (Postfix) with ESMTP id 2FAF4881CF9; Wed, 21 Apr 2004 21:42:19 -0700 (PDT) From: Wes Peters Organization: Softweyr.COM To: freebsd-current@freebsd.org Date: Wed, 21 Apr 2004 21:42:19 -0700 User-Agent: KMail/1.6.1 References: <4084F85B.5070909@delit.net> <20040420121423.GA1154@frontfree.net> <20040420125025.GA30066@energistic.com> In-Reply-To: <20040420125025.GA30066@energistic.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404212142.19308.wes@softweyr.com> X-Mailman-Approved-At: Thu, 22 Apr 2004 04:41:04 -0700 cc: current@freebsd.org Subject: Re: A way to recover deleted files (just contents) from USF2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2004 04:42:21 -0000 On Tuesday 20 April 2004 05:50, Steve Ames wrote: > On Tue, Apr 20, 2004 at 08:14:23PM +0800, Xin LI wrote: > > On Tue, Apr 20, 2004 at 12:26:32PM +0200, Oliver Brandmueller wrote: > > > This is a FAQ. Und the frequent answer is: > > > > > > You can easily recover valuable data after accsional deletion from > > > your backup. If you don't have a backup, then your data don't seem to > > > be woth having them backed up. > > > > Some Unix coursebooks even comment the result of accidentialy removal > > of a file without backing up as "User should take this as a lesson". > > That's kinda silly. Unless files are backed up at every edit then most of > us only have periodic filesystem backups. Lets say I just download a 150M > file and then accidentally delete it. Rather than wasting time and > bandwidth downloading again it'd be simpler to just 'unrm' it. Odds are > that diskspace and even inode haven't been recycled yet. > > Mind you such an option takes some of the breathtaking fun of working > without a net away from your shell session but hey... sometimes you > actually do need the airbag. The easy way to implement this is to make a 'remove file' command that really doesn't remove the file. Yeah, it's that trivial. When the user says 'rm file' you move it into a holding area and note it's original location, and when the user says 'unrm file' you put it back. It doesn't free any of the disk space, but it does conceptually get it out of the user's face. Then you add a command to clear out the temporary holding area. We can call that holding area the 'trash can' and the program 'empty.' (If you're a VMS-head, you might be tempted to call it 'purge.') Yes, this can all be done with a few lines of scripting. Inevitably some damn fool is going to want an 'unempty' program too. We'll let YOU write that one. -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com