判断路径

if [ -d /root/Desktop/text/123 ];then 
    echo "找到了123"
    if [ -d /root/Desktop/text ]
    then echo "找到了text"
    else echo "没找到text"
    fi
else echo "没找到123文件夹"
fi

 

相关文章:

  • 2021-05-31
  • 2021-07-02
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2022-01-26
  • 2021-12-22
  • 2022-12-23
相关资源
相似解决方案