Last active
June 28, 2022 10:26
-
-
Save AlperRehaYAZGAN/bb20c6a53b6c2b56f69debdf29a60581 to your computer and use it in GitHub Desktop.
This is the simple shell command for refresh docker container logs by container id.
This file contains hidden or 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
# see log sizes | |
# https://stackoverflow.com/questions/59765204/how-to-list-docker-logs-size-for-all-containers | |
sudo du -h $(docker inspect --format='{{.LogPath}}' $(docker ps -qa)) | |
# truncate file to refresh | |
sudo truncate -s 0 $(docker inspect --format='{{.LogPath}}' container-id ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment