#!/bin/bash

function ergodic(){

for file in ` ls $1`

do                

    if [ -d $1"/"$file] #如果 file存在且是一个目录则为真                

    then                       ergodic $1"/"$file                

  else                       local path=$1"/"$file #得到文件的完整的目录                      

                 local name=$file       #得到文件的名字                                   

   fi

done }

INIT_PATH="/home"

ergodic $INIT_PATH

相关文章:

  • 2021-09-13
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2021-09-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-05-27
相关资源
相似解决方案