boy foolish的博客最简单的应该是依靠ls返回值(当文件不存在时它会返回非零值):if ls /path/to/your/files* 1> /dev/null 2>&1; then echo "files do exist" else echo "files do not exist" fi我redirectls输出,使其完全...
weixin_39517357的博客使用access函数功能:检查调用进程是否可以对指定的文件执行某种操作。用法:#include #include int access(const char *pathname, int mode);pathname: 需要测试的文件路径名。mode: 需要测试的操作模式,可能值是...