Page 81 - RHEL8 BOOK
P. 81
Remove crontab entries:
Step 10: To remove cron jobs use the following command:
[root@sun ~]# crontab –r
This command remove all crontab entries of current user.
Step 11: To make a prompt before deleting run the following command:
[root@sun ~]# crontab -i -r
crontab: really delete root's crontab?
Crontab Examples:
Step 12: Schedule a cron to execute at 5 am daily.
0 5 * * * /bin/sh backup.sh
Redirecting the output onto a terminal window:
[root@sun ~]# tty
/dev/pts/0
[root@sun ~]# crontab -e
0 5 * * * date >/dev/pts/0
S. Pradhan
(MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
Email Id:-spradhan.iiht@gmail.com
81