Skip to main content

Create a temporary file or directory.

# To create an empty temporary file and print the absolute path to it:
mktemp

# To create an empty temporary file with a given suffix and print the absolute path to file:
mktemp --suffix "<.ext>"

# To create a temporary directory and print the absolute path to it:
mktemp -d