Anyway to retrieval file creation time

Is there any way to retrieval creation time for a specified file in Linux/Unix environment? Basically,  you can not do that! By default EXT2/3 and Reiserfs do not hold the creation time, but only the last modified time. so if the file has been modified you’ll not find the created time. That means you need create you own track record on the creation timestamps.

As we know, with the help of system command stat, we can easily get very detailed information about files like last access time, last modified time, exact file size, file owner and inode number, but the ctime output by “stat” refers to the attribute change time not creation time. The basic i-node structure in any unix/linux variant doesn’t have a field for creation time. Since the file system abstraction layer VFS is fundamental to uniform access to any file system, inode structure remains same from file system to file system.

Of course, you can also engineer a file system differently by your own, but for proper VFS functionality you still need to mess with libc and etc.

Share Button

Leave a comment

Your email address will not be published. Required fields are marked *