DOCKER日志全清理

#!/bin/bash

echo "==================== start clean docker containers logs =========================="

logs=$(find /var/lib/docker/ -name *.log)

for log in $logs
do
    echo "clean logs : $log"
    cat /dev/null > $log
done

echo "==================== end clean docker containers logs   =========================="  

发表评论

电子邮件地址不会被公开。