How to Revert Rm -Rf in Mac Os X?

I was trying to run a set of commands (all starting with rm -rf) to completely remove an application in Mac OS X. All my folders in Desktop are accidentally removed somehow. Is there a way to bring them back?

3

1 Answer

You can use PhotoRec but keep your expectations low, it's pretty unlikely that you would get back your data after an rm -rf operation. You can usebrew to install PhotoRec, it's part of testdisk (brew install testdisk).

If the files lost were on your Desktop, you may want to check on iCloud. By default Desktop and Documents files sync to iCloud Drive and most people don't deactivate that setting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest