# To test: touch -t '190001010000' /tmp/todel && ls -lh /tmp/todel
#
#################################################################################
-DAYS="+90"
+DAYS="90"
DIRS="\
/tmp/ \
/var/tmp/ \
(
[ -n "$LOCATE" ] && which locate 1>/dev/null 2>&1 && locate $LOCATE &
if [ -n "$DIRS" -a -n "$DAYS" ]; then
- eval find $DIRS -mindepth 1 -not -type d -mtime $DAYS
- eval find $DIRS -mindepth 1 -type d -mtime $DAYS -empty -prune
+ eval find $DIRS -mindepth 1 -not -type d -mtime +$DAYS
+ eval find $DIRS -mindepth 1 -type d -mtime +$DAYS -empty -prune
fi
) 2>/dev/null | while IFS= read -r path; do
;
}
-sys_cpu_temp() {
- local temp=$(cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null)
+sys_cpu_temperature() {
+ temp=$(head -1 /sys/class/thermal/thermal_zone*/temp 2>/dev/null)
[ -n "$temp" ] && echo $(($temp/1000))
+ type -P vcgencmd > /dev/null && vcgencmd measure_temp | sed -E -e 's/^.*=([0-9\.]+).*$/\1/g'
}