linux ls只是列出文件夹
linux ls只是列出文件夹
ls -l|grep ^d ----列出当前目录下的文件夹
ls -l|grep ^d|grep "tmp" ----列出当前目录下明子含有"tmp"的文件夹
for dir in `ls -l ~/dxy/|grep ^d | awk '{print $9}'` ---- awk '{print $9}' ,只print 文件夹的名字
do
echo "==== $dir"
cd ~/dxy;cd $dir/
t=`ls -l|grep ^d|grep "tmp"|wc -l`
echo t =: $t
done