In linux, there is no creation time, there are only access, modify, and change dates.
The POSIX standard only defines three distinct timestamps to be stored for each file: the time of last data access, the time of last data modification, and the time the file status last changed. Linux does not provide a kernel API for accessing the file creation times, even on filesystems supporting them (ext4, Btrfs and JFS), perhaps it will be impelemented in the future.
To modifie the accessed and modified time in a file, you can use the command touch
with these options
-a = accessed
-m = modified
ctime
(change time) – Stéphane Chazelas Jan 10 '17 at 13:25touch newfile; cat oldfile > newfile; mv newfile oldfile
– Shadur-don't-feed-the-AI Jan 10 '17 at 16:02crtime
or btime/birth time) is different thanctime
(change time) so that I vote for a re-open of this question that may not be a duplicate, if taken literally. I guess this is part is confusing "it does not change the first date - creation date", but we cannot know for sure, and the OP writes "CREATION", so... (and a recent enoughstat
does show creation time, even though, maybe not first). And if it IS/WAS a duplicate, it should have been edited for clarity before setting duplicate status IMHO. – Totor Apr 09 '22 at 12:17stat
on Linux certainly wasn't showing creation time. At the very least, this should be remain closed as unclear - OP needs to clarify which OS and filesystem this was before it should be reopened. – muru Apr 09 '22 at 16:02