批量删除当前目录下的可执行文件
2011-06-22 15:18
726 查看
test.sh
#!/bin/sh
for file in `ls`;do
if [ -x "$file" ]; then
if [
"$file" != "test.sh" ];then
rm -rf $file
fi
fi
done
#!/bin/sh
for file in `ls`;do
if [ -x "$file" ]; then
if [
"$file" != "test.sh" ];then
rm -rf $file
fi
fi
done
相关文章推荐
- 使用shell脚本删除当前目录下.c文件对应的可执行文件
- Unix删除当前目录可执行文件
- 批处理 批量删除当前目录及子目录下多个指定的扩展名文件
- 批量删除当前目录下所有文件夹中的指定文件
- 使用shell脚本删除当前目录下.c文件对应的可执行文件
- 批量删除当前目录下后缀名为.c的文件。如a.c、b.c。
- [导入]Asp.Net 文件操作基类(读取,删除,批量拷贝,删除,写入,获取文件夹大小,文件属性,遍历目录)(二)
- 删除当前目录下的文件,保留目录
- Asp.Net 文件操作基类(读取,删除,批量拷贝,删除,写入,获取文件夹大小,文件属性,遍历目录)
- 怎么用批处理*.bat 执行文件目录下面的SQL语句脚本(批量的)。。。@echo off是什么意思?
- bat删除当前目录及其所有子目录中的VC临时文件
- 删除当前目录下特定文件
- 一个自动化 编译当前目录所有cpp为可执行文件的makefie
- Mac 删除当前目录下所有.DS_Store文件
- 批量解压当前目录下的zip文件_循环执行
- mac 查找当前目录下所有同一类型文件,并执行命令行
- [bash] 删除目录下可以执行文件
- 递归解压当前目录以及子目录下的所有压缩文件,并删除源文件
- linux 删除当前目录下的某一类型文件
- 删除目录下所有文件和子目录(不包括当前目录)