跳至主要內容

抓出docker 容器(container) 與volume比較大的log檔案

Last Updated on 2022-05-17 by william

除非有log備份需要, 否則log太大, 必須抓出來, 然後清 0 (cat /dev/null > xxx.log)

find /docker/images/  -name *.log -ls | sort -r -n -k7

或是

find /docker/images/ -name *.log -type f -size +1000000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

分類:技術

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題