MKTEMP(1)
π MKTEMP(1) β the group chat edition π
okay so bestie, you know how the manual name is MKTEMP(1) and it lives in the User Commands section? yeah. that's us. that's the vibe. let's go π¦
β¨ NAME β¨
mktemp β create a temporary file or directory. literally its whole thing. icon behavior. π
πΈ SYNOPSIS πΈ
mktemp [OPTION]... [TEMPLATE]
π DESCRIPTION π
So the assignment is: make a temporary file or directory, safely, and print its name. that's it, that's the job, and she does it flawlessly every single time no cap π«Ά
Your TEMPLATE has one non-negotiable rule: it must contain at least 3 consecutive X's in the last component. three. minimum. that's the price of admission, bestie π€
If you don't hand over a TEMPLATE at all, she'll just use tmp.XXXXXXXXXX, and --tmpdir is implied. she's got you, don't stress π
Also, for the record: files get created u+rw, and directories get u+rwx, minus whatever your umask restrictions say. so like, the umask still gets a say in this. she's not above the umask. nobody is. π
β¨ the flags, bestie β¨
-d,--directoryβ create a directory, not a file. plot twist but make it organized π-u,--dry-runβ do not create anything at all, just print a name. sounds cute, and it is, but heads up: this is unsafe. not me being dramatic, the manpage literally says unsafe. so like. respect the red flag π©-q,--quietβ suppress diagnostics about file/dir-creation failure. she'll just quietly not tell you. silence is golden, or whatever π--suffix=SUFFβ append SUFF to TEMPLATE; SUFF must not contain a slash. and fun fact: this option is implied if TEMPLATE doesn't end inX.-p DIR,--tmpdir[=DIR]β interpret TEMPLATE relative to DIR; if DIR isn't specified, use$TMPDIRif it's set, else/tmp. With this option, TEMPLATE must not be an absolute name. and unlike with-t, TEMPLATE may contain slashes β butmktemponly creates the final component. yeah, only the last one. the rest is just vibes and hopes and dreams π-tβ interpret TEMPLATE as a single file name component, relative to a directory:$TMPDIR, if set; else the directory specified via-p; else/tmp. [deprecated] β she's an icon but she's retired, okay? still works, still listed, but like. deprecated π--helpβ display this help and exit. the classic. π₯°--versionβ output version information and exit. π
π AUTHOR π
Written by Jim Meyering and Eric Blake. legends. absolute main characters. we thank them for their service π«‘π
π REPORTING BUGS π
Found a bug? spill it, bestie:
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
- Report any translation bugs to <https://translationproject.org/team/>
π¦ SEE ALSO π¦
Full documentation at <https://www.gnu.org/software/coreutils/mktemp>
or available locally via:
info '(coreutils) mktemp invocation'
Packaging tea β: Packaged by Ubuntu (9.10-1ubuntu2) Copyright Β© 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
and that's the whole page, bestie π this was GNU coreutils 9.10, from August 2026, filed under MKTEMP(1) β mwah, take care of her, and remember: three X's minimum, no absolute paths with -p, and -u is unsafe fr fr πβ¨π
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms