![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
jizp
有责任心、有激情
展开
-
linux shell 判断文件或文件夹是否真的存在
#判断文件或文件夹是否存在filepath=/data/test.txtfolderpath=/data/qtech#判断文件是否存在if [ -f "$file" ]then echo "文件存在"fi#判断文件夹是否存在if [ -d "$folderpath" ]then echo "文件存在"fi原创 2015-08-21 17:47:02 · 602 阅读 · 0 评论 -
linux shell 判断文件或文件夹是否真的存在
#判断文件或文件夹是否存在filepath=/data/test.txtfolderpath=/data/qtech#判断文件是否存在if [ -f "$file" ]then echo "文件存在"fi#判断文件夹是否存在if [ -d "$folderpath" ]then echo "文件存在"fi原创 2016-06-21 08:38:08 · 463 阅读 · 0 评论