Shell编写清除日志脚本 一、shell编写清除日志脚本,清除日志并保留五个最新日志 while [1] do date="$(date +%Y%m%d)" ReservedNum = 5#保留文件数量 rm_file_dir="/app/hfis/log" cd $rm_fil