How to see the date created, modified etc. in Thunar?  [Solved]

Message
Author
MXRobo
Posts: 1838
Joined: Thu Nov 14, 2019 12:09 pm

Re: How to see the date created, modified etc. in Thunar?

#31 Post by MXRobo »

I haven't followed closely – partially because I'm not sure what you want, but since you've done a lot of modifications, and others can't replicate, you could try a fresh original official MXLive-USB of the same type to see if it occurs there.

I tried what was suggested in post #11 and it seemed to work, but I haven't tried it extensively.
MX-21.3 Xfce

andymx
Posts: 434
Joined: Mon Sep 11, 2023 7:10 pm

Re: How to see the date created, modified etc. in Thunar?

#32 Post by andymx »

@MXRobo What is suggested in post #11 works for me. What doesn't work is showing the created and accessed dates.
"While I may not get any money from Linux, I get a huge personal satisfaction from having written something that people really enjoy using, and that people find to be the best alternative for their needs."
~ Linus Torvalds
:linuxlove:

andymx
Posts: 434
Joined: Mon Sep 11, 2023 7:10 pm

Re: How to see the date created, modified etc. in Thunar?

#33 Post by andymx »

I did another test (which nearly turned to a disaster).
I made a Live-USB and booted from that. I then added the custom actions to Thunar, but in this case none of the files that I tested worked. This compares to my current situation where for a few files it works. Maybe it's significant to note that my Live-USB was the 30 July 2023 version. I'm using the September version.

P.S. The disaster was that my GRUB menu was reset, but this is a specific question that I have for another section in the Forum. :puppy:
"While I may not get any money from Linux, I get a huge personal satisfaction from having written something that people really enjoy using, and that people find to be the best alternative for their needs."
~ Linus Torvalds
:linuxlove:

andymx
Posts: 434
Joined: Mon Sep 11, 2023 7:10 pm

Re: How to see the date created, modified etc. in Thunar?

#34 Post by andymx »

Do you believe this? I have a text file in one folder whose File Info I cannot see. I copy it to another folder and I can see the copied file's File Info. Now isn't it crazy?
Does it have anything to do with the fact that I also cannot see the (source) directory's File Info?
"While I may not get any money from Linux, I get a huge personal satisfaction from having written something that people really enjoy using, and that people find to be the best alternative for their needs."
~ Linus Torvalds
:linuxlove:

andymx
Posts: 434
Joined: Mon Sep 11, 2023 7:10 pm

Re: How to see the date created, modified etc. in Thunar?

#35 Post by andymx »

I think I know what the problem is! If there are any spaces in the folder or file name, the custom action doesn't work. To clarify, if the parent folder name has any spaces in it then the files inside it will not work with File Info. The files themselves must not have any spaces in their name. Hopefully this will be a clue to correcting it.
"While I may not get any money from Linux, I get a huge personal satisfaction from having written something that people really enjoy using, and that people find to be the best alternative for their needs."
~ Linus Torvalds
:linuxlove:

User avatar
Melber
Developer
Posts: 1389
Joined: Tue Mar 23, 2021 4:19 pm

Re: How to see the date created, modified etc. in Thunar?  [Solved]

#36 Post by Melber »

@andymx Try this:

Change the custom action command to

Code: Select all

bash $HOME/bin/fileinfo %f;
Save this as $HOME/bin/fileinfo (without the .sh file extension)

Code: Select all

#!/bin/bash

FILENAME=$@

CREATED=$(stat -c%w "$FILENAME" | cut -d'.' -f1)
ACCESSED=$(stat -c%x "$FILENAME" | cut -d'.' -f1)
MODIFIED=$(stat -c%y "$FILENAME" | cut -d'.' -f1)
CHANGED=$(stat -c%z "$FILENAME" | cut -d'.' -f1)
PERMISSION=$(stat -c%A "$FILENAME")

yad --class=fileinfo --undecorated \
--borders=10 --center \
--button=close \
--form --columns=2 \
--text="<b>$FILENAME</b>\n" \
--field="Created:":LBL "" \
--field="Accessed:":LBL "" \
--field="Modified:":LBL "" \
--field="Changed:":LBL "" \
--field=" ":LBL "" \
--field="Permissions:":LBL "" \
--field="$CREATED":LBL "" \
--field="$ACCESSED":LBL "" \
--field="$MODIFIED":LBL "" \
--field="$CHANGED":LBL "" \
--field=" ":LBL "" \
--field="$PERMISSION":LBL ""


(and maybe think about not using spaces in folder and file names any more...)
Last edited by Melber on Thu Oct 12, 2023 6:41 am, edited 2 times in total.

User avatar
Jerry3904
Administrator
Posts: 23410
Joined: Wed Jul 19, 2006 6:13 am

Re: How to see the date created, modified etc. in Thunar?

#37 Post by Jerry3904 »

I used this today in order to distinguish between two different images--it's a great add IMO.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Melber
Developer
Posts: 1389
Joined: Tue Mar 23, 2021 4:19 pm

Re: How to see the date created, modified etc. in Thunar?

#38 Post by Melber »

Should look like this now and work with spaces in the path name.

231011_fileinfo.png

I added Changed and Permissions just because.
btw, good detective work @andymx . The script wasn't expecting spaces in the names and they broke the stat commands.
You do not have the required permissions to view the files attached to this post.

User avatar
Melber
Developer
Posts: 1389
Joined: Tue Mar 23, 2021 4:19 pm

Re: How to see the date created, modified etc. in Thunar?

#39 Post by Melber »

Jerry3904 wrote: Wed Oct 11, 2023 5:30 pm I used this today in order to distinguish between two different images--it's a great add IMO.
Glad it was useful, even if the info is already available in the context menu under properties.

User avatar
Jerry3904
Administrator
Posts: 23410
Joined: Wed Jul 19, 2006 6:13 am

Re: How to see the date created, modified etc. in Thunar?

#40 Post by Jerry3904 »

Not with the time (which I needed), at least by default
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Post Reply

Return to “Software / Configuration”