mktemp(1) - SerenityOS man pages

#Name

mktemp - create a temporary file or directory

#Synopsis

$ mktemp [--directory] [--dry-run] [--quiet] [--tmpdir DIR] [template]

#Description

mktemp creates temporary a file or directory safely, and then prints its name.

A template may be specified and will be used instead of the default tmp.XXXXXXXXXX as long as it contains at least 3 consecutive 'X's.

#Options

#Examples

# Create a temporary file
$ mktemp
# Find an available temporary file name
$ mktemp -u
# Create a temporary directory with a custom template
$ mktemp -d serenity.XXXXX

#See also