mdate=`date +%R-%d-%m-%Y` LogFile=/root/HDstatusLog.log echo disk is good! $mdate >> $LogFile 输出: disk is good! :--- disk is good! :--- disk is good! :--- 注意: 1. >写入,覆盖掉原有的: >>继续添加,原来的还存在.
cfg # This is generated to be a configuration file. # kay # // # This is a parameter for crontab and objective file. interval= begin= end= # There are some log path # logpath=/root/shell/log/;/root/shell/log/;/root/shell/log/ logpath=/home/pospadm/tr