linux删当前目录下的文件的命令是啥?

如题所述

删除当前目录下的文件

1.rm -f *

#最经典的方法,删除当前目录下的所有类型的文件

2.find . -type f -delete或find . -type f -exec rm -f {} \;

#用find命令查找普通文件并删除or用find命令的处理动作将其删除

3.find . -type f | xargs rm -f

#用于参数列表过长;要删除的文件太多

4.rm-f `find . -type f`

#删除全部普通文件

5.for delete in `ls -l`;do rm -f * ;done

#用for循环语句删除当前目录下的所有类型的文件

详细的命令介绍请查询“Linux命令大全"

温馨提示:答案为网友推荐,仅供参考
相似回答