#! /bin/bash
#从当前目录下找出所有要查询的文件并输出文件位置
echo start time=`date`
echo -e
function func()
{
for file in `ls $2`
do
if [ -L $2"/""$file" ]
then
continue
else
if [ -d $2"/""$file" ]
then
path=$2"/""$file"
func $1 $path
else
if [ $1 = $file ]
then
echo file pwd= $2"/""$file"
fi
fi
fi
done
}
func $1 `pwd`
echo -e
echo end time=`date`
linux shell编程 从当前目录下查找指定文件,输出文件位置
猜你喜欢
转载自blog.csdn.net/Z_Dream_ST/article/details/79105618
今日推荐
周排行