First, homework (exercise) content:
1. Summarize the detailed usage method of the task plan (at, crontab) on Linux system;
answer:http://blog.51cto.com/user_index.php?action=addblog_new&did=164807
2, 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;
Answer: 3 * * 1-6/bin/cp-rf/etc/*/backup/etc-' date + $F '
3, every Sunday 2:30 A.M., run the CP command to backup the/etc/fstab file, the storage location is/BACKUP/FSTAB-YYYY-MM-DD-HH-MM-SS;
Answer: 2 * * 0/bin/cp/etc/fstab/backup/fstab-' date +%y-%m-%d-%h-%m-%s '
4, every night 12 o'clock, get all the lines in the/proc/meminfo file starting with S or M, append the Statistics/meminfo.txt file, and the daily message before, to add a similar =============== separator line;
Answer: 0 0 * * */bin/mkdir-p/statistics &&/bin/egrep--color=auto ' ^s|^m '/proc/meminfo >>/statis Tics/meminfo.txt && echo =========================== >>/statistics/meminfo.txt
This article is from the "it_working" blog, make sure to keep this source http://weine100.blog.51cto.com/2152945/1691694
20150905-day Course Assignment (scheduled task Mail,at,cron,)