OS Manuals

/usr/bin/mktemp

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running mktemp --help (exit 0). permalink

Create a temporary file or directory.

Usage: mktemp [OPTION]... [TEMPLATE]

Arguments:
  [template]

Options:
  -d, --directory        Make a directory instead of a file
  -u, --dry-run          do not create anything; merely print a name (unsafe)
  -q, --quiet            Fail silently if an error occurs.
      --suffix <SUFFIX>  append SUFFIX to TEMPLATE; SUFFIX must not contain a path separator. This
                         option is implied if TEMPLATE does not end with X.
  -p <DIR>               short form of --tmpdir
      --tmpdir[=<DIR>]   interpret TEMPLATE relative to DIR; if DIR is not specified, use $TMPDIR
                         ($TMP on windows) if set, else /tmp. With this option, TEMPLATE must not be
                         an absolute name; unlike with -t, TEMPLATE may contain slashes, but mktemp
                         creates only the final component
  -t                     Generate a template (using the supplied prefix and TMPDIR (TMP on windows)
                         if set) to create a filename template [deprecated]
  -h, --help             Print help
  -V, --version          Print version
Options (9)
OptionDescriptionSource
-d, --directoryMake a directory instead of a filehelp + man
-u, --dry-rundo not create anything;help + man
-q, --quietFail silently if an error occurs.help + man
--suffix SUFFIXappend SUFFIX to TEMPLATE;help + man
-p DIRshort form of --tmpdirhelp + man
--tmpdir DIRinterpret TEMPLATE relative to DIR;help
-tGenerate a template (using the supplied prefix and TMPDIR (TMP on windows) if set) to create a filename template [deprecated]help + man
-h, --helpPrint helphelp + man
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.