Temporary folder

From Wikipedia, the free encyclopedia

In computing, a temporary folder or temporary directory is a directory used to hold temporary files. Many operating systems and some software automatically delete the contents of this directory at bootup or at regular intervals.

For security reasons, it is best for each user to have his own temporary directory, since there has been a history of security vulnerabilities with temporary files due to programs incorrect file permissions or race conditions.

[edit] Traditional locations

In MS-DOS and Microsoft Windows, the temporary folder is set by the environment variable TEMP. Originally the default was c:\Temp, then C:\Windows\Temp. In modern versions, the temporary folder is set per-user as Local Settings\Temp.

In Unix and Linux, the global temporary directories are /tmp and /var/tmp. Typically, /var/tmp is for more permanent files, and /tmp is for more temporary files. See Filesystem Hierarchy Standard.

[edit] See also