-------------------------------------------------- ------------ Perform backup and empty the current log files, clear_countlog.shzcatlinux, zcatlinux@yahoo.com.cn, 2004-06-28 --------- -------------------------------------------------- -
#! / bin / bashlogfile = / var / count.logdate = `Date % y% m% d`
IF [-f $ logfile] THEN CP $ logfile $ logfile- $ DATE FIND / VAR /-CTIME 3 -NAME Count / * -exec RM {} /; echo "> $ logfilefi
-------------------------------------------------in CRONTAB implements the above script once a day! -------------------------------------------------
10 3 × × × ROOT /HOME/CLEAR_COUNTLOG.SH