Finding out why/how a folder is being created

There's a folder on my Linux desktop which shouldn't exist. The first time I saw it, I thought I'd accidentally copied it from somewhere else, so I deleted it. Now it's back again. So it must have been automatically created by some process, but what can I do to figure out which program is creating it? I think it's likely that if I delete the folder it'll eventually be created again, so I should be able to catch this program in the act if anyone can suggest a technique for doing so.

By the way, there are no files in this mystery folder, and its name is the same as another folder I created months ago to hold my personal documents, not something that a program would create to hold its own configuration files or the like.

EDIT: Since I asked this question the folder hasn't shown up again, so I guess I could consider the problem solved... but I'd still be interested to know if anyone has an idea of some tool I could use if this happens again.

EDIT 2: IT'S BAAAACK.... yes, the mysteriously reappearing folder has reappeared. The modification time is July 2, ~10:30 PM EDT, just over a week after I last edited this question, so I guess that's when it was recreated, but that doesn't tell me what might have put it there. So I am still interested in any other answers.


Mark the Desktop folder as not writeable. After 24 hours or so, grep your logs for the string "Desktop", because the process that fails to create the folder might log an error when it isn't able to.