How to truncate docker logs?

Docker logs are organized inside their respective container folders. However, with a single command you can truncate all the docker logs as following:

[code lang="bash"]sudo truncate -s 0 /var/lib/docker/containers/*/*-json.log[/code]

Worth Sharing?

3 Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>