Workable Solutions | Step-by-step Troubleshooting |
---|---|
Fix 1. Undelete with Terminal Command | Go to "Applications" > "Utilities" > double-click on "Terminal" to open the application > type cd .Trash...Full steps |
Fix 2. Restore with Backup on Mac | Connect the Time Machine backup disk to your Mac and turn it on > find files and select...Full steps |
Fix 3. Restore files with software | Download EaseUS file recovery software for Mac > select the location > scan...Full steps |
Mac Delete Situations: How to Understand "Delete" on Mac
Speaking of deleting files on Mac, what do you think? Moving files from the Desktop to the Trash or erasing a USB drive to wipe out all data? On a Mac computer, there are many ways to delete a file.
The most common method is to drag and drop unwanted files into the Trash. Also, you could use the shortcut "Option+Command+Delete" to quickly remove a file. Most Mac users might be uncommon about the last method. You can also delete files using the rm command.
By running "rm -rf ./Desktop/myScript.sh" command line in Mac Terminal, users could delete multiple unwanted files at one time.
A Brief Overview of rm Command Line
rm command simply deletes the directory entry for the file while leaving the disk blocks it used, untouched. You can try to re-discover those blocks' contents with some advanced methods. The essential issue is that nothing else re-uses any of the disk blocks represented by your file.
How to Recover Files Deleted on Mac - with Terminal, Time Machine, Software
If you have performed a quick deletion with the rm command line to mistakenly remove some needful files from the desktop or anywhere else on Mac, the files won't go to the trans bin, so you can't recover the lost files from trash bin directly. But don't worry, you can still use the advanced methods below to recover deleted files by command line possibly.
Method 1. Undelete Files with Terminal Command on Mac
1. Go to "Applications" > "Utilities" > double-click on "Terminal" to open the application.
2. Type in the following Terminal command: cd .Trash, then hit the "Return".
3. Type mv xxx ../. Replace the "xxx" part with the full name of the file you deleted. Hit the "Return" key.
4. Type Quit in the Terminal window.
5. Launch the "Finder" window. Enter the name of the deleted files in the search bar at the top right part of the window to find the restored files.
Note: You must type the Terminal commands exactly, otherwise, the data recovery will fail.
Method 2. Restore with Time Machine Backup on Mac
- Important
- Only users with backups can apply to this solution. If you haven't made any backup before, jump to the next part to recover deleted Mac files with the user-friendly EaseUS Data Recovery Wizard for Mac.
Time Machine, the built-in backup feature of your Mac, automatically backs up all of your files, including apps, music, photos, email, documents, and system files. With the backup, Mac deleted file recovery from the command line will be easily settled.
1. Connect the Time Machine backup disk to your Mac and turn it on.
2. Find the files you want to restore in your Time Machine backup. Select an item and press Space Bar to preview it and make sure it's the one you want.
3. Click "Restore" to recover the items you selected.
Method 3. Restore Mac Deleted Files with a Data Recovery Tool Without Backup
If you're not familiar with the command line, nor have a Time machine backup, a Mac data recovery program is your best choice. EaseUS Data Recovery Wizard for Mac not only can help recover files deleted by the command line but also restore lost files from formatted hard drive/partition on Mac, virus infection, system reinstallation, and more. Follow the three steps below to see how to make it in the easiest and quickest way.
Step 1. Scan for deleted files
Select the hard drive, external drive, or SSD where your important data & files were deleted and click "Search for lost files".

Step 2. Filter the lost files
The software will run quick and deep scans and work hard to find as many deleted files as possible on the selected volume. Filter wanted files through the "Type" and "Path" options.

Step 3. Recover deleted files
Double-click the deleted files to preview. Then, click the "Recover" button to get them back.

Was This Page Helpful?

Cedric Grantham is one of the senior editors of EaseUS who lives and works in Chengdu, China. He mainly writes articles about data recovery tutorials on PC and Mac and how-to tips for partition management. He always keeps an eye on new releases and loves various electronic products.

Jean has been writing tech articles since she was graduated from university. She has been part of the EaseUS team for over 5 years. Her special focuses are data recovery, disk partitioning, data space optimization, data backup and Mac OS. By the way, she's an aviation fan!
Related Articles
-
How to Recover SD Card with Bad Sectors on Mac [2023 Guide]
Dany/Feb 22, 2023
-
How to Recover Data from Macintosh HD Data
Daisy/Feb 22, 2023
-
Tracy King/Feb 22, 2023
-
Top 5 Completely Free Data Recovery Software for macOS/Mac OS X
Cedric/Feb 22, 2023