|
|
HP-UX Reference > Uutime(2)HP-UX 11i Version 2: December 2007 Update |
|
NAMEutime() — set file access and modification times DESCRIPTIONThe utime() system call sets the access and modification times of the file to which the path argument refers. If times is a NULL pointer, the access and modification times of the file are set to the current time. A process must be the owner of the file or have write permission on the file to use utime() in this manner. The following times in the utimbuf structure defined in <utime.h> are measured in seconds since 00:00:00 UTC (Coordinated Universal Time), January 1, 1970. time_t actime; /* access time */ time_t modtime; /* modification time */ Security RestrictionsIf times is not a NULL pointer, times is interpreted as a pointer to a utimbuf structure, and the access and modification times are set to the values contained in the designated structure. Only the owner of the file or a user with the OWNER privilege can use utime() this way. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUEutime() returns the following values:
ERRORSIf utime() fails, errno is set to one of the following values.
DEPENDENCIESNFSutime() may return EPERM when invoked on a remote file owned by a superuser, or users with DAC_WRITE and OWNER privileges, even if the invoking user has write permission on the file. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. |
|