Created
September 20, 2020 11:23
-
-
Save ayozehd/1286eeb0181cbbd382af5bdc0ac70d1c to your computer and use it in GitHub Desktop.
Clean all docker containers logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this script as ROOT | |
# Display docker logs disk usage in human-readable | |
du -chs /var/lib/docker/containers/*/*json.log; | |
# Clean all docker logs | |
truncate -s 0 /var/lib/docker/containers/*/*-json.log; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment