Unix cp参数列表太长 [英] Unix cp argument list too long

查看:72
本文介绍了Unix cp参数列表太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AIX.

当我尝试使用以下命令将一个文件夹中的所有文件复制到另一个文件夹中时:

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

cp ./00012524/*.PDF ./dummy01

外壳抱怨:

ksh: /usr/bin/cp: 0403-027 The parameter list is too long.

如何处理?我的文件夹包含8xxxx文件,如何快速复制它们?每个文件的大小为4x kb到1xx kb.

How to deal with it? My folder contain 8xxxx files, how can I copy them very fast? each file have size of 4x kb to 1xx kb.

推荐答案

使用查找在* nix中的命令:

Use find command in *nix:

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

这篇关于Unix cp参数列表太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆