O Padrão da hierarquia do sistema de arquivos versão 3.0 diz:
/tmp : Temporary files
The
/tmpdirectory must be made available for programs that require temporary files.Programs must not assume that any files or directories in
/tmpare preserved between invocations of the program.Rationale
IEEE standard POSIX.1-2008 lists requirements similar to the above section. Although data stored in
/tmpmay be deleted in a site-specific manner, it is recommended that files and directories located in/tmpbe 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.
/var/tmp : Temporary files preserved between system reboots
The
/var/tmpdirectory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in/var/tmpis more persistent than data in/tmp.Files and directories located in
/var/tmpmust not be deleted when the system is booted. Although data stored in/var/tmpis typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than/tmp.
Além disso, as Especificações do grupo aberto, edição 7, variáveis de ambiente mencionam as seguintes :
TMPDIRThis variable shall represent a pathname of a directory made available for programs that need a place to create temporary files.