This is a multi-part message in MIME format. ------=_NextPart_000_09F6_01C29F8D.678B9040 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello everyone! I need to copy, and occasionally move, some directories that contain = thousands of files, (like around 250,000 pdfs), and the problem I'm = having is that in the Bash shell, both cp and mv commands seem to die at = somewhere around 3,000 files, so that if I enter cp /mydir/myfiles/*.pdf /newdir/ I get the following error: bash: /bin/cp: Argument list too long. =20 I noticed that even just trying to list this many files can cause this = error, depending on the syntax used. "ls /mydir/myfiles/*.pdf" generates = the Argument list too long error, but "ls /mydir/myfiles" displays fine. I can get around it using a python script and more fiddling around than = I really want to do. I'd really like to be able to move these large = numbers of files around just through the shell. Is anyone aware of a separate file copying or moving (I need to do both, = depending on the situation) utility that can handle very large numbers = of files? Would switching to a different shell solve this (if so, which = one?), or is it a limit on the cp and mv commands? Thanks! Bill Earl Network Admin Spectrum Data Solutions, LLC www.bestbill.com ------=_NextPart_000_09F6_01C29F8D.678B9040 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello everyone!
 
I need to copy, and occasionally move, = some=20 directories that contain thousands of files, (like around 250,000 pdfs), = and the=20 problem I'm having is that in the Bash shell, both cp and mv commands = seem to=20 die at somewhere around 3,000 files, so that if I enter
 
cp /mydir/myfiles/*.pdf  = /newdir/
 
I get the following error:
 
bash: /bin/cp: Argument list too = long. =20
 
I noticed that even just trying to list = this many=20 files can cause this error, depending on the syntax used. "ls=20 /mydir/myfiles/*.pdf" generates the Argument list too long error, but = "ls=20 /mydir/myfiles" displays fine.
 
I can get around it using a python = script and more=20 fiddling around than I really want to do. I'd really like to be = able to=20 move these large numbers of files around just through the = shell.
 
Is anyone aware of a separate file = copying or=20 moving (I need to do both, depending on the situation) utility that can = handle=20 very large numbers of files?  Would switching to a different shell = solve=20 this (if so, which one?), or is it a limit on the cp and mv=20 commands?
 
Thanks!
 
Bill Earl
Network Admin
Spectrum = Data=20 Solutions, LLC
www.bestbill.com
= ------=_NextPart_000_09F6_01C29F8D.678B9040--