#include <stdio.h>
#include <sys/stat.h>
#include <utime.h>
#include <time.h>
int main(int argc, char **argv)
{
const char *filename = "d:\\data.txt";
struct stat foo;
struct utimbuf new_times;
new_times.actime = foo.st_atime;
new_times.modtime = time(NULL);
if (utime(filename, &new_times) < 0)
{
perror(filename);
return 1;
}
return 0;
}
/*
run:
check the file date and time on your hard disk drive
*/