Skip to content

Instantly share code, notes, and snippets.

@Akagi201
Created July 24, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akagi201/b47cf0aa592560210528d8696ac160e0 to your computer and use it in GitHub Desktop.
Save Akagi201/b47cf0aa592560210528d8696ac160e0 to your computer and use it in GitHub Desktop.
#!/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 =========================="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment