Shell 脚本 遍历文件夹

遍历文件夹,作用不说了,用处太多了

 

贴代码 .sh

 

deepls() { cd "$1" for x in * do if [ -f $x ] then echo $x fi if [ -d $x ] then (deepls "$PWD/$x") fi done } deepls $PWD

你可能感兴趣的:(Shell,and,so,on,Linux,Common)