temporary file

A file or directory a script creates for its own scratch work and should delete before it finishes.

In more detail

Temporary files hold intermediate results that are too big for memory or must be handed between steps. Create them with a tool or library function that gives unique, safe names, such as mktemp in the shell, and remove them when the work is done, even if it fails. Predictable names in a shared directory such as /tmp can let another user read or replace your data.

Example

External sorting writes each sorted chunk to a temporary file; Python's tempfile module creates them.

Related terms

Taught in

References