
linux
jizp
有责任心、有激情
展开
-
linux shell 判断文件或文件夹是否真的存在
#判断文件或文件夹是否存在 filepath=/data/test.txt folderpath=/data/qtech #判断文件是否存在 if [ -f "$file" ] then echo "文件存在" fi #判断文件夹是否存在 if [ -d "$folderpath" ] then echo "文件存在" fi原创 2015-08-21 17:47:02 · 634 阅读 · 0 评论 -
linux shell 判断文件或文件夹是否真的存在
#判断文件或文件夹是否存在 filepath=/data/test.txt folderpath=/data/qtech #判断文件是否存在 if [ -f "$file" ] then echo "文件存在" fi #判断文件夹是否存在 if [ -d "$folderpath" ] then echo "文件存在" fi原创 2016-06-21 08:38:08 · 499 阅读 · 0 评论