UTIMESection: Linux Programmer's Manual (2)
Return to Main Contents
NAMEutime, utimes - change access and/or modification times of an inode
int utime(const char *filename, struct utimbuf *buf);
DESCRIPTIONutime changes the access and modification times of the inode specified by filename to the actime and modtime fields of buf respectively. If buf is NULL, then the access and modification times of the file are set to the current time. The utimbuf structure is:
In the Linux DLL 4.4.1 libraries, utimes is just a wrapper for utime: tvp.tv_sec is actime, and tvp.tv_sec is modtime. The timeval structure is:
RETURN VALUEOn success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORSOther errors may occur.
CONFORMING TOutime: SVr4, SVID, POSIX. SVr4 documents additional error conditions EFAULT, EINTR, ELOOP, EMULTIHOP, ENAMETOOLONG, ENOLINK, ENOTDIR, ENOLINK, ENOTDIR, EPERM, EROFS.
utimes: BSD 4.3
This document was created by man2html, using the manual pages.
Time: 16:01:09 GMT, February 24, 2018