MKDTEMP(3) Linux Programmer's Manual MKDTEMP(3)NAME
mkdtemp - create a unique temporary directory
SYNOPSIS
#include <stdlib.h>
char *mkdtemp(char *template);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
mkdtemp(): _BSD_SOURCE
DESCRIPTION
The mkdtemp() function generates a uniquely named temporary directory from template. The last six characters of template must be XXXXXX
and these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700. Since it
will be modified, template must not be a string constant, but should be declared as a character array.
RETURN VALUE
The mkdtemp() function returns a pointer to the modified template string on success, and NULL on failure, in which case errno is set appro-
priately.
ERRORS
EINVAL The last six characters of template were not XXXXXX. Now template is unchanged.
Also see mkdir(2) for other possible values for errno.
VERSIONS
Available since glibc 2.1.91.
CONFORMING TO
POSIX.1-2008. This function is present on the BSDs.
SEE ALSO mkdir(2), mkstemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2008-08-21 MKDTEMP(3)
Check Out this Related Man Page
MKDTEMP(3) Linux Programmer's Manual MKDTEMP(3)NAME
mkdtemp - create a unique temporary directory
SYNOPSIS
#include <stdlib.h>
char *mkdtemp(char *template);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
mkdtemp():
_BSD_SOURCE
|| /* Since glibc 2.10: */
(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
DESCRIPTION
The mkdtemp() function generates a uniquely named temporary directory from template. The last six characters of template must be XXXXXX
and these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700. Since it
will be modified, template must not be a string constant, but should be declared as a character array.
RETURN VALUE
The mkdtemp() function returns a pointer to the modified template string on success, and NULL on failure, in which case errno is set appro-
priately.
ERRORS
EINVAL The last six characters of template were not XXXXXX. Now template is unchanged.
Also see mkdir(2) for other possible values for errno.
VERSIONS
Available since glibc 2.1.91.
CONFORMING TO
POSIX.1-2008. This function is present on the BSDs.
SEE ALSO mkdir(2), mkstemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2010-09-26 MKDTEMP(3)
When reading man pages, I notice that sometimes commands are follwed by a number enclosed in parenthesis. such as:
mkdir calls the mkdir(2) system call.
What exactly does this mean? (4 Replies)
Hi,
Please find the Question Summary below-
In our email template document(.txt) bullets and Apostrophe are getting replaced by the string "£" in our Live environment.We are using sun solaris 8 in live.
Can anybody let me know why this happens and how to prevent this .
Thanks... (0 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a shell script that gives a passed file the "755" access permissions. The shell script should:
Change... (0 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a shell script that gives a passed file the "755" access permissions. The shell script should:
Change... (5 Replies)
hi experts,
i'm trying to do this:
file1 is a template. might have kinds of 'funny' characters.
sample:
<body>
<form>
<p><input type="text" name="abc"/></p>
<p><my_content></p>
</form>
</body>
file2 is a file that contains lots of text. this might be very big. might have... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Ok i need to create a directory within another directory in one command. I'm already in a directory to. I need to... (6 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
The characters "*", "?", "" have special meaning in Unix.
They can either be used on the command line to... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Give the command line for displaying manual pages for the socket, raed, and connect system calls. What will be... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I'm doing aproximation of derivative called five-point stencil. For every value of x, in interval , in step... (0 Replies)
Hello, I am creating a Solaris 11 template on my ESXI host. I would like each VM that is deployed from the template to have its own unique host fingerprint.
With Linux, I simply delete host keys, which causes new keys to be generated at bootup (new VM deployment)
Is there a way to do this... (1 Reply)