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

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
450
132
I wanted to reset the view settings for all folders, so I followed the advice posted by someone on the Apple forum. I opened Terminal and entered:
Code:
rm -rf .DS_Store /
The process took a long time, my computer became unresponsive, and it eventually locked up. When I restarted, I just got a flashing "?". I used my emergency partition to boot up the computer and not only was my internal HD wiped (except for a few empty folders), but my entire 1TB external backup drive was empty too. My entire life was on there! :mad:

I understand that modern file systems have backup file allocation tables. Is it possible to recover what was there using those? I hear that some rescue apps are unable to retrieve the original filenames, but they should all still be there right? I'm keeping the affected partitions unmounted to preserve them. Which tool is the best for my situation? I know of FileSalvage, Data Rescue, and Disk Drill. Thanks.
 
Yeah....you shouldn't trust to everything that anyone says or listen to what anyone says on the internet. That was some ******** of an advice.

you need to be careful using that command because if you don't you'll end up deleting everything into a disaster.
 
Last edited:
I know my way around a DOS prompt really well, but NIX is still pretty new to me. What should the command have looked like?
 
I know my way around a DOS prompt really well, but NIX is still pretty new to me. What should the command have looked like?

I wouldn't use unix terminal if you don't know what you doing and what the commands is going to do. Likewise, the Unix terminal are for more advance users. Recommend you use a third party GUI tool like Onyx to remove the DS.Store to begin with. But if really want to use unix terminal You would need to learn the commands and how to use it.

you can use the find command to find the DS.Store and delete it safely.
 
I actually use the terminal on a regular basis with much success, for various things, including compiling apps. I've used RM before too. This time I screwed up, badly. Thanks for the warning, and I'll give Onyx a try, but I'll still continue to use and learn about the Unix terminal.

So can you enlighten me as to why it deleted everything? It was the "/" at the end wasn't it?
 
I see. Well just be careful next time using the rm command. Do you have a backup before this disaster happen.

----------

So can you enlighten me as to why it deleted everything? It was the "/" at the end wasn't it?

yeah the forward slash at end points the path to the root directory of the Hard Drive which probably what cause the error which deleted everything...
 
WOW that sucks beyond anything. What an ****** to give you that command. I would recommend you find a recovery expert in your area and see if they can help you.

As long as you don't do ANYTHING at this point and don't try anything, they may be able to recover a good amount of files. There is recovery software you can use yourself but once you start installing new software and the operating system you would be destroying any chance of recovery.

It should be done on a different computer with your hard drives connected as secondary drives.

Good luck!
 
It is a fool for someone who doesn't know what the forward slash at end is going to do to the command. It telling the command to start delete everything from the root directory of the hierarchy.
 
Wow. That command first deleted the .DS_Store file from the current directory... then moved on to deleting every file starting with the root directory. While you should have checked what it did before you ran it, that was a seriously terrible thing for someone to do. I can only hope that it was unintentional.

jW
 
What's with the wowes here ?

Deleting files using rm command in linux/unix is dangerous and use it at your own risk.
 
Do you have a backup before this disaster happen.
my entire 1TB external backup drive was empty too.
Because external drives are mounted in root/Volumes, it got hit too.

The guy who wrote that instruction is a Level 8, #2 "Top Participant" in the Apple discussion community. Mods have been notified.

I picked up a 2TB external HD today for data extraction. Hopefully the recovery of 1,100 GB of data goes well.
 
Wirelessly posted (iPhone 4: Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3)

Wow, that really sucks! Not that it makes it any better for the OP, but I hope the "advice" was given in error rather than maliciously.
 
I'm surprised that anyone still uses Apple's forums at all. Even though no one from Apple provides any useful technical advice there, the people who do provide help are often "rewarded" by being censored for unfair reasons. I think it would be great if Apple's communities became literally deserted - maybe then Apple would get the message.
 
Yeah I dislike Apple forums too for a variety of reasons. According to the zombies there, Apple is always right and you are wrong, and mods actively censor any criticism of Apple.
 
If you made another mistake like that next time. you can stop the command from running by pressing ctrl-c on the keyboard while *nix terminal shell window is active. Or you look up the PID number of the command/process and kill it by entering this code in another shell window

Code:
sudo kill [enter PID number here]
and press enter

That would stop it. That goes for any process that is running.
 
I need to reinstall the OS on the wiped HD to get it back up and running. But I'd also like to store a copy of it, so I can work on further recovery, or in case I need to extract some important data from it. Is there a way to create a bit-for-bit disk image which includes data in the unallocated space?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.