After update, creation timestamp for new files created with right click > new file in Gnome seems to be hard-coded

OS version: Fedora 33

[sysadmin@localhost Downloads]$ uname -a
Linux localhost.localdomain 5.10.7-200.fc33.x86_64 #1 SMP Tue Jan 12 20:20:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Today, I did a ‘dnf update’. New kernel version shown above in the uname output.

After the update, the file names and were appearing a little weird. So, I did a restart. Now the file names are fine.

From gnome, I can right-click and open(create) a new text document. I had to configure this as it doesn’t come out of the box in gnome (unlike MS Windows).

But, after the update when I create a new text file, the timestamp of creation is hardcoded to 09-August-2019 !!
Same goes for any file with or without an extension. Its always 09-August-2019 !! I think this is a bug.

Files created from the terminal using touch command doesn’t have this issue.

[sysadmin@localhost Downloads]$ touch dummyFile
[sysadmin@localhost Downloads]$
[sysadmin@localhost Downloads]$ ls -l dummyFile
-rw-rw-r--. 1 sysadmin sysadmin 0 Jan 20 20:37 dummyFile
[sysadmin@localhost Downloads]$

Sorry about the bad screenshot from my mobile. The regular PrintScreen won’t work in Fedora if the right-click menu is open.

1 Like

Hey–how have you done this please? It probably isn’t a bug with Gnome, but with whatever you used to add this functionality to Gnome. So let’s start there.

If you use the screenshot tool: activities > screenshot, you can take screenshots with the right click menu active.

Hi Ankur

How I added the ‘New text file’ and ‘New LibreOffice Doc’ to the Right click menu

–Adding ‘Create document’ menu and adding Text, .doc (odt) , excel file

Go to /home/<user>/Templates directory , do the following

— to add ‘Text File’ to the right click menu
a. touch Text\ File.txt

— To add ‘Libre office Doc’ to the right click menu
Open an instance of Libre office writer and click Save as and save a file named ~/LibreOfficeDoc.odt

Pitfall (Don’t know if this still applies for Fedora 33)
If you manually touch a file with .odt extension, any new document will only be text file.

Regarding the Screenshot tip you gave:
It doesn’t work for me.
Once the right-click menu is active, how do you invoke Activities>Screenshot utility ?

I tried clicking the Super key (Windows Key) while the right-click menu is active, but nothing happens. Needless to say, I cannot use mouse to do this as the right-click will be gone if I use the mouse.

Thank You.

2 Likes

I can see that the timestamp of the ‘template’ files I had created in /home//Templates directory
has the timestamp 09-Aug-2019.

But, whenever I created a new .txt file or new .odt (LibreOffice doc), the right timestamp used to be shown.
Only today, after the ‘dnf update’ maybe, this ‘issue’ started happening.

2 Likes

Hrm, doesn’t work for me here, but I didn’t have a Templates directory on this user. Maybe I’d deleted it (I’ve been upgrading Fedora releases for a number of years now, so my home configuration doesn’t change).

I’ll create a new user later and see if I can reproduce the issue.

No, do it the other way. First invoke Activities > Screenshot. There, you can set a delay, say 5 seconds. Click “take screenshot”, and in the five seconds get your right click menu up. When the screenshot is taken, if your right click menu was open, it’ll be in the screenshot.

1 Like

Thank You very much for the screenshot tip, Ankur. I just didn’t think of the delay feature.

1 Like

I just tested this out. On my system, the time stamp for the new file seems to be the same as whatever it was for the template file:

# Check modification time
$ ls -ls Templates/  dump/test/
dump/test/:
total 8
8 -rw-r--r--. 1 asinha asinha 7931 Jan 20 16:45 Doc.odt

Templates/:
total 8
8 -rw-r--r--. 1 asinha asinha 7931 Jan 20 16:45 Doc.odt
0 -rw-rw-r--. 1 asinha asinha    0 Jan 20 16:45 file.txt

# Check creation time
$ ls -ls Templates/  dump/test/ --time=creation
dump/test/:
total 8
8 -rw-r--r--. 1 asinha asinha 7931 Jan 20 16:53 Doc.odt

Templates/:
total 8
8 -rw-r--r--. 1 asinha asinha 7931 Jan 20 16:45 Doc.odt
0 -rw-rw-r--. 1 asinha asinha    0 Jan 20 16:45 file.txt

So, the new file that is created using the template has the same “modified time”, which will change once you work with the file and save it again. The creation times vary—the new file you create will have a newer creation time.

How are you checking the time attributes for your files? Are you certain you are looking at the creation time and not the modified time? Nautilus (the file manager) shows me “accessed time” and “modified time”. It does not show me a “creation time”. Gotta use ls for that.

2 Likes

Emm…
I guess that wasn’t an issue, after all. My bad.
Thank You very much Ankur. :handshake:

Determining the creation time of a file using --time=creation option in the ls command : Has it always been there in the GNU’s ls utility? Or is it something new? Because, few years back, I remember my System admin (RHEL) friend telling me that, in Linux, you cannot find the creation timestamp of a file ; i.e. you can only know the Modified time stamp.

2 Likes

No worries. It was fun to revise these things a bit :smiley:

I’m not sure—it’s one of those things that we don’t need too often. The modification time stamp is generally enough. We’ll have to look at the changelog or commit log to see if it’s mentioned there:

https://github.com/coreutils/coreutils

1 Like

Btw the status of a file shows also this infos.

stat info.txt

The change attribute is the creation time.

3 Likes

I think you meant the Birth attribute in stat command’s output.

1 Like

Just make a

touch info.txt

and you will see that the Birth attribute will be empty (at least in F32 with ext4). As i know this should be a attribute where is in several filesystems available. But as there is no agreement till today it is just empty :thinking:

Correction: in Fedora 33 (BTRFS) the attribute is used.

Birth: 2021-01-22 08:30:23.387149313 -0300
2 Likes

I use ext4. Version: Fedora 33

$ touch dummyfile2
$ 
$ 
$ stat dummyfile2
  File: dummyfile2
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: fd01h/64769d	Inode: 22823359    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/malphonse)   Gid: ( 1000/malphonse)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2021-01-23 13:14:07.141939374 +0800
Modify: 2021-01-23 13:14:07.141939374 +0800
Change: 2021-01-23 13:14:07.141939374 +0800
 Birth: 2021-01-23 13:14:07.141939374 +0800
$ 
$ ls -l dummyfile2 --time=creation
-rw-rw-r--. 1 malphonse malphonse 0 Jan 23 13:14 dummyfile2
$ 
$ # After 30 minutes
$ echo 'hello world' >> dummyfile2
$ 
$ cat dummyfile2
hello world
$ 
$ stat dummyfile2
  File: dummyfile2
  Size: 12        	Blocks: 8          IO Block: 4096   regular file
Device: fd01h/64769d	Inode: 22823359    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/malphonse)   Gid: ( 1000/malphonse)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2021-01-23 13:14:07.141939374 +0800
Modify: 2021-01-23 13:44:43.266938980 +0800
Change: 2021-01-23 13:44:43.266938980 +0800
 Birth: 2021-01-23 13:14:07.141939374 +0800
$ 
$ 
$ 
$ ls -l dummyfile2
-rw-rw-r--. 1 malphonse malphonse 12 Jan 23 13:44 dummyfile2
$ 
$ ls -l dummyfile2 --time=creation
-rw-rw-r--. 1 malphonse malphonse 12 Jan 23 13:14 dummyfile2
$
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.