跳到主要内容

count

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

#!/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