Recover Deleted Files using Mac Command Line

Recover files deleted from the command line with the help of Remo Mac Recovery tool. Even, the tool restores files deleted using Command Delete keys. Follow this step by step guide and get back all files in few clicks

Written by John Harris / Updated on September 14, 2023

The command line is a text interface for your computer. It's a program that takes in commands, which it passes on to the computer's operating system to run. You can use command line to delete files which cannot be removed by delete option. In some cases, you might delete required files accidentally. In such cases the files will bypass the trash folder, so there is no chance of getting them back from the trash folder.

Note – When trying to recover deleted files, it is recommended to avoid using the computer or external drive until required data has been recovered.

But what if the lost files are essential? Remo Data Recovery software for Mac comes in handy. The files which are lost due to accidental deletion still reside on the logical memory of your mac volume. Remo Recover can recover deleted files mac by command line with few simple clicks. So how to recover files deleted using command line on mac? Skim through the following section for the answer.

Can Files Deleted using Command Line on Mac be Recovered?

The answer is yes, in this section we have explained 3 ways on how to recover those files.

  1. Terminal Command (works if you have manually deleted files)
  2. Time Machine (only if you have backup)
  3. Recovering Data using a Data Recovery Software (go to option if everything else fails)

Method 1: Retrieve files using Terminal Command

Step 1: Launch Terminal on Mac

Step 2: Type cd. Trash command, hit Return

Step 3: In order to view the contents of the folder type Is -al ~/. Trash

Step 4: Type the name of your file mv filename../ (change file name with the full name of the file you have deleted), Hit Return button.

Step 5: Type mv filename ../destination (destination, where you want the file to be restored)

Step 6: Type Quit and hit Return.

Step 7: To verify if the files you want have been recovered or not. Open Finder, search the deleted files by entering their name in the search bar.

In case, you didn’t find the files you wanted to recover, you can use the next methods to retrieve those files back.

Method 2: Restore files from a backup using Time Machine

Time Machine is an in-built feature in your mac system. Once you set time machine and choose back up Automatic option, Time Machine regularly takes backup of all files including music files, images, videos, documents, applications, emails, files etc. One of the best features of Time Machine is it only backs up those files which were changed or modified since previous backup. Unchanged files will not be backed up, which makes back up process faster and saves storage space.

Click here to know more about Mac Time Machine

How to restore back up data.

Step 1: Connect your external storage device where you have stored your backup files to your Mac system.

Step 2: Launch Time Machine by Clicking on System Preferences option

Step 3: Find and Click on Time Machine icon.

Step 4: Check show time machine in the menu bar option, Time Machine icon will appear on your menu bar of your screen.

Step 5: Click on Enter Time Machine
Note: In case you know in which folder was the file previously stored. Click on that folder, then Click on Enter Time Machine.

Step 6: Find the files that you want to recover, then Click on Restore button.

As discussed earlier this method only works if you have a backup, in case you don’t have a backup or this method failed to recover your files. We highly recommend you Use the next method.

Method 3: Recover Deleted files using a Powerful Data Recovery Tool

Remo Recover is a renowned data recovery tool designed to recover files in case no manual method works. locates the deleted files using advanced scan engine which thoroughly goes through your mac drive. It can recover more than 300+ file formats like word files, PDF files, compressed files etc. Even, files deleted using RM command and Command Delete keys can be restored with utmost ease. Also, the tool quickly recovers files from emptied Trash folder. Mac data recovery from command line is done with the simplified user interface.

Remo Recover not only works best on all type of mac file system like HFS, HFS+, APFS, but also all type of Mac operating systems like Catalina, High Sierra, Mojave, Mountain Lion, Lion, Snow Leopard and also the latest versions including Big Sur.

Download Now

Steps to Recover Deleted files On Mac using Remo Recover

Step 1: Download and launch Remo Recover Mac on your system.

Step 2: Then, select the volume or drive and click on Scan to begin recovering deleted files on Mac.

select the volume or drive and click on Scan

Step 3: Click on Dynamic Recovery View to see the files being recovered form the Mac.

view the initally recovered files after QuickScan

Step 4: Make use of features like Advanced Scan or Search Bar to sort the recovered files from the drive easily.

sort the recovered files

Step 5: Double-click on any file to preview the recovered files.

preview recovered files

Step 6: Preview the files you wish to restore, select them, and then click Restore to save the files to your preferred location.

recover the files from the tool


Other Beneficial Features of Remo Mac Recovery tool:

Remo File Recovery tool for Mac recovers files from HFS, FAT, and EXFAT partition/drives. Also, the tool comes handy to restore data from USB flash drive, MacBook, iMac, iPod, memory card, etc. Moreover, it doesn’t modify file name while recovering. Even, allows you to organize them according to their size, type, name and creation date. Also,

  • It displays all restored files in Mac finder styled interface
  • Allows you to compress recovered files if you don’t have enough space to store them
  • The tool helps to save recovered files in any device such as CD/DVD, external drives, etc
  • Provides technical support team to solve your queries
  • To recover files lost due to improper transfer process
  • Get back deleted due to unreliable application

Conclusion:

In this article we have talked through how to use Time Machine on Mac to restore your previously back up files. We have also showed how Remo Recover can help you recover and restore all files deleted or lost under any data loss scenario.

Why Choose Remo?

100% safeSecure

100% SatisfactionGuarantee

10 Million+Downloads

Free TechSupport

Live Chat24/7 Support

Top