ncrmastby$cat /data/run/delarc.sh
#!/bin/bash
DAYS=7
DIR=/data/apex/arch
EXT=".arc"
echo
echo "Start delarc `date`"
cd $DIR
for file in `find . -depth -mindepth 1 -name \*$EXT -mtime +$DAYS`
do
echo "Deleting $file"
rm -f $file
done
echo "Complete delarc `date`"
exit 0
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-702709/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-702709/