用shell脚本清理日志
#!/bin/bash
echo"1"
echo "========start clean docker containers logs ========"
logs=$(find /var/lib/docker/containers/ -name *-json.log)
for log in $logs
do
echo "clear logs : $log"
cat /dev/null > $log
done
echo "========end clean docker containers logs ========"