How to Recover Deleted Files in a Mac OS X Terminal | eHow

How to Recover Deleted Files in a Mac OS X Terminal


eHow Contributor


hi tech keyboard closeup image by Mograph from

When using your Mac, you may find it necessary to perform a quick cleanup by deleting old files from your document folders, for example, or from the desktop. Following such a cleanup, if you realize that you deleted a few files that you didn’t want to delete and need to recover them, there is a way. File recovery is simple using the Mac OS X terminal.

Power on your Mac.

Click on your “Applications” folder to navigate to the Mac OS X Terminal.

Click on the “Utilities” folder.

Double-click on “Terminal” to open the application.

Type in the following Terminal command: “cd .Trash” (without quotation marks).

Hit the “Return” key on your Mac.

Key in the name of the file you would like to recover using the following format “mv xxx ../” (without quotations). Replace the “xxx” part of the format with the full name of the file you deleted and now want to recover.

Hit the “Return” key on your Mac.

Type “Quit” (without quotations) in the Terminal window.

Press the “Command” and “F” keys simultaneously to launch the “Finder” window.

Enter the name of the deleted file in the search bar at the top right part of the window.

Click on the file you found in Finder and drag it onto your desktop or the location you wish to save the file.

Click on the red “X” in the Finder window to close the window.

Tips & Warnings

Always back up your Mac to ensure your files remain safely on your computer.

Enter the Terminal commands exactly. Entering them incorrectly will not yield a successful file recovery.

Related Searches


Mac Data: Recover Mac Files from Trash

Photo Credit hi tech keyboard closeup image by Mograph from

Around The Web

Promoted By Zergnet


You May Also Like

How to Recover Files on a Mac OS

We all know the woe of accidentally deleting a file and then trying to recover it. On the Mac, it is not…

How to Recover Deleted Files on My Mac

Sometimes you accidentally delete important files on your Mac that you cannot recover from the recycling bin. If this happens all is…

How to Restore Deleted File Using Terminal on a Macintosh

On the Macintosh, you can access certain files or folders using a text-based approach with an application called the Terminal. In the…

How to Recover Lost Files From a USB

When files have been permanently deleted from a USB pen drive, recovery is nearly impossible without a specialized application. These applications, called…

How to Transfer Files in HyperTerminal

A component of Windows XP and previous versions of the Windows operating system, HyperTerminal is a free communications program that lets you…

Comments are closed.