How to check if a directory exist, within a shell script?
This question already has an answer here:
if [ -d "/path/to/dir" ]
then
echo "Directory /path/to/dir exists."
else
echo "Error: Directory /path/to/dir does not exists."
fi
链接地址: http://www.djcxy.com/p/17478.html
上一篇: 我刚开始学习RHEL 6.3 Shell脚本中的脚本
下一篇: 如何在shell脚本中检查目录是否存在?