POSIX Base Specifications, Issue 7 on /tmp:
The following directory shall exist on conforming systems and shall be
used as described:
A directory made available for applications that need a place to create temporary files. Applications shall be allowed to create files
in this directory, but shall not assume that such files are preserved
between invocations of the application.
The File Hierarchy Standard 2.3 on /tmp:
The /tmp directory must be made available for programs that require
Programs must not assume that any files or directories in /tmp are
preserved between invocations of the program.
IEEE standard P1003.2 (POSIX, part 2) makes requirements that are
similar to the above section.
Although data stored in /tmp may be deleted in a site-specific manner,
it is recommended that files and directories located in /tmp be
deleted whenever the system is booted.
FHS added this recommendation on the basis of historical precedent and
common practice, but did not make it a requirement because system
administration is not within the scope of this standard.
POSIX does not specify /var/tmp.
The FHS does though:
The /var/tmp directory is made available for programs that require
temporary files or directories that are preserved between system
reboots. Therefore, data stored in /var/tmp is more persistent than
data in /tmp.
Files and directories located in /var/tmp must not
be deleted when the system is booted. Although data stored in
/var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than