This commit is contained in:
zeaslity
2024-10-30 16:30:51 +08:00
commit 437acbeb63
3363 changed files with 653948 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/bash
common_dir_list=(/var/lib/docker/ /var/log/ /root/ /data /home)
# 查找最深3级目录并计算空间占用
for dir in "${common_dir_list[@]}"
do
echo "start to find disk usage of $dir"
find "$dir" -mindepth 1 -maxdepth 6 -exec du -sh {} + | sort -hr | head -n 10
echo ""
done