Solved

List all users cron jobs

Posted on 2014-07-30
7
197 Views
Last Modified: 2014-08-04
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
Comment
Question by:pkonstan1
7 Comments
 
LVL 34

Assisted Solution

by:Seth Simmons
Seth Simmons earned 40 total points
ID: 40229942
you could try cat /var/spool/cron/*
if it's too long use less
less /var/spool/cron/*
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 150 total points
ID: 40230000
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
 

Author Comment

by:pkonstan1
ID: 40230035
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
 
LVL 40

Expert Comment

by:omarfarid
ID: 40230107
I think output should go to /tmp/cronjobs file which is text file that you can download
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 25 total points
ID: 40230997
linux can print text files via lp command.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now