0

Is there a common practice where to save temporary files on macOS? Currently I'm using /tmp but I often see the folder /var/folders in use for saving temporary files.

Is there a suggested way?

Thanks!

Mike Nathas
  • 1,247
  • 2
  • 11
  • 29

1 Answers1

0

I don't know of any official guide, but I would say:

  • use /tmp for temporary things that do not need to survive a reboot

  • use /var/tmp for temporary things that do need to survive reboot

On my system at least, /var/folders is quite restricted in who can access it:

drwxr-xr-x  4 root  wheel  136 28 Oct  2015 /var/folders
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432