Created convienence bash script to count the crontabs that exist on disk.

This commit is contained in:
tristan committed 2023-05-09 21:41:55 -05:00
1 parent 0ac0b7ef9e
commit d28047b9df
1 file changed
+19
+19
View File
@@ -0,0 +1,19 @@
total_count=0
declare -a crontab_dirs=(
/etc/cron.d
/etc/cron.daily
/etc/cron.hourly
/etc/cron.weekly
/var/spool/cron
)
for dir in ${crontab_dirs[@]}; do
count=0;
for file in $dir/*; do
count=` ls -1 $dir | wc -l `
done
echo "- $dir: $count<br>"
total_count=$(( $count + $total_count ))
done
echo "Total: $total_count"