2013年4月19日

摘要: 1.shell判断文件,目录是否存在或者具有权限2.#!/bin/sh3.4.myPath="/var/log/httpd/"5.myFile="/var/log/httpd/access.log"6.7.#这里的-x参数判断$myPath是否存在并且是否具有可执行权限8.if[!-x"$myPath"];then9.mkdir"$myPath"10.fi11.12.#这里的-d参数判断$myPath是否存在13.if[!-d"$myPath"];then14.mkdir"$myPat 阅读全文

posted @ 2013-04-19 09:00 NooBkey 阅读(655) 评论(0) 推荐(0) 编辑


Copyright © 2024 NooBkey
Powered by .NET 8.0 on Kubernetes