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

linux删除文件:rm -rf * 时 由于文件过多。造成报错

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

解决办法:10个10个的删

ls | xargs -n 10 rm -fr