[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problem with cp (copy)

From: Mr. Phillip Kimble
Subject: RE: Problem with cp (copy)
Date: Thu, 30 Jan 2003 18:50:28 -0600

I have left the country for my new place in life.  I am not sure when I
will return.

-----Original Message-----
From: Bob Proulx [mailto:address@hidden 
Sent: Friday, January 24, 2003 12:12 AM
To: address@hidden
Cc: address@hidden
Subject: Re: Problem with cp (copy)

David T-G wrote:
> Alfred --
> ...and then Alfred M. Szmidt said...
> %
> % Please read the Coreutils FAQ, it describes your problem in detail
> % 
> % Argument list too long
> There's a very interesting wrinkle here, though...  As he has posted, 
> he actually has fewer files in the .05 directory than he has in the 
> .01 directory.

The arg max problem would be related to the size of the command line
which means that fewer files with longer names might overflow that limit
before more files with shorter names did.

> Oh, wait -- Phil, are all fo the files in these dirs of a standard 
> name format, or could they be anything?  More precisely, have [any of]

> the files in .05 longer names than in, say, .01?
>   echo 01.01.01/* | wc -c
>   echo 01.02.01/* | wc -c
>   echo 01.03.01/* | wc -c
>   echo 01.04.01/* | wc -c
>   echo 01.05.01/* | wc -c

That '*' is going to be trouble.  If there are too many files and it
overflows arg max then this will cause the error and the wc -c won't
return anything.

What you wanted is to see now many files and how long the files were in
the directory.

  ls 01.01.01 | wc -c
  ls 01.02.01 | wc -c
  ls 01.03.01 | wc -c
  ls 01.04.01 | wc -c
  ls 01.05.01 | wc -c

Since there is no command line expansion this avoids arg max entirely.

> There is the "too many things" kind of 'too long' and there's the "too

> many characters" kind of 'too long'; you may be hitting the *second* 
> one rather than the first.

Well, "Argument list too long" refers to the first type.  But of course
longer file names would push you over the limit with less of them.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]