Bash-Linux.com : Le SHELL pour les nuls

  Actuellement 50 lignes de commande et 1472 man disponibles
login as: root
root@213.186.33.18's password:
Last login: Tue May 29 18:41:55 2012 from 38.107.179.229
[root@bash-linux ~] # echo "Bienvenue sur Bash-Linux.com"_
 Manuel des commandes UNIX (man) Version anglaise

Indiquez la fonction :

Man Mkstemp en anglais

MKSTEMP(3) Linux Programmer's Manual MKSTEMP(3)
 
NAME


mkstemp, mkostemp - create a unique temporary file
 
SYNOPSIS


#include int mkstemp(char *template); int mkostemp (char *template, int flags); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): mkstemp(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 mkostemp(): _GNU_SOURCE
 
DESCRIPTION


The mkstemp() function generates a unique temporary filename from tem- plate, creates and opens the file, and returns an open file descriptor for the file. The last six characters of template must be "XXXXXX" and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array. The file is created with permissions 0600, that is, read plus write for owner only. (In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users.) The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file. mkostemp() is like mkstemp(), with the difference that flags as for open(2) may be specified in flags (e.g., O_APPEND, O_SYNC).
 
RETURN VALUE


On success, these functions return the file descriptor of the temporary file. On error, -1 is returned, and errno is set appropriately.
 
ERRORS


EEXIST Could not create a unique temporary filename. Now the contents of template are undefined. EINVAL The last six characters of template were not XXXXXX. Now tem- plate is unchanged. These functions may also fail with any of the errors described for open(2).
 
VERSIONS


mkostemp() is available since glibc 2.7.
 
CONFORMING TO


mkstemp(): 4.3BSD, POSIX.1-2001. mkostemp(): is a glibc extension.
 
NOTES


The old behavior of creating a file with mode 0666 may be a security risk, especially since other Unix flavors use 0600, and somebody might overlook this detail when porting programs. More generally, the POSIX specification of mkstemp() does not say any- thing about file modes, so the application should make sure its file mode creation mask (see umask(2)) is set appropriately before calling mkstemp() (and mkostemp()). The prototype for mktemp() is in for libc4, libc5, glibc1; glibc2 follows POSIX.1 and has the prototype in .
 
SEE ALSO


mkdtemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)
 
COLOPHON


This page is part of release 3.05 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-06-19 MKSTEMP(3)


 Dernières recherches
Man  en anglais Man mkstemp en anglaisMan  en français Man mkstemp en français
Man  en anglais Man mkreiserfs en anglaisMan  en français Man mkreiserfs en français
Man  en anglais Man mknodat en anglaisMan  en français Man mknodat en français
Man  en anglais Man mkfifoat en anglaisMan  en français Man mkfifoat en français
Man  en anglais Man mkdtemp en anglaisMan  en français Man mkdtemp en français
Man  en anglais Man mesg en anglaisMan  en français Man mesg en français
Man  en anglais Man memset en anglaisMan  en français Man memset en français
Man  en anglais Man mempcpy en anglaisMan  en français Man mempcpy en français
Man  en anglais Man memmove en anglaisMan  en français Man memmove en français
Man  en anglais Man memmem en anglaisMan  en français Man memmem en français
Man  en anglais Man memfrob en anglaisMan  en français Man memfrob en français
Man  en anglais Man memcpy en anglaisMan  en français Man memcpy en français
Man  en anglais Man memcmp en anglaisMan  en français Man memcmp en français
Man  en anglais Man memccpy en anglaisMan  en français Man memccpy en français
Man  en anglais Man mem en anglaisMan  en français Man mem en français

 Recherche

Dans ce moteur de recherche, vous pouvez taper directement votre besoin, en une phrase normale, humaine.
Exemple : vous cherchez comment remplacer un mot par un autre dans tous les fichiers d'un certain dossier. Vous pouvez écrire "Comment remplacer un mot par un autre dans tous les fichiers d'un dossier". Le moteur vous ramenera les résultats en fonction de leur pertinence.
Vous pouvez bien sûr ne chercher qu'un seul mot-clé, par exemple "find".
 Toutes les lignes de code
Par popularité
Par fonction
Recherche avancée
 Les logiciels SHELL/SSH
Putty
Astuces Bash
Faire du SHELL avec PHP!
 La doc officielle
Les man Linux en français
Les man Linux en anglais
 Proposer vos bash
Partagez vos lignes!
 Les requêtes
Déposer une requête
Voir/répondre à une requête
 Quelques sites interessants
Bons sites pour apprendre
 Rechercher