View previous topic :: View next topic |
Author |
Message |
dermot Tux's lil' helper
Joined: 28 Mar 2003 Posts: 108 Location: Dublin, Ireland
|
Posted: Tue Nov 25, 2003 4:34 pm Post subject: How To _REALLY_ breakmygentoo! |
|
|
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 |
|
|
Qball Apprentice
Joined: 25 Nov 2002 Posts: 196
|
Posted: Tue Nov 25, 2003 5:26 pm Post subject: |
|
|
he he, thats funny. |
|
Back to top |
|
|
fatcat.00 Tux's lil' helper
Joined: 12 Aug 2002 Posts: 145
|
Posted: Wed Nov 26, 2003 4:06 am Post subject: |
|
|
Ouch. That'll leave a mark.
My advice is "don't do that" _________________ -- Fatcat |
|
Back to top |
|
|
Lews_Therin l33t
Joined: 03 Oct 2003 Posts: 657 Location: Banned
|
Posted: Wed Nov 26, 2003 6:20 am Post subject: Re: How To _REALLY_ breakmygentoo! |
|
|
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 |
|
|
canibuz n00b
Joined: 23 Feb 2003 Posts: 61
|
Posted: Wed Nov 26, 2003 10:55 am Post subject: |
|
|
deletes everything |
|
Back to top |
|
|
yatesco Tux's lil' helper
Joined: 17 May 2002 Posts: 113 Location: England
|
Posted: Wed Nov 26, 2003 12:24 pm Post subject: |
|
|
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 |
|
|
carpman Advocate
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Wed Nov 26, 2003 12:25 pm Post subject: |
|
|
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 |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Wed Nov 26, 2003 12:44 pm Post subject: |
|
|
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 |
|
|
dermot Tux's lil' helper
Joined: 28 Mar 2003 Posts: 108 Location: Dublin, Ireland
|
Posted: Wed Nov 26, 2003 1:52 pm Post subject: |
|
|
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 |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Wed Nov 26, 2003 2:52 pm Post subject: |
|
|
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 |
|
|
dermot Tux's lil' helper
Joined: 28 Mar 2003 Posts: 108 Location: Dublin, Ireland
|
Posted: Thu Nov 27, 2003 12:30 pm Post subject: |
|
|
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 _________________ 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 |
|
|
Lews_Therin l33t
Joined: 03 Oct 2003 Posts: 657 Location: Banned
|
Posted: Thu Nov 27, 2003 10:36 pm Post subject: |
|
|
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 |
|
|
|