修复删除日志命令

This commit is contained in:
hanhh 2021-06-08 15:29:00 +08:00
parent 1cbc534edc
commit c3c3dc3e06

View File

@ -8,7 +8,7 @@ days=$1
## 删除运行js脚本的旧日志
remove_js_log() {
local log_full_path_list=$(find test/ -name "*.log")
local log_full_path_list=$(find $dir_log/ -name "*.log")
local diff_time
for log in $log_full_path_list; do
local log_date=$(echo $log | awk -F "/" '{print $NF}' | cut -c1-10) #文件名比文件属性获得的日期要可靠