1, every Monday to Saturday 3:20 A.M., run the CP command to archive the/etc/directory, storage location is/BACKUPS/ETC-YYYY-MM-DD; mkdir backups00 * * * 1-5 tar-cvf/backups/etc-' date +\%y-\%m-\%d '. TAR.XZ/ETC00 * * * 1-5 cp-rf/etc/backups/etc-2015- 09-052, every Sunday 2:30 A.M., run the CP command to backup the/etc/fstab file, storage location is/BACKUP/FSTAB-YYYY-MM-DD-HH-MM-SS30 * * 0 cp-rf/etc/fstab/backup/ fastab-' Date +%y-%m-%d-%h-%m-%s ' 3, every night 12 o'clock, get all lines in/proc/meminfo file that begin with S or M, append to/statistics/ Meminfo.txt file, and the daily message is preceded by a similar =============== divider; XX * * * grep "^[s| M] "/proc/meminfo >>/statistics/meminfo.txt && echo" =================== ">>/statistics/ Meminfo.txt
This article is from "Fang Wenjun's It Technology blog" blog, make sure to keep this source http://fangwenjun.blog.51cto.com/7806977/1691626
Scheduled Task jobs