Ever Deleted /tmp Folder on a Mac?

/tmp folder is used by the Mac OS apps to store temporary data. Any a week old content in the folder is earsed as well as every time you restart your machine. I accidently deleted it. Not a big deal, but any app that writes into it will throw an exception.

Creating a tmp folder, using mkdir won’t help because tmp is not a folder it’s a symbolic link to /private/tmp folder.

Therefore to restore it you need to create the symbolic link again:

ln -s /private/tmp/ /tmp

That’s it. Hope it helps!

comments powered by Disqus