As root, you enter a crontab command as shown;
[root@FAROUT cron.daily] # crontab -1
*/2 * * * * vmstat
0 0 1 1-5 * iostat
[root@FAROUT cron.daily] #
Which three statements are true concerning the two cron jobs listed?
A.
The iostat command runs at midnight of every day except Sunday.
B.
The vmstat command runs twice per hour.
C.
The vmstat command runs every other hour.
D.
The vmstat command runs every second minute.
E.
All cron job output is sent to the root user’s mall.
F.
All cron job output is sent to /var/log/messages.
G.
The iostat command runs at midnight on the first day of each of the first five months of the year.
Explanation:
C, D, E
DEG … C and D cannot by together 🙂
D, E, G
D,E,G
The answer is D,E,G
=================
Job definitions are specified in the following format:
minute hour day month day-of-week user command
the output is always sent to the owner’s mail, at the begining says that you execute the command as root so…
D,E,G
D, E, G
http://www.unixgeeks.org/security/newbie/unix/cron-1.html
The main config file is normally /etc/crontab.
On a default RedHat install, the crontab will look something like this:
root@pingu # cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# ===========================================================================
# .————— minuto (0-59)
# | .———— hora (0-23)
# | | .——— dÃa del mes (1-31)
# | | | .—— mes (1-12) o jan,feb,mar,apr,may,jun,jul… (meses en inglés)
# | | | | .— dÃa de la semana (0-6) (domingo=0 ó 7) o sun,mon,tue,wed,thu,fri,sat (dÃas en inglés)
# | | | | |
# * * * * * comando a ejecutar