BSD 2.11 - man page for mktemp (bsd section 3)

Linux & Unix Commands - Search Man Pages

Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

MKTEMP(3)										MKTEMP(3)

       mktemp - make a unique file name

       char *mktemp(template)
       char *template;

       char *template;

       Mktemp  creates	a unique file name and returns the address of the template.  The template
       should contain a file name with trailing X's,  normally	something  like  /tmp/tempXXXXXX.
       The  X's  are  replaced	by the current process number and/or a unique letter combination.
       Mkstemp makes the same replacement to the template but opens the template file and returns
       a  file	descriptor open for reading and writing.  Mkstemp avoids the race between testing
       whether the file exists and opening it for use.	The  number  of  file  name  combinations
       mktemp  and  mkstemp  will  try depends on the number of X's placed on the end of the tem-
       plate; six X's will result in them trying roughly 26 ** 6 combinations.

       access(2), getpid(2), open(2)

       Mktemp returns NULL on failure, mkstemp returns -1 if no suitable file could be created.

7th Edition				  April 10, 1987				MKTEMP(3)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 07:02 PM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?