解决docker 日志文件过大的问题

#!/bin/sh
echo "======== docker containers logs file details ========"

logs=$(find /var/lib/containers/storage/ -name *ctr.log)

for log in $logs
do
ls -lh $log
echo $log
cat /dev/null > $log
done

posted @ 2022-06-27 11:03  小学弟-  阅读(269)  评论(0编辑  收藏  举报