Finding the file creation date/time on Linux
Posted on 18 Dec, 2020
1. Find inode
number of file.
inode
number of file.2. Find name of your root partition
3. Use the inode
no in stat
& debugfs
inode
no in stat
& debugfs
Look for crtime, that is our file creation date/time
Here is a one liner if your filesystem is ext4
debugfs is a ext2, ext3, ext4 file system debugger. The
-R
flag causes debugfs to execute a single command. In our case that command isstat
which is used to check file status. We need to run debugfs where our filesystem is mounted, i.e/dev/sda1
.
Note: this will not work on older file systems. Although this has changed with modern file systems such as ext4 & Btrfs which has been designed to store file creation time.
PreviousFinding all Python Virtual Environments in your systemNextGenerate a RSS Feed of recent files inside a Git repository
Last updated