#include < sys/types.h > #include < sys/stat.h > #include < unistd.h > #include < time.h > #include < stdio.h > int main() { struct stat buf; if(lstat("file.txt", &buf) < 0){ perror("lstat"); return 1; } printf("%s", ctime(&buf.st_mtime)); return 0; }

