temporary file temporary files or foo files tmp are files created to temporarily contain information while a new file is being made it may be created by computer programs for a variety of purposes principally when a program cannot allocate enough memory for its tasks when the program is working on data bigger than the architectures address space or as a primitive form of interprocess communication auxiliary memory modern operating systems employ virtual memory however programs that use large amounts of data eg video editing may need to create temporary files interprocess communication most operating systems offer primitives such as pipes sockets or shared memory to pass data among programs but often the simplest way especially for programs that follow the unix philosophy is to write data into a temporary file and inform the receiving program of the location of the temporary file creation on posix systems temporary files can be safely created with the mkstemp or tmpfile library functions some systems provide the former posix now removed mktemp1 program these files are typically located in the standard temporary directory tmp on unix machines or temp which is login specific on windows machines a temporary file created with tmpfile is deleted automatically when the program exits or the file is closed to generate a temporary file name that will survive past the lifespan of the creating program tmpnam posix or gettempfilename windows can be used issues some programs create temporary files and then leave them behind they do not delete them this can happen because the program crashed or the developer of the program simply forgot to add the code needed to delete the temporary files after the program is done with them the temporary files left behind can accumulate over time and consume a lot of disk space temporary files may be deleted manually operating systems may clear out the temporary directory on a reboot and they may have cleaner scripts that remove files if they have not been accessed in a certain amount of time also memorybased systems such as tmpfs inherently do not preserve files across a reboot temp file cleaner temporary folder temporary filesystem temporary variable vtecomputer filestypes binary file text file file format list of file formats file signatures magic number metafile sidecar file sparse file swap file system file temporary file zerobyte file properties filename 83 filename long filename filename mangling filename extension list of filename extensions file attribute extended file attributes file size hidden file hidden directory organisation directoryfolder ntfs junction point temporary folder directory structure file sequence file system filesystem hierarchy standard path operations open close read write linking alias file descriptor hard link shadow shortcut symbolic link management file comparison file compression file manager comparison of file managers file system permissions file transfer file sharing file verification 