I need to creation date and time of file in linux.
I have tried below two command but did not get any output.
sudo debugfs -R 'stat <inode_no of file>' "mount point name"
.This gives me the following error:
Bad magic number in super-block while opening the file system
stat -c '%w' file_name
This gives me -
as output.
So someone please suggest appropriate command to get create date and time of file in linux.
ext4
, it is unfortunately impossible. – AdminBee Nov 11 '21 at 09:27btime
- creation date). Most do not, and you have to revert to modification time (mtime
). If you're getting-
fromstat -c %w
then it's probably your filesystem is one of those without birth time – Chris Davies Nov 11 '21 at 09:32/dev/sda1
mounted at/
, are you giving/
or/dev/sda1
as the name? And what file system are you using? Also see Birth is empty on ext4. – terdon Nov 11 '21 at 10:29