Oh yeah, /tmp is *temporary*

I was storing some files that were semi-important to the project I’m working on in /tmp. I knew that there is a process on some Unix computers that cleans out the stuff in /tmp either on boot or on a schedule, but I didn’t know if it did that on my Mac. So while I’d sort of had a flag in the back on my head to move that to somewhere less fragile, I never got around to it. And I got to working on another part of the project for a few days and forgot about them. And in the mean time, the files haven’t been touched, and I’ve installed an OS update and rebooted. And now I go back, and they’re gone. “Oh yeah”, I think, “/tmp is temporary”. So then I look to see if Time Machine has a backup, and of course Time Machine excludes /tmp because, oh yeah, /tmp is *temporary*.

I can recreate the files, but it’s a waste of a few hours. This time I’m going to recreate them in ~/data/.

4 thoughts on “Oh yeah, /tmp is *temporary*”

  1. I haven’t seen a Mac from near in the last 10 years, but didn’t you do any system-level customizing? It is said to be UNIX-like, so why no disable auto-cleaning of /tmp and put something in with find and mtime or atime with, say, 8 days and exec rm?
    It may get me a “don’t come here again, kid” but I ask anyway: why are you not using a linux distribution? One thing is the broad software availability other thing is hardware: Mac-Laptops are only available using glossy display (I prefer to shave myself in the bathroom, thank you) and in my self-built desktop I really like hardware-raid for speed and safety-reasons – mirrored boot volumes under UNIX can be strange ( http://www.adaptec.com/en-US/support/raid/sas_raid/SAS-5405/ does not offer Mac-drivers ).

  2. Why the hell would I buy a Mac and run some clunky ugly Linux distro on it? The whole reason I started buying Macs is that I got disenchanted with the lack of user friendliness and the shear ugliness that passes for “cool” in the Linux world. With Mac OS I get my Unix command line and commercial software that actually works out of the box without installing kluges like CodeWeaver. And when I actually want Linux, I boot a VirtualBox with the latest Ubuntu on it. Meanwhile my Linux server sits in a corner sulking because I never use it.

Comments are closed.