删除某个目录下大小为0的文件-《shell脚本》

admin 2025-11-06 14:20:59 系统网络 来源:ZONE.CI 全球网 0 阅读模式
    1. #!/bin/bash
    2. #/var/www/html 为测试目录,脚本会清空该目录下所有 0 字节的文件
    3. dir="/var/www/html"
    4. find $dir -type f -size 0 -exec rm -rf {} \;
    01-shell脚本介绍-《shell脚本》 系统网络

    01-shell脚本介绍-《shell脚本》

    一、shell脚本是什么二、为什么要学shell,而不是其他计算机语言三、学习这门课程的优势四、学了能干什么五、学习什么内容六、学习的技巧七、成长路径八、学习环
    评论:0   参与:  13