mktemp
v(uutils coreutils) 0.1.0
Options
--directory,-d- 
mktemp-help-directory
 --dry-run,-u- 
mktemp-help-dry-run
 --quiet,-q- 
mktemp-help-quiet
 --suffix=<SUFFIX>- 
mktemp-help-suffix
 -p <DIR>- 
mktemp-help-p
 --tmpdir=<DIR>- 
mktemp-help-tmpdir
 -t- 
mktemp-help-t
 
Examples
Create an empty temporary file and print its absolute path:
mktemp
Use a custom directory if $TMPDIR is not set (the default is platform-dependent, but usually /tmp):
mktemp -p /{{path/to/tempdir}}
Use a custom path template (Xs are replaced with random alphanumeric characters):
mktemp {{/tmp/example.XXXXXXXX}}
Use a custom file name template:
mktemp -t {{example.XXXXXXXX}}
Create an empty temporary directory and print its absolute path:
mktemp -d
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.