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: Sat Feb 11 11:39:38 2012 from 38.107.179.227
[root@bash-linux ~] # echo "Bienvenue sur Bash-Linux.com"_
 Manuel des commandes UNIX (man) Version anglaise

Indiquez la fonction :

Man Utime en anglais

UTIME(2) Linux Programmer's Manual UTIME(2)
 
NAME


utime, utimes - change file last access and modification times
 
SYNOPSIS


#include #include int utime(const char *filename, const struct utimbuf *times); #include int utimes(const char *filename, const struct timeval times[2]);
 
DESCRIPTION


The utime() system call changes the access and modification times of the inode specified by filename to the actime and modtime fields of times respectively. If times is NULL, then the access and modification times of the file are set to the current time. Changing timestamps is permitted when: either the process has appropri- ate privileges, or the effective user ID equals the user ID of the file, or times is NULL and the process has write permission for the file. The utimbuf structure is: struct utimbuf { time_t actime; /* access time */ time_t modtime; /* modification time */ }; The utime() system call allows specification of timestamps with a reso- lution of 1 second. The utimes() system call is similar, but the times argument refers to an array rather than a structure. The elements of this array are timeval structures, which allow a precision of 1 microsecond for speci- fying timestamps. The timeval structure is: struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; times[0] specifies the new access time, and times[1] specifies the new modification time. If times is NULL, then analogously to utime(), the access and modification times of the file are set to the current time.
 
RETURN VALUE


On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
 
ERRORS


EACCES Search permission is denied for one of the directories in the path prefix of path (see also path_resolution(7)). EACCES times is NULL, the caller's effective user ID does not match the owner of the file, the caller does not have write access to the file, and the caller is not privileged (Linux: does not have either the CAP_DAC_OVERRIDE or the CAP_FOWNER capability). ENOENT filename does not exist. EPERM times is not NULL, the caller's effective UID does not match the owner of the file, and the caller is not privileged (Linux: does not have the CAP_FOWNER capability). EROFS path resides on a read-only file system.
 
CONFORMING TO


utime(): SVr4, POSIX.1-2001. utimes(): 4.3BSD, POSIX.1-2001.
 
NOTES


Linux does not allow changing the timestamps on an immutable file, or setting the timestamps to something other than the current time on an append-only file. In libc4 and libc5, utimes() is just a wrapper for utime() and hence does not allow a subsecond resolution. POSIX.1-2001 marks utimes() legacy, which is strange since it provides more functionality than utime().
 
SEE ALSO


chattr(1), futimesat(2), stat(2), utimensat(2), futimes(3), futimens(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/. Linux 2008-06-19 UTIME(2)


 Dernières recherches
Man  en anglais Man utime en anglaisMan  en français Man utime en français
Man  en anglais Man htons en anglaisMan  en français Man htons en français
Man  en anglais Man raise en anglaisMan  en français Man raise en français
Man  en anglais Man mbind en anglaisMan  en français Man mbind en français
Man  en anglais Man stime en anglaisMan  en français Man stime en français
Man  en anglais Man qecvt en anglaisMan  en français Man qecvt en français
Man  en anglais Man issue en anglaisMan  en français Man issue en français
Man  en anglais Man zmore en anglaisMan  en français Man zmore en français
Man  en anglais Man index en anglaisMan  en français Man index en français
Man  en anglais Man unzip en anglaisMan  en français Man unzip en français
Man  en anglais Man anvil en anglaisMan  en français Man anvil en français
Man  en anglais Man alarm en anglaisMan  en français Man alarm en français
Man  en anglais Man htonl en anglaisMan  en français Man htonl en français
Man  en anglais Man size en anglaisMan  en français Man size en français
Man  en anglais Man fabs en anglaisMan  en français Man fabs 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