Re: rm -rf and fat fingers
On Wed, Jul 22, 2009 at 8:18 PM, Jimmie Jamesjimmie...@gmail.com wrote: So here I was, half asleep, removing some old directories as root, and here's what I did...sitting in /home/jimmie after su jim...@jimmiejaz 101 [0] /home/jimmie#rm -rf cd /usr/local/lib (note the space, the PWD is home/jimmie/) Now, a lot of libs went missing from /usr/local/lib. With libchk, last locatedb I've been able to reinstall most of the libs. My ~/ *seems* unaffected, but I'm worried about that, I don't notice anything missing, but I could be wrong. What I'm thinking is the rm -rf found no 'cd' and moved to wipe out /usr/local/lib Would this be a correct assumption? Yes, this is correct. Similarly, if you were to: rm -rf .mozilla /usr/local/lib It would remove your $HOME/.mozilla (assuming you were in $HOME) as well as /usr/local/llib. Your $HOME directory *should* be fine. Unless you had a 'cd' directory, of course. ;) -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: rm -rf and fat fingers
2009/7/22 Jimmie James jimmie...@gmail.com: So here I was, half asleep, removing some old directories as root, and here's what I did...sitting in /home/jimmie after su jim...@jimmiejaz 101 [0] /home/jimmie#rm -rf cd /usr/local/lib (note the space, the PWD is home/jimmie/) Now, a lot of libs went missing from /usr/local/lib. With libchk, last locatedb I've been able to reinstall most of the libs. My ~/ *seems* unaffected, but I'm worried about that, I don't notice anything missing, but I could be wrong. What I'm thinking is the rm -rf found no 'cd' and moved to wipe out /usr/local/lib Would this be a correct assumption? Sounds like you're on the right medicine. If you don't have a ton (that's 2000 in real world measures, or 1000 in beheader speak) of packages, you can always reinstall all of your packages to make sure you've caught every little thing (including things that future packages/ports may wish to link to). Well, you still can with a lot, but that might take a while. And, yes, rm -rf is a naughty naughty boy. Excepting the sense in which he always does exactly as he is told. -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: rm -rf and fat fingers
Rolf G Nielsen wrote: Jimmie James wrote: So here I was, half asleep, removing some old directories as root, and here's what I did...sitting in /home/jimmie after su jim...@jimmiejaz 101 [0] /home/jimmie#rm -rf cd /usr/local/lib (note the space, the PWD is home/jimmie/) Now, a lot of libs went missing from /usr/local/lib. With libchk, last locatedb I've been able to reinstall most of the libs. My ~/ *seems* unaffected, but I'm worried about that, I don't notice anything missing, but I could be wrong. What I'm thinking is the rm -rf found no 'cd' and moved to wipe out /usr/local/lib Would this be a correct assumption? And yes, I sat in the stupid corner with the dunce hat on. Hi Jimmie, Out of curiousity, what were you trying to do when you issued that command? And this reminds me of an equally stupid thing I did a few years ago. I had a directories named share on three different partitions. These were for files that I and my then current gf shared. At one point I wanted to clean them all out, and issued this command: find -s / -type d -name share -exec rm -Rd {}/* \; -exec rm -Rd {}/.* \; Fortunately I had backups. And after that I renamed those share directories to something else. And yes, I too sat in the stupid corner. I messed up the JPEG update somehow, many ports were failing to build. Ran libchk and found some unused/need libraries, and directories, so I was going to rm them. Typed in rm -rf, flipped to another terminal to gather my list, then thought it would be better if I was actually in /usr/local/lib so typed in cd /usr/local/lib without realizing I was in the terminal with rm -rf ready to go... I noticed as soon as I hit [enter] and was able to ^c it a few seconds later, but the damage was done. Lack of coffee/beer and administration is a Bad Thing (tm). Pure stupidity trying to rush to get the day started. Lesson learned. -- Over the years I've come to regard you as people I've met. I may be schizophrenic, but at least I have each other, and when I am alone I am together. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: rm -rf and fat fingers
Jimmie James wrote: So here I was, half asleep, removing some old directories as root, and here's what I did...sitting in /home/jimmie after su jim...@jimmiejaz 101 [0] /home/jimmie#rm -rf cd /usr/local/lib (note the space, the PWD is home/jimmie/) Now, a lot of libs went missing from /usr/local/lib. With libchk, last locatedb I've been able to reinstall most of the libs. My ~/ *seems* unaffected, but I'm worried about that, I don't notice anything missing, but I could be wrong. What I'm thinking is the rm -rf found no 'cd' and moved to wipe out /usr/local/lib Would this be a correct assumption? And yes, I sat in the stupid corner with the dunce hat on. Hi Jimmie, Out of curiousity, what were you trying to do when you issued that command? And this reminds me of an equally stupid thing I did a few years ago. I had a directories named share on three different partitions. These were for files that I and my then current gf shared. At one point I wanted to clean them all out, and issued this command: find -s / -type d -name share -exec rm -Rd {}/* \; -exec rm -Rd {}/.* \; Fortunately I had backups. And after that I renamed those share directories to something else. And yes, I too sat in the stupid corner. -- Rolf Nielsen ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org