Date: Fri, 14 Nov 2003 09:39:29 +1030 From: "Thyer, Matthew" <Matthew.Thyer@dsto.defence.gov.au> To: "'Robert Watson'" <rwatson@freebsd.org> Cc: "'current@freebsd.org'" <current@freebsd.org> Subject: RE: undelete for FreeBSD current? Message-ID: <5F13229E7BA2D611BD0300306E010DB08C9795@ednex503.dsto.defence.gov.au>
next in thread | raw e-mail | index | archive | help
Thanks Robert, The "strings" method worked very well in this instance. -----Original Message----- From: Robert Watson [mailto:rwatson@freebsd.org] Sent: Thursday, 13 November 2003 1:59 PM To: Barney Wolff Cc: Thyer, Matthew; 'current@freebsd.org' Subject: Re: undelete for FreeBSD current? On Wed, 12 Nov 2003, Barney Wolff wrote: > On Thu, Nov 13, 2003 at 11:30:51AM +1030, Thyer, Matthew wrote: > > I've done a bad thing and need to recover a single file in /usr/local/etc/rc.d/ after a rm -rf of /usr/local > > > > I've kept the file system relatively quiet since then. > > TCT may help. http://www.porcupine.org/forensics/tct.html but I don't > think it's been tested with current/ufs2. Also, don't expect to build > it on the system and then find a deleted file. > > But if you have a clue of what you're looking for, just grepping > /dev/da<n> or /dev/ad<n> might work. (grep -a -A100 -B100) Assuming that the file system had a fair amount of free space, and therefore wasn't fragmented, I've always found the "strings" command quite helpful in recovering text files after loss or deletion. It can also be nicely applied to /dev/mem if you accidentally close that pesky editor window without save... Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5F13229E7BA2D611BD0300306E010DB08C9795>