Issue
I am writing a C program to change the modified timestamp(time and date) of a file in linux. I found the commands to that but I am looking for a way I can do that through a C program. Is there a way I can do that?
Solution
For linux try
int utimensat(int dirfd, const char *pathname,
const struct timespec times[2], int flags);
or legacy command
int utime(const char *filename, const struct utimbuf *times);
Answered By - Bo R Answer Checked By - Mildred Charles (WPSolving Admin)