10

Background: I am working on CentOS

Details

# cat /proc/version
Linux version 2.6.18-308.4.1.el5PAE ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Tue Apr 17 17:47:38 EDT 2012

Question: How can i know which version cron daemon installed and running on machine

Md Mahbubur Rahman
  • 837
  • 4
  • 9
  • 21

3 Answers3

14

The dummy way:

whereis -b crontab | cut -d' ' -f2 | xargs rpm -qf
MeaCulpa
  • 366
  • 1
  • 4
  • Nice Answer. Would you please explain the command? – Md Mahbubur Rahman Nov 15 '12 at 04:16
  • 2
    search for a binary named crond, get the 2nd column of the output(the binary), then pass to rpm to look for it's belonging package. Note that in RHEL/CentOS cron daemon is named crond but not in some other OS. So I edited and use "crontab" instead which is more general. You can even filter from ps to figure out what binary is running – MeaCulpa Nov 15 '12 at 07:45
  • +1 for your helpful Answer. Also thanks for your helpful comment. – Md Mahbubur Rahman Jan 01 '13 at 05:31
3

On your centos system: rpm -q vixie-cron

Should be something like vixie-cron-4.1-77.el5_4.1

Dennis Kaarsemaker
  • 8,420
  • 3
  • 29
  • 31
3

In EL6, you can check the version of cronie (contains crond) with yum:

sudo yum list installed cronie

fyi, cronie replaced vixie-cron in EL6.

Banjer
  • 2,870
  • 6
  • 27
  • 35