Argument list too long error for rm, cp, mv commands

前端 未结 27 2457
长情又很酷
长情又很酷 2020-11-22 04:50

I have several hundred PDFs under a directory in UNIX. The names of the PDFs are really long (approx. 60 chars).

When I try to delete all PDFs together using the fol

27条回答
  •  感情败类
    2020-11-22 05:04

    Using GNU parallel (sudo apt install parallel) is super easy

    It runs the commands multithreaded where '{}' is the argument passed

    E.g.

    ls /tmp/myfiles* | parallel 'rm {}'

提交回复
热议问题