Or give options.
How to see the date created, modified etc. in Thunar? [Solved]
Re: How to see the date created, modified etc. in Thunar?
"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

~ Linus Torvalds

Re: How to see the date created, modified etc. in Thunar?
OK, I stand corrected.
Seconds removed and script split into two separate custom actions.m_pav wrote: Fri Oct 13, 2023 4:50 pm+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.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.
Show Timestamps
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
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.
Re: How to see the date created, modified etc. in Thunar?
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
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: How to see the date created, modified etc. in Thunar?
Not corrected, just FYI.
But what's the difference between Modified and Changed?
Cheers!
But what's the difference between Modified and Changed?
Cheers!
Re: How to see the date created, modified etc. in Thunar?
apparentlyMXRobo wrote: Mon Oct 16, 2023 10:19 am Not corrected, just FYI.
But what's the difference between Modified and Changed?
Cheers!
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)