Accidental data loss is a common occurrence during everyday computer use. It's not uncommon to delete a needed file on your Mac. When this happens, you'll want to know how to recover the lost file.
With this guide, you'll learn how to recover deleted files on your Mac using two of the most effective methods:
Here, we have enlisted some common ways to delete files on Mac and gathered two methods to help you recover files from different situations of file loss on Mac.
Know the reasons for file loss and choose the right way to recover deleted files now from your Mac:
Method 1: Using Terminal | Method 2: Using Mac File Recovery Software |
---|---|
|
|
Note that Terminal can't help you recover files that you permanently deleted by emptying the Trash on your Mac or using the rm command in Terminal.
This code translates to: ```javascript $(document).ready(function() { $('.click_copy_box .click_button').on('click', function() { var self = $(this); // Store the clicked element var Url2 = $(this).parent().find('textarea'); // Find the textarea in the parent element Url2.val(Url2.val()); // Set textarea value Url2.select(); // Select the text document.execCommand("Copy"); // Execute the copy command $(this).html('Copied'); // Change button text to "Copied" setTimeout(function() { // Delay for 3 seconds self.html('Click to copy'); // Reset button text to "Click to copy" Url2.blur(); // Remove focus from textarea }, 3000); }); }) ``` This script is a jQuery function that handles copying the text inside a textarea when a button is clicked. Upon clicking the button, the text is selected and copied to the clipboard. The button's text temporarily changes to "Copied" for 3 seconds before reverting back to "Click to copy", and the textarea loses focus.
It's high time you picked the right method and followed a specific tutorial to instantly undelete a file or reverse the RM command from the Mac Terminal.
Applies to: Restoring deleted files on Mac by dragging and dropping or right-clicking and moving them to the Trash.
This is a regular method that Mac users sometimes use to delete or recover files through the Terminal. Not only can you delete files on your Mac as shown above, but you can also use the command line to recover deleted files from the Mac Terminal.
Follow these steps to recover deleted files on your Mac using the Terminal with the following UTF-8 encoding:
(This was on a MacBook Pro running macOS Mojave 10.14.2.)
Step 1: Go to Finder > Applications > Utilities, and then double-click Terminal.
Step 2: Type cd.Trash, and then hit "Enter."
Step 3: Type ls and press Return.
Step 4: Type mv yourfilename ../ and press "Enter." (Make sure to use your file's full name in the command.)
5. Type Quit, and then close the terminal window.
Step 6: Open Finder and type the name of your lost file in the search bar in the top right corner.
Here you will see your recently recovered file. You can move it to any location of your choice.
Applies to: recovering files from the Trash, using Option+Shift+Command+Delete to delete files, and using the rm, rm -R, or rm -f command to delete files.
As mentioned in Method 1, terminal commands work only when you want to recover deleted files from Mac trash. If you have emptied the Trash, used Option+Shift+Command+Delete keys or executed rm, rm -R, rm -f command, then chances are that your Mac file is not recoverable.
Another option you can try is to let a reliable Mac data recovery software help you out. If you've deleted files from Mac Terminal following the above three steps, the data recovery wizard can assist you.
< strong > Steps to Recover Deleted Files from Mac (Reverse RM -R -F):
Note: You can first click on "Disk Backup" on the left to create a backup. The software will recover the deleted files from the backup image. This prevents further damage to your disk and data, making it safer and more reliable.
Step 1: Scan the deleted files
Select the hard drive, external drive, or SSD that contains the important data and files you want to recover, then click Search for lost files.
Step 2: Filter for missing files
The software will scan the selected volume quickly and thoroughly, trying to find as many deleted files as possible. Filter the required files by Type and Path options.
< strong > Step 3: Recover the deleted file
Double-click to preview the deleted files, and then click the “Recover” button to get them back.
After you recover files from a Mac, remember to save them to an external drive. Once you're sure the device can save files again, you can move the recovered files back to your Mac.
What else can the Mac Data Recovery Wizard do:
1. Recover Files from Mac That Terminal Command Line Can't Handle:
2. Search for various types of files, including:
Mac Data Recovery Wizard recovers files like photos, documents, videos, audio, email and more from your Mac.
3. Recover data from all types of storage devices:
Mac Data Recovery software recovers data from Mac (PC), hard drive, USB drive, SD card, memory card, digital camera and other devices.
On this page, we demonstrate how to delete files properly on a Mac. Based on feedback from most Mac users, we have also gathered two reliable and practical methods to help you safely recover lost files from your Mac.
Now it's your turn. Take it slow, and follow this guide to put the files back on your Mac.