shell建立日志文件


shell建立日志文件
 
#this chapter is about build log file to record operation information
#写入日志
myPath="/home/oracle/etl_data_1104/log/" 
if [ ! -d "$myPath" ]
then
echo "No log path..."
else
cd $myPath
log_file="ctl.log"
touch $log_file
echo $(date +%Y"."%m"."%d" "%k":"%M":"%S) >> $log_file
echo "----------create log file success--------------" >> $log_file
#>>向文件追加记录
#>创建一个新文件
fi
 

相关内容

    暂无相关文章