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.

Related posts:

  1. Simple ways to check Process running time
  2. Using stat command to display file status
  3. Convert File System from ext3 to ext4
  4. How can I set real time priority for a process
Tags: , ,


Joseph chen is a system administrator from south China. He has a keen interest in Open Source and system administration solutions.

Leave a Reply

© 2006-2009 Admon Home. All rights reserved.