shell删除失效软连接
#! /bin/bash
read path
if [ -z $path ]
then
echo "please enter scan path"
exit
fi
for file in $(find $path -type l)
do
if [ ! -e $file ]
then
echo "rm $file"
rm -f $file
fi
done
Mark it down to use.
本文介绍了一个使用bash脚本删除指定目录下所有失效软链接的方法。
2405

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



