How to get list of all cron jobs ( crontab ) in a server

Run below as root :


for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done


If you want to see who owns that cron job run below :

for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done


getent passwd cut -d: -f1 perl -e'while(<>){chomp;$l = `crontab -u $_ -l 2>/dev/null`;print "$_\n$l\n" if $l}'