AegisRyan's Island

about tech, code, hobbies..



How to List Crontab for All Users

There was a time I would like to check what are the task/job configured in crontab of all users. After I googled it I found this scripts from StackOverflow

You must run this script as root.

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

What does it do? This script basically loop thru /etc/passwd to get the user id and call ‘crontab -l’ for each user. A nice script to share and also I would like to keep it here so easy for me to refer next time.


bookmark:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News







Leave a Reply