#include #include #include main (int argc,char **argv) { struct stat st; if (argc!=2) { printf("Usage: stat \n"); exit (1); } if (stat(argv[1],&st) < 0 ) { perror(argv[1]); exit(1); } printf("access/modification/creation/modification=#%ld#%ld#%ld#%s\n",st.st_atime,st.st_mtime,st.st_ctime,ctime(&st.st_mtime)); }