Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick ways of killing a server

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Off Topic
View previous topic :: View next topic  
Author Message
bobthebob1234
LXF regular


Joined: Thu Jan 03, 2008 9:38 pm
Posts: 1369
Location: A hole in a field

PostPosted: Tue Aug 10, 2010 2:13 pm    Post subject: Quick ways of killing a server Reply with quote

Just killed a server. Oops Shocked

(Don't try this a home)
Code:
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
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8449
Location: Warrington, UK

PostPosted: Tue Aug 10, 2010 2:41 pm    Post subject: Reply with quote

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 Smile

As far as your question is concerned, I take the Fifth Smile
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
bobthebob1234
LXF regular


Joined: Thu Jan 03, 2008 9:38 pm
Posts: 1369
Location: A hole in a field

PostPosted: Tue Aug 10, 2010 4:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2430

PostPosted: Tue Aug 10, 2010 5:24 pm    Post subject: Reply with quote

Add penicilline Wink Rolling Eyes

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

Mr. Green Mr. Green
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8449
Location: Warrington, UK

PostPosted: Tue Aug 10, 2010 6:30 pm    Post subject: Reply with quote

Code:
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)
Back to top
View user's profile Send private message
ajgreeny
LXF regular


Joined: Wed May 10, 2006 9:18 pm
Posts: 448
Location: Oxfordshire.

PostPosted: Tue Aug 10, 2010 6:34 pm    Post subject: Reply with quote

It's always worth adding an
Code:
alias rm='rm -i'
and
Code:
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!
Back to top
View user's profile Send private message
MartyBartfast
LXF regular


Joined: Mon Aug 22, 2005 8:25 am
Posts: 814
Location: Hants, UK

PostPosted: Tue Aug 10, 2010 7:07 pm    Post subject: Reply with quote

I once intended to

Code:
rm -r foo*


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


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


I did have a backup though
Smile
_________________
I have been touched by his noodly appendage.
Back to top
View user's profile Send private message
Nickless-Wirth



Joined: Sun Nov 28, 2010 8:31 pm
Posts: 4
Location: planet earth

PostPosted: Mon Nov 29, 2010 12:11 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Off Topic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast