pastebin

date de création
  1. #include <sys/stat.h>
  2. #include <unistd.h>
  3. #include <time.h>
  4. #include <stdio.h>
  5.  
  6. int main (int argc, char* argv[])
  7. {
  8.     struct stat* buffer;
  9.     char* toto = argv[1];
  10.     char date[80];
  11.    
  12.     stat(toto, buffer);
  13.    
  14.     strftime(date, 80, "%d/%m/%Y %H:%M:%S", gmtime(&buffer->st_ctime));
  15.     printf("num d'inode : %d - date de création : %s\n", buffer->st_ino, date);
  16.     return 0;
  17. }
Parsed in 0.004 seconds