使用shell递归遍历文件并打印所有文件名的绝对路径
#/bin/bash function recursive_list_dir(){ for file_or_dir in `ls $1` do if [ -d $1"/"$file_or_dir ] then recursive_list_dir $1"/"$file_or_dir else file=$1"/"$file_or_dir echo $file fi done } recursive_list_dir() $1
#/bin/bash function recursive_list_dir(){ for file_or_dir in `ls $1` do if [ -d $1"/"$file_or_dir ] then recursive_list_dir $1"/"$file_or_dir else file=$1"/"$file_or_dir echo $file fi done } recursive_list_dir() $1