I don't believe that its a limit of cp. Its a shell limitation where the buffer can only hold so many entries at any time, and 50000 is prolly well above that limit. At any rate, using the for loop should do the trick, assuming that these files aren't really huge (bigger than 2GB each).
--- Joel Hammer <[EMAIL PROTECTED]> wrote: > I don't know about the file number. You can find out yourself. > I also don't know which limit of cp you are referring to but, if cp > won't > work, this likely will (bash): > for i in "`dir -1 *`";do cp -a "$i" /newdirectory/"$i";done > Joel > On Thu, Dec 27, 2001 at 07:51:45PM +0800, Chang wrote: > > > > 1. is it possible to have 50000 files in a directory? > > 2. how to copy it given the limit of the cp command? ===== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lonni J. Friedman [EMAIL PROTECTED] Linux Step-by-step help: http://netllama.ipfox.com . __________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com _______________________________________________ Linux-users mailing list Archives, Digests, etc at http://linux.nf/mailman/listinfo/linux-users