(shell)Show all the files in folders and subfolders

for d in ./*; do
  if [ -d "$d" ]; then
     for e in $d/*;do
        if [ -d "$e" ]; then
            find "$e" -type f -print
        fi
     done
  fi
done

  

 

for d in ./*; do
  if [ -d "$d" ]; then
#     echo "$d"
     for e in $d/*;do
        if [ -d "$e" ]; then
            #find "$e" -type f -print
            aa=`find "$e" -type f -print`
            echo $aa
        fi
     done
  fi
done

  

posted on 2018-01-23 17:12  cdekelon  阅读(185)  评论(0编辑  收藏  举报

导航