Linux下查找空目录的代码

作者: tioced 2014-03-26 10:27:41
以下是Linux下查找空目录的源代码。

引用:
if [ -z "$1" ]; then
echo Usage: $0 \
exit 1
fi
echo -e Null directory list:
for i in $(find $1 -type d -print)
do
TMP=$(ls $i)
if [ "$TMP" = "\." ]; then
continue
elif [ -z "$TMP" ]; then
echo $i
fi
done


完毕。

相关资讯