当前位置:首页 > 操作系统 > 正文

linux判别目录是否存在

时间:2025-01-24阅读数:2

1. 运用 `test` 指令(`; then echo Directory existselse echo Directory does not existfi```

2. 运用 `bash` 的 `d` 选项:```bashif ; then echo Directory existselse echo Directory does not existfi```

3. 运用 `bash` 的 `qwe2; then echo Directory existselse echo Directory does not existfi```

4. 运用 `find` 指令:```bashif find /path/to/directory > /dev/null 2>

本站所有图片均来自互联网,一切版权均归源网站或源作者所有。

如果侵犯了你的权益请来信告知我们删除。邮箱:[email protected]

猜你喜欢