Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
80
rated 0 times [  80] [ 0]  / answers: 1 / hits: 123093  / 2 Years ago, sat, january 22, 2022, 12:19:32

I need to find the creation time of a file, when I read some articles about this issue, all mentioned that there is no solution (like Site1, Site2).



When I tried the stat command, it states Birth: -.



So how can I find the creation time of a file?


More From » filesystem

 Answers
3

There is a way to know the creation date of a directory , just follow these steps :




  1. Know the inode of the directory by ls -i command (lets say for example its X)


  2. Know on which partition your directory is saved by df -T /path command ( lets say its on /dev/sda1 )


  3. Now use this command : sudo debugfs -R 'stat <X>' /dev/sda1




You will see in the output :



crtime: 0x4e81cacc:966104fc -- mon Sep 27 14:38:28 2013


crtime is the creation date of your file .



What I tested :




  1. Created a directory at specific time .

  2. Accessed it .

  3. Modified it by creating a file .


  4. I tried the command and it gave an exact time .


  5. Then i modify it , and test again , the crtime remained the same ,
    but modify and access time changed .


[#25087] Sunday, January 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tresein

Total Points: 197
Total Questions: 113
Total Answers: 112

Location: Hungary
Member since Wed, Nov 9, 2022
2 Years ago
tresein questions
Tue, Jun 28, 22, 17:57, 2 Years ago
Sun, Apr 3, 22, 07:11, 2 Years ago
Thu, Feb 3, 22, 18:03, 2 Years ago
Sat, May 13, 23, 13:00, 1 Year ago
;