shell 判断目录是否存在
判断/data/www/logs/wos_log/crontab_log是否,
如果不存在则新建
if [ ! -d "/data/www/logs/wos_log/crontab_log" ];then
mkdir /data/www/logs/wos_log/crontab_log
fi
shell 判断目录是否存在的更多相关文章
- linux bash shell 判断目录是否为空的函数
#!/bin/sh ##方法一 判断输出字符数统计为0 is_empty_dir(){ |wc -w` } ##方法二 判断输出string为空 #is_empty_dir(){ # ` ] #} t ...
- shell 判断文件、目录是否存在
shell判断文件是否存在 1. shell判断文件,目录是否存在或者具有权限 2. #!/bin/sh 3. 4. myPath="/var/log/httpd/" 5. m ...
- shell判断文件,目录是否存在或者具有权限的代码
核心代码 #!/bin/sh myPath="/var/log/httpd/" myFile="/var /log/httpd/access.log" #这里的 ...
- shell判断文件,目录是否存在或者具有权限 (转载)
转自:http://cqfish.blog.51cto.com/622299/187188 文章来源:http://hi.baidu.com/haigang/blog/item/e5f582262d6 ...
- shell判断文件,目录是否存在或者具有权限
shell判断文件,目录是否存在或者具有权限 #!/bin/sh myPath="/var/log/httpd/" myFile="/var /log/httpd/ ...
- shell判断文件/目录是否存在
https://www.cnblogs.com/37yan/p/6962563.html caution!!! if should be end with fi caution!!! there sh ...
- shell判断文件是否存在
转自:http://www.cnblogs.com/sunyubo/archive/2011/10/17/2282047.html 1. shell判断文件,目录是否存在或者具有权限 2. #!/bi ...
- Linux shell判断文件和文件夹是否存在
shell判断文件,目录是否存在或者具有权限 #!/bin/sh myPath="/var/log/httpd/" myFile="/var /log/httpd/acc ...
- shell判断条件是否存在
1. shell判断文件,目录是否存在或者具有权限 2. #!/bin/sh 3. 4. myPath="/var/log/httpd/" 5. myFile="/var ...
随机推荐
- 为什么HTTPS比HTTP安全,以及两者的优缺点
一.HTTPS简介 HTTPS协议的主要作用可以分为两种:一种是建立一个信息安全通道,来保证数据传输的安全:另一种就是确认网站的真实性. HTTP协议传输的数据都是未加密的,也就是明文的,因此使用HT ...
- TensorFlow学习笔记之--[tf.app.flags使用方法]
很多时候在运行python代码的时候我们需要从外部定义参数,从而避免每次都需要改动代码.所以一般我们都会使用 argparse 这个库.其实TensorFlow也提供了这个功能,那就是 tf.app. ...
- 【上载虚拟机】XX是一个Workstations 12.X虚拟机,不受XX支持。请选择其他主机或将虚拟机的硬件版本更改为以下选项之一。
背景 由于搭建集群时,要使用Ubuntu系统,还有一点就是咱们使用的Ubuntu系统是定制的,但是它是一个虚拟机,需要通过VMware Workstations这款软件,把咱们定制好的Ubuntu系统 ...
- hibernate框架学习之数据抓取(加载)策略helloworld
package cn.itcast.h3.query.hql; import java.util.List; import org.hibernate.Query; import org.hibern ...
- JS导出excel设置下载的标题/与angular结合冲突
2017.8更新 此功能与angular结合使用时,最后一行 document.getElementById("dlink").click(); 与angular的ng-click ...
- mysql 5.6 windows 启动脚本
2018-4-25 17:02:08 星期三 下载mysql 5.6 zip(免安装版)到本机 一台电脑上可能装有多个版本的mysql, 启动时为了不影响: 1. 解压后文件夹根目录改名为 mysql ...
- [nodejs]er_bad_field_error NaN in where clause
1 前言 nodejs 运行时,出现以下情况er_bad_field_error NaN in where clause. 2 分析 原来是userid = NAN传进来了,生成userid时出错了. ...
- PHP use闭包函数
<?php class Cart { //产品价格 const PRICE_BUTTER = 1.00; const PRICE_MILK = 3.00; const PRICE_EGGS = ...
- 时间格式化 Date-formatDate
//日期格式化 export function formatDate(date,fmt){ var o = { "M+":date.getMonth() + 1,//月份 &quo ...
- swift 学习- 10 -- 类和结构体
// '类和结构体' 是人们构建代码所使用的一种通用且灵活的构造体, 我们可以使用完全相同的语法规则来为 '类和结构体' 定义属性 (变量 和 常量) 和添加方法, 从而扩展 类和结构体 的功能 // ...