#! /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编程 从当前目录下查找指定文件,输出文件位置
最新推荐文章于 2024-11-10 17:48:09 发布
648

被折叠的 条评论
为什么被折叠?



