hpux man page for mktemp

Query: mktemp

OS: hpux

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

mktemp(1)						      General Commands Manual							 mktemp(1)

NAME
mktemp - make a name for a temporary file
SYNOPSIS
directory_name] prefix]
DESCRIPTION
makes a name that is suitable for use as the pathname of a temporary file, and writes that name to the standard output. The name is chosen such that it does not duplicate the name of an existing file. If the option is specified, a zero-length file is created with the generated name. The name generated by is the concatenation of a directory name, a slash the value of the environment variable truncated to - 6 characters, and the process ID of the invoking process. The directory name is chosen as follows: 1. If the option is specified, directory_name is used. 2. Otherwise, if the environment variable is set and a string that would yield a unique name can be obtained by using the value of that variable as a directory name, this value is used. 3. Otherwise, if a string that would yield a unique name can be obtained using as the directory, is used. 4. Otherwise, (current directory) is used. If the option is specified, prefix is used instead of the value of the environment variable for name generation.
RETURN VALUE
returns zero on successful completion and non-zero if syntax, file access, or file creation errors were encountered or a unique pathname could not be generated.
SEE ALSO
mktemp(3C), umask(1). mktemp(1)
Related Man Pages
mktemp(1) - ultrix
mktemp(1) - opendarwin
mkstemp(3c) - hpux
mktemp(1) - sunos
mktemp(1) - freebsd
Similar Topics in the Unix Linux Community
looking for a unix C program...help please
mktemp error
remove files from a directory
Looping through entire directory and count unique values
Sorting the contents of a variable