CRON on Unix Server

What is the command to list out all the CRON's running on a UNIX Server

have you ever heard of "crontab" ???

Check here!!!

crontab -l [user] will list the commands for the given user (the user option is only applicable if you are root). I don't think there's a command to list for all users in one go, if that's what you are asking. For that you would need to "cat" all the users crontab files, which you could only do if you were root.

But I'm guessing that you're not root, since you wouldn't need to ask this question :wink:

Don't worry about root login.. I will get that....Can you give the command for the listing all the CRONS..........

There isn't one. There is a section in the manual page that PikK45 linked to called FILES. You should read that. You should respect other peoples privacy before you go rummaging around in their stuff.

So the answer is simple " There isn't one". You could have replied at first go.
Also don't jump to conclusion about anyone's privacy....its an official matter and will be taken care through due permission of respective authority.

With a simple shell loop processing /etc/passwd user you can accomplish the same.

(this is HPUX)

Try this oneliner as root.

awk -F":" ' { print "crontab -l " $1 } ' /etc/passwd | sh

Or something like ..

for i in $(awk -F":" ' { print $1 } ' /etc/passwd)
do
printf "crontab for user $i \n"
crontab -l $i
printf  "end crontab for user $i\n"
done

Maybe just quicker cat'ing the files

# grep . /var/spool/cron/cronjobs/* #or wherever the files are on your system