Docker truncate logs

Table of Contents

Docker truncate logs

truncate -s 0 /var/lib/docker/containers/**/*-json.log
sudo sh -c "truncate -s 0 /var/lib/docker/containers/*/*-json.log"

sudo truncate -s 0 `docker inspect --format='{{.LogPath}}' f7ea99211cf3c10fa86cfb78824485f20933b8cdfa35ca542c88c4b15310427e`

sudo sh -c 'truncate -s 0 /var/lib/docker/containers/*/*-json.log'

Leave a Reply

Your email address will not be published. Required fields are marked *