Can I recover my /opt/local/bin folder that I accidentally deleted?

I'm running Mac OS X 10.5.8. I was recently uninstalling mysql5 from /opt/local/bin.

I typed:

rm -rf /opt/local/bin mysql*

instead of

rm -rf /opt/local/bin/mysql*

This deleted my entire /opt/local/bin directory which puts me in a bit of a bind.

Is there any way to recover those files? If not, I have a friend that is using a similar set of programs, would it be possible to use the contents of his folder?

If I end up needing to reinstall everything in this folder, what is the best way to go about doing this?

Answers


There is no 100% fool-proof way to recover the files. In fact, if you've left the machine running after issuing the rm command, the OS might have mistakenly viewed the disk space formerly occupied by /opt/local/bin as free space, and may have written something there. Once that happens, complete recovery becomes pretty iffy.

Although there are data-recovery tools which one might use when such a disaster strikes, fortunately for you you lost programs, not personal data. The easiest, most sure-fire way to restore the directory is to reinstall the programs.

PS. Welcome to the club. It is usually only after such an experience that one becomes enthusiastic about backing up!


I reinstalled ports and all apps, etc.

I'm back up and running and getting a good backup strategy in place.


Need Your Help

Android AccessibilityService Event not received ONLY in KitKat (4.4)

java android android-4.4-kitkat accessibilityservice

I have created Accessibility service in Android and it works perfectly on 4.2 (Jelly Bean) and 5.1 (Lollipop) but not on 4.4 (KitKat).