Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose some file "Any File.pdf" is in the Trash (aka ~/.Trash).

How can I determine its original location?

By "original location" I mean the folder where that file would be moved to if one were to apply the "Put Back" command to it (but without actually doing so)? (See figure below.)

(I had hoped that this information would be available through running "Get Info" on the file, but I did not find it there.)

Put Back

share|improve this question
As mentioned here (last comment) this information seems to be stored in the .DS_Store file in the trash-folder – iolsmit May 29 '12 at 14:04
Related:… – Ian C. May 29 '12 at 14:07
up vote 4 down vote accepted

Data containing a file's original location before being placed in the Trash is keep in the .DS_Store file in the ~/.Trash folder.

Since the trash folder is hidden it can not normally be found using the finder application. The easiest way to find this file is by using the Terminal and entering the following commands.

$cd ~/.Trash
$open -e .DS_Store

This will open the file in TextEdit. From there you should be able to quickly search for the file by its name and its original path.

Its seems that files in .DS_Store follow the pattern of:


Note spaces are added just for readability.

share|improve this answer
Did you actually test that? .DS_Store contains a lot of binary data, I didn't find any file names at all. – patrix Jun 4 '12 at 15:23
I did test this on my own machine before posting. I found references to files in my Trash and their original locations. – a240 Jun 4 '12 at 15:28
Ah, seems to depend on the language settings, it's all Unicode here. – patrix Jun 4 '12 at 16:25
I believe this answer only works for OS X around/before 10.4 or 10.5 as .DS_Store is now a binary file and undocumented by Apple. – bmike May 4 '15 at 17:41
It does still work here in OS X 10.7.5. – Dictionarics Anonymous Mar 15 at 18:22

'Put Back' the File, Use the search function to search for the file, When you find your file, Right-Click it and select "Open Enclosing Folder"

share|improve this answer
What if the same file name appears more than once on the file system? This approach will fail for that case. Better to read the meta data OS X is reading to determine the 'Put Back' location in the first place. – Ian C. May 29 '12 at 14:21
I thought I was very explicit about wanting a solution that did not require actually putting back the file. How much clearer could I have made it??? – kjo May 29 '12 at 15:21
@kjo For other people who search for this question that might be the solution though. – user495470 May 29 '12 at 16:41
@Lri: if so, he/she should have submitted a comment, not an answer. It is unfair and disrespectful to the OP who takes pains to write a clear question not to answer what was asked. It also gives to the casual observer the wrong impression that the question has already been answered, thus reducing the likelihood that the question the OP took pains to clearly state will actually get an answer. If SE wants that those who post do a good job with the wording of their questions, then it should also hold the responders to the minimal courtesy of answering what is asked. – kjo May 29 '12 at 17:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.