| MKTEMP(1) | General Commands Manual | MKTEMP(1) |
mktemp — make a
new randomly-named file or directory
mktemp |
[-dqtu] [-p
tempdir] [template] |
mktemp creates a new randomly-named file
or directory, and prints its name.
template must contain at least 6 consecutive
‘X’ as last path component. If
template is not specified,
‘./tmp.XXXXXXXX’ is used instead.
Files are created with u+rw permissions, directories with u+rwx.
-d-q-p
tempdirTMPDIR.-tTMPDIR or if unset,
/tmp, as an existing directory to create
into.-uOnly present for compatibility with existing scripts, do not use.
The mktemp utility exits 0 on
success, and >0 if an error occurs.
0001616: Standardize mktemp utility - Austin Group Issue Tracker
An mktemp utility first appeared in
NetBSD 1.5 and OpenBSD
2.1
Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
| March 6, 2025 | Linux |