2

I am using Dolphin version 18.08.0 (KDE Frameworks 5.54.0, Qt 5.11.3) which has, besides the access and modification times, a separate column for the creation time. Unfortunately this column is empty, although the files do have a crtime as shown via debugfs -R 'stat INODE' DEVICE.

Is there any way to display the creation time of the files in Dolphin by default?

$ debugfs -R 'stat /home/old.txt' /dev/sda4  
Inode: 3418797   Type: regular    Mode:  0644   Flags: 0x80000
Generation: 3373842699    Version: 0x00000000:00000001
User:  1000   Group:  1000   Project:     0   Size: 1106
File ACL: 0
Links: 1   Blockcount: 8
Fragment:  Address: 0    Number: 0    Size: 0
 ctime: 0x5e33cb3d:28fa524c -- Fri Jan 31 07:37:49 2020
 atime: 0x5e35ec0f:1e00e7b8 -- Sat Feb  1 22:22:23 2020
 mtime: 0x5e33cb3d:28fa524c -- Fri Jan 31 07:37:49 2020
crtime: 0x5e1dec5d:b24a3ea0 -- Tue Jan 14 17:29:17 2020
Size of extra inode fields: 32
Inode checksum: 0xc328f441
EXTENTS:
(0):580854
(END)
  • @muru: In this thread https://unix.stackexchange.com/questions/50177/birth-is-empty-on-ext4/50184#50184 you referred to GNU coreutils 8.31 (released March 2019), on my fully updated system coreutils 8.30 are installed. Could this be an issue? – I'm not a bug -- I'm a feature Feb 02 '20 at 13:12
  • My guess. The file-system is storing creation time, stat understands creation time. The something in between e.g. the virtual-file-system (the layer in the kernel between the real file-system and the user process) does not. – ctrl-alt-delor Feb 02 '20 at 14:27
  • @kalamazoo Dolphin should be using libc directly to get the creation time, but given how long it took for coreutils to gain support, I wouldn't be surprised it took a year or two for GUIs to add it. – muru Feb 02 '20 at 15:07
  • As a former MS Windows user, I know about the limited support of the creation date in Linux -- I still miss this feature. Hence, I was surprised to find after my last upgrade to Debian Buster in Dolphin by default a third dates column labeled "Erstellt" (German for "created"). Unlike the mtime and atime column it is empty. This is my reason for asking, because why include this column by default if nothing can be displayed? – I'm not a bug -- I'm a feature Feb 02 '20 at 18:04

1 Answers1

3

Creation time is new to Gnu/Linux (Unix does not traditionally support it: it is hard to come up with a useful use-case).

I have just done some research ( https://www.anmolsarma.in/post/linux-file-creation-time/ ).

The time line seems to be:

  • support added to some file-systems: 2010 or earlier (I am not sure).
  • support added to the virtual-file-system: Linux 4.11 in 2017 (kernel support complete).
  • support added to glibc: version 2.28 in 2018.
  • support added to gnu coreutils (stat): GNU coreutils 8.31 in March 2019.
  • support added to your favourite distro.
  • you upgrading.

Somewhere in there the format of the output of stat was changed, to add the new line Birth: -, but still with no way to find out the answer.

Debian Buster seems to have the first 3, but not a working stat command. If you are in this situation, and need this functionality, then you can download gnu coreutils > 8.31 and compile them. (non of this is tested, just based on a bit of memory of the development history and confirmed by the linked post.) I did not check dolphin support.