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.XXXXXXXXXX
’ is used instead.
Files are created with u+rw permissions, directories with u+rwx.
-d
-q
-p
tempdirTMPDIR
.-t
TMPDIR
or if unset,
/tmp, as an existing directory to create
into.-u
Only present for compatibility with existing scripts, do not use.
The mktemp
utility exits 0 on
success, and >0 if an error occurs.
An mktemp
utility first appeared in
NetBSD 1.5 and OpenBSD
2.1
Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
2024-09-20 | Linux 6.6.67-gentoo-x86_64 |