Add files via upload

This commit is contained in:
kneutron 2022-10-08 12:22:35 -05:00 committed by GitHub
parent 339b72fcb6
commit 78daaf982f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

30
updt-suse.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
# mod for SUSE
zypper ref
zypper update
#debsort
#mv -f -v ~/DEBInstalled.list ~/DEBInstalled.list.prev ; \
# dpkg -l >~/DEBInstalled.list
rpmsortinst &
# only updt if locatedb >24H old
# REF: https://unix.stackexchange.com/questions/275728/set-ls-l-time-format
#ls -lhk --time-style='+%s' /var/lib/mlocate/mlocate.db
# 1 2 3 4 5 6
#-rw-r--r-- 1 root root 21M 1665244188 /var/lib/mlocate/mlocate.db
# date +%s
#1665249077
now=$(date +%s)
dbage=$(ls -lhk --time-style='+%s' /var/lib/mlocate/mlocate.db |awk '{print $6}')
let timediff=$now-$dbage
if [ $timediff -ge 86400 ]; then
updatedb &
else
echo "NOTE Skipping updatedb, timediff is only $timediff"
fi
#squiderr
#efibootmgr