The temporary folder on a Mac's hard drive is in the drive's root directory, also known as the main directory. The folder is hidden; you can't visibly see it. The TMP folder holds any files an application uses during an installation or removal process. The folder also stores any files an application uses on a temporary basis. Temporary files are also stored in the hidden "/var/TMP" folder, also located in the root directory.
Video of the Day
To unhide the TMP folder for viewing, click the Terminal application icon on the dock. You can also open Terminal from the Launchpad. Type the following command into the Terminal screen, with the "username" representing the username you use to log in to the Mac: Simple command chflags nohidden /Users/"username"/TMP. Press "Return." Click the Mac's hard disk icon on the "Desktop" to access the root directory. Click the "tmp" folder to view any temporary files that may be present in the directory. You can click and drag a file and move it to your desktop, if desired, or click and drag the file to the Trash Can to delete it. If you receive a warning that the file can't be deleted, the temporary file is currently in use by an application or your Mac's operating system, OS X or earlier version. To hide the TMP folder, enter "chflags hidden ~/ Users/"username"/TMP" in Terminal without the outer quotes, and then press "Return." The "username" again represents your username. You can also unhide the "/var/TMP" folder by entering the wording "/var/TMP" in place of the word "TMP."
Usually, the application that placed one or more temporary files in the TMP or "/var/TMP" directory will delete the files automatically after you close the application or the application no longer is using the files. If you notice temporary files in one or both directories, you can delete them manually without causing any harm to your system. Again, if the files are in use, the application or the operating system will warn you and prevent them from being deleted.
The TMP and "/var/TMP" directories are part of the Mac OS X operating system and are created just for temporary files. The folders are protected by the operating system so you can't delete them. Each application that's present on your Mac uses the folders at some point in time to store files. Like other folders on your system, you can copy and rename files within the folders, if desired.
File Name Structure
Each temporary file in the TMP and "/Var/TMP" folders ends with the extension ".tmp," for example: XXXX.tmp or 000001.tmp. You can view a temporary file's content using a text editor or word processing package. The file's content will consist of a series of numbers, letters and possibly words.