LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-16-2009, 10:48 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
viewing all crontab files on a system


Hi there --

Is there a way to view all the crontab files, owned by root, users, and other system accounts, that exist on a system simultaneously rather than having to go the individual accounts? The distribution in question here is the Debian 4.0 release.

Thanks.
 
Old 11-16-2009, 11:04 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi

You can read the files in /var/spool/cron/crontabs. Each user has a file there. But you should not change the files there, but reading is ok.
 
Old 11-16-2009, 11:45 AM   #3
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

Rep: Reputation: 58
Here's a quick bash command (must run as su):
Code:
 for LISTED in $(awk -F":" '{ printf "%s ",$1 }' /etc/passwd); do /usr/bin/crontab -u $LISTED -l; done 
for LISTED in $(awk -F":" '{ printf "%s ",$1 }' /etc/passwd); do echo "$LISTED:";/usr/bin/crontab -u $LISTED -l; done

Last edited by david1941; 11-16-2009 at 11:51 AM. Reason: Added the second line to echo the user
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing System Logs from Root ispguy_01 Linux - General 2 06-23-2007 04:03 PM
system crontab gazman1 Linux - General 1 06-01-2006 11:31 AM
crontab & quota files are temporary files? hamish Linux - Software 0 07-10-2004 02:09 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
Viewing MPEG2 on a Redhat 8 System? wiseraptor Linux - Software 2 02-09-2003 09:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration