# mh-mkstemp(1) - man - phpMan

[MH-MKSTEMP(1mh)](https://www.chedong.com/phpMan.php/man/MH-MKSTEMP/1mh/markdown)                                                                      [MH-MKSTEMP(1mh)](https://www.chedong.com/phpMan.php/man/MH-MKSTEMP/1mh/markdown)



## NAME
       mkstemp - create a temporary file

## SYNOPSIS
       **/usr/lib/mh/mkstemp** [**-help**] [**-version**] [**-directory** _directory_] [**-prefix** _prefix_] [**-suffix** _suf__‐
            _fix_]

## DESCRIPTION
       **mkstemp** creates a temporary file using [_mkstemp_(3)](https://www.chedong.com/phpMan.php/man/mkstemp/3/markdown), or if the **-suffix** switch is available  and
       used,  [_mkstemps_(3)](https://www.chedong.com/phpMan.php/man/mkstemps/3/markdown).   The  file name identifies a unique, newly created file, and always con‐
       tains 6 characters that appear to be random.

       The **-directory** switch specifies a _directory_ in which to create the file.

       The **-prefix** switch specifies an initial part, before the 6 characters, of the file name.

       The **-suffix** switch is only supported on platforms that provide the [_mkstemps_(3)](https://www.chedong.com/phpMan.php/man/mkstemps/3/markdown) library  func‐
       tion.  It specifies a _suffix_ to appear after the 6 characters; if it should begin with a spe‐
       cial character such as a period, that must be explicit in _suffix_.

       Unlike arguments to most switches of other **nmh** commands, the arguments  to  **mkstemp**  switches
       can begin with a dash.

## EXIT STATUS
       If  **mkstemp** successfully creates the temporary file, it prints the file name on standard out‐
       put and exits with status 0.  On failure, it prints a diagnostic message  on  standard  error
       and exits with status 255.

## PROFILE COMPONENTS
       None

## SEE ALSO
       [_mkstemp_(3)](https://www.chedong.com/phpMan.php/man/mkstemp/3/markdown), [_mkstemps_(3)](https://www.chedong.com/phpMan.php/man/mkstemps/3/markdown)

## DEFAULTS
       -directory    current directory
       -prefix       none
       -suffix       none



nmh-1.7.1                                    2014-03-16                              [MH-MKSTEMP(1mh)](https://www.chedong.com/phpMan.php/man/MH-MKSTEMP/1mh/markdown)
