#脚本 del_h_data.sh
#!/bin/sh
set -x
find /das/data1 -name *.dat -type f -mtime +120 -exec rm {} ;
crontab -l
3 14 * * * /das/scripts/del_dasdat.sh >/das/scripts/del_dasdat.log 2>&1
$ cat del_dasdat.log
+ find /das/data1 -name *.dat -type f -mtime +120 -exec rm {} ;
以上是目前的策略,不奏效
1
BOYPT 2017-04-14 14:51:56 +08:00
rm -fv {}\;才会有删除的记录吧
|
4
xss 2017-04-14 16:39:32 +08:00
find /das/data1 -name *.dat -type f -mtime +120 -exec echo -ne "rm {}" && rm {}\;
|