On 05. sep 2002 08:58, Robert Fox wrote:

> I just tried copying a large directory (the full RPMS from Cooker main)
> from one directory to another using the cp command.
> 
> I simply typed (as root):
> 
> cp /mnt/disk/cooker/Mandrake/RPMS/* .
> 
> and i got an error saying:
> 
> bash: /bin/cp: Argument list too long
> 
> Is there a limit set somewhere or is this a bug in cp?

sure, this is kernel limit. if you want increase this limit, check in
kernel sources: include/linux/binfmts.h and lines:

/*
 * MAX_ARG_PAGES defines the number of pages allocated for arguments
 * and envelope for the new program. 32 should suffice, this gives
 * a maximum env+arg of 128kB w/4KB pages!
 */
#define MAX_ARG_PAGES 32

and increase this value..

or, simply use find command, xargs or something else, which split argument
list to smaller..

-- 
Linux 2.4.19-3mdk 
Mandrake Linux release 9.0 (Cooker) for i586 
10:07am up 19 days, 16:19, 7 users, load average: 0.03, 0.05, 0.01 

Attachment: msg73739/pgp00000.pgp
Description: PGP signature

Reply via email to