Press Return to run the command, and the trash folder for your username will open (the name will be a number like 501 or 502). When this is done the command should look something like the following: With the space removed, copy and paste the following into the command (note the single quotes are in fact acute accent characters, if you want to type it in yourself):
#RECOVER DELETED FILES FROM TRASH MAC OS X FULL#
The full path will contain a trailing space, so press the delete key once to remove this space. If the file was originally saved to an external hard drive, then ensure that drive is connected and do the following instead (takes a few more steps to target the desired hidden folder):ĭrag the mounted hard drive icon from the Finder to the Terminal window, and the full path to the hard drive should be entered.
Running the 'open' command on the hidden folders in the Terminal will open them in the Finder, where you can then use Time Machine to locate deleted files. Launch the Terminal application (located in the /Applications/Utilities/ folder).
#RECOVER DELETED FILES FROM TRASH MAC OS X HOW TO#
Here is how to restore the file from these locations: For the most part, trashed items will be stored in the user's home directory, but if you quickly saved a file to an external or other secondary drive and then moved it to the trash, then the file will be in the ".Trashes" folder at the root of that drive. To recover a file from within these directories, you must first open the hidden trash folder directly within the Finder, instead of opening the Trash in the Dock, and you must know which trash folder to open. These hidden folders are stored in the following locations (hidden because they have a period in front of their names): When you open the Trash and view its contents, OS X shows you the contents of all of these trash folders, and emptying the trash subsequently empties these trash folders. The Trash folder system in OS X is a hidden set of directories that includes the home directory trash folder and the user's trash folders that are stored at the root of each locally mounted filesystem. Trashes folder is at the root of a USB flash drive, and within it the folder '502' is the user ID number for the current account (click for larger view). Unfortunately doing so is not straightforward, because if you open the Trash and invoke Time Machine then the folder will revert to your Home directory as Time Machine activates, leaving you with no view of the trash folder backups to browse. Generally because of odd issues like this, storing items in the Trash is not recommended, but luckily as long as Time Machine has backed up the system while the items were in the trash then a backup does exist for it that can be recovered.
You can use Spotlight searching from within Time Machine to try to locate the file (using Quick Look to help this procedure) however, there are times when documents have been placed in the trash before Time Machine can back them up elsewhere. When this happens it may be difficult to remember exactly where the items originated from on disk, so if you empty the trash and then need to recover a document it may be difficult to locate it using Time Machine. The trash in OS X is generally used to delete items, but because items can be placed in the trash without being immediately deleted, people commonly end up storing items in the trash.