Help! Deleted files accidentally..

JZing
New Contributor III

Need help. I accidentally deleted a user directory using rm -R $dir Is there any way to recover it outside of something like disk doctor? We are using AD and they have logged in to empty folders already.

3 REPLIES 3

mm2270
Legendary Contributor III

The rm command is pretty permanent unfortunately. It's not like the deleted files go into a trash bin or something. They are gone.
You might be able to recover them with something like DataRescue, but it's not a given, and I would strongly encourage you to stop using the Mac entirely until you can use a tool like the above to see what it can recover. Because of how disk management works, the files are still there, but not accessible because the space they occupied on the disk has been allocated as empty blocks to the filesystem, so the more the computer gets used, the more likelihood of the original data being overwritten by newly written data and thus becoming unrecoverable.

wmayhone
New Contributor III

If you can pull the drive out asap, I'd also try using something like EaseUS Data Recovery Wizard. It's a paid program, but has helped me recover files for others in the past. But I haven't used it after the command you entered, so no guarantees.

JZing
New Contributor III

Thanks for the responses all. I know what I need to do. Is there a good utility to help search through the files you get back from Data Rescue? I have a bunch of unnamed files and it would be nice to search for key words to help use what I have recovered.