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 ...
随机推荐
- Spring重温(二)--Spring JavaConfig
1.从Spring 3起,JavaConfig功能已经包含在Spring核心模块,它允许开发者将bean定义和在Spring配置XML文件到Java类中.但是,仍然允许使用经典的XML方式来定义bea ...
- springboot整合dubbo\zookeeper做注册中心
springboot整合dubbo发布服务,zookeeper做注册中心.前期的安装zookeeper以及启动zookeeper集群就不说了. dubbo-admin-2.5.4.war:dubbo服 ...
- Java内存模型[转]
原文:http://www.cnblogs.com/nexiyi/p/java_memory_model_and_thread.html 1. 概述 多任务和高并发是衡量一台计算机处理器的能力重要指标 ...
- Docker学习笔记1
来源:第一本Docker书 基础命令 安装: apt-get install docker 启动: service docker start 创建并运行第一个容器: docker run -i -t ...
- SpringSecurity实现图形验证码功能
⒈封装验证码类 package cn.coreqi.security.validate; import java.awt.image.BufferedImage; import java.time.L ...
- Nand
1.boolean logic 常用的boolean logic有AND OR NOT,其性质如下 事实上,可用AND和NOT来表示OR x or y = NOT(NOT(x) AND NOT(y)) ...
- HTTP笔记01-http相关的基础知识
这个系列文章是阅读<图解HTTP>后写下的笔记 当我们在浏览器输入url,点击回车后,浏览器显示我们需要的web页面,那么,这个界面是如何产生的? 根据浏览器地址中输入的url,浏览器从相 ...
- 制作ecc证书(linux命令行)
生成ECC证书.Debian:/home/test# openssl ecparam -out EccCA.key -name prime256v1 -genkeyDebian:/home/test# ...
- Linux系统下安装pycharm
在 linux下打开浏览器,搜索pycharm,点击download. 下载好的文件的名称可能是 ‘pycharm-professional-2018.3.5.tar.gz’. 打开终端界面,输入命令 ...
- 用puttygen工具把私钥id_rsa转换成公钥id_rsa.ppk
1 前言 有时候需要ppk格式的公钥,可以用putty来处理 2 步骤 1. 产生密钥 可以参考Gitlab的SSH配置(linux和windows双版本) $ ssh-keygen -t rsa - ...