Bash脚本中新建文件夹跳过已有文件夹的方法

Bash脚本中新建文件夹跳过已有文件夹的方法


发布日期: 1970-01-01 更新日期: 2015-12-15 编辑:bukun 浏览次数: 4673

标签:

摘要: 建立新文件夹的Bash脚本,若文件夹存在,则跳过。代码放到脚本里面运行,还是很方便的。 #!/bin/bash dire="/home/bk/tmdown" if [ -d "$dire" ] ; then    ech...

建立新文件夹的Bash脚本,若文件夹存在,则跳过。代码放到脚本里面运行,还是很方便的。

    #!/bin/bash
    dire="/home/bk/tmdown"
    if [ -d "$dire" ] ;
        then    echo "Directory Exists!"
    else
        mkdir "$dire"fi

关注公众号
获取免费资源

随机推荐


Copyright © Since 2014. 开源地理空间基金会中文分会 吉ICP备05002032号

Powered by TorCMS

OSGeo 中国中心 邮件列表

问题讨论 : 要订阅或者退订列表,请点击 订阅

发言 : 请写信给: osgeo-china@lists.osgeo.org