Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Some application or action is deleting my ~/.Trash directory. I obviously don't know when this happens, save for the "Are you sure you want to delete..." dialog box.

I can restore the Trash, by restarting the Finder, as per this question, but I would like to figure out what is doing this.

Is there a way to monitor a directory (i.e., .Trash) and determine when it changes? So when my Trash is deleted, I'll know.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

This will display every file deletion on your system. If you want to only display the deletion of "~/.Trash", add | grep .Trash to the last command.

share|improve this answer
    
Do I start this process and leave it running? Then wait for .Trash to show up? –  kmm Jun 23 '11 at 23:37
    
Yes, you need to keep this running. –  jjungnickel Jun 24 '11 at 9:27
add comment

you can do this from the Terminal.app

sudo fs_usage -f filesys | grep ~/.Trash

will list all processes what accessing Trash - try it - enough click on the Trash icon and you will get tens of line for "Finder".

share|improve this answer
add comment

Your Answer

 
discard

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.