The mktemp command

create a temporary file or directory 3 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-d, --directory
create a directory, not a file

Examples

mktemp

/tmp/tmp.k3F9x2LmQa

mktemp -d

a temporary folder

mktemp /tmp/report.XXXXXX

your own name: the X's become random letters

Lessons that use mktemp