Unix cp argument list too long

后端 未结 6 939
情歌与酒
情歌与酒 2021-02-19 04:37

I am using AIX.

When I try to copy all the file in a folder to another folder with the following command:

cp ./00012524/*.PDF ./dummy01

The

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-19 04:40

    The cp command has a limitation of files which you can copy simultaneous.

    One possibility you can copy them using multiple times the cp command bases on your file patterns, like:

    cp ./00012524/A*.PDF ./dummy01
    cp ./00012524/B*.PDF ./dummy01
    cp ./00012524/C*.PDF ./dummy01
    ...
    cp ./00012524/*.PDF ./dummy01
    

    You can also copy trough find command:

    find ./00012524 -name "*.PDF" -exec cp {} ./dummy01/ \;
    

提交回复
热议问题