How to list cron jobs of all the users
by Nashath Rafeeq on Nov.18, 2011, under cool, Programing
while I was doing some server maintenance for a customer last night it required that i find out what cron jobs were in the cron tabs of all the users on the machine. I found this handy script that will list out all the cron jobs for all the users
[sourcecode language=’sh’]
#!/bin/bash
for user in $(cut -f1 -d: /etc/passwd)
do echo $user && crontab -u $user -l
echo ” ”
done
[/sourcecode]