文件是否存
-
判断文件是否存在的shell脚本代码
实现代码一、 myPath=”/var/log/httpd/”myFile=”/var /log/httpd/access.log” # 这里的-x 参数判断$myPath是否存在并且是否具有可执行权限if [ ! -x “$myPath”…
实现代码一、 myPath=”/var/log/httpd/”myFile=”/var /log/httpd/access.log” # 这里的-x 参数判断$myPath是否存在并且是否具有可执行权限if [ ! -x “$myPath”…