Copyright (C) 2000-2012 |
Manpages UTIMESection: Linux Programmer's Manual (2)Updated: 1995-06-10 Index Return to Main Contents NAMEutime, utimes - change access and/or modification times of an inodeSYNOPSIS#include <sys/types.h>#include <utime.h> int utime(const char *filename, struct utimbuf *buf); #include <sys/time.h> int utimes(char *filename, struct timeval *tvp); 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[0].tv_sec is actime, and tvp[1].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 SEE ALSOstat(2)
IndexThis document was created by man2html, using the manual pages. Time: 09:48:27 GMT, December 14, 2024 |