Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

List all users cron jobs

Is there a way to see All USERS cron jobs?  I know you can use crontab -l to see a list for a single user, but what I want to do is see all of the cron jobs for ALL users in one big list.

I'm needing to replicate "most" of server A to server B, but I want to pick and choose my cron jobs. But over the years they were set up under various different users and I don't recall who they all were.

Thanks.
0
Paul Konstanski
Asked:
Paul Konstanski
3 Solutions
 
Seth SimmonsSr. Systems AdministratorCommented:
you could try cat /var/spool/cron/*
if it's too long use less
less /var/spool/cron/*
0
 
omarfaridCommented:
if you want to document the crontab jobs then you can run

cd /var/spool/cron
for user in `ls`
do
    echo ---------------------- $user ---------------------------
    cat $user
done >> /tmp/cronjobs
0
 
Paul KonstanskiProject SpecialistAuthor Commented:
That's excellent.  Is there a way to get that to be saved to a file that I could then download to my workstation and print out.
0
 
omarfaridCommented:
I think output should go to /tmp/cronjobs file which is text file that you can download
0
 
gheistCommented:
linux can print text files via lp command.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now