Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rehaana

macrumors newbie
Original poster
Mar 6, 2008
2
0
Hi,
I accidentally used "rm -rf" command to delete from the top directory instead of the one that i actually wanted to delete. Started with gcc giving error messages that it cant open a.out.

So , a lot of applications ( including ones that came with MAC leopard - chess, garage band etc ) got removed . Cant find them in Trash.
.Trashes doesnot have permission - shows administrator as the owner even though I am the administrator.

Cant find the logfiles to check what happened. Could someone please tell me Where are they located?

I donot have backup. Please tell me how to recover those applications - actually i dont even know what all got deleted since dont know where the logfile is.
:(

Plesae help.

Thanks a lot.
 
Reinstall Leopard. Then buy an external hard drive and use Time Machine. It might be a good idea for you to delete Terminal.
 
rm -rf = GONE.

Good ol' BSD. It does exactly what you tell it to... which is why you never do stuff unless you're sure you're doing it right.
 
There are ways to get your files back. You just have to ask how important they are.

I've used a program called testdisk on the windows side. It also has a Mac version.

If you really need to recover your files send me a PM and I can explain what my department's procedure is when a professor gets delete happy.

If it's just applications I'd back up your personal data and reinstall leopard/tiger/panther/etc. It'll take a lot less time.
 
I've joked around about this with other Unix junkies before, but I've never heard or seen this actually happen.

You're better off just reinstalling leopard and maybe running as a lower level user.

brn2ski00 said:
OMG, that is a big NO-NO.... just about as bad as "rm -r *"
rm -rf / will leave you with a nice clean root.
 
Better question is why would you run that command anyway? Just use the UI if you want to manage files. The Terminal is only for Trekkie nerds...
 
Better question is why would you run that command anyway? Just use the UI if you want to manage files. The Terminal is only for Trekkie nerds...

Sometimes it's easier/faster if you know where the file is already. I personally find typing faster than clicking. I guess that makes me a "Trekkie nerd". :D
 
OH NOS! always use "ls" to see whats in the directory your dealing with. well thats what i do.

is the Users folder gone? can you still login? i would erase and install Leopard.
 
Tough luck! Running that command on a *nix systems practically guarantees hosing your files. USB sticks are dirt cheap these days, get one and put your important stuff on it.
 
Wow. I was an exclusive linux user for almost a half decade and always read jokes about this happening to people. Never thought I'd see one in real life, certainly not on a mac.

Kidding aside, truly am sorry for your loss. In my early days of using linux, without any prior knowledge, I did some rather idiotic things. Trust me, one day you'll look back at this and laugh. It'll be a vary painful laugh, but a laugh none the less.

and yes. given the prices of external drives and the availability of time machine, there is no reason as to why someone should not use it.
 
Like the others have said, just reload leopard. There is really no way to restore the files you deleted - especially if you don't know which ones they were.

Once you delete important parts of OS X, you are pretty much stuck...
 
Did the applications themselves get removed? Or are they just not working?

Sounds like you were working on files near the root, and deleted the Applications folder itself. I'd definitely reinstall Leopard, but you could also find another mac user and just copy over their applications folder, minus any licensed apps they paid for but including all of the standard Apple ones.
 
Actually dealt with similar thing last week
the only thing that wa able to recover data was File Salvage, loaded on my computer , firewire target mode to the other persons machine with full salvage to external drive.
yeah got everything back.
including stuff from a few months back long deleted, but not a disaster.
 
Thanks all of you.

What actually happened ws that I had installed gcc 4.0 then installed a later version of gcc, after which things stopped working. So, I was removing the gcc completely and going to reinstall it. And then I did, cd.. , cd.. andrm -rf * , thinking that I was still in the top level gcc dir while I actually was near to the root directory.

Anyway, I have decided to alias my rm command to "rm -i " in .bashrc file so that it always asks me ( unless some day i decide to use \rm - which i am pretty sure that i wd since i have very little patience) .

I guess I am going to re-install leopard ( i prefer that since it ensures a clean slate when i dont know which files got deleted ) . But what i am wondering is where do teh files actually go if i delete them using "rm -rf". Since they can still be got back using some tools, doesnt that mean that they shd be around in the hard-disk. may be not in a file format though. Anyway, thanks for all teh support. You guys are awesome.
 
There are ways to get your files back. You just have to ask how important they are.

I've used a program called testdisk on the windows side. It also has a Mac version.

If you really need to recover your files send me a PM and I can explain what my department's procedure is when a professor gets delete happy.

If it's just applications I'd back up your personal data and reinstall leopard/tiger/panther/etc. It'll take a lot less time.

@ethernet76 - Do you still have your departments procedure available for a delete happy person like me?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.