base_home=`pwd`
function recur_dir(){for file in `ls$1`;doif[[-f $1"/"$file]]; then
echo"->FILE: "$1"/"$file
elif [[-d $1"/"$file]]; then
echo"FOLDER: "$1"/"$file
recur_dir $1"/"$fileelseecho"---ERR: Other file type or not exists: "$1"/"$file
fi
done
}
recur_dir $base_home/Desktop/log
base_home=`pwd`
recur_dir(){
folder=$1
base_dir=`cd $folder;pwd`
for file in `ls$folder`;do
local file_full_path=$base_dir/$fileif[[-f $file_full_path]]; then
echo"->FILE: "$1"/"$file
elif [[-d $file_full_path]]; then
echo"FOLDER: "$1"/"$file
recur_dir $file_full_pathelseecho"---ERR: Other file type or not exists: "$file_full_path
fi
done
}
recur_dir $base_home/Desktop/log
base_home=`pwd`function recur_dir(){ for file in `ls $1`; do if [[ -f $1"/"$file ]]; then echo "->FILE: "$1"/"$file elif [[ -d $1"/"$file ]]; then echo "FOLDER: "$1"/"$file recur_dir $1"/"$file