统计文件夹下文件的个数及大小(包括子文件夹)

#!/bin/bash
for file in ./*
do
    if test -d $file
    then
        #echo $file >> test.log
        du -sh $file >> test.log
        ls -lR|grep "^-" $file |wc -l >> test.log
    fi
done
作者:admin  创建时间:2023-04-27 13:43
最后编辑:admin  更新时间:2024-07-17 15:26