“By accident while doing some stuff in Terminal, everything in the Documents folder on my iMac got deleted. I was just wondering if there's any way to get those files back. Most of the file recovery apps and utilities don't mention if they work with files that were deleted in Terminal...”
Have you faced the same problem? Let’s see first what is Mac Terminal?
On the Mac platform, you can access certain files or folders with the help of an application named Terminal, using a text based approach. You can navigate through your file tree using commands like CD (Change Directory) or ls command which stands for list and list all the files in the current directory. It is true that the Terminal is not user friendly but it is also true that when the Finder is having problem or you cannot use the Graphical User Interface then the Terminal will help you navigate from one directory to another and do the specific steps properly using commands.
If a file is deleted and is residing in the Trash then you can easily restore it back using Terminal. But if you have deleted the file using Terminal or emptied the Mac Trash or want to restore files deleted from flash drives or the file is lost due to some other reason then you cannot do recovery from here, for that you need a recovery tool.
Mac File Recovery is an effective tool that offers iMac data recovery and all other Mac computer recovery of the files that were deleted using the Mac Terminal. Check More for iMac Recovery. It can easily and efficiently restore all deleted and lost data with all the original details intact like size, file name, creation date, etc. One can also accomplish deleted file recovery from Mac Mini using this efficient and powerful tool.
Scenarios in which files get deleted using Mac Terminal –
- Using the command rm –Rf – In Mac terminal, files are deleted using rm – Rf command and once the file is deleted it cannot be retrieved back, at least not from the terminal itself.
- Accidental deletion – Usually people drag & drop the file in the terminal for deleting it, instead of writing the path manually after rm – Rf. There is a possibility that by mistake you dragged a different file and it got deleted.
- Unintentional removal – Sometimes you may delete an entire folder and later realizes that one or more files in that folder were useful. So always check the contents of the folder before deleting it.
Using CMD + Delete option deletes the files present in the trash. It is a short cut method to clear the contents of the file. You may click the option by mistake & later regret for the loss. You can easily get back lost files by using this tool in a fingertips.
Steps to recover files deleted from Mac Terminal –
1. Download & install Mac File Recovery Software and run it. On the welcome screen select “Recover Files”.
Fig 1: Main Screen
2. Click “Recover Deleted Files” from the next screen to restore deleted files from Mac OS.
Fig 2: Select Mode of Recovery Screen
3. Select the drive and wait for the scanning process.
Fig 3: Select Drive Screen
4. Select the files you want to recover from the list generated and save them. (Save option available only in full version).
Fig 4: Recovered Files Screen
If you are looking to restore playlist of iTunes that was deleted accidently then to recover deleted iTunes playlist go to http://www.recoverdeletedfilesmac.net/itunes-playlist.html.