# Temporary File

*noun*

say it: **“TEM-puh-rer-ee FYL”** **/ˈtɛmpəˌrɛri ˈfaɪl/**

A file a program makes for its own use while it works and removes when it is done.

## What is a **temporary file**?

A **temporary file** is a program's scratch paper: made while it works and removed when it's done. A browser downloads into one, such as a `.part` file, and gives it the real name only when it's whole. Linux keeps them in `/tmp`, and Windows in the TEMP folder.

```bash
tmp=$(mktemp)   # make one: /tmp/tmp.fnPP9aOBRq
date > "$tmp"   # use it
rm -f "$tmp"    # remove it when done
```

## In a sentence

- “Linux keeps each **temporary file** in /tmp.”
- “The browser wrote the download into a **temporary file** ending in .part until it was whole.”

Level: Apprentice · [More Operating System terms at this level](https://www.ask-codey.com/glossary?category=operating-system&level=2)

Updated: November 10, 2026

Source: https://www.ask-codey.com/glossary/temporary-file
