Skip to content

Instantly share code, notes, and snippets.

@AlperRehaYAZGAN
Last active June 28, 2022 10:26
Show Gist options
  • Save AlperRehaYAZGAN/bb20c6a53b6c2b56f69debdf29a60581 to your computer and use it in GitHub Desktop.
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.
# 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