
the caller must have appropriate privileges. the caller's effective user ID must match the owner of theģ. the caller must have write access to the file Ģ.

NULL, or both tv_nsec fields specify UTIME_NOW), either:ġ. To set both file timestamps to the current time (i.e., times is If times is NULL, then both timestamps are set to the current In both of theseĬases, the value of the corresponding tv_sec field is ignored. Timespec structures has the special value UTIME_OMIT, then theĬorresponding file timestamp is left unchanged. Special value UTIME_NOW, then the corresponding file timestamp is If the tv_nsec field of one of the timespec structures has the Updated file timestamps are set to the greatest value supportedīy the filesystem that is not greater than the specified time. Number of seconds and nanoseconds since the Epoch, Ġ0:00:00 +0000 (UTC). Each of the elements of times specifies a time as the ( atime) times specifies the new "last modification time" Updated is specified via an open file descriptor, fd.įor both calls, the new file timestamps are specified in theĪrray times: times specifies the new "last access time" With futimens() the file whose timestamps are to be With utimensat() the file is specified via the pathname given in Precision, respectively, when setting file timestamps. Utime(2) and utimes(2), which permit only second and microsecond

#Unable to set utime update#
#include int utimensat(int dirfd, const char * pathname, const struct timespec times, int flags ) int futimens(int fd, const struct timespec times ) įeature Test Macro Requirements for glibc (seeĭESCRIPTION top utimensat() and futimens() update the timestamps of a file with SYNOPSIS top #include /* Definition of AT_* constants */ Utimensat, futimens - change file timestamps with nanosecond

UTIMENSAT(2) Linux Programmer's Manual UTIMENSAT(2) NAME top
