Modification history for Crontab


 
Thread Tools Search this Thread
Operating Systems Solaris Modification history for Crontab
# 1  
Old 03-13-2008
Modification history for Crontab

Hi all -

I've searched the forums and seen a few questions related, but nothing which explicitly answers what I'm looking for.

I need to know if there's ANY way to get the modification history of any users crontab.

Yes, I know that crontabs are in /var/spool/cron. I know that the date/time of the users file is the last time they modified.

But, I don't know if there's any way to find out when previous modifications have been made. (any log of additions or deletions?).

Also been searching the /var/cron/log but that only seems to have the commands executed from the crontab, but not whether the crontab was replaced with a new version.

Someone mentioned to me that the user.au file might have some clues.. but, I can't tell what the format of that file is, so, it's not much help to me right now.


If there's no built-in method for tracking these changes vis Solaris.... then what options would you guys think are best for us to implement some type of backup of previous crontab versions (maybe keep 5-10 versions as backups, and just keep deleting the 11th old file as new versions are pushed into the cron).


Thanks!
# 2  
Old 03-21-2008
could be possible...

I used to modify crontabs by listing crontab contents (-l option) and sending it to a dated file, this way i keep a record of the previous crontabs... if you use -e option for editing directly the crontabs, you can create an alias for "crontab -e" redirecting it to an script wich first store the previos version (crontab -l >filename) then give you the editor)...
Hope this could help...!
# 3  
Old 03-26-2008
Quote:
Originally Posted by guilartec
I used to modify crontabs by listing crontab contents (-l option) and sending it to a dated file, this way i keep a record of the previous crontabs... if you use -e option for editing directly the crontabs, you can create an alias for "crontab -e" redirecting it to an script wich first store the previos version (crontab -l >filename) then give you the editor)...
Hope this could help...!
This is the only method I can think of. You can use the root cron to list user's crontabs and output them to a dated file.

However, if you want to know something that was in a cron before doing this. You might be out of luck.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

The Great History of UNIX (1969-1999) | 30 Years of UNIX History | YouTube Video

I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX. The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Discussion started by: Neo
8 Replies

2. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

3. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

4. UNIX for Dummies Questions & Answers

How to review the history and the commands that has been done in this history?

Hello every body, Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris?? To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time. FYI I used... (5 Replies)
Discussion started by: ahmedamer12
5 Replies

5. Solaris

Command for checking modification history on file

What is the command for checking modification history on file? ---------- Post updated at 01:20 PM ---------- Previous update was at 12:35 PM ---------- Let me rephrase this. On a regular Unix file can I at least check to see the time and date history modification of the file? (6 Replies)
Discussion started by: jastanle84
6 Replies

6. Shell Programming and Scripting

File modification history

Can anyone please suggest an alternate command for "stat" . I am trying this on Solaris 5.9 , but the command doesn't exist. Basically i need to see one particalar file modification history. Any help is appreciated. (4 Replies)
Discussion started by: mk1216
4 Replies

7. UNIX for Dummies Questions & Answers

How to track the modification history on file in unix

How do we track the modification history on a file in UNIX. IS there any command or any script that we could run. Many Thanks (5 Replies)
Discussion started by: RSPDaemon
5 Replies

8. UNIX for Dummies Questions & Answers

Crontab history

Hi All, Is there any way to get the information for crontab running history, when it executed last time & what was the recent time it executed & all information. My crontab suddenly failed yesterday but it was working fine for last 2 mnths.What could be the reason? Thanks (2 Replies)
Discussion started by: Vips
2 Replies

9. Shell Programming and Scripting

crontab entry modification using shell script

hi Friends, iam trying to write a script which will grep the particular entry in crontab of root and enable/disable it .iam a novice in scripting. your suggestions are most welcome..please help Cheers!! (4 Replies)
Discussion started by: munishdh
4 Replies
Login or Register to Ask a Question