1MKTEMP(1)                        User Commands                       MKTEMP(1)
2
3
4

NAME

6       mktemp - create a temporary file or directory
7

SYNOPSIS

9       mktemp [OPTION]... [TEMPLATE]
10

DESCRIPTION

12       Create a temporary file or directory, safely, and print its name.  TEM‐
13       PLATE must contain at least 3 consecutive 'X's in last  component.   If
14       TEMPLATE is not specified, use tmp.XXXXXXXXXX, and --tmpdir is implied.
15       Files are created u+rw, and directories  u+rwx,  minus  umask  restric‐
16       tions.
17
18       -d, --directory
19              create a directory, not a file
20
21       -u, --dry-run
22              do not create anything; merely print a name (unsafe)
23
24       -q, --quiet
25              suppress diagnostics about file/dir-creation failure
26
27       --suffix=SUFF
28              append  SUFF  to  TEMPLATE; SUFF must not contain a slash.  This
29              option is implied if TEMPLATE does not end in X
30
31       -p DIR, --tmpdir[=DIR]
32              interpret TEMPLATE relative to DIR; if DIR is not specified, use
33              $TMPDIR  if set, else /tmp.  With this option, TEMPLATE must not
34              be an absolute  name;  unlike  with  -t,  TEMPLATE  may  contain
35              slashes, but mktemp creates only the final component
36
37       -t     interpret  TEMPLATE as a single file name component, relative to
38              a directory: $TMPDIR, if set; else the directory  specified  via
39              -p; else /tmp [deprecated]
40
41       --help display this help and exit
42
43       --version
44              output version information and exit
45

AUTHOR

47       Written by Jim Meyering and Eric Blake.
48

REPORTING BUGS

50       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
51       Report any translation bugs to <https://translationproject.org/team/>
52
54       Copyright  ©  2021  Free Software Foundation, Inc.  License GPLv3+: GNU
55       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
56       This is free software: you are free  to  change  and  redistribute  it.
57       There is NO WARRANTY, to the extent permitted by law.
58

SEE ALSO

60       mkstemp(3), mkdtemp(3), mktemp(3)
61
62       Full documentation <https://www.gnu.org/software/coreutils/mktemp>
63       or available locally via: info '(coreutils) mktemp invocation'
64
65
66
67GNU coreutils 9.0                 March 2022                         MKTEMP(1)
Impressum