且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检测Bash中的符号链接是否断开?

更新时间:2023-02-26 13:13:13

# test if symlink is broken (by seeing if it links to an existing file)
if [ ! -e "$F" ] ; then
    # code if the symlink is broken
fi