Skip to Content
gnux

-p, --base-dir

Use DIR as the directory, like --tmpdir=DIR.

An option of mktempx.

Usage

mktempx -p DIR [TEMPLATE]
mktempx --base-dir=DIR [TEMPLATE]

Details

ShortLongValueDefaultMeaning
-p--base-dirDIRuse DIR as the directory, like --tmpdir=DIR

Examples

Create it under a directory of your choice

mktempx -p out report.XXXX

Fail quietly and handle it yourself

mktempx -q -p /nonexistent || echox 'no temp dir'

Help in the terminal

gnux help mktempx --base-dir

On this page