Create a temporary file or directory. More information: https://man.openbsd.org/mktemp.1.
mktemp
$TMPDIR
is not set (the default is platform-dependent, but usually /tmp
):mktemp -p /path/to/tempdir
X
s are replaced with random alphanumeric characters):mktemp /tmp/example.XXXXXXXX
mktemp -t example.XXXXXXXX
mktemp -d