UTIMES(2,L) AIX Technical Reference UTIMES(2,L)
-------------------------------------------------------------------------------
utimes
PURPOSE
Sets file times.
LIBRARY
Berkeley Compatability Library (libbsd.a)
SYNTAX
#include <sys/time.h>
int utimes (file, tvp)
char *file;
struct timeval tvp[2];
DESCRIPTION
The utimes system call sets the accessed and modification times of a file to
the values specified by the tvp parameter. The inode-changed time of the file
is set to the current time.
The calling process must be the owner of the file or have an effective user ID
of superuser.
Note: In the AIX Operating System, file times have a resolution of one second.
RETURN VALUE
When the call succeeds, a value of 0 is returned. If utimes fails, a value of
-1 is returned and errno is set to indicate the error.
ERROR CONDITIONS
The utimes system call fails if one or more of the following is true:
EACCES Search permission is denied to a component of the path prefix.
EFAULT The file or tvp parameter points to a location outside of the process's
allocated address space.
ENOENT The named file does not exist.
ENOTDIR A component of the path prefix is not a directory.
Processed November 7, 1990 UTIMES(2,L) 1
UTIMES(2,L) AIX Technical Reference UTIMES(2,L)
EPERM The calling process is not the owner of the file and does not have an
effective user ID of superuser.
EROFS The file system that contains the file is mounted read-only.
ENAMETOOLONG
A component of the path parameter exceeded NAME_MAX characters or the
entire path parameter exceeded PATH_MAX characters.
ENOENT A hidden directory was named, but no component inside it matched the
process's current site path list.
ENOENT A symbolic link was named, but the file to which it refers does not
exist.
ELOOP A loop of symbolic links was detected.
ETXTBSY The path parameter is pure procedure (shared text) file that is being
executed.
RELATED INFORMATION
In this book: "statx, fstatx, stat, fstat, fullstat, ffullstat, lstat."
Processed November 7, 1990 UTIMES(2,L) 2