• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Check File Date And Time In Linux Ubuntu Terminal

How To Check File Date And Time In Linux Ubuntu Terminal

By Sourabh / November 15, 2025 Category: How To, Ubuntu

How to check file creation date in Linux Ubuntu commandline. Here is an easiest way to check timestamp of file in Linux.

Let us learn about the two commands to check file creation date in Ubuntu and check last modified file in Linux.

Method 1. Using Stat Command

To check the file creation date, simply run the following command where demofile1.txt is the name of the file

$ stat demofile1.txt

From the output, the Birth directive shows the file creation date.

The above command displays all the informtion attched to the file. To narrow down the search result file creation date, pass the -c %w arguments as shown.

$ stat -c %w demofile1.txt

The ‘stat’ command displays information about the specified file(s). With no option, ‘stat’ reports all information about the given files.

Method 2. Using debugfs Command

The other way of checking the file creation date is by using the debugfs command. However, this is a multi-stage operation and more complex than the stat command.

First, you need to get the file’s inode number using the ls command shown.

$ ls -i demofile1.txt

Next, find the partition where the file is located using the df command shown

$ df ./demofile1.txt

Finally, run the following debugfs command to find out the file creation date.

$ sudo debugfs -R 'stat <2256081>' /dev/sda2

NOTE: 2256081 is the inode number of the file. The crtime field displays the file creation time and date.

The following output shows the crtime alongwith ctime, atime and mtime.

Inode: 2256081 Type: regular Mode: 0664 Flags: 0x80000
Generation: 3350473792 Version: 0x00000000:00000001
User: 1000 Group: 1000 Size: 316
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 8
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x666680f0:285a5028 -- Mon Jun 10 09:58:32 2024
atime: 0x666680f0:257de410 -- Mon Jun 10 09:58:32 2024
mtime: 0x666680f0:285a5028 -- Mon Jun 10 09:58:32 2024
crtime: 0x666680f0:257de410 -- Mon Jun 10 09:58:32 2024
Size of extra inode fields: 32
EXTENTS:
(0):8994391
(END)

That’s all. You are all aware of the two ways of checking the file creation date on a Linux Ubuntu system.

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap