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

前端 未结 27 2781
长情又很酷
长情又很酷 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:20

    The below option seems simple to this problem. I got this info from some other thread but it helped me.

    for file in /usr/op/data/Software/temp/application/openpages-storage/*; do
        cp "$file" /opt/sw/op-storage/
    done
    

    Just run the above one command and it will do the task.

提交回复
热议问题