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: Wed May 30 13:16:40 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 Utimes 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 utimes en anglaisMan  en français Man utimes en français
Man  en anglais Man utimensat en anglaisMan  en français Man utimensat en français
Man  en anglais Man ustat en anglaisMan  en français Man ustat en français
Man  en anglais Man users en anglaisMan  en français Man users en français
Man  en anglais Man usermod en anglaisMan  en français Man usermod en français
Man  en anglais Man userdel en anglaisMan  en français Man userdel en français
Man  en anglais Man uselib en anglaisMan  en français Man uselib en français
Man  en anglais Man urandom en anglaisMan  en français Man urandom en français
Man  en anglais Man updwtmp en anglaisMan  en français Man updwtmp en français
Man  en anglais Man unzipsfx en anglaisMan  en français Man unzipsfx en français
Man  en anglais Man unlinkat en anglaisMan  en français Man unlinkat en français
Man  en anglais Man unlink en anglaisMan  en français Man unlink en français
Man  en anglais Man uniq en anglaisMan  en français Man uniq en français
Man  en anglais Man unicode en anglaisMan  en français Man unicode en français
Man  en anglais Man unexpand en anglaisMan  en français Man unexpand 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