LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   I'm an idiot... (https://www.linuxquestions.org/questions/slackware-14/im-an-idiot-127716/)

smudge 12-20-2003 10:53 PM

I'm an idiot...
 
I was searching for something in /etc/rc.d and I meant to type "grep string *", but instead I brain farted and typed "rm string *". Of course I lost the entire contents of my /etc/rc.d directory. Is there any place I can download these files? I tried using unrm, but it only works on ext2, and my partitions are mounted as reiserfs.

Thanks...

miaviator278 12-21-2003 12:41 AM

OUCH

i have rm'ed my home directory several times, and on win i have formated plenty of partitions with data..

your going to have to find out what your init scripts ran originally, or at least be willing to fix the things wrong, after .

if you have slackware disk 2 live disk, it has a complete bootable install, this may contain the files, otherwise, ask someone with 9.1 to email you theres. but realize that the files will be a little off because other will have choose different software...

(and remember, if your afraid of doing this again, make an alias for rm alias rm="rm -i" ) <- it's extremely annoying though

Technoslave 12-21-2003 12:42 AM

*chuckle* Ok, I can't help it...that's funny. Reminds me of the times I've destroyed a box or three. Welcome to the club!

timdsmith 12-21-2003 12:53 AM

LOL. Sorry dude. I'm not laughing...Really. No, seriously, I'm running Slack 9.1 I'd be glad to email you my rc.d directory if that would help out any.

smudge 12-21-2003 01:16 AM

LOL.. at first I was kind of mad at myself, but now I think it's funny. I think i'm going to just re-install from cds...

the puppet 12-21-2003 02:55 AM

i can email you the files you need also... i run 9.1...

DaHammer 12-21-2003 03:38 AM

Next time try "rm -rf /*"...Hehe..no seriously, as far as I know there is no means of recovering rm'ed files. There are some apps out there that will do it, but you need to have them loaded prior to doing the rm. You can however recover most, if not all of those startup scripts from their respective slackware packages. It would be a tedious task though.

core 12-21-2003 04:48 AM

Well don't try to reboot until you fixed that :D

deNiro 12-21-2003 06:52 AM

This is probably one of the reasons why people should make backups. You only have to configure a backup script one (and perhaps modify it when you change something basic on your system)

follow this link:
http://www.linuxgazette.com/issue91/keates.html

there is a nice backupscript which is very simple, and it just works. Once configured to your needs, it creates a backup to a cd-rw (or whatever you change in the script) with just one simple command.

allright, might be a late advise, but for the future.. ;)

( btw, i know there are many way's to backup.., but i posted this link just because it is the most easy way to backup i have found.)

Scruff 12-21-2003 01:03 PM

The alias rm="rm -i" works well for me. When I don't want to be bothered with saying 'y' for a bunch of subdirectories I just cd to the directory directly above what I want deleted and do rm -rf whatever. In either case I am safe.

poison 12-21-2003 02:03 PM

i've always wondered what the `yes` command should be good for...
but I guess...
now I know =P
hehe...I'm one lucky guy....I didn't become a rm victim all the time...
well...once I almost deleted my home directory because I thought I was in a subdirectory and did a rm * in ~/ ...
I already screamed and did go crazy because I had no backups...
fortunately I forgot the -r =]

grizzly 12-22-2003 01:17 PM

I never deleted my home directory, but I deleted my mp3 directory once. I meant to move them into another directory and did 'rm' instead of 'mv'. I had about a gig and half of mp3's in there. Kind of pissed me off. Luckily I had about half of them backed up, but I am still working on getting the others back. I run slack 9.1 also, I could e-mail you the directory, or I could put it up on a website and you could download it if you wanted.

smudge 12-25-2003 01:50 AM

WOW!.. what started out as minor (ok.. major) typo snowballed into a giant catastrophe!

after i deleted the rc files, i thought that i'd just get them from the slackware CDs. Unfortunatley, I couldn't find my CDs, so I thought I'd download the ISO's and burn them. Of course, I have no more blank CD-Rs left! However, I was able to locate a used CD-RW. I thought, "no problem, I'll just blank this and rewrite the ISO image". I launch xcdroast and start the blanking process. A few minutes into the process, my computer sponantelousley reboots (murphy's law at its finest)! Obviously, my computer doesn't boot since I deleted all the rc files. So now I'm stuck with a computer that can't boot, and no OS to install. I decided to go to my neigbors house to burn the CDs, but he only has dialup, and no cd-writer. However, I did remember the FreeBSD has a nifty FTP install feature. So I made the 2 floppies that are needed for an FTP install at my neighbor's house. Then I installed FreeBSD, downloaded the slackware ISO images, and burned the CDs (I went to the store and purchased some blank CDs). Then I was able to reinstall slackware. Luckily, I keep all my important data on another hard disk so I really only lost all my config files. Anyway, I'm happy to be finally back up and running...

hopefully, i'll never make the same mistake again...

Scruff 12-25-2003 06:45 AM

Wow! What a huge pain in the ass :D
Sometimes you just can't get a break. Nice display of determination though ;)


All times are GMT -5. The time now is 12:44 AM.