Something on my Mac keeps deleting the /private/tmp directory. I first noticed this was happening as I was investigating high CPU usage. The Console was full of errors like the following:
1/10/15 10:27:52.529 AM com.apple.xpc.launchd: (com.apple.quicklook) Service only ran for 0 seconds. Pushing respawn out by 1 seconds. 1/10/15 10:27:53.556 AM com.apple.xpc.launchd: (com.apple.quicklook) Service could not initialize: Unable to set current working directory. error=2, path=/tmp: 14B25: xpcproxy + 12907 [1016C726-9ACF-3A24-9C51-A279F5C6B167]: 0x2
It turned out that /tmp was there, but it was a symlink pointing to /private/tmp, which was missing. I tried simply creating a new folder under /private and calling it "tmp" and to my surprise that worked. Until a few days later, I got the same runaway CPU, found the same errors in Console, and discovered that /private/tmp had been eaten once again.
I've tried all the repair options in Disk Utility and DiskWarrior. I've looked at scheduled processes with a 3rd party utility called LaunchControl, and didn't see anything obviously out of the ordinary. That said, I really don't know much about OS X internals, so the fact that nothing stood out to me isn't saying much.
I'm currently using the latest version of Yosemite. I should also note that my computer has been acting kind of flakey in general. For example, not staying asleep when I shut it. I've tried resetting the SMC several times, and even went so far as to reinstall OS X about a month ago. I'm not asking for help with these issues (if I did I'd write a separate post and be more specific). Just setting the context, in case it's relevant to the /private/tmp issue.