linux 参数列表过大

ref: https://blog.csdn.net/weixin_39972777/article/details/111103053

在使用rm * 命令删除文件的时候, 会提示参数列表过大, 此时我们可以使用如下方法:

  1. 递归删除
    find [path] -name ["*"] -print0| xargs -0 rm -f

  2. 设置堆栈上限
    ulimit -s 显示当前堆栈大小
    getconf ARG_MAX 查看当前最大值
    ulimit -s [81920] 修改当前堆栈值
    再次运行删除

posted @ 2022-11-08 15:03  wioponsen  阅读(64)  评论(0编辑  收藏  举报