How to check if a directory exist, within a shell script?
在shell脚本中,可以使用什么命令检查目录是否存在?
- 下次,亲爱的@ayyappa,在您输入标题时,请查看建议的旧文章;-)
1 2 3 4 5 6
| if [ -d"/path/to/dir" ]
then
echo"Directory /path/to/dir exists."
else
echo"Error: Directory /path/to/dir does not exists."
fi |