[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Restoring /etc/inittab



On 2004-04-29, Thomas Adam penned:
>
> --- Shaun Jackman <sdj@sfu.ca> wrote:
>
>> To answer your other question, I did something along the lines of...
>> 
>> rm passwd~ *
>
> Well that was stupid!

[snip]

>  
> The reason that happend was because you had a space after the
> 'passwd~', hence the shell globbed everything in /etc, and replaced it
> with all the filenames contained therein.
>
> What you should have done was:
>
> rm *~
>
>> I have -i aliased into cp, mv, and rm, so I don't know how it
>> happened! If my system ever boots again, I'll be browsing through the
>> .bash_history.
>
> No need, I've just told you why. :) The lesson here is *don't* do
> anything as root until you are sure.

Um, no, you haven't.  If rm is aliased to 'rm -i' in root's environment,
it should have prompted.  Unless he neglected to mention that he
actually did 'rm -rf' ...

-- 
monique



Reply to: