Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2002 15:26:01 -0500
From:      mpd <mpd6334@cs.rit.edu>
To:        Peter Leftwich <Hostmaster@Video2Video.Com>
Cc:        sandy nandy <sandynandy@hotmail.com>, FreeBSD Questions <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: freebsd system wont boot [find *.core -exec rm -rf]
Message-ID:  <20020403152601.A68228@rochester.rr.com>
In-Reply-To: <20020403150156.K55317-100000@earl-grey.cloud9.net>; from Hostmaster@Video2Video.Com on Wed, Apr 03, 2002 at 03:08:09PM -0500
References:  <F31VcxjXHzfAbPM1EhX00001367@hotmail.com> <20020403150156.K55317-100000@earl-grey.cloud9.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 03, 2002 at 03:08:09PM -0500, Peter Leftwich wrote:
> On Wed, 3 Apr 2002, sandy nandy wrote:
> > HI ther all - i was practicing find and remove command in the root login and unfortunately i executed somehow rm -rf in the find command, actually  i specified to remove core files but it started removing all files. but i stopped iit in the middle. but nothing was working( for instance ps, vi etc etc). what do i ahve to do now to recover the system. PLEase LET ME KNOW IN DETAIL AS SSON AS POSSIBLE> I HAVE USE TEH MACHINE - thankx a lot in advance
> > sandy
> 
> First of all, you ought to alias the "rm" command to "rm -i" so you will be
> prompted "are you sure?"  The "rm -rf" basically means "keep removing
> recursively and forcefully!"

Aliasing to rm -i is nice for beginners, but once you're comfortable
with the command line you'll find it really holds you back. At a
previous job rm was aliased to rm -i by default in the system files,
which was incredibly annoying anytime I had to do work in other
accounts. YMMV, I guess.

> 
> Second of all, it is difficult to tell what damage has been done, so the
> best rememdy would be to obtain the kern.flp and mfsroot.flp images and
> create boot floppies for whatever version of FreeBSD you were running and
> reinstall the system.  There may be a way to *repair* your OS using
> /stand/sysinstall but I seriously doubt it.  (List?)

You can try making a fixit floppy. There are references in several
places on how to do that (I've never done so myself, so I can't be
of much help.) Depending on what was nuked, you might be able to save
some of your data that way.

If not, you're probably going to have to bite the bullet and re-install.

> 
> Finally, rather than practicing as root and doing dangerous remove commands,
> might I suggest instead doing a google search for /bin/sh scripts which
> were created to find and nuke *.core files on your system?  or post to a
> list such as this one the way such as you have and inquire what command
> line is safest to use to find and remove all *.core files on the system.
> 
> Bonus Answer: My shell is tcsh and in my ~/.cshrc file I have a line:
> limit coredumpsize 0            # don't make core files

I wouldn't suggest this if you do any programming, but if you don't
and you don't plan on filing bug reports that require backtraces, I
guess it's ok.

> 
> --
> Peter Leftwich

mike
-- 
___________________________________________________________
 
"IT IS INTERACTIVE HANDSHAKE GOLD!!!"
	- Pokey the Penguin from "HAPPY BIRTHDAY POKEY"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020403152601.A68228>