> 
> Hello
> I use freebsd4.9
> I have thousands of files in my any directory. and I need to copy them 
> to another directory. 
> but when I started to copy them I got error as below;
> /bin/cp: Argument list too long.


You didn't include the command you used, but I it was something
like:    cp * /otherdir/.

That '*' on there makes the shell feed it all the file names on
the command line.  eg, the globbing function adds in all the file
names before it is handed over to the cp command and since there are
huge numbers of files, it makes the command line too long.

> 
> Do I have to copy them in pieces ?

You can try that.

When I am too lazy or foggy to think up a find or script segment
I often do something like:
  cp a* /otherdir/.
  cp b* /otherdir/.
  etc,

But, it is possible for there to be too many files in some alphabet
clumps even for that.

A couple of other people have suggested pairing a find with the copy.
That is the officially good way to go, but find can seem tricky to use
at times.  

////jerry

> 
> What shall I do ?
> 
> Thanks 
> _______________________________________________
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 
> 

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to