0

The title says everything.

I'm using Fedora 11.

Luc M
  • 3,110
  • 4
  • 26
  • 27

3 Answers3

6

There is no native command to do this, but you can use a simple bash oneliner like this:

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

The above would read out all user entries in /etc/passwd and list their appropriate crontab entries. sudo usage is required, since you'd need superuser privileges to access another user's cron.

Aron Rotteveel
  • 8,449
  • 17
  • 53
  • 64
  • 2
    This assumes your users are all listed in /etc/passwd. If you use a different naming service, say for example LDAP, to define your user namespace, they will not appear in /etc/passwd. You might instead consider using "getent passwd" in place of the cut command above. – ktower Mar 04 '10 at 14:43
3

cat /var/spool/cron/*

Many distributions have additional system crons configured via /etc as well. For example, CentOS has files in /etc/cron*

Let me know if you have any further questions.

Warner
  • 23,756
  • 2
  • 59
  • 69
3

I don't think so

You could do something like this:

for crontab in `ls /etc/cron.*/* /var/spool/cron/* /etc/crontab`
do
echo $crontab
cat $crontab
done
Richard Holloway
  • 7,456
  • 2
  • 25
  • 30