utime(2) System Calls Manual utime(2) utime, utimes - inode C (libc, -lc) #include int utime(const char *filename, const struct utimbuf *_Nullable times); #include int utimes(const char *filename, const struct timeval times[_Nullable 2]); : , utimensat(2). 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. The status change time (ctime) will be set to the current time, even if the other time stamps don't actually change. times NULL, . : , times NULL . utimbuf : struct utimbuf { time_t actime; /* */ time_t modtime; /* */ }; utime() 1 . utimes() , times , . timeval, 1 . timeval: struct timeval { long tv_sec; /* */ long tv_usec; /* */ }; times[0] , times[1] . times NULL, utime(), . 0. -1, errno . EACCES path (. path_resolution(7)). EACCES times NULL, , , (Linux: CAP_DAC_OVERRIDE CAP_FOWNER). ENOENT filename . EPERM times NULL, (Linux: CAP_FOWNER). EROFS path , . POSIX.1-2008. utime() SVr4, POSIX.1-2001. POSIX.1-2008 . utimes() 4.3BSD, POSIX.1-2001. Linux (immutable) , , . chattr(1), touch(1), futimesat(2), stat(2), utimensat(2), futimens(3), futimes(3), inode(7) () Azamat Hackimov , Dmitriy Ovchinnikov , Dmitry Bolkhovskikh , Katrin Kutepova , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . utime(2)