#!/bin/bash
function read_dir() {
for file in `ls $1`
do
if [ "`ls -A $1"/"$file`" != "" -a -d $1"/"$file ]
then
read_dir $1"/"$file
else
echo $1"/"$file
fi
done
}
read_dir $1
本文转自 freeterman 51CTO博客,原文链接:http://blog.51cto.com/myunix/1402175,如需转载请自行联系原作者