放在nginx目录下 - yanwei li, 02/09/2022 11:21 AM
access=/var/log/nginx/access.log
error=/var/log/nginx/error.log
while true
do
rm -f $access;
rm -f $error;
echo $(date +%F%n%T) "Delete file successfully!" >> ./JKnginx.log
touch $access;
touch $error;
sleep 604800;
done