How to find a folder with temporary files "Temp" in Mac OS?

In the Mac operating system, there are several system folders with temporary files that are used as

The "temp" folder is not intended for user interference, but sometimes advanced Mac users canYou'll need to access it.

In this article, we will tell you where the “temp” folders are located on Mac OS, and how to access them.

Advertising

Advertising

The instruction is intended for experienced users only.Mac users. We do not recommend looking for “temp” folders for no reason and even more so deleting any data from them. This can lead to serious system problems and data corruption or loss. If for some reason you need to clear temporary files, just restart your computer.

If you still deleted some files, then use our instructions on how to recover them.

</ p>

Advertising

Advertising

How to find the "Temp» inMac OS

The easiest way to find the Temp folder is through the command line.

Advertising

Advertising

1. Run the Terminal program from the utility folder and use the following command:

echo $ TMPDIR

2. You will get the location of the folder with temporary files.

The result of using the $ TMPDIR command might look something like this:

$ echo $ TMPDIR
/var/folders/g7/7du81ti_b7mm84n184fn3k910000lg/T/

In this case, the location of the “temp” folder will be as follows:

/var/folders/g7/7du81ti_b7mm84n184fn3k910000lg/T/

You can also use the printenv command:

printenv | grep TMP

It will also display the location of TMPDIR like this:

TMPDIR = / var / folders / g7 / 2du11t4_b7mm24n184fn1k911300qq / T /

How to open the folder "Temp» inMac OS

You can immediately open the Temp folder in a new Finder window using the open command.

1. In the Terminal program, enter the following command:

open $ TMPDIR

2. Press Return (Enter) and a new Finder window will open with $ TMPDIR.

$ TMPDIR files are not protected by SIP, soBe careful when working with them. In the folder you will find various temporary files and cache. Recall that you can delete or edit something in this folder only if you know exactly what you are doing.

You can also change the current folder to a folder with temporary files using this command:

cd $ TMPDIR

Other Temporary File FoldersMacOS

There is another Mac OS folder with temporary files:

/ tmp

The / tmp folder on Mac OS contains links to / private / tmp /, i.e. it will have the same data.

There are other folders with temporary files, for example, user ~ / Library / Caches /. In addition, some programs have their own folders with temporary files. Among them are Outlook and the Mac App Store.

The main folder with temporary files is located at the following address:

~ / Library / Caches / TemporaryItems /

Once again, we remind you that there is no reasoninteract with temporary files, as this can lead to unpleasant consequences. To clear the temporary files, just restart the Mac.