for循环遍历linux当前目录的结构

for i in `ls`;do echo ">>>"$i ;ls $i;done
[root@mail 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
[root@mail cache]# 

只是单纯的个人学习记录,欢迎评论指教,初学者,请见谅!

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Lebron_zhb

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值