#/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