Announcement

Collapse
No announcement yet.

Linux FAT File Creation/Birth Time Reporting, Proposal For Statx I/O Alignment Info

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux FAT File Creation/Birth Time Reporting, Proposal For Statx I/O Alignment Info

    Phoronix: Linux FAT File Creation/Birth Time Reporting, Proposal For Statx I/O Alignment Info

    Back in 2017 for the Linux 4.11 kernel the statx system call was added for allowing enhanced file information reporting. Since then various file-systems began adding Statx support and worked its way up into Glibc and the like in user-space for Linux finally having file creation time reporting and other attributes. Two separate statx-related additions are now working their way to the kernel...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    It is insane how Linux even today in 2022 does not have support for creation date information for files, other operating systems have had this functionality for decades.

    Comment


    • #3
      Originally posted by uid313 View Post
      It is insane how Linux even today in 2022 does not have support for creation date information for files, other operating systems have had this functionality for decades.
      Yes, it does. btime from the statx struct used with statx syscall. It is mentioned in the story. It's just that not all filesystems support it which isn't unreasonable given there are many feature disparities between filesystems and the fact such information wasn't standard.

      Comment


      • #4
        Originally posted by uid313 View Post
        It is insane how Linux even today in 2022 does not have support for creation date information for files, other operating systems have had this functionality for decades.
        I understand that creation time is cool yes it has its uses, and I want it there too, but really - what real world use does it have?!

        You already got modification date and when you modify a file it is not equal to the original and therefore a new file.

        Ergo the modification time is identical to when this "new" file was created so why would you need the date of a non-existing file which really is what this is when you think about it?

        http://www.dirtcellar.net

        Comment


        • #5
          Originally posted by waxhead View Post

          I understand that creation time is cool yes it has its uses, and I want it there too, but really - what real world use does it have?!
          Because sometimes you want directories listed in the order they were created, instead of having the order change every time you modify something within those directories

          Comment


          • #6
            Originally posted by uid313 View Post
            It is insane how Linux even today in 2022 does not have support for creation date information for files, other operating systems have had this functionality for decades.
            Well it does have support but not for FAT right now.

            Code:
            stat mbox
            File: mbox
            Size: 9372 Blocks: 24 IO Block: 4096 regular file
            Device: 805h/2053d Inode: 29099467 Links: 1
            Access: (0600/-rw-------) Uid: ( 1000/ _user_) Gid: ( 1000/ _user_)
            Access: 2022-04-23 08:59:11.329221639 +0200
            Modify: 2022-04-14 14:02:48.159957564 +0200
            Change: 2022-04-14 14:02:48.159957564 +0200
            Birth: 2022-02-11 03:50:10.975526182 +0100

            Comment


            • #7
              Creation time will still be usable only for a specific niche. On UNIX, it is common to replace a file instead of rewriting it. It is atomic and open files will not stop you from replacing it. It is the case for software updates but it might also happen with many more tools. For example, "sed -i" will create a new file, write the output and replace the original one.

              Comment


              • #8
                Originally posted by luizluca View Post
                Creation time will still be usable only for a specific niche. On UNIX, it is common to replace a file instead of rewriting it. It is atomic and open files will not stop you from replacing it. It is the case for software updates but it might also happen with many more tools. For example, "sed -i" will create a new file, write the output and replace the original one.
                " > I am trying to read a file which has several lines of data, modify [...]

                Modifying a file at a specific location is tricky. Generally it's much easier to create a new file, copying lines from the original file and changing as needed, and then rename the new file to the original name when you're done."
                -- https://stackoverflow.com/questions/...-file/56531548

                Comment


                • #9
                  Like someone asked:

                  What exactly would “creation date” mean, though? If I do
                  Code:
                  cp -a file1 file2
                  should file2 be given the same creation date as file1? Or should it be given a creation date of now?

                  Comment


                  • #10
                    Also from... 2014 (!) :

                    "modern filesystems on Linux such as EXT4 and BTRFS also support a file creation timestamp."
                    -- http://blog.fpmurphy.com/2014/06/fil...e-in-ext4.html

                    Comment

                    Working...
                    X