How to Recover Deleted Files from Mac Terminal in Proven Ways

Tracy King updated on Sep 18, 2020 to Mac File Recovery | How-to Articles

When it comes to recovering deleted files on Mac, there is more than one way to go. You can either use the command line in Terminal to perform Mac data recovery or effective third-party software to restore the deleted files on your Mac. Whether you want to recover deleted files on Mac without software for free using Terminal or look for another way around, you can find the way to do it from the following paragraphs.

Accidental data loss occurs quite often during the daily use of our computer. It's not rare that you may unintentionally delete the files you need on your Mac. When that happens, you will inevitably wonder how to retrieve your lost files. Here we recommend you try two effective ways to get your deleted files back on your Mac.

Part 1: How to Recover Deleted Files on Mac Using Command Line in Mac Terminal

If you want to recover deleted files on Mac without software or for free, the optimal solution should be using Terminal on your Mac. It can be very easy for regular Mac users to see Terminal in the utility folder. The terminal is a quite powerful and effective program which is offered by Mac OS X or macOS for controlling Macs. It can not only delete files on your Mac like in the situation presented above but also recover deleted files using the command line. ( The steps below are performed on a MacBook Pro running macOS Mojave 10.14.2.)

Step 1: Go to "Finder" > "Applications" > "Utilities" and  double-click "Terminal".

Step 2: Type cd.Trash and hit "Return".

Step 3: Type mv youfilename ../ and hit "Return". (It must be your full file name in the command line.)

Step 4: Type Quit to exit the Terminal window.

Step 5: Go to "Finder" your Mac. Enter the name of the file you want to recover in the search bar at the top-right corner of the window.

Step 6: In the result, you can see the deleted file you just recovered. Move it to any location as you like.

How to Recover Deleted Files on Mac using Terminal

If this method fails to recover your deleted files on your Mac, you can improve your chances of getting back all your data using EaseUS data recovery tool for Mac, with the help of which you can even recover deleted files after emptying the Trash Bin.

Part 2: How to Retrieve Files Deleted on Mac with Data Recovery Software

With multiple file types supported, including photos, documents, videos, audio, emails, and other files, and multiple devices supported, including Mac (PC), hard drive, USB drive, SD card, Memory card, digital camera, and more, EaseUS Data Recovery Wizard for Mac will recover your deleted files on your Mac easily. This software can also help you out of other Mac data loss troubles like recovering deleted files from trash on Mac or recover lost data from Time Machine backup drive, etc.

Steps to retrieve files deleted from Mac Terminal:

Step 1. Select the location where your important data & files were deleted and click the "Scan" button.

select the location where data was deleted and click scan

Step 2. The software will run both quick scan and deep scan and work hard to find as many deleted files as possible on the selected volume.

scan the selected disk to find deleted files on your Mac

Step 3. The scan results will be displayed in the left pane. Just select the file(s) and click the "Recover Now" button to get them back.

click recover now button to recover deleted files on your Mac

Regardless of how you get your Mac data lost or deleted, EaseUS Data Recovery Wizard can help you if you follow the above three steps to retrieve files deleted from Mac Terminal. More Mac data troubles like how to make file recover after Macintosh re-installation can also be solved on your own now with the help of this powerful tool. 

Was This Page Helpful?


Frequently Asked Questions

1. Why choose EaseUS Data Recovery Wizard?

"EaseUS Data Recovery Wizard is the best we've seen. It's far from perfect, partly because today's advanced disk technology makes data-recovery more difficult than it was with the simpler technology of the past, but it's fast and efficient..."PCMag

"The first thing you'll notice about EaseUS Data Recovery Wizard Pro is that its interface is very clear and uncluttered, with only a small collection of self-explanatory controls. You won't find lots of extra options hidden in a system of hidden menus, either; what you see really is what you get."techradar

"Recover lost files, even after deleting a partition or formatting your drive."Macworld

2. Why cannot I recover 2GB data for free?

It is recommended to check the version installed is Free or Trial because they are different versions.

Trial has data preview function but cannot save any files, while the Free version enables to recover 2 GB files. The default free space is 500 MB and you may share the product on social media to get another 1.5 GB.

3. Why cannot the recovered files be opened?

A file is saved as 2 parts on the storage device: directory info (which is comprised by file name, time stamp and size info, etc.) and data content.

If the files with original file names and folder structures cannot be opened, one possible reason is the corrupted directory info. There is still a chance to recover the data content with the RAW Recovery method in our software.

4. Why isn't it suggested to recover the files back to the original drive?

The storage structure of the lost files would be altered or damaged by any changes on the drive. If you save the recovered files back to the same drive, the original data structures and data content would be corrupted or overwritten, which causes permanent data loss. So you should prepare another disk to save the files.

5. How can I check whether my data is recoverable or not before purchase?

The Free version helps you save 2GB files, so verify the recovery quality of our product before purchase.

6. How long does it take to scan the drive?

It strongly depends on the capacity of your hard drive and the performance of your computer. As reference,most drive recoveries can be completed in around 10 to 12 hours for a 1-TB healthy hard drive in general conditions.

About Data Recovery Wizard

It's super easy to recover 250+ types of files after deletion, disk formatting and virus infection. Click the links and compare the difference of each version.