A standard procedure for system administration is to reduce the amount of storage space used (typically, on a disk drive) by removing temporary files.
Increasingly, memory-based solutions for the temporary directory or folder are being used, such as "RAM disks" set up in random-access memory or the shared-memory device /dev/shm in Linux.
For Windows Vista, 7, 8, and 10 the temp location has moved again to within the AppData section of the User Profile, typically C:\Users\User Name\AppData\Local\Temp (%USERPROFILE%\AppData\Local\Temp).
[4][5] In addition, a user can set their TMPDIR environment variable to point to a preferred directory (where the creation and modification of files is allowed).
In macOS, a sandboxed application cannot use the standard Unix locations, but may use a user-specific directory whose path is provided by the function NSTemporaryDirectory.