How to Find Linux File Creation Time using Debugfs?
Last Updated :
23 Jul, 2025
Everything is treated as a file in Linux, and all the information about a file is stored in inodes, which includes the crucial metadata about a file such as creation time, last modification, etc. Every file in Linux is identified by its inode number.
In this article, we will be using debugf command to find Linux File Creation Time with the help of stat(utility to find file or file system status) command that is used to get Last Modified Date of File in Linux. Both stat command and Debugfs command together will be used to find actual file creation time in Linux.
Find Linux file creation Time using debugfs
Step 1: To find the inode number of the file which we need to know for finding the file creation time and the date we have to use the following command :
$ stat <file name>
Alternatively, ls -i command can also be used that will only show the inode number and skip all the other information.
$ ls -i <file name>
So now we have got the inode number that is "7342019 " for the file "tithi.jpeg", copy that to your clipboard because we are going to need this inode number in our further steps.
Step 2: Find out the root filesystem in which the file resides using the following command:
$ df -h
So here, system the root partition is /dev/sda1, that might be different on your system, so make sure to check it properly and note it down.
Step 3: Now lastly, use the debugfs command for finding the creation time of the file called “tithi.jpeg" by using the following command :-
sudo debugfs -R 'stat <inode number>' /dev/sda1

In the above result you can see different prefix such as ctime, atime, mtime, crtime, each of these has its own meaning that is:
- ctime: file change time Displayed.
- atime: file access time Displayed.
- mtime: Shows file modification time.
- crtime: Shows file creation time. (This is what we needed)
Similar Reads
How to Create a File in the Linux Using the Terminal? In this article, we will learn to create a file in the Linux/Unix system using the terminal. In the Linux/Unix system, there are the following ways available to creating files. Using the touch commandUsing the cat commandUsing redirection operatorUsing the echo commandUsing the heredocUsing the dd c
4 min read
How to Get Information About a File using Node.js ? Node.js is an open-source and cross-platform runtime environment built on Chromeâs V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recollect that NodeJS isnât a framework, and itâs not a programming language. In this article, we will discuss how to get informatio
3 min read
How to Find and Remove Files Modified or accessed N days ago in Linux Searching for the files which were modified (or accessed) some days ago is a common operation that is performed by Archival or Backup applications. This process is a trivial one for an Operating System that stores all the Metadata about the files in a File Table. Therefore, there exist commands offe
3 min read
C# Program to Get File Time Using File Class Given a file, now our task is to get the file time using the File class. So we use the GetCreationTime() method of the File class. This method is used to find the creation date and time of the given file or directory. This method will only take one parameter that is the path of the file and if this
2 min read
File Timestamps - mtime, ctime and atime in Linux Timestamps are records for the times in which actions are performed on files. A timestamp is useful because it keeps records of when a file was accessed, modified, or added. Linux's files have 3 timestamps recorded by the computer: Access timestamp (atime): which indicates the last time a file was a
4 min read
How to get file creation and modification date or time in Python? We often need to access various file properties for different purposes. Among the file properties, the creation and modification time of a file are the most commonly used ones. We can achieve the same functionality and use it for various utility purposes, using multiple methods. You can use function
4 min read