File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,18 @@ function dir_info {
78
78
size=$( du --summarize --bytes " ${dir} " | cut -f 1)
79
79
timestamp=$( stat --format=" %Y" " ${dir} " )
80
80
now=$( date " +%s" )
81
- age=$(( (now - timestamp) / 3600 ))
82
- if [[ ${age} -lt 48 ]]; then
83
- age=" ${age} hours ago"
81
+ age=$(( now - timestamp))
82
+ age=$(( age / 60 ))
83
+ if [[ ${age} -lt 120 ]]; then
84
+ age=" ${age} minutes ago"
84
85
else
85
- age=" $(( age / 24 )) days ago"
86
+ age=$(( age / 60 ))
87
+ if [[ ${age} -lt 48 ]]; then
88
+ age=" ${age} hours ago"
89
+ else
90
+ age=$(( age / 24 ))
91
+ age=" ${age} days ago"
92
+ fi
86
93
fi
87
94
timestamp=$( date -d " @${timestamp} " " +%F %T" )
88
95
echo " ${size} bytes; ${timestamp} (${age} )"
Original file line number Diff line number Diff line change 75
75
# ## rsc reset --force
76
76
# ## rsc reset --which=session
77
77
# ##
78
- # ## Version: 0.16.2-9008
78
+ # ## Version: 0.16.2-9009
79
79
# ## Copyright: Henrik Bengtsson (2022-2024) and Harry Putnam (2022)
80
80
# ## License: ISC
81
81
You can’t perform that action at this time.
0 commit comments