Accidently i done rm -rf to one of my folder. How to recover it?
migrated from serverfault.com Aug 18 '10 at 15:30
It seems that a particular folder was deleted and not the entire drive.
First step, shut the machine down. This will help prevent those sectors from being over written.
Second step, go search for mac recovery software and buy something you like. There is a long list of software. This company has a good rep and might be worth a try: link text
Don't forget to make a backup of your existing data prior to recovery attempts. Do this from another computer with the disk attached externally.
If this lost data is critical to the survival of a business (as in people go to jail or the doors shutdown) then you may consider taking the drive directly to a data recovery specialist and pay the big bucks.
In the meantime put a new drive in the machine, reinstall the os and turn on time machine. Start copying your data back from the backup you just made.
If it didn't complete, or if you haven't used the server at all since, and I mean at all, it's possibly recoverable but it will be expensive (several thousand) and not guaranteed. Otherwise, ++jscott.
Macs use HFS, not the linux filesystems, so you'll need a mac specific tool. You'll never get it back to a bootable state without reinstalling, but if you need to recover some critical data try using a 3rd party mac disk recovery tool. I don't have a specific tool to recommend, you should google, but there are a few commercial ones for around 100 USD or a bit less. http://www.mac-file-recovery.com/ seems to have a free download that claims to show you what you could expect to recover so this might at least give you an idea about what is possible.
I've used Norton Disk Doctor for Macs in the past but this is no longer available - however it proves that its possible to retrieve at least some data with this type of approach.