#!/bin/sh
echo "======== 开始清理Docker所有服务日志 ========"
logs=$(find /var/lib/docker/containers/ -name *-json.log)
for log in $logs
do
echo "clean logs : $log"
cat /dev/null > $log
done
echo "======== Docker服务日志清理结束 ========"
清除Docker服务日志
最新推荐文章于 2024-08-21 12:32:48 发布