Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How To _REALLY_ breakmygentoo!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
dermot
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2003
Posts: 108
Location: Dublin, Ireland

PostPosted: Tue Nov 25, 2003 4:34 pm    Post subject: How To _REALLY_ breakmygentoo! Reply with quote

Today I did a stoopid thing. I downloaded the binary package for OpenOffice-Ximian from breakmygentoo.net and then extracted it into my / directory. Not surprisingly it didn't work (I had one of those dumbass moments). So I typed:
Code:
for i in `tar -tjf openoffice-ximian-1.1.0.tar.bz2`
do

rm -rf ${i}

done


And completely borked my gentoo. Much hilarity ensued.
_________________
Dermot

I bought some rock star ashes from the back of Rolling Stone
I don't think he would've minded - he couldn't sell his soul
Back to top
View user's profile Send private message
Qball
Apprentice
Apprentice


Joined: 25 Nov 2002
Posts: 196

PostPosted: Tue Nov 25, 2003 5:26 pm    Post subject: Reply with quote

he he, thats funny.
Back to top
View user's profile Send private message
fatcat.00
Tux's lil' helper
Tux's lil' helper


Joined: 12 Aug 2002
Posts: 145

PostPosted: Wed Nov 26, 2003 4:06 am    Post subject: Reply with quote

Ouch. That'll leave a mark.

My advice is "don't do that" 8O
_________________
-- Fatcat
Back to top
View user's profile Send private message
Lews_Therin
l33t
l33t


Joined: 03 Oct 2003
Posts: 657
Location: Banned

PostPosted: Wed Nov 26, 2003 6:20 am    Post subject: Re: How To _REALLY_ breakmygentoo! Reply with quote

dermot wrote:
Today I did a stoopid thing. I downloaded the binary package for OpenOffice-Ximian from breakmygentoo.net and then extracted it into my / directory. Not surprisingly it didn't work (I had one of those dumbass moments). So I typed:
Code:
for i in `tar -tjf openoffice-ximian-1.1.0.tar.bz2`
do

rm -rf ${i}

done


And completely borked my gentoo. Much hilarity ensued.


For the newbs among us (me), what does that do?
Back to top
View user's profile Send private message
canibuz
n00b
n00b


Joined: 23 Feb 2003
Posts: 61

PostPosted: Wed Nov 26, 2003 10:55 am    Post subject: Reply with quote

deletes everything
Back to top
View user's profile Send private message
yatesco
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2002
Posts: 113
Location: England

PostPosted: Wed Nov 26, 2003 12:24 pm    Post subject: Reply with quote

See, if you had used a GUI, that wouldn't have happened!

And these people think CLI are better!

:0

P.S. I am only kidding!!!! Don't flame!!!
_________________
Truth lasts longer than lip service

yatesco.blogspot.com
http://homepage.ntlworld.com/colin.yates/
Back to top
View user's profile Send private message
carpman
Advocate
Advocate


Joined: 20 Jun 2002
Posts: 2202
Location: London - UK

PostPosted: Wed Nov 26, 2003 12:25 pm    Post subject: Reply with quote

See this thread
https://forums.gentoo.org/viewtopic.php?t=108955&highlight=

for same thing plus few examples of how to safe guard yourself.
_________________
Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Wed Nov 26, 2003 12:44 pm    Post subject: Reply with quote

How to (more) safely undo your tar...

for i in `tar -tjf openoffice-ximian-1.1.0.tar.bz2`
do

rm -f ${i} || rmdir ${i}

done

Do it twice.
Back to top
View user's profile Send private message
dermot
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2003
Posts: 108
Location: Dublin, Ireland

PostPosted: Wed Nov 26, 2003 1:52 pm    Post subject: Reply with quote

Lews_Therin:
Quote:
For the newbs among us (me), what does that do?

It won't quite delete everything, but it pretty much deletes any directory that the OpenOffice-Ximian tar put files into, which included /usr/bin among others :( It also borked portage, so I couldn't just do a re-emerge of the system/world.

The rm -r means delete recursively, the f switch means force. Basically, if I'd just typed 'rm -r' it would have been fine(ish) - rm would have refused to delete non-empty directories. Adding the f forced to delete them without asking me first!

It's a pain, but in a way I'm glad because it means that I can reinstall Gentoo, applying everything I've learned since the last time I installed it!
_________________
Dermot

I bought some rock star ashes from the back of Rolling Stone
I don't think he would've minded - he couldn't sell his soul
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Wed Nov 26, 2003 2:52 pm    Post subject: Reply with quote

dermot wrote:
The rm -r means delete recursively, the f switch means force. Basically, if I'd just typed 'rm -r' it would have been fine(ish) - rm would have refused to delete non-empty directories. Adding the f forced to delete them without asking me first!


Hmm, really? I was under the assumption rm -r would just try to delete everything recursively, whereas rm -rf would force it.
Back to top
View user's profile Send private message
dermot
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2003
Posts: 108
Location: Dublin, Ireland

PostPosted: Thu Nov 27, 2003 12:30 pm    Post subject: Reply with quote

I'm not sure whether or not you are being sarcastic, because that's what I said. In reply to Lews_therin, who asked what my commands would have achieved.

edit:

no, wait, I see what you're saying; the -f switch would force it to delete, say, write-protected files/directories. The -r will delete directories, regardless of whether or not they contain anything. I'm just trying to remember why I felt the need to add the -f... Hang on, I'll do it again :P
_________________
Dermot

I bought some rock star ashes from the back of Rolling Stone
I don't think he would've minded - he couldn't sell his soul
Back to top
View user's profile Send private message
Lews_Therin
l33t
l33t


Joined: 03 Oct 2003
Posts: 657
Location: Banned

PostPosted: Thu Nov 27, 2003 10:36 pm    Post subject: Reply with quote

dermot wrote:
Lews_Therin:
Quote:
For the newbs among us (me), what does that do?

It won't quite delete everything, but it pretty much deletes any directory that the OpenOffice-Ximian tar put files into, which included /usr/bin among others :( It also borked portage, so I couldn't just do a re-emerge of the system/world.

The rm -r means delete recursively, the f switch means force. Basically, if I'd just typed 'rm -r' it would have been fine(ish) - rm would have refused to delete non-empty directories. Adding the f forced to delete them without asking me first!

It's a pain, but in a way I'm glad because it means that I can reinstall Gentoo, applying everything I've learned since the last time I installed it!


Doh! Talk about horrible mistakes...time to add another entry to the list of "never ever do these"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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