Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <time.h>
- #include <unistd.h>
- #include <fcntl.h>
- int main (int argc, char *argv[])
- {
- struct stat fileStat;
- int OO=0;
- FILE *filename = argv[1];
- if((OO = open(filename , O_RDONLY))== -1)
- {
- printf("Erreur d'ouverture du fichier");
- return EXIT_FAILURE;
- }
- if(fstat(OO, &fileStat)<0)
- {
- return 1;
- }
- printf("Numéros d'inode : \t\t%d\n",fileStat.st_ino);
- printf("Date de création du fichier: \t%s\n", ctime(&fileStat.st_ctime));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement