for迴圈遍歷linux當前目錄的結構
阿新 • • 發佈:2018-12-09
for i in `ls`;do echo ">>>"$i ;ls $i;done
[[email protected] cache]# for i in `ls`;do echo ">>>"$i ;ls $i;done
>>>abrt-di
>>>fontconfig
0251a5afa6ac727a1e32b7d4d4aa7cf0-le64.cache-3 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-3 b79f3aaa7d385a141ab53ec885cc22a8-le64.cache -3
12b26b760a24f8b4feb03ad48a333a72-le64.cache-3 87f5e051180a7a75f16eb6fe7dbd3749-le64.cache-3 beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
>>>foomatic
>>>hald
fdi-cache
>>>krb5rcache
>>>ldconfig
aux-cache
>>>man
cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 catn local whatis X11R6
>>>powertop
saved_parameters.powertop saved_results.powertop
>>>rpcbind
>>>yum
CentOS-Updates openlogic timedhosts.txt x86_64
[[email protected] cache]#
知識單純的個人學習記錄,歡迎評論指教,初學者,請見諒!