cleanDocker.sh

2021-09-06 14:16
220
0

#!/bin/sh echo "======== start clean docker containers logs ========" logs=$(find /var/lib/docker/containers/ -name *-json.log) for log in $logs do echo "clean logs : $log" cat /dev/null > $log done echo "======== end clean docker containers logs ========"

echo "======== start clean data logs ========" logs=$(find /data/mnt/server/ -name *.log) for log in $logs do echo "clean logs : $log" cat /dev/null > $log done echo "======== end clean docker containers logs ========"

全部评论