Announcement

Collapse
No announcement yet.

Dolphin's 'Created' column is empty

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dolphin's 'Created' column is empty

    Dolphin
    Version 18.12.0

    Why is the Created column empty? Is there some setting I need to change?

    Edit: Looks like a work in progress: https://phabricator.kde.org/D7423
    Attached Files
    Last edited by chimak111; Dec 23, 2018, 09:53 AM.
    Kubuntu 20.04

    #2
    Just in case someone doesn't know this...

    Traditional *nix file systems usually did not have a file creation date and time; the weird date and time of "last change to the inode" sometimes worked as such when the date and time of last modification did not do. (chmod, f. ex., would spoil this). GNU systems have a "birth" date and time, and so GNU tools often show a blank when run on Linux file systems.

    Regards, John Little
    Regards, John Little

    Comment


      #3
      Given that, it would seem to me that that easiest 'fix' to this would be to use the Accessed date as a static entry for the Created date column. That way, the date the file was created would always remain, and the date last accessed would continue to evolve.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        This does beg a discussion; Of what use is the "Create" time anyway? A file, when created, has content "abc". When modified "abc" may no longer be "abc" so what use is knowing when it was "abc"? You have no way of knowing what was modified so what good is knowing the age of the modification? In my view, that's all the create date tells you - that this file was "new" on this date, so the last time it was modified was X number of days/weeks/etc ago, but gives no indication as to what was modified.

        I can think of specific use cases where it might be useful - system backups for example. This must be why a common file naming scheme is use the date/time in the filename in these cases - so at a glance you can tell the age of the backup. But even this is only necessary if you move or copy the file from one filesystem to another. Otherwise, the "accessed" date tells us when it was created. Photos have this info implanted in exif data.

        Interesting to think about.

        BTW, EXT4 does store the create (crtime) time:

        Code:
        stuart@office:/mnt/vm_drive1/stuart/virtualbox_vms$ sudo debugfs -R 'stat /stuart/virtualbox_vms/mountimg' /dev/sda5 |grep time
        debugfs 1.44.1 (24-Mar-2018)
         ctime: 0x5c20e445:c953890c -- Mon Dec 24 08:51:01 2018
         atime: 0x594e74af:5f106d40 -- Sat Jun 24 10:18:23 2017
         mtime: 0x5c20e445:c953890c -- Mon Dec 24 08:51:01 2018
        crtime: 0x594e74af:5d2826d0 -- Sat Jun 24 10:18:23 2017

        Please Read Me

        Comment


          #5
          Originally posted by oshunluvr View Post
          This does beg a discussion; Of what use is the "Create" time anyway? A file, when created, has content "abc". When modified "abc" may no longer be "abc" so what use is knowing when it was "abc"? You have no way of knowing what was modified so what good is knowing the age of the modification? In my view, that's all the create date tells you - that this file was "new" on this date, so the last time it was modified was X number of days/weeks/etc ago, but gives no indication as to what was modified.
          Agreed to all that, but a birth date does have at least sentimental significance
          Originally posted by oshunluvr View Post
          I can think of specific use cases where it might be useful - system backups for example. This must be why a common file naming scheme is use the date/time in the filename in these cases - so at a glance you can tell the age of the backup. But even this is only necessary if you move or copy the file from one filesystem to another. Otherwise, the "accessed" date tells us when it was created. Photos have this info implanted in exif data.
          I like to have my screenshot filenames like $(date +%Y%m%d%H%M%S).png so that the creation date is baked into the filename for easy reference.

          Originally posted by oshunluvr View Post
          BTW, EXT4 does store the create (crtime) time:

          Code:
          stuart@office:/mnt/vm_drive1/stuart/virtualbox_vms$ sudo debugfs -R 'stat /stuart/virtualbox_vms/mountimg' /dev/sda5 |grep time
          debugfs 1.44.1 (24-Mar-2018)
          ctime: 0x5c20e445:c953890c -- Mon Dec 24 08:51:01 2018
          atime: 0x594e74af:5f106d40 -- Sat Jun 24 10:18:23 2017
          mtime: 0x5c20e445:c953890c -- Mon Dec 24 08:51:01 2018
          crtime: 0x594e74af:5d2826d0 -- Sat Jun 24 10:18:23 2017
          Someone's written a shell function for that:
          Code:
          get_crtime() {
          
          for target in "${@}"; do
           inode=$(stat -c %i "${target}")
           fs=$(df  --output=source "${target}"  | tail -1)
           crtime=$(sudo debugfs -R 'stat <'"${inode}"'>' "${fs}" 2>/dev/null | 
           grep -oP 'crtime.*--\s*\K.*')
           printf "%s\t%s\n" "${target}" "${crtime}"
          done
           }
          Anyway, my original issue, now that I know a little more, remains: should Dolphin offer the "Created" option? I feel it should not be offered as an option in the image in the first post or in the one below:
          Attached Files
          Last edited by chimak111; Dec 29, 2018, 06:17 AM.
          Kubuntu 20.04

          Comment


            #6
            Originally posted by chimak111 View Post
            ... my original issue ... remains: should Dolphin offer the "Created" option? I feel it should not be offered...
            In my reading about this issue, I found that the underlying lack of a creation date is in the Linux kernel, even though common file systems like btrfs and ext4 have it. (I didn't find any reason why this is so.) But I was also surprised to get the impression that dolphin is not in principle KDE only, and the project has flirted with other environments in the past. So, maybe, they don't want to remove something that will be needed somewhere.
            Regards, John Little

            Comment


              #7
              Originally posted by jlittle View Post
              In my reading about this issue, I found that the underlying lack of a creation date is in the Linux kernel, even though common file systems like btrfs and ext4 have it. (I didn't find any reason why this is so.) But I was also surprised to get the impression that dolphin is not in principle KDE only, and the project has flirted with other environments in the past. So, maybe, they don't want to remove something that will be needed somewhere.
              So, maybe, they don't want to remove something that will be needed somewhere. Or even in the (near) future if "Now that glibc has support for the statx(2) system call, stat will follow soon and we'll be able to use the plain old stat command for this." is anything to go by. Source: https://unix.stackexchange.com/a/407305/
              Kubuntu 20.04

              Comment


                #8
                Originally posted by chimak111 View Post
                ... "Now that glibc has support for the statx(2) system call,
                https://unix.stackexchange.com/a/407305/...glibc added a wrapper for statx(2) only in 2.28 (release August 2018).
                Thank you for that, I looked for stuff like that but didn't find it. (Sometimes it's "birth", sometimes "creation"). I note that my Cosmic has version 2.28-0ubuntu1 of libc6, and that man statx hasn't caught up yet. I now expect dolphin to get the birth time support soonish. This wishlist KDE bug suggests that "soonish" will be dolphin 17.08.0. I wonder if KDE Neon might have to wait till it is based on a more recent Ubuntu than 18.04.
                Regards, John Little

                Comment

                Working...
                X