file_dir=`find 目录 -mindepth 1 -maxdepth 5 - type d`
for dir in $file_dir
do
file_name=`basename $dir`
if [ $file_name != "目标文件名" ];then
rm -rf $dir
if [ $? != 0 ];then
echo "未删除成功!"
exit -2
fi
fi
done
2023-12-24 12:39:52
file_dir=`find 目录 -mindepth 1 -maxdepth 5 - type d`
for dir in $file_dir
do
file_name=`basename $dir`
if [ $file_name != "目标文件名" ];then
rm -rf $dir
if [ $? != 0 ];then
echo "未删除成功!"
exit -2
fi
fi
done
下一篇:Git - Cheey Pick