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.

When a user opens an attached file from Outlook or other email utilities, the default save location is often an obscurely-named temporary folder (e.g. C:\Documents and Settings\Nathan Larson\Local Settings\Temporary Internet Files\Content.IE5\S9QNS9UR\). Thus, it is easy, after modifying the file, to inadvertently save it, thereupon closing it, and then have no idea where to find it later. If this happens, a way to retrieve the file may be to open the original attachment again and attempt to save it; this will usually show the temporary folder's path where the modified file is located.

[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. In addition, a user can set his TMPDIR environment variable to point to a preferred directory (where the creation and modification of files is allowed).

[edit] See also