One-stop Way to Undo RM Command and Recover Deleted Files on Mac

LisaUpdated by Lisa Ou / Dec 31, 2020 09:20

- I deleted some files on an NTFS partition with ‘sudo rm –r /FOLDER’. Is there a way I could undo or recover what was removed?
- When I deleted folders or files in through OS X Terminal using the rm –rf, where do they go? Can files deleted with rm-rf be recovered?

It is possible to recover files deleted by RM on Mac. Different from common deletions, your RM deleted files cannot be found in Trash Bin. Thus, when you mistakenly delete files using RM command, you need to use Mac data recovery software to undo RM command and get back files after RM.

Now, let’s read together to see how to find and recover RM deleted files on Mac.

Undo RM Command and Recover Deleted Files on Mac

Guide List

1. How to Delete File on Mac Using RM Command

In most cases, you can drag and drop files to Trash Bin to delete Mac files. But what if the file is locked, or you cannot empty the Trash? During this time, you can delete files with RM command.

If you want to delete a file named Example.rtf, you can type rm Example.rtf to delete a file using RM command.

If you want to delete a directory full of archives with subdirectories and files contained, you can run RM – R command like rm –R Archives to delete a directory on Mac.

Be aware that the RM deleted files are not saved in Mac Tash Bin. Thus, you had better make a backup before running RM command. Next time you want to recover RM deleted files on Mac without software, you can undo RM and rescue RM deleted files with Time Machine backup.

2. How to Recover Deleted Files by RM on Mac

If you have no backups, you can still recover RM files via FoneLab Data Retriever. The RM deleted files are not permanently erased. Mac just makes the occupied space as available for new files after running RM command. To get the higher success rate of RM file recovery, you had better stop using the disk that contained RM deleted files before.

Then here comes the question, how to undo an RM command without losing any uncommitted changes? Luckily, the Mac data recovery software can show you the currently existing and deleted files in a short time. You can select, search, preview and recover any file without storing or modifying.

In a word, you can recover files deleted by RM command on Mac before data are overwritten.

Main Features of Mac Data Recovery Software

  1. Recover RM files on Mac, including photos, videos, documents, audios, emails, archives, etc.
  2. Scan for RM command deleted files on the selected disk volume completely and quickly.
  3. Support RM file recovery from Mac, memory card, flash drive, hard drive and other removable drives.
  4. Fully compatible to undo RM command on Mac 10.7 and above (macOS Mojave included).
FoneLab Data Retriever
FoneLab Data Retriever

FoneLab Data Retriever - recover the lost/deleted data from computer, hard drive, flash drive, memory card, digital camera and more.

  • Recover photos, videos, contacts, WhatsApp, and more data with ease.
  • Preview data before recovery.

How to Undo RM Command and Recover Files Deleted by RM on Mac

Step 1Free download and install Mac data recovery software. To undo RM on Mac, you can click Start under Mac Data Recovery.

launch mac recovery

Step 2Choose the file type and hard disk drive according to the RM deleted files. Click Scan to enter into the Quick Scan mode by default.

choose data files

Step 3 When the quick scanning process finishes, you can see all RM deleted files in the left pane. If you fail to find the certain RM file, you can click Deep Scan to get more possible files deleted by RM command.

quick scan

Step 4 Double-click on a file to get a preview window if necessary. You can also enter name or path to find one RM file quickly. After selecting all files deleted by RM, you can click Recover to recover deleted files and undo RM command on Mac.

recover data

To avoid deleting important files by RM command by mistake, you can use - i flag for protection. For instance, when you run rm – iR Archives command, you will be asked to confirm the deletion.

Thus, you can get one more chance before regretting deleting files with RM command on Mac. Well, it is not the recommended way to delete Mac files.

All in all, you can recover files deleted by RM on Mac quickly and safely here. If you cannot find the certain file, you can run Data Retriever to find the lost or disappeared file in minutes too. It is a good tool that can protect your Mac from unexpected data loss cases all the time.

Leave your comment and join our discussion