#!/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
#!/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
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。