Tuesday, May 20, 2014

Get a list of crontabs for all users on a system

The following command will print a list of crontabs for all users of the system.

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