-bash: /bin/rm: Argument list too long :

来源:互联网 发布:软件企业评估减税 编辑:程序博客网 时间:2024/05/19 13:24

要删除的文件太多时,用下面的方法删除:
当前目录下,
find   ./   -name  company* |xargs   rm   -rf


如果是zip file 出现这个问题:
find  -iname 'test*' -print | xargs zip aa.zip

 

 

I have found the same problem with tar showing too long arguments than I break up the command into two which are as follows :

find . -type f -name "*.bas" > include-file
tar -cvf newfile.tar -I include-file

原创粉丝点击