Skip to main content

I have a couple of scripts that I'm looking to tidy up a bit and I've noticed that with El Capitan's release Apple isn't super fond of folks adding folders where the user doesn't normally have access to. Currently, I'll drop files into /private/var/tmp/[FolderName] for a script to use.



This is mostly when a piece of software doesn't play nice with Composer so I'll drop the pkg installer into a folder in tmp and run command line against the installer. It works great but are there any better locations or suggestions that you guys might have? Not so much on the process flow but rather where I could/should drop my temp files.

/Users/Shared
/private/tmp


In general +1 /private/tmp



Although you can do a tidy up afterwards, if you store things in /tmp/ then they will be removed naturally. Of course, if you need to reboot and continue something after rebooting then avoid /tmp/.


Ditto here: I use /private/tmp if I want the files to go away on reboot and /Users/Shared if I don't... usually.


/private/tmp



I only put things in /Users/Shared if there's a library or some common files / resources that all users need. For example, Ableton Live music software is built to be installed only for one user, so there are some /Library and ~/Library files that we have to make accessible to all, so we set the default location to a directory within /Users/Shared.


Thanks all for your responses. Seems I'm on the right track for this.