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

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

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

#51 Post by andymx »

Jerry3904 wrote: Fri Oct 13, 2023 5:56 pm Agreed. @Melber: you might consider that change...
Or give options.
"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: 1425
Joined: Tue Mar 23, 2021 4:19 pm

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

#52 Post by Melber »

MXRobo wrote: Thu Oct 12, 2023 10:11 am FYI - I don't see the Changed info under properties...
OK, I stand corrected.

m_pav wrote: Fri Oct 13, 2023 4:50 pm
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.
+1 Agreed, though I'd take out the seconds because it make it look too busy. I think seconds are only needed if you're running a server with multiple users and you have to do in depth analysis.
Seconds removed and script split into two separate custom actions.


Show Timestamps
231014_timestamps.png

Code: Select all

#!/bin/bash
#Show Timestamps

FILENAME=$@

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

####

TITLE=Timestamps
CLASS=timestamps
ICONPATH="dialog-information"

export BTN_CLOSE=$(gettext "Close")  ; BTN_CLOSE+='!window-close'

TEXT_TIME=Timestamps
TEXT_CRE=Created
TEXT_ACC=Accessed
TEXT_MOD=Modified
TEXT_CHA=Changed


yad --title="$TITLE" --class=$CLASS --window-icon=$ICONPATH --undecorated \
--mouse --borders=10 \
--button="${BTN_CLOSE}" \
--form --columns=2 \
--text="\n<b>$FILENAME</b>\n" --wrap --width=250 \
--field="<b>$TEXT_TIME</b>":LBL "" \
--field="$TEXT_CRE:":LBL "" \
--field="$TEXT_ACC:":LBL "" \
--field="$TEXT_MOD:":LBL "" \
--field="$TEXT_CHA:":LBL "" \
--field=" ":LBL "" \
--field="$CREATED":LBL "" \
--field="$ACCESSED":LBL "" \
--field="$MODIFIED":LBL "" \
--field="$CHANGED":LBL ""



Show Permissions
231014_permissions.png

Code: Select all

#!/bin/bash
#Show Permissions

FILENAME=$@

PERMISSIONS=$(stat -c%A "$FILENAME" | sed -e "s/-/- /g" | sed -e "s/r/read /g" | sed -e "s/w/write /g" | sed -e "s/x/execute /g")

perm=($PERMISSIONS)

PER_USER=$(echo ${perm[1]} ${perm[2]} ${perm[3]})
PER_GROUP=$(echo ${perm[4]} ${perm[5]} ${perm[6]})
PER_OTHER=$(echo ${perm[7]} ${perm[8]} ${perm[9]})

####

TITLE=Permissions
CLASS=permissions
ICONPATH="dialog-information"

export BTN_CLOSE=$(gettext "Close")  ; BTN_CLOSE+='!window-close'

TEXT_PER=Permissions
TEXT_USER=User
TEXT_GROUP=Group
TEXT_OTHER=Other

yad --title="$TITLE" --class=$CLASS --window-icon=$ICONPATH --undecorated \
--mouse --borders=10 \
--button="${BTN_CLOSE}":1 \
--form --columns=2 \
--text="\n<b>$FILENAME</b>\n" --wrap --width=250 \
--field="<b>$TEXT_PER</b>":LBL "" \
--field="$TEXT_USER:":LBL "" \
--field="$TEXT_GROUP:":LBL "" \
--field="$TEXT_OTHER:":LBL "" \
--field=" ":LBL "" \
--field="$PER_USER":LBL "" \
--field="$PER_GROUP":LBL "" \
--field="$PER_OTHER":LBL ""

You do not have the required permissions to view the files attached to this post.

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

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

#53 Post by Jerry3904 »

Nice!
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

MXRobo
Posts: 1840
Joined: Thu Nov 14, 2019 12:09 pm

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

#54 Post by MXRobo »

Not corrected, just FYI.

But what's the difference between Modified and Changed?

Cheers!

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

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

#55 Post by Melber »

MXRobo wrote: Mon Oct 16, 2023 10:19 am Not corrected, just FYI.

But what's the difference between Modified and Changed?

Cheers!
apparently
Modify - the last time the file was modified (content has been modified)
Change - the last time meta data of the file was changed (e.g. permissions, ownership, file name)

Post Reply

Return to “Software / Configuration”