14

I'm using Fedora-16 with ext4.Suddenly with stat command I can see something called "Birth".

# stat history_file1.txt 
  File: `history_file1.txt'
  Size: 8944            Blocks: 24         IO Block: 4096   regular file
Device: 802h/2050d      Inode: 4192        Links: 1
Access: (0600/-rw-------)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:admin_home_t:s0
Access: 2012-01-18 18:11:10.799900150 +0530
Modify: 2012-01-18 18:11:10.867908793 +0530
Change: 2012-01-18 18:11:10.867908793 +0530
 Birth: -

search man page show instances of birth

%w Time of file birth, human-readable; - if unknown

%W Time of file birth, seconds since Epoch; 0 if unknown

Is this newly added field? where this field is stored with respect to inode ?

webminal.org
  • 273
  • 5
  • 19

1 Answers1

9

This is the "birth" time of a specific file - the moment when it was created on the file system. This attribute is new to ext4 and is also known as crtime or btime, just google it. :)

Here you can find a discussion regarding the stat command and the specific output you're seeing.

Georgi Hristozov
  • 702
  • 1
  • 4
  • 13
  • 2
    Cygwin's `stat(1)` also has this field, since Windows' NTFS stores the file's creation time. – Adam Rosenfield Aug 01 '12 at 21:34
  • 2
    BTW, Linux userspace tools don't seem to be able to read this time yet. At least not in Ubuntu 14.04. More details: http://unix.stackexchange.com/questions/50177/birth-is-empty-on-ext4 – Nelson Nov 08 '14 at 21:14
  • 1
    Has that link somehow changed? I cannot see the relevance. – paradroid Aug 10 '15 at 18:25
  • How to display the missing birth / creation field: http://moiseevigor.github.io/software/2015/01/30/get-file-creation-time-on-linux-with-ext4/ – Florin Andrei Jan 31 '17 at 20:46
  • Same on 16.04, for what it's worth. I wonder if 18.04 has it yet? – icedwater Feb 18 '19 at 01:43