Quick ways of killing a server

Non-computer-related chit-chat

Moderators: ChrisThornett, LXF moderators

Quick ways of killing a server

Postby bobthebob1234 » Tue Aug 10, 2010 1:13 pm

Just killed a server. Oops :shock:

(Don't try this a home)
Code: Select all
sudo mv /* ../


Well that was a bit silly of me.

Missed a .


Any others that people have done?
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1373
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby nelz » Tue Aug 10, 2010 1:41 pm

If you'd used * instead of ./* you couldn't have accidentally type /*.

Anyway that's not dead, just rather ill, unless it's a remote server and you rebooted before realising what you'd done :)

As far as your question is concerned, I take the Fifth :)
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby bobthebob1234 » Tue Aug 10, 2010 3:04 pm

well it wasn't a remote server but when i logged in locall it seemed very ill so i rebooted then it was very very ill.

reinstalled in the end cos i had only just installed it. all working now (appart from the fact i just locked myself out from moodle...)

for future reference though how does one fix the it when it is ill?
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1373
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby Dutch_Master » Tue Aug 10, 2010 4:24 pm

Add penicilline ;) :roll:

(sorry, couldn't let this one pass by :oops: )

:mrgreen: :mrgreen:
Dutch_Master
LXF regular
 
Posts: 2471
Joined: Tue Mar 27, 2007 1:49 am

Postby nelz » Tue Aug 10, 2010 5:30 pm

Code: Select all
cd ..
mv anythingthat shouldbein the root /


There's only a limited number of directories in / so it's not hard to identify what you should move.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby ajgreeny » Tue Aug 10, 2010 5:34 pm

It's always worth adding an
Code: Select all
alias rm='rm -i'
and
Code: Select all
alias mv='mv -i'
either in ~/.bashrc or ~/.bash_aliases.

It will not completely stop things like that happening, but at least gives you one more chance to look at the command.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 462
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby MartyBartfast » Tue Aug 10, 2010 6:07 pm

I once intended to

Code: Select all
rm -r foo*


but was a little puzzled to see the error
Code: Select all
rm: cannot remove `foo': No such file or directory


and then realised my typo, I'd actually done
Code: Select all
rm -r foo *


I did have a backup though
:)
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 820
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby Nickless-Wirth » Mon Nov 29, 2010 12:11 am

I generally do these as "ls <whatever>" first, then arrow-up, edit, and away the root goes...

Not so obviously, I tend to have time to think of such problems - someone who is frantically trying to get something into working order, is generally not so lucky.
Member of the Institute of Market Dialysis
Nickless-Wirth
 
Posts: 4
Joined: Sun Nov 28, 2010 8:31 pm
Location: planet earth


Return to Off Topic

Who is online

Users browsing this forum: No registered users and 0 guests

cron