解决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
#!/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