First, homework (exercise) content:
1. Summarize the detailed usage method of the task plan (at, crontab) on Linux system;
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;
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;
4, every night 12 o'clock, get all the lines in the/proc/meminfo file starting with S or M, appended to the/statistics/meminfo.txt file, and the daily message before, to add a similar =============== separator line;
First question:
http://huangyisan.blog.51cto.com/6925110/1691815
The second question:
[[email protected] ~]# CRONTAB-L20 3 * * 1-6/bin/cp-rfp/etc//backups/etc-' Date +\%f ' &>/dev/null
Question three:
[[email protected] backups]# CRONTAB-L20 3 * * 7/bin/cp-rpf/etc/fstab-' date +\%f-\%h-\%m-\%s ' &>/dev/null
Question Fourth:
[Email protected] backups]# crontab-l00 * * */bin/echo "===============" >>/statistics/meminfo.txt; /bin/cat/proc/meminfo | Egrep "^s|^m" >>/statistics/meminfo.txt
This article is from the "It_landscape" blog, make sure to keep this source http://huangyisan.blog.51cto.com/6925110/1691809
Linux OPS Practice-September 5, 2015 Course assignments