目录判断: path="/home"#if [ ! -d ${path} ];thenif[ -d${path}];thenechodir${path}exist!elseechodir${path}not exist!fi 文件判断: file="/home/log.txt"if[ -f${file}];thenechofile${file}exist!elseechofile${file}not exist!fi...