Hello, on April 20 at 11:45 am I created a text file; on April 25 at 8:20 am I modified it; and today April 30 at 10:10 am I accessed it. I wanted to check these metadata that I quoted previously on my file. So, to check them, I used the program Stat but also Thunar and they allowed me to check the date and time of access of a file, the creation, the modification, etc. To understand better, here is what I get with Stat :
This problem occurs for all my files and folders and seems to occur since the last update of my Manjaro xfce system.
It seems to me (see certain), that it is to an application such as for example: fs.inotify (kernel module), watchman, iwatch, etc; to manage and update the metadata of creation, modification, access, etc on files and folders, yes or no? If yes, what is the best?
How to solve this problem?
What’s going on with Manjaro xfce which is supposed to use one of the mentioned applications? Because it’s worrying…Knowing that, I just use my Manjaro xfce system for word processing and going on the web, I don’t even install any application or else one or two.
Thank you a lot for your help!
On a Linux Filesystem, the “Birth Date” of a file is fixed and cannot be modified with default tools. Only way to change that is recreating the file: remove & create or overwrite.
Good question, but as I said, I don’t know what’s going on with my Manjaro xfce system. The only thing I know about this is that when I open/access a file, the system overwrites all the metadata of the file to put that access date in all the metadata of that same file, which removes the creation date, etc. Exactly like this:
I hope to be clear.
Edit: I just saw that you added some new stuff to your comment, I’ll read them .
Thanks a lot, it’s getting clearer and clearer!
So I did all the command lines you gave me and I get exactly the same thing as you, it’s positive. I also took the opportunity to do exactly the same thing but with Mousepad and Libreoffice and I realize that they are the ones that cause the problem of my original message of this topic; that is to say, to make it short, that it also changes the creation date of the file compared to the modification date; so when I modify a text file, it will change the creation date when it was a simple modification (exactly like the Stat command of my first message). So, I don’t think that noatime is the problem because it simply acts on the access times to the files but simply Mousepad and Libreoffice? If it is two text applications that are the problem, is there a solution? Because I would like to keep the real date of creation of the file and not that it is replaced by the date of modification as I already said before.
Finally, thanks to these tests, I have the impression that the problem is not as serious as I thought, which means that we can exclude the fault or absence of applications such as: fs.inotify, watchman, iwatch, etc.; because if it was their fault, your test would not have worked, right? What do you think?
Thank you!
Well I never actually use the stats, but I tried gedit and it is like you said: When saving a file, it will always overwrite it and reset all dates to the current time.
If I edit a file with nano, it only updates the Modify and Change date as expected
So I assume it is because the application recreates the file on save.
So gedit creates a new file. It doesn’t matter if you click on save or save as.
No idea if it is indented to work that way, but it is clearly a question to the devs of the program. Why they ignore the stats and recreate/overwrite files.
LibreOffice will try to autodetect the most suitable VCL UI interface based on your desktop environment. To force the use of a certain VCL UI interface, use one of the SAL_USE_VCLPLUGIN=gen, SAL_USE_VCLPLUGIN=gtk3, or SAL_USE_VCLPLUGIN=kf5environment variables. These variables can be uncommented in /etc/profile.d/libreoffice-fresh.sh or /etc/profile.d/libreoffice-still.sh. See vcl/README.md for more information. LibreOffice - ArchWiki
Though i say this, i am using KDE lately, and i do see that all metadata are modified when using LibreOffice. But is switched from Xfce this week, so i don’t know if there is a leftover or something…
I’ve noticed many strange time stamp inconsistencies. Some files are modified weeks before they are created. Others I know I created over six months ago show as new. Nothing can be trusted.
If I copy files from a device (gopro, bike computer) it always sets modify +1hr in the future of when the file was saved on the device.
If I use Nautilus, right-click New Document > Empty file, the modify will be -2hrs in the past.
if I edit a file (gedit) then ALL access, modify, change, birth all get set to current time.
I am using Gnome. Manjaro 21.2.6
EXAMPLE: This text file has been sitting around for a month or two untouched.
Thank you very much for this research. I don’t know what to say, on the one hand it seems to be intentional but on the other hand not really… What also gives me the impression that it’s intentional is that several editors have exactly the same problem/bug (because yes, for me too, it’s a problem/bug); but then, why don’t command line editors have this problem/bug… But one thing is sure, robots with a conscience, it’s not for 2022… xD I’m teasing, of course, I respect the devs and thank them for their work!
It may be worth it, other communities may want to find a solution, because it’s not possible to stay in this situation. But it will be difficult for me, I don’t have enough time… Sorry.